/* ============================================================
   Ometz Admin — theme layer
   Re-skins the HLG admin component library (main/components/
   pages/mobile.css) in Ometz black + honey gold.
   ============================================================ */
:root {
  /* The HLG library keys everything off --green / --gold. Remap them. */
  --green: #17161B;          /* ink */
  --green-dark: #0B0A0D;
  --green-light: #2A2830;
  --green-pale: #FBF3DC;     /* honey wash */
  --green-tint: #FDF9EE;
  --gold: #D9A21B;           /* honey */
  --gold-light: #F0C14B;
  --gold-dark: #A9780A;

  --honey: #D9A21B;
  --honey-deep: #A9780A;
  --honey-wash: #FBF3DC;
  --ink: #17161B;
  --cream: #F7F1E3;

  --nav-h: 76px;
}

body { font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.page-head-text h1, .card-hd h3, .stat-value, .stat-num, .mod-tile-val, .modal-hd h3 {
  font-family: 'Cinzel', 'Cormorant Garamond', Georgia, serif;
  letter-spacing: .02em;
}
.page-head-text h1 { font-size: 26px; }

/* ── Top nav ─────────────────────────────────────────────── */
.topnav {
  height: var(--nav-h);
  background: linear-gradient(180deg, #1C1B21 0%, #0B0A0D 100%);
  border-bottom: 1px solid rgba(217,162,27,.35);
}
.om-brand {
  display: inline-flex; align-items: center; gap: 12px; cursor: pointer;
  color: #fff; text-decoration: none; flex-shrink: 0;
}
.om-brand img { width: 46px; height: 46px; object-fit: contain; display: block; }
.om-brand .om-word {
  font-family: 'Cinzel', Georgia, serif; font-weight: 700; font-size: 22px;
  letter-spacing: .18em; color: var(--gold-light); line-height: 1;
}
.om-brand .om-sub {
  display: block; font-family: 'Outfit', sans-serif; font-size: 9.5px; font-weight: 600;
  letter-spacing: .32em; color: rgba(255,255,255,.55); margin-top: 5px; text-transform: uppercase;
}
.topnav .topnav-avatar { background: var(--honey); color: var(--ink); font-weight: 700; }
.om-mode {
  font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(217,162,27,.5); color: var(--gold-light);
}
.om-mode.live { border-color: rgba(16,185,129,.55); color: #6ee7b7; }

.primary-nav { border-bottom: 1px solid #ece7da; }
.pn-item.is-active > .pn-top { color: var(--ink); background: var(--honey-wash); box-shadow: inset 0 -2px 0 var(--honey); }
.pn-top:hover { color: var(--ink); }
.pn-badge {
  display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--honey); color: var(--ink); font-size: 10.5px; font-weight: 700;
  align-items: center; justify-content: center; margin-left: 4px;
}
.main-wrap { background: #F6F4EF; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn-green { background: var(--ink); color: #fff; }
.btn-green:hover { background: #000; }
.btn-gold { background: var(--honey); color: var(--ink); font-weight: 600; }
.btn-gold:hover { background: var(--gold-light); }
.btn-outline:hover { border-color: var(--honey); color: var(--ink); }

/* ── Login ───────────────────────────────────────────────── */
.login-screen {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(217,162,27,.22), transparent 60%),
    linear-gradient(180deg, #141317, #070609);
}
.login-card {
  background: #fff; width: 100%; max-width: 420px; border-radius: 18px; padding: 34px 30px;
  display: flex; flex-direction: column; gap: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.login-card img { width: 96px; height: 96px; margin: 0 auto 4px; object-fit: contain; }
.login-card h2 { font-family: 'Cinzel', Georgia, serif; text-align: center; font-size: 26px; letter-spacing: .18em; }
.login-card .subtitle { text-align: center; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--honey-deep); font-weight: 700; }
.login-field { display: flex; flex-direction: column; gap: 4px; }
.login-field label { font-size: 12px; font-weight: 600; color: #374151; }
.login-field input { padding: 12px 14px; border: 1px solid #d4d4d4; border-radius: 10px; font-size: 15px; }
.login-field input:focus { outline: none; border-color: var(--honey); box-shadow: 0 0 0 3px rgba(217,162,27,.18); }
.login-btn { background: var(--ink); color: #fff; padding: 14px; border-radius: 10px; font-size: 15px; font-weight: 600; }
.login-btn:hover { background: #000; }
.login-alt { background: transparent; border: 1px solid var(--ink); color: var(--ink); padding: 11px; border-radius: 10px; font-size: 13px; font-weight: 600; }
.login-error { font-size: 12px; color: #c53030; min-height: 14px; }
.login-note { text-align: center; font-size: 11.5px; color: #6b7280; }
.login-link { text-align: center; font-size: 12px; color: #6b7280; cursor: pointer; }
.login-link:hover { color: var(--ink); text-decoration: underline; }

/* ── Data table ──────────────────────────────────────────── */
.om-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.om-table th {
  text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #8a8578; padding: 12px 14px; border-bottom: 1px solid #ece7da; background: #fcfbf8; white-space: nowrap;
}
.om-table td { padding: 13px 14px; border-bottom: 1px solid #f1ede4; vertical-align: middle; }
.om-table tr.clickable { cursor: pointer; }
.om-table tr.clickable:hover td { background: #fdf9ee; }
.om-table .muted { color: #8a8578; font-size: 12px; }
.om-table strong { font-weight: 600; }
.table-wrap { overflow-x: auto; }

.om-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.om-toolbar input[type=search], .om-toolbar select {
  padding: 9px 12px; border: 1px solid #e3ddcf; border-radius: 9px; font-size: 13px; background: #fff; min-width: 180px;
}
.om-toolbar input[type=search]:focus, .om-toolbar select:focus { outline: none; border-color: var(--honey); }
.om-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.om-chip {
  padding: 7px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid #e3ddcf;
  background: #fff; color: #57534a; cursor: pointer;
}
.om-chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.om-chip .n { opacity: .6; margin-left: 4px; }

/* ── KPI tiles ───────────────────────────────────────────── */
.om-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 22px; }
.om-kpi {
  background: #fff; border: 1px solid #ece7da; border-radius: 14px; padding: 18px 20px; position: relative; overflow: hidden;
}
.om-kpi::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--honey); }
.om-kpi.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.om-kpi.dark .om-kpi-lbl { color: rgba(255,255,255,.6); }
.om-kpi.dark .om-kpi-val { color: var(--gold-light); }
.om-kpi-lbl { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #8a8578; }
.om-kpi-val { font-family: 'Cinzel', Georgia, serif; font-size: 28px; font-weight: 700; margin-top: 6px; line-height: 1.1; }
.om-kpi-sub { font-size: 12px; color: #8a8578; margin-top: 4px; }
.om-kpi.dark .om-kpi-sub { color: rgba(255,255,255,.55); }

.om-grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
@media (max-width: 1000px) { .om-grid-2 { grid-template-columns: 1fr; } }

.om-list { list-style: none; margin: 0; padding: 0; }
.om-list li { display: flex; align-items: center; gap: 12px; padding: 12px 24px; border-bottom: 1px solid #f1ede4; cursor: pointer; }
.om-list li:last-child { border-bottom: none; }
.om-list li:hover { background: #fdf9ee; }
.om-list .t { font-weight: 600; font-size: 13.5px; }
.om-list .s { font-size: 12px; color: #8a8578; }
.om-list .r { margin-left: auto; text-align: right; flex-shrink: 0; }
.om-empty { padding: 28px 24px; text-align: center; color: #8a8578; font-size: 13px; }

/* ── Kanban (reuses the HLG pipeline structure) ──────────── */
.om-board { display: grid; gap: 14px; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); overflow-x: auto; padding-bottom: 6px; }
.om-col { background: #efebe2; border-radius: 14px; padding: 12px; min-height: 280px; display: flex; flex-direction: column; }
.om-col h4 {
  display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: #57534a; padding: 4px 6px 10px;
}
.om-col h4 .cnt { background: #fff; border-radius: 999px; padding: 2px 8px; font-size: 11px; color: var(--ink); }
.om-col .drop { flex: 1; display: flex; flex-direction: column; gap: 10px; border-radius: 10px; transition: background .15s, box-shadow .15s; min-height: 60px; }
.om-col .drop.over { background: var(--honey-wash); box-shadow: inset 0 0 0 2px var(--honey); }
.om-card {
  background: #fff; border-radius: 11px; padding: 12px 13px; border: 1px solid #e9e3d5; cursor: grab;
  box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: transform .12s, box-shadow .12s, opacity .12s;
}
.om-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-1px); }
.om-card.dragging { opacity: .35; }
.om-card .t { font-weight: 600; font-size: 13.5px; }
.om-card .s { font-size: 12px; color: #8a8578; margin-top: 2px; }
.om-card .row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 6px; }
.om-card .val { font-weight: 700; font-size: 12.5px; }
.om-progress { height: 6px; background: #efebe2; border-radius: 999px; overflow: hidden; margin-top: 10px; }
.om-progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--honey-deep), var(--honey)); border-radius: 999px; }

/* ── Badges ──────────────────────────────────────────────── */
.om-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.om-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.b-honey { background: #FBF0D0; color: #8A6106; }
.b-ink { background: #E9E7EE; color: #26242c; }
.b-green { background: #DCF5E7; color: #146C3F; }
.b-blue { background: #DDEBFD; color: #1D4ED8; }
.b-red { background: #FDE2E1; color: #B42318; }
.b-gray { background: #EFEDE8; color: #6B6659; }
.b-purple { background: #EEE4FD; color: #6D28D9; }
.b-orange { background: #FDEBD8; color: #B45309; }

/* ── Detail drawer / modal content ───────────────────────── */
.om-dl { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px 20px; margin-bottom: 18px; }
.om-dl .k { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8a8578; margin-bottom: 3px; }
.om-dl .v { font-size: 13.5px; word-break: break-word; }
.om-dl .full { grid-column: 1 / -1; }
.om-dl .v.pre { white-space: pre-wrap; background: #fcfbf8; border: 1px solid #f1ede4; border-radius: 9px; padding: 10px 12px; }
.om-form { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 14px; }
.om-form .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .om-dl, .om-form { grid-template-columns: 1fr; } }

.om-check { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #ece7da; font-size: 13px; }
.om-check input { width: 16px; height: 16px; accent-color: var(--ink); }
.om-check.done span { text-decoration: line-through; color: #8a8578; }

.om-banner {
  display: flex; gap: 12px; align-items: center; background: var(--ink); color: #fff; border-radius: 12px;
  padding: 12px 16px; margin-bottom: 18px; font-size: 13px;
}
.om-banner b { color: var(--gold-light); }

/* Package editor */
.om-pkg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.om-pkg { background: #fff; border: 1px solid #ece7da; border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.om-pkg.featured { border-color: var(--honey); box-shadow: 0 0 0 1px var(--honey); }
.om-pkg h3 { font-family: 'Cinzel', Georgia, serif; font-size: 20px; }
.om-pkg .price { font-family: 'Cinzel', Georgia, serif; font-size: 26px; font-weight: 700; }
.om-pkg .price small { font-family: 'Outfit', sans-serif; font-size: 13px; color: #8a8578; font-weight: 500; }
.om-pkg ul { list-style: none; padding: 0; margin: 0; font-size: 12.5px; color: #57534a; }
.om-pkg ul li { padding: 4px 0 4px 18px; position: relative; }
.om-pkg ul li::before { content: '⬡'; position: absolute; left: 0; color: var(--honey); font-size: 11px; top: 5px; }

@media (max-width: 720px) {
  :root { --nav-h: 64px; }
  .topnav { height: 64px; }
  .om-brand img { width: 38px; height: 38px; }
  .om-brand .om-word { font-size: 18px; }
  .om-brand .om-sub { display: none; }
  .om-mode, #topnavSite, #topnavUserName { display: none !important; }
  .topnav-left { gap: 10px; }
}
@media (max-width: 420px) { .om-brand .om-word { display: none; } }

/* Mobile drawer brand block */
.sidebar-brand { background: #0B0A0D !important; flex-direction: row !important; justify-content: flex-start !important; align-items: center !important; border-bottom: 1px solid rgba(217,162,27,.25) !important; }
.sidebar-brand img { width: 40px !important; height: 40px !important; margin: 0 !important; }
.sidebar-brand-sub { color: rgba(255,255,255,.55) !important; font-size: 9.5px !important; letter-spacing: .28em !important; }

/* Public live-demo chrome */
.om-demo-bar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 500;
  display: flex; align-items: center; gap: 14px; background: #0B0A0D; color: #fff; border: 1px solid rgba(217,162,27,.5);
  border-radius: 999px; padding: 8px 8px 8px 20px; box-shadow: 0 18px 50px rgba(0,0,0,.35); font-size: 13px; max-width: calc(100% - 24px);
}
.om-demo-bar b { color: var(--gold-light); }
.om-demo-x { color: rgba(255,255,255,.6); font-size: 20px; padding: 0 8px; line-height: 1; }
@media (max-width: 640px) { .om-demo-bar span { display: none; } .om-demo-bar { padding: 5px; bottom: 12px; gap: 4px; } .om-demo-bar .btn { padding: 9px 14px; } }
body.om-demo .main-wrap { padding-bottom: 90px; }

/* ── Mobile polish pass ─────────────────────────────────── */
@media (max-width: 760px) {
  .main-wrap { padding: 18px 14px 40px !important; }
  .page-head { align-items: flex-start; }
  .page-head-text h1 { font-size: 22px; }
  .page-head-actions { width: 100%; display: flex !important; flex-wrap: wrap; gap: 8px; align-items: center; }
  .page-head-actions .btn { flex: 0 0 auto !important; padding: 10px 16px; min-height: 42px; }
  .page-head-actions .btn-gold { margin-left: auto; }
  .page-head-actions .om-chips { flex: 0 0 auto; }
  .page-head-actions .om-chip { padding: 9px 14px; }

  .om-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .om-kpi { padding: 14px 14px; }
  .om-kpi-val { font-size: 22px; }
  .om-kpi-lbl { font-size: 9.5px; letter-spacing: .1em; }

  /* Tables become stacked cards */
  .om-table thead { display: none; }
  .om-table, .om-table tbody { display: block; width: 100%; }
  .om-table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 14px 16px; border-bottom: 1px solid #f1ede4; }
  .om-table td { display: block; padding: 0; border: 0; min-width: 0 !important; max-width: none !important; }
  .om-table td:first-child { flex: 1 1 100%; }
  .om-table td.muted { margin-left: auto; }
  .om-table td .om-progress { width: 120px; }
  .om-table tr.clickable:hover td { background: transparent; }

  /* Bottom-sheet modal footer: compact, primary on top */
  .modal-ft { display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; gap: 8px !important; }
  .modal-ft .btn { flex: 1 1 calc(50% - 4px) !important; min-height: 46px; height: auto !important; padding: 12px 14px !important; }
  .modal-ft .btn:last-child { flex-basis: 100% !important; order: -1; }
  .modal-ft .btn-ghost { flex-basis: 100% !important; order: 10; min-height: 34px; padding: 6px !important; }
  .modal-card { max-height: 92vh !important; }
  .om-dl { gap: 12px; }

  .om-board { grid-auto-columns: 82%; scroll-snap-type: x mandatory; }
  .om-col { scroll-snap-align: start; }
  .om-toolbar input[type=search], .om-toolbar select { min-width: 0; flex: 1 1 100%; margin-left: 0 !important; }
}
