/* Time Champ Enterprise Platform - console layout on top of the shared Time Champ base styles */
:root {
  --navy: #0A1230; --navy-2: #121C45; --navy-3: #1C2A5E; --tc: #0030DB; --tc-2: #2B55E8; --cyan: #0EA5A4;
  --bar-h: 52px; --nav-w: 248px;
}
body { background: var(--bg); }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- global bar ---------- */
#gbar { position: sticky; top: 0; z-index: 40; height: var(--bar-h); background: var(--navy); color: #DCE3FF; display: flex; align-items: center; gap: 14px; padding: 0 14px 0 8px; box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.g-waffle, .g-btn { position: relative; width: 36px; height: 36px; border-radius: 8px; border: 0; background: transparent; color: #DCE3FF; display: grid; place-items: center; cursor: pointer; }
.g-waffle:hover, .g-btn:hover { background: rgba(255,255,255,.08); }
.g-btn em { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #E5484D; color: #fff; font: 700 10px/16px Inter, sans-serif; font-style: normal; }
.g-brand { display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; padding-right: 8px; }
.g-mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #2B55E8, #0030DB); display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; letter-spacing: -.02em; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.g-brand b { display: block; font-size: 14px; line-height: 1.1; }
.g-brand small { display: block; font-size: 11px; color: #9AA8E0; letter-spacing: .02em; }
.g-tenant { display: flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; color: #fff; white-space: nowrap; }
.g-tenant i { width: 8px; height: 8px; border-radius: 50%; background: #3DD68C; box-shadow: 0 0 0 3px rgba(61,214,140,.18); }
.g-tenant small { color: #9AA8E0; font-weight: 500; margin-left: 2px; }
.g-search { position: relative; flex: 1; max-width: 560px; margin-left: auto; }
.g-search > span { position: absolute; left: 10px; top: 9px; color: #8C9AD4; }
.g-search input { width: 100%; height: 36px; border-radius: 8px; border: 1px solid rgba(255,255,255,.12); background: var(--navy-2); color: #fff; padding: 0 12px 0 36px; font: inherit; font-size: 13px; }
.g-search input::placeholder { color: #8090C8; }
.g-search input:focus { outline: none; border-color: #4C6FFF; background: var(--navy-3); }
.g-res { position: absolute; top: 42px; left: 0; right: 0; background: #fff; color: var(--ink); border-radius: 10px; box-shadow: 0 18px 48px rgba(10,18,48,.28); max-height: 70vh; overflow: auto; }
.g-res:empty { display: none; }
.g-res a { display: flex; align-items: center; gap: 10px; padding: 8px 14px; color: var(--ink); text-decoration: none; font-size: 13px; }
.g-res a:hover { background: var(--tc-bg); }
.g-res a small { margin-left: auto; color: var(--ink-3); font-size: 11.5px; }
.g-rg { padding: 10px 14px 4px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; }
.g-user { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; color: #fff; cursor: pointer; padding: 4px 6px; border-radius: 8px; text-align: left; }
.g-user:hover { background: rgba(255,255,255,.08); }
.g-av { width: 30px; height: 30px; border-radius: 50%; background: #E8EDFD; color: var(--tc); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.g-un b { display: block; font-size: 12.5px; line-height: 1.15; }
.g-un small { display: block; font-size: 11px; color: #9AA8E0; }

/* ---------- console layout ---------- */
.ent { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); min-height: calc(100vh - var(--bar-h)); }
.ent-nav { background: #fff; border-right: 1px solid var(--line); position: sticky; top: var(--bar-h); height: calc(100vh - var(--bar-h)); overflow-y: auto; padding: 10px 10px 30px; }
.nav-g { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 16px 10px 6px; }
.nav-i { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 13.5px; font-weight: 500; }
.nav-i:hover { background: var(--panel-2); color: var(--ink); }
.nav-i.on { background: var(--tc-bg); color: var(--tc); font-weight: 650; }
.nav-suite { margin: 2px 0 6px; padding-left: 10px; border-left: 2px solid var(--c); margin-left: 10px; }
.nav-suite > span { display: block; font-size: 11.5px; font-weight: 650; color: var(--ink-2); padding: 4px 0 2px; }
.nav-a { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px; border-radius: 6px; font-size: 12.5px; color: var(--ink-2); text-decoration: none; }
.nav-a:hover { background: var(--panel-2); color: var(--ink); }
.nav-a.on { color: var(--tc); font-weight: 650; background: var(--tc-bg); }
.nav-a.locked { color: #B7BDCD; }
.nav-a em { font-style: normal; font-size: 10px; font-weight: 700; color: var(--warn); background: var(--warn-bg); border-radius: 10px; padding: 0 6px; }
#view { padding: 22px 28px 60px; min-width: 0; }
body.in-app #view { padding: 0; }
body.in-app .ent-nav { display: none; }
body.in-app .ent { grid-template-columns: minmax(0, 1fr); }
#menu-btn { display: none; }

/* ---------- page head ---------- */
.ph { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.ph h1 { font-size: 24px; letter-spacing: -.02em; }
.ph p { margin: 4px 0 0; color: var(--ink-2); max-width: 760px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--tc); margin-bottom: 4px; }
.sec { margin-top: 26px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-h h2 { font-size: 16px; }
.sec-h p { margin: 2px 0 0; color: var(--ink-3); font-size: 12.5px; }

/* ---------- app icons, chips, lists ---------- */
.app-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 12%, white); color: var(--c); flex: none; }
.app-ic .ic { width: 22px; height: 22px; }
.app-ic.sm { width: 30px; height: 30px; border-radius: 8px; } .app-ic.sm .ic { width: 17px; height: 17px; }
.app-ic.xs { width: 22px; height: 22px; border-radius: 6px; } .app-ic.xs .ic { width: 13px; height: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 20px; padding: 3px 10px; font-size: 12px; background: var(--panel); color: var(--ink-2); text-decoration: none; }
a.chip:hover { border-color: var(--tc); color: var(--tc); }
.chip .ic { width: 14px; height: 14px; }
.chip b { font-size: 10px; text-transform: uppercase; color: var(--tc); }
.app-list { display: flex; flex-direction: column; gap: 4px; }
.app-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 13px; }
.app-row:hover { background: var(--panel-2); }
.app-row .pill { margin-left: auto; }
.lnk { color: var(--tc); text-decoration: none; font-weight: 550; }
.lnk:hover { text-decoration: underline; }
.kpis3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 4px; }
.mk { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel-2); }
.mk b { display: block; font-size: 18px; letter-spacing: -.01em; }
.mk span { font-size: 11.5px; color: var(--ink-3); }
.sm { font-size: 11.5px; }
.dr-body h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 18px 0 8px; }
.dr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn .ic { width: 15px; height: 15px; margin-right: 4px; vertical-align: -3px; }
.tbl-tools { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.tbl th { cursor: pointer; }

/* launcher, roles, notifications */
.launch { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.la { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-decoration: none; color: var(--ink); background: var(--panel); }
.la:hover { border-color: var(--tc); box-shadow: 0 4px 16px rgba(0,48,219,.08); }
.la b { font-size: 13px; } .la small { font-size: 11px; color: var(--ink-3); }
.la.locked { opacity: .45; }
.role-list { display: flex; flex-direction: column; gap: 6px; }
.role { text-align: left; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 10px 12px; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font: inherit; }
.role b { font-size: 13.5px; } .role span { grid-column: 1; font-size: 12px; color: var(--ink-3); } .role em { grid-row: 1 / 3; grid-column: 2; align-self: center; font-style: normal; font-size: 11.5px; color: var(--ink-2); }
.role.on { border-color: var(--tc); background: var(--tc-bg); }
.note { border-left: 3px solid var(--line-2); padding: 8px 12px; margin-bottom: 10px; background: var(--panel-2); border-radius: 0 8px 8px 0; }
.note.critical { border-color: #D92D20; } .note.warning { border-color: #E8A317; } .note.info { border-color: var(--tc-2); }
.note small { font-size: 11px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.note p { margin: 2px 0 8px; font-size: 13px; }

/* ---------- app frame ---------- */
.appbar { position: sticky; top: var(--bar-h); z-index: 20; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; background: #fff; border-bottom: 1px solid var(--line); }
.ab-back { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-2); }
.ab-back:hover { background: var(--panel-2); }
.ab-t small { display: block; font-size: 10.5px; color: var(--ink-3); line-height: 1.1; }
.ab-t b { font-size: 14px; }
.ab-peers { display: flex; gap: 2px; margin-left: 14px; flex: 1; overflow-x: auto; }
.ab-peers a { padding: 6px 10px; border-radius: 7px; font-size: 12.5px; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.ab-peers a:hover { background: var(--panel-2); }
.ab-peers a.on { background: var(--tc-bg); color: var(--tc); font-weight: 650; }
.ab-meta { display: flex; gap: 6px; }
.grow { flex: 1; }
.appframe { display: block; width: 100%; height: calc(100vh - var(--bar-h) - 48px); border: 0; background: #fff; }
.frame-note { background: var(--info-bg); color: var(--info); font-size: 12.5px; padding: 6px 16px; }
.frame-msg { max-width: 640px; margin: 60px auto; text-align: center; padding: 0 20px; }
.frame-msg h2 { font-size: 20px; margin-bottom: 8px; }
.frame-msg p { color: var(--ink-2); }

@media (max-width: 1100px) { .g-un, .g-tenant small { display: none; } }
@media (max-width: 860px) {
  .ent { grid-template-columns: minmax(0, 1fr); }
  .ent-nav { position: fixed; left: 0; top: var(--bar-h); z-index: 30; transform: translateX(-100%); transition: transform .2s; width: var(--nav-w); box-shadow: 0 10px 40px rgba(0,0,0,.2); }
  body.nav-open .ent-nav { transform: none; }
  #menu-btn { display: grid; }
  .g-brand small, .g-tenant, .ab-peers, .ab-meta { display: none; }
  #view { padding: 16px; }
  .kpis3 { grid-template-columns: minmax(0, 1fr); }
  .seg { flex-wrap: wrap; }
}
@media (max-width: 560px) { .g-search { display: none; } .g-brand span:last-child { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
