@import url("https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@500;600&display=swap");
/* SamaTop demo shell - mirrors the Prometheus ToP look (Times serif, gray navbar, gold accents) */
:root {
  --brand: #C98A1A; --brand-dark: #9A6610; --brand-light: #F5E6C8;
  --text: #1A1A1A; --text-muted: #6B6B6B; --border: #E0D5C5; --white: #FFFFFF;
  --danger: #C0392B; --success: #27AE60; --info: #2C6FA5;
  --shadow: 0 2px 12px rgba(0,0,0,.08); --shadow-lg: 0 8px 32px rgba(0,0,0,.12); --radius: 8px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: 'Times New Roman', Times, serif; color: var(--text); font-size: 14px; background: #fff; min-height: 100vh; padding-top: 60px; }
a { color: inherit; }

/* ---------- navbar ---------- */
.nb { position: fixed; top: 0; left: 0; right: 0; height: 60px; background: #d9dadb; border-bottom: 1px solid #dcdde1; box-shadow: 0 1px 3px rgba(0,0,0,.05); z-index: 1000; display: flex; align-items: center; gap: 12px; padding: 0 14px; }
.nb-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.nb-logo svg { width: 30px; height: 30px; color: #d97706; }
.nb-links { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.nb-dd { position: relative; }
.nb-dd > span { display: block; padding: 8px 12px; font-size: 16px; font-weight: 600; color: #374151; cursor: pointer; border-radius: 6px; user-select: none; }
.nb-dd > span::after { content: " \25BE"; font-size: 11px; color: #6b7280; }
.nb-dd:hover > span, .nb-dd.open > span, .nb-dd.active > span { background: rgba(255,255,255,.6); color: #9A6610; }
.nb-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 230px; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 1100; }
.nb-dd:hover .nb-menu, .nb-dd.open .nb-menu { display: block; }
.nb-menu a { display: block; padding: 8px 12px; font-size: 15px; color: #1f2937; text-decoration: none; border-radius: 6px; }
.nb-menu a:hover { background: var(--brand-light); color: var(--brand-dark); }
.nb-menu a.current { background: var(--brand-light); font-weight: 700; color: var(--brand-dark); }
.nb-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nb-role { background: #fff; border: 1px solid #d1d5db; border-radius: 8px; padding: 6px 10px; font-family: inherit; font-size: 14px; }
.nb-badge { font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; background: var(--brand); color: #fff; border-radius: 6px; padding: 4px 8px; font-weight: 700; }
.nb-burger { display: none; background: transparent; color: #d97706; border: 1px solid #d1d5db; border-radius: 4px; font-size: 20px; padding: 2px 10px; cursor: pointer; }
@media (max-width: 980px) {
  .nb-burger { display: block; }
  .nb-links { display: none; position: fixed; top: 60px; left: 0; right: 0; background: #d9dadb; flex-direction: column; align-items: stretch; margin: 0; padding: 8px; max-height: calc(100vh - 60px); overflow-y: auto; }
  .nb-links.show { display: flex; }
  .nb-menu { position: static; box-shadow: none; display: none; }
  .nb-dd.open .nb-menu { display: block; }
  .nb-dd:hover .nb-menu { display: none; }
  .nb-dd.open:hover .nb-menu { display: block; }
  .nb-badge { display: none; }
}

/* ---------- demo ribbon ---------- */
.demo-ribbon { margin: 10px 16px 0; background: #fff8e8; border: 1px dashed var(--brand); color: var(--brand-dark); border-radius: 10px; padding: 8px 14px; font-size: 13px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.demo-ribbon button { font-family: inherit; }

/* ---------- page layout ---------- */
.pg { padding: 0 16px 40px; max-width: 1500px; margin: 0 auto; }
.pg-head { margin-top: 14px; background: #fff; border: 1.5px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.pg-head-l { display: flex; align-items: center; gap: 14px; }
.pg-ico { width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: 0 4px 12px rgba(201,138,26,.3); }
.pg-title { font-size: 21px; font-weight: 700; color: var(--brand-dark); letter-spacing: .4px; }
.pg-sub { font-size: 13px; color: var(--text-muted); font-style: italic; }
.pg-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card { background: #fff; border: 1.5px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); margin-top: 14px; overflow: hidden; }
.card-h { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: #fff; padding: 10px 18px; font-weight: 700; letter-spacing: .5px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card-b { padding: 16px 18px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); } .g5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 900px) { .g3, .g4, .g5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .g2, .g3, .g4, .g5 { grid-template-columns: 1fr; } }

/* ---------- controls ---------- */
.btn { font-family: inherit; font-size: 13px; font-weight: 700; border: 1.5px solid var(--brand); background: var(--brand); color: #fff; border-radius: 8px; padding: 7px 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: .15s; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.ghost { background: #fff; color: var(--brand-dark); } .btn.ghost:hover { background: var(--brand-light); }
.btn.danger { background: var(--danger); border-color: var(--danger); } .btn.ok { background: var(--success); border-color: var(--success); }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.inp, .sel { font-family: inherit; font-size: 13px; padding: 7px 10px; border: 1.5px solid var(--border); border-radius: 8px; background: #fff; min-width: 120px; }
.inp:focus, .sel:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(201,138,26,.15); }
label.lbl { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.fld { display: flex; flex-direction: column; min-width: 160px; flex: 1; }
.chk { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 14px; }
.chk input { width: 17px; height: 17px; accent-color: var(--brand); }

/* ---------- tables ---------- */
.tbl-wrap { overflow: auto; max-height: 70vh; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th { position: sticky; top: 0; background: #faf4e8; color: var(--brand-dark); text-align: left; padding: 9px 12px; border-bottom: 2px solid var(--border); white-space: nowrap; font-size: 12px; letter-spacing: .6px; text-transform: uppercase; cursor: pointer; user-select: none; }
table.tbl td { padding: 8px 12px; border-bottom: 1px solid #f0e9da; white-space: nowrap; }
table.tbl tr:hover td { background: #fffaf0; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); background: #fffdf8; }
.tools .grow { flex: 1; }
.count { color: var(--text-muted); font-size: 12px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.Available, .pill.Approved, .pill.ok, .pill.Active { background: #e3f6ea; color: #1b7a3f; }
.pill.Reserved, .pill.Pending, .pill.warn { background: #fff1d6; color: #a76a00; }
.pill.Sold, .pill.Rejected, .pill.bad, .pill.Inactive, .pill.Blocked { background: #fbe3e0; color: #a8281c; }
.pill.info { background: #e1effa; color: #1f5f93; }

/* ---------- KPI ---------- */
.kpi { background: #fff; border: 1.5px solid var(--border); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .k-l { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .8px; font-weight: 700; }
.kpi .k-v { font-size: 26px; font-weight: 700; color: var(--brand-dark); margin-top: 4px; }
.kpi .k-n { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---------- bars ---------- */
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 70px; gap: 10px; align-items: center; font-size: 13px; }
.bar { height: 16px; background: #f3ecdc; border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-dark)); border-radius: 999px; }

/* ---------- modal & toast ---------- */
.mo { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 2000; display: none; align-items: center; justify-content: center; padding: 16px; }
.mo.open { display: flex; }
.mo-box { background: #fff; border-radius: 14px; width: 100%; max-width: 640px; max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); }
.mo-h { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: #fff; padding: 12px 18px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.mo-h button { background: none; border: 0; color: #fff; font-size: 20px; cursor: pointer; }
.mo-b { padding: 18px; } .mo-f { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: #1f2937; color: #fff; padding: 10px 18px; border-radius: 10px; z-index: 3000; opacity: 0; transition: .25s; pointer-events: none; font-size: 14px; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- landing tiles ---------- */
.tile { display: block; text-decoration: none; background: #fff; border: 1.5px solid var(--border); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); transition: .15s; }
.tile:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: var(--shadow-lg); }
.tile b { color: var(--brand-dark); font-size: 16px; display: block; } .tile small { color: var(--text-muted); font-size: 12.5px; line-height: 1.35; display: block; margin-top: 3px; }
.hero { background: #092857; color: #fff; border-radius: 16px; padding: 30px 32px; margin-top: 14px; box-shadow: var(--shadow-lg); }
.hero h1 { margin: 0 0 6px; font-size: 34px; letter-spacing: .5px; } .hero p { margin: 0 0 16px; font-size: 16px; max-width: 760px; opacity: .95; }
.hero .btn { background: #fcf6ed; color: #092857; border-color: #fcf6ed; }
.hero .btn:hover { background: #fff; color: #092857; }
.sec-t { font-size: 18px; font-weight: 700; color: var(--brand-dark); margin: 26px 0 8px; letter-spacing: .4px; }
.empty { text-align: center; color: var(--text-muted); padding: 34px 10px; font-style: italic; }
.mp-wrap { position: relative; display: inline-block; max-width: 100%; line-height: 0; }
.mp-wrap img { max-width: 100%; height: auto; display: block; border-radius: 8px; border: 1px solid var(--border); }
.pin { position: absolute; transform: translate(-50%, -100%); width: 30px; height: 30px; border-radius: 50% 50% 50% 0; rotate: -45deg; border: 3px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.35); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pin span { rotate: 45deg; color: #fff; font-size: 10px; font-weight: 700; line-height: 1; }
.pin.Available { background: #28a745; } .pin.Reserved { background: #e0a000; } .pin.Sold { background: #dc3545; } .pin.Blocked { background: #6c757d; }

/* ===== unified look: same page background + same grid style as the real Manage Inventory ===== */
body { background: #f4f6f9; }
.card, .kpi, .pg-head { border-color: #e3e7ec; }
table.tbl { border-collapse: separate; border-spacing: 0; }
table.tbl th { background: linear-gradient(180deg, #7e858d 0%, #6c757d 100%); color: #fff; text-align: center; text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 700; padding: 8px 8px; border-right: 1px solid rgba(255,255,255,.2); border-bottom: 2px solid #5a6268; }
table.tbl td { text-align: center; border-right: 1px solid #e0e0e0; border-bottom: 1px solid #e0e0e0; padding: 6px 8px; }
table.tbl tbody tr:nth-child(even) td { background: #f8f9fa; }
table.tbl tbody tr:hover td { background: #eaeaea; }
.tools { background: #f8f9fa; }
.tools .btn:not(.danger):not(.ok) { background: #6c757d; border-color: #6c757d; color: #fff; }
.tools .btn:not(.danger):not(.ok):hover { background: #5a6268; border-color: #5a6268; }

/* ===== Excel-style inventory grid ===== */
.xg-btn { font-family: inherit; font-size: 14px; font-weight: 700; color: #fff; background: #6c757d; border: 0; border-radius: 5px; padding: 8px 16px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: .2s; min-width: 80px; justify-content: center; }
.xg-btn:hover { background: #5a6268; transform: translateY(-1px); box-shadow: 0 2px 5px rgba(0,0,0,.2); }
.xg-btn.excel { background: #10793f; } .xg-btn.excel:hover { background: #0d6534; }
.xg-company { display: flex; align-items: center; gap: 8px; background: #f8f9fa; padding: 6px 12px; border: 1px solid #ddd; border-radius: 5px; font-size: 14px; }
.xg-company select { padding: 5px 10px; border: 1px solid #ccc; border-radius: 4px; background: #fff; font-family: inherit; font-size: 14px; }
.xg-card { background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.1); margin-top: 12px; overflow: hidden; display: flex; flex-direction: column; }
.xg-scroll { overflow: auto; max-height: 68vh; position: relative; }
table.xg { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.xg thead { position: sticky; top: 0; z-index: 10; }
table.xg th { background: linear-gradient(180deg, #7e858d 0%, #6c757d 100%); color: #fff; padding: 8px 6px; font-weight: 700; text-align: center; border-right: 1px solid rgba(255,255,255,.2); border-bottom: 2px solid #5a6268; white-space: nowrap; font-size: 12px; user-select: none; }
.xg-hc { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.xg-ht { flex: 1; min-width: 90px; cursor: pointer; font-size: 12px; } .xg-ht:hover { filter: brightness(1.15); }
.xg-sort { margin-left: 6px; font-size: 11px; opacity: .85; display: inline-block; min-width: 14px; }
.xg-fb { background: rgba(255,255,255,.2); border: 0; color: #fff; padding: 4px 6px; border-radius: 3px; cursor: pointer; font-size: 11px; } .xg-fb:hover { background: rgba(255,255,255,.35); } .xg-fb.on { background: #ffc107; color: #333; }
table.xg td { padding: 3px; border-right: 1px solid #e0e0e0; border-bottom: 1px solid #e0e0e0; min-width: 85px; max-width: 170px; position: relative; background: #fff; }
table.xg tbody tr:nth-child(even) td { background: #f8f9fa; } table.xg tbody tr:hover td { background: #eaeaea; }
.xg-c { outline: none; padding: 4px; border-radius: 3px; min-height: 22px; text-align: center; display: block; width: 100%; word-break: break-word; cursor: text; color: #444; }
.xg-c:focus { background: #fff; box-shadow: 0 0 0 2px #6c757d; position: relative; z-index: 2; }
.xg-c.ro { cursor: default; color: #777; }
.xg-sel { width: 100%; border: 0; background: transparent; font-family: inherit; font-size: 12px; cursor: pointer; outline: none; text-align: center; font-weight: 700; }
table.xg .xg-fix { position: sticky; left: 0; z-index: 5; box-shadow: 2px 0 4px rgba(0,0,0,.1); }
table.xg thead th.xg-fix { z-index: 15; }
table.xg td.xg-n { z-index: 6; }
table.xg th.xg-n, table.xg td.xg-n { min-width: 46px; max-width: 46px; width: 46px; color: #888; font-size: 12px; text-align: center; background: #f1f3f5 !important; }
.xg-foot { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-top: 1px solid #e0e0e0; background: #f8f9fa; font-size: 13px; flex-wrap: wrap; }
.xg-foot select { padding: 4px 8px; border: 1px solid #ccc; border-radius: 4px; font-family: inherit; }
.xg-menu { position: fixed; background: #fff; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,.25); min-width: 270px; z-index: 2500; }
.xg-mh { padding: 10px; background: #6c757d; color: #fff; border-radius: 8px 8px 0 0; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.xg-mh button { background: none; border: 0; color: #fff; font-size: 18px; cursor: pointer; }
.xg-mb { padding: 10px; max-height: 280px; overflow-y: auto; }
.xg-mb input[type=text], .xg-mb input[type=number] { width: 100%; padding: 5px; margin-bottom: 6px; border: 1px solid #ddd; border-radius: 4px; font-family: inherit; }
.xg-mb label { display: block; padding: 3px; cursor: pointer; font-size: 13px; }
.xg-ma { padding: 10px; border-top: 1px solid #eee; display: flex; gap: 6px; } .xg-ma button { flex: 1; }
.xg-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.xg-hint { font-size: 12px; color: #777; padding: 6px 14px; background: #fffdf5; border-top: 1px dashed #e9dfc7; }


/* ===== SAMA logo ===== */
.header-logo { height: 54px; width: auto; object-fit: contain; }

/* ===== SAMA brand lock-up (same as SAMA CRM) ===== */
.nb-logo { gap: 0; }
.nb-mark { height: 42px; width: auto; display: block; }
.nb-div { width: 2px; height: 38px; background: #E97B3C; margin: 0 14px; border-radius: 1px; display: block; }
.nb-top { font-family: "Barlow Semi Condensed", "Arial Narrow", sans-serif; font-weight: 700; font-size: 28px; line-height: 1; color: #092857; letter-spacing: 1px; }
