/* NEPTUNE Licence Manager v1.0.0 - BY NEPTUNE UAE
   Flat colours only (no gradients). Tiles are grey grades by tier with the 3D look from bevel and shading;
   colour is kept for indicators (green / amber / red). */
:root {
  --ink: #0B1D4D; --ink-2: #13306B; --accent: #1C7ED6; --accent-deep: #155FA5;
  --bg: #EEF1F5; --card: #FFFFFF; --line: #DDE2EA; --text: #16202E; --muted: #5D6A7E; --faint: #98A2B3;
  --ok: #1F8A55; --ok-soft: #E3F3EA; --warn: #A86608; --warn-soft: #FCF0DC; --danger: #C2362B; --danger-soft: #FBE7E4; --info: #1D6FB8; --info-soft: #E3EEF8;
  --pt: #5B6472; --pt-hi: #737C8A; --pt-lo: #444C58;     /* first tier: darkest grey */
  --au: #8A929E; --au-hi: #A1A8B3; --au-lo: #707884;     /* second tier */
  --ag: #C3C8CF; --ag-hi: #D6DADF; --ag-lo: #A9AFB8;     /* third tier: lightest grey */
  --r: 8px; --r-lg: 12px;
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-size: 14.5px; line-height: 1.5; }
a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { margin: 0; line-height: 1.25; }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 13px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.block { display: block; }
.nowrap { white-space: nowrap; }
.break { word-break: break-all; }
.num { text-align: right; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: var(--r); z-index: 99; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid #8CC8FF; outline-offset: 2px; }

/* frame */
.app { display: flex; min-height: 100vh; }
.side { width: 236px; flex: none; background: var(--ink); color: #DCE6F5; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px; color: #fff; text-decoration: none !important; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand img { width: 40px; height: 40px; background: var(--ink-2); border-radius: 10px; padding: 3px; }
.brand b { display: block; font-size: 15px; }
.brand small { color: #8CA6CC; font-size: 11.5px; letter-spacing: .08em; }
.side nav { padding: 10px 8px; overflow-y: auto; flex: 1; }
.nav-group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #7F95B8; padding: 14px 10px 6px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r); color: #DCE6F5; text-decoration: none; }
.side nav a i { width: 18px; text-align: center; color: #8CC8FF; }
.side nav a:hover { background: var(--ink-2); }
.side nav a.is-on { background: var(--ink-2); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.count { margin-left: auto; background: var(--warn); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 8px; }
.side-sign { padding: 12px 16px; font-size: 11px; color: #7F95B8; border-top: 1px solid rgba(255,255,255,.08); }
.side-sign a { color: #8CC8FF; }
.shell { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 14px; padding: 10px 24px; background: var(--card); border-bottom: 1px solid var(--line); }
.top-title { font-weight: 600; }
.who { margin-left: auto; color: var(--muted); }
.who small { color: var(--faint); }
.top form { margin: 0; }
.menu-btn { display: none; }
.content { padding: 22px 24px 40px; flex: 1; }
.foot { padding: 14px 24px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); background: var(--card); }

/* page head */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-title { display: flex; gap: 12px; align-items: flex-start; }
.page-title h1 { font-size: 22px; }
.page-title p { margin: 4px 0 0; color: var(--muted); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); color: var(--text); }

/* buttons, forms */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r); border: 1px solid var(--accent-deep); background: var(--accent); color: #fff; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none !important; }
.btn:hover { background: var(--accent-deep); }
.btn-ghost { background: var(--card); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: #F4F6F9; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.icon-btn { background: none; border: 0; font-size: 18px; cursor: pointer; color: var(--text); }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; }
.field > span { color: var(--muted); font-weight: 500; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; color: var(--text); width: 100%; }
textarea { resize: vertical; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.error { color: var(--danger); }
.hint { color: var(--faint); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13.5px; }
.check input { width: auto; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 14px; margin-top: 10px; }
.key-box { font-size: 12px; word-break: break-all; background: #F7F8FA; }
details summary { cursor: pointer; color: var(--accent-deep); margin: 10px 0; }
.inline { display: inline; margin-left: 8px; }

/* cards, grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 15.5px; display: flex; gap: 8px; align-items: center; }
.card-head h2 i { color: var(--muted); }
.pad { padding: 16px 18px; }
.pad-h { padding: 16px 18px 0; font-size: 15px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; }
.grid-2 > .card { margin-bottom: 18px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.act-list { list-style: none; margin: 0; padding: 6px 18px 12px; }
.act-list li { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.act-list li:last-child { border-bottom: 0; }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.empty i { font-size: 28px; color: var(--faint); display: block; width: auto; margin: 0 auto 8px; }
.empty b { display: block; color: var(--text); }

/* notices and badges: colour = indicator */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--r); margin-bottom: 14px; border: 1px solid transparent; }
.notice-ok { background: var(--ok-soft); color: #145C39; border-color: #BFE3CF; }
.notice-error { background: var(--danger-soft); color: #8E241B; border-color: #F2C3BD; }
.notice-info { background: var(--info-soft); color: #134C80; border-color: #C3D9EF; }
.notice-warn { background: var(--warn-soft); color: #7A4A05; border-color: #F2D9A8; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid var(--line); background: #F4F6F9; color: var(--muted); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: #BFE3CF; }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: #F2D9A8; }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: #F2C3BD; }
.badge-info { background: var(--info-soft); color: var(--info); border-color: #C3D9EF; }
.ind-red-ic { color: var(--danger); }

/* tables and filters */
.table-card { overflow: hidden; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { font-size: 12.5px; color: var(--muted); font-weight: 600; background: #F7F8FA; }
.table th.num, .table td.num { text-align: right; }
.table tr.is-muted td { color: var(--faint); }
.th-sort { color: inherit; text-decoration: none !important; display: inline-flex; gap: 6px; align-items: center; }
.th-sort i { color: var(--faint); font-size: 11px; }
.th-sort.is-on i { color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; margin-bottom: 14px; }
.filters .field { min-width: 170px; flex: 1 1 170px; max-width: 280px; }
.filter-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: flex-end; color: var(--muted); font-size: 13px; }

/* dashboard tiers and tiles: flat grey grades, bevel and shading for depth */
.tier-board { margin-bottom: 18px; }
.tier-section { margin-bottom: 16px; }
.tier-head { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 8px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.tile { position: relative; display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r-lg); color: #fff; text-decoration: none !important;
  border: 1px solid; transition: transform .12s, box-shadow .12s; }
.tile:hover { transform: translateY(-1px); }
.tile:active { transform: translateY(1px); }
.tier-platinum { background: var(--pt); border-color: var(--pt-hi) var(--pt-lo) var(--pt-lo) var(--pt-hi); box-shadow: inset 1px 1px 0 var(--pt-hi), inset -1px -1px 0 var(--pt-lo), 0 2px 4px rgba(20,28,40,.18); }
.tier-gold { background: var(--au); border-color: var(--au-hi) var(--au-lo) var(--au-lo) var(--au-hi); box-shadow: inset 1px 1px 0 var(--au-hi), inset -1px -1px 0 var(--au-lo), 0 2px 4px rgba(20,28,40,.15); }
.tier-silver { background: var(--ag); color: #1E2633; border-color: var(--ag-hi) var(--ag-lo) var(--ag-lo) var(--ag-hi); box-shadow: inset 1px 1px 0 var(--ag-hi), inset -1px -1px 0 var(--ag-lo), 0 2px 4px rgba(20,28,40,.12); }
.tile-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(0,0,0,.14); box-shadow: inset 1px 1px 0 rgba(0,0,0,.18), inset -1px -1px 0 rgba(255,255,255,.12); font-size: 17px; }
.tile-body { display: flex; flex-direction: column; min-width: 0; }
.tile-num { font-size: 24px; line-height: 1.1; }
.tile-label { font-size: 13px; opacity: .92; }
.tile small { font-size: 11.5px; opacity: .8; }
.ind { position: absolute; top: 10px; right: 10px; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.65); }
.ind-green { background: #2FB36F; }
.ind-amber { background: #F2A541; }
.ind-red { background: #E5483B; }

/* sign-in and installer */
.center-page { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.login { width: 100%; max-width: 400px; padding: 24px; }
.install { width: 100%; max-width: 820px; padding: 26px; }
.install h2 { font-size: 15px; margin: 20px 0 10px; }
.install-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.install-head img { width: 54px; height: 54px; background: var(--ink); border-radius: 12px; padding: 4px; }
.install-head h1 { font-size: 20px; }
.install-head p { margin: 2px 0 0; color: var(--muted); }
.login .field, .install .field { margin-bottom: 12px; }
.narrow { max-width: 520px; }

/* phones: only what is needed to follow up and act - no tables of extra columns, no secondary panels */
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .side { position: fixed; left: -260px; z-index: 50; transition: left .2s; }
  body.side-open .side { left: 0; box-shadow: 0 0 0 100vmax rgba(10,16,28,.4); }
  .menu-btn { display: inline-block; }
  .top { padding: 10px 14px; }
  .top-title, .who small { display: none; }
  .content { padding: 16px 12px 30px; }
  .hide-sm { display: none !important; }
  /* phone: no summary tiles - only the lists to act on (requests waiting, licences ending) */
  .tier-board { display: none; }
  .filters .field { max-width: none; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
}
