/* Global Network Remote Access — portal styles. Brand: GDS "Phyllotaxis Globe" kit (navy, deep green, gold, ink). */
:root {
  --navy: #0A2A5E;
  --navy-2: #12397a;
  --royal: #1450C8;
  --sapphire: #1F6BFF;
  --teal: #00B3A6;
  --emerald: #008C4A;     /* brand "deep green": buttons, OK states */
  --emerald-2: #00733D;
  --lime: #3DDC84;
  --gold: #F2A900;
  --amber: #FFC629;
  --charcoal: #14181F;    /* brand "ink" */
  --bg: #f4f6f9;
  --panel: #ffffff;
  --muted: #5f6b7a;
  --line: #e1e5eb;
  --bad: #b42318;
  --warn: #a15c07;
  --radius: 8px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-size: 14px;
  color: var(--charcoal);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--navy-2); }
h1 { font-size: 21px; margin: 0 0 16px; color: var(--navy); }
h2 { font-size: 16px; margin: 0 0 12px; color: var(--navy); }
h3 { font-size: 14px; margin: 18px 0 8px; }
p { line-height: 1.5; }
code, .mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: 12.5px; }

/* top bar */
.topbar { display: flex; align-items: center; gap: 18px; padding: 0 24px 0 12px; height: 76px; background: #fff;
  border-bottom: 3px solid var(--gold); }
.topbar .logo { height: 72px; width: auto; display: block; } /* ≥180 px wide: brand minimum for the full logo */
.topbar .product { font-weight: 600; color: var(--navy); font-size: 15px; border-left: 1px solid var(--line); padding-left: 14px; }
.topbar nav { display: flex; gap: 2px; margin-left: 12px; }
.topbar nav a { color: var(--charcoal); padding: 8px 12px; border-radius: 6px; text-decoration: none; font-weight: 500; }
.topbar nav a:hover { background: var(--bg); }
.topbar nav a.active { background: var(--navy); color: #fff; }
.topbar .spacer { flex: 1; }
.topbar .who { color: var(--muted); text-align: right; line-height: 1.2; }
.topbar .who small { display: block; font-size: 11.5px; }

.announce { padding: 8px 24px; background: #e8eefb; color: var(--navy); border-bottom: 1px solid var(--line); }
.announce.warning { background: #fff4e0; color: var(--warn); }
.announce.outage { background: #fde8e7; color: var(--bad); }

main { width: 100%; max-width: 1180px; margin: 24px auto; padding: 0 24px; flex: 1; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.footer { padding: 14px 24px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); background: #fff;
  display: flex; gap: 16px; flex-wrap: wrap; }
.footer a { color: var(--muted); }

/* forms */
label { display: block; font-weight: 600; margin: 12px 0 5px; }
label .hint { font-weight: normal; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=date], input[type=tel], input[type=url], input[type=month], input[type=time], textarea, select {
  width: 100%; padding: 8px 10px; border: 1px solid #c9d0da; border-radius: 6px; font: inherit; background: #fff; color: inherit; }
input:focus, textarea:focus, select:focus { outline: 2px solid #b9c9ec; border-color: var(--navy-2); }
.check { display: flex; align-items: flex-start; gap: 8px; font-weight: normal; margin: 8px 0; }
.check input { margin-top: 3px; }
button, .btn { font: inherit; padding: 8px 14px; border-radius: 6px; border: 1px solid #c9d0da; background: #fff; color: var(--charcoal);
  cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-block; }
button:hover, .btn:hover { border-color: #8d99aa; }
button.primary, .btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
button.primary:hover { background: var(--navy-2); }
button.go { background: var(--emerald); border-color: var(--emerald); color: #fff; }
button.go:hover { background: var(--emerald-2); }
button.danger { color: var(--bad); }
button.small { padding: 4px 10px; font-size: 13px; }
button:disabled { opacity: .45; cursor: default; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.error { color: var(--bad); margin-top: 10px; min-height: 1em; }
.ok-msg { color: var(--emerald); margin-top: 10px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hidden { display: none !important; }

/* tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-weight: 600; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; }
tr:last-child td { border-bottom: none; }
td.actions { text-align: right; white-space: nowrap; }
td.actions button { margin-left: 4px; }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: #aab3c0; vertical-align: 1px; }
.dot.on { background: var(--emerald); box-shadow: 0 0 0 3px #cdeedb; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11.5px; background: #eef1f6; color: var(--muted); margin: 1px 2px 1px 0; }
.badge.navy { background: #e3e9f6; color: var(--navy); }
.badge.green { background: #e1f3e8; color: var(--emerald); }
.badge.gold { background: #f8efd9; color: #7c5a10; }
.badge.bad { background: #fde8e7; color: var(--bad); }

/* usage meters */
.meters { display: flex; gap: 18px; flex-wrap: wrap; }
.meter { flex: 1; min-width: 220px; }
.meter .num { font-size: 22px; font-weight: 600; color: var(--navy); }
.meter .bar { height: 8px; background: #e7ebf1; border-radius: 4px; overflow: hidden; margin-top: 6px; }
.meter .bar span { display: block; height: 100%; background: var(--emerald); }
.meter .bar span.full { background: var(--gold); }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button { border: none; border-bottom: 3px solid transparent; border-radius: 0; background: none; padding: 10px 14px; color: var(--muted); }
.tabs button.active { color: var(--navy); border-bottom-color: var(--gold); font-weight: 600; }

/* dialogs */
dialog { border: none; border-radius: 10px; padding: 22px; width: min(620px, 94vw); box-shadow: 0 20px 60px rgba(10, 42, 94, .3); }
dialog.wide { width: min(860px, 96vw); }
dialog::backdrop { background: rgba(10, 20, 40, .45); }
dialog .buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.checklist { max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; }
pre.cmd { background: #0d1b33; color: #dbe6ff; padding: 12px; border-radius: 6px; white-space: pre-wrap; word-break: break-all; font-size: 12px; }
.callout { background: #fff6dc; border-left: 4px solid var(--gold); padding: 10px 14px; border-radius: 4px; margin: 10px 0; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--charcoal); color: #fff;
  padding: 10px 16px; border-radius: 8px; z-index: 50; max-width: 80vw; box-shadow: 0 8px 30px rgba(0,0,0,.3); }

/* sign-in pages */
.auth-wrap { flex: 1; display: grid; place-items: center; padding: 30px 16px;
  background: linear-gradient(160deg, #eef2f9 0%, #ffffff 55%, #f6efe0 100%); }
.auth { width: 380px; max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px; box-shadow: 0 10px 40px rgba(10,42,94,.08); }
.auth .logo { width: 100%; max-width: 300px; display: block; margin: 0 auto 6px; }
.auth .product { text-align: center; color: var(--navy); font-weight: 600; font-size: 16px; margin-bottom: 18px; }
.auth button.primary, .auth button.sso { width: 100%; margin-top: 14px; padding: 10px; }
.auth button.sso { display: flex; align-items: center; justify-content: center; gap: 8px; }
.auth .or { text-align: center; color: var(--muted); margin: 16px 0 0; font-size: 12px; }
.auth .tagline { text-align: center; color: var(--muted); font-size: 11.5px; letter-spacing: 2px; margin-top: 22px; text-transform: uppercase; }
.secret { font-family: Consolas, monospace; font-size: 16px; letter-spacing: 2px; background: var(--bg); padding: 8px; border-radius: 6px; text-align: center; word-break: break-all; }
.qr { display: block; margin: 10px auto; image-rendering: pixelated; }

/* activity summary */
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 16px; }
.summary .stat { background: #fff; border: 1px solid var(--line, #e3e7ee); border-radius: 10px; padding: 12px 14px; border-top: 3px solid var(--gold); }
.summary .stat-value { font-size: 22px; font-weight: 700; color: var(--navy); }
.summary .stat-label { font-size: 13px; color: #4b5563; margin-top: 2px; }

/* Cluster: server bar, server list */
.serverbar { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line, #e3e7ee); border-left: 4px solid var(--gold, #F2A900);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.serverbar label { margin: 0; font-weight: 600; }
.serverbar select { max-width: 460px; margin: 0; }
.notice { background: #f8efd9; color: #5c430c; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.notice a { color: inherit; font-weight: 600; }
.capbar { height: 6px; background: #eef1f6; border-radius: 3px; overflow: hidden; margin-top: 5px; max-width: 160px; }
.capbar > span { display: block; height: 100%; background: var(--emerald, #1E8E5A); }
.capbar.warn > span { background: var(--gold, #F2A900); }
.capbar.full > span { background: var(--bad, #C0392B); }
pre.joblog { max-height: 360px; overflow: auto; background: #0e1420; color: #d7dde8; padding: 12px; border-radius: 8px; font-size: 12px; white-space: pre-wrap; word-break: break-word; }
.roles-grid { display: grid; grid-template-columns: 1fr 170px; gap: 6px 12px; align-items: center; }
.roles-grid select { margin: 0; }
.choice { border: 1px solid var(--line, #e3e7ee); border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
.choice h3 { margin-top: 0; }

/* Support tickets */
.navbadge { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 6px; border-radius: 9px; background: var(--gold, #F2A900);
  color: #1d1d1d; font-size: 11.5px; font-weight: 700; line-height: 18px; text-align: center; }
.topbar nav a.active .navbadge { background: #fff; color: var(--navy); }
tr.ticket-row { cursor: pointer; }
tr.ticket-row:hover td { background: #f6f8fb; }
tr.ticket-new td { background: #fff8e6; }
tr.ticket-new td:first-child { box-shadow: inset 4px 0 0 var(--gold, #F2A900); }
tr.ticket-unread td { font-weight: 600; }
.ticketgrid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 900px) { .ticketgrid { grid-template-columns: 1fr; } }
.thread { display: flex; flex-direction: column; gap: 12px; }
.msg { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fff; }
.msg.staff { background: #eef3fc; border-left: 4px solid var(--navy); }
.msg.internal { background: #fff6dc; border-left: 4px solid var(--gold, #F2A900); }
.msg.system { border: none; background: none; padding: 0 4px; color: var(--muted); font-size: 12px; text-align: center; }
.msg .meta { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.msg .meta b { color: var(--charcoal); font-size: 13.5px; }
.msg .body { white-space: pre-wrap; word-wrap: break-word; line-height: 1.5; }
.msg .files { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.msg .files a { font-size: 12.5px; }
.msg .files img { max-width: 220px; max-height: 150px; border: 1px solid var(--line); border-radius: 6px; display: block; }
.attachlist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.attachlist .badge button { border: none; background: none; padding: 0 0 0 4px; cursor: pointer; color: inherit; }
dl.ctx { display: grid; grid-template-columns: 110px 1fr; gap: 4px 10px; font-size: 12.5px; margin: 0; }
dl.ctx dt { color: var(--muted); }
dl.ctx dd { margin: 0; word-break: break-word; }
.side h3:first-child { margin-top: 0; }
.prio-urgent { background: #fde8e7; color: var(--bad); }
.prio-high { background: #f8efd9; color: #7c5a10; }

/* PC folders (locations) */
.pcgrid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: start; }
.pcgrid.nofolders { grid-template-columns: minmax(0, 1fr); }
.pcgrid.nofolders .foldertree { display: none; }
@media (max-width: 860px) { .pcgrid { grid-template-columns: 1fr; } }
.foldertree ul { list-style: none; margin: 0; padding: 0 0 0 14px; }
.foldertree > div > ul { padding-left: 0; }
.foldertree .fitem { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 7px; cursor: pointer; font-size: 14px; user-select: none; }
.foldertree .fitem:hover { background: #f1f4f9; }
.foldertree .fitem.active { background: var(--navy); color: #fff; }
.foldertree .fitem.active .fcount { color: #dfe6f3; }
.foldertree .fitem.droptarget { outline: 2px dashed var(--gold, #F2A900); background: #fff8e6; color: inherit; }
.foldertree .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foldertree .fcount { font-size: 12px; color: var(--muted); }
.foldertree .ftoggle { width: 14px; text-align: center; font-size: 10px; color: var(--muted); }
.foldertree .fitem.active .ftoggle { color: #dfe6f3; }
.foldertree .sep { border-top: 1px solid var(--line); margin: 6px 0; }
.crumbs { font-weight: 600; color: var(--navy); }
.crumbs a { color: var(--navy); }
.bulkbar { background: #eef3fc; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; gap: 10px; }
tr.dragging td { opacity: .5; }
tr[draggable="true"] { cursor: grab; }
.msg.assist { background: #f4f1ff; border-left: 4px solid #6b5bd6; }
.msg.assist .assist-sec { margin-top: 6px; line-height: 1.5; }
.msg.assist ol, .msg.assist ul { margin: 4px 0 0; padding-left: 22px; }
.msg.assist li { margin: 3px 0; }
.msg.assist details summary { cursor: pointer; font-weight: 600; }
.msg.assist .draft { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-top: 6px; }
.assist-line { color: #5a4fc0; margin-top: 2px; }

/* Agent updates (Client Admin) */
.update-panel { border-left: 4px solid var(--gold, #F2A900); }
.update-panel .notes { white-space: pre-wrap; background: #fffaf0; border: 1px solid #f1e2bd; border-radius: 8px; padding: 10px 12px; margin-top: 6px; font-size: 14px; }
.update-panel details summary { cursor: pointer; font-weight: 600; margin-top: 10px; }
tr.needs-update td { background: #fff8e6; }
tr.needs-update td:first-child { box-shadow: inset 4px 0 0 var(--gold, #F2A900); }
.bad-text { color: var(--bad); }

a.badge { text-decoration: none; }
.hl-ok { color: var(--emerald); } .hl-warning { color: #7c5a10; } .hl-problem { color: var(--bad); } .hl-info { color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.hgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
main.wide { max-width: none; }
table.usage th { vertical-align: bottom; }
table.usage td, table.usage th { white-space: nowrap; font-size: 13px; padding-left: 8px; padding-right: 8px; }
table.usage td.wrap { white-space: normal; }
table.usage th { white-space: normal; min-width: 60px; }
.about h3 { margin: 14px 0 6px; color: var(--navy); font-size: 14px; }
.aboutrow { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 13px; }

/* GDS Account */
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.app-tile { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; text-decoration: none; color: var(--charcoal); border-top: 4px solid var(--navy); min-height: 130px; }
.app-tile:hover { border-color: var(--navy-2); box-shadow: 0 2px 10px rgba(10, 42, 94, 0.12); }
.app-tile h3 { margin: 0; color: var(--navy); font-size: 16px; }
.app-tile .open { margin-top: auto; color: var(--emerald); font-weight: 600; font-size: 13px; }
.app-tile .lbl { font-size: 12px; color: var(--muted); }
.page { max-width: 1050px; width: 100%; margin: 0 auto; padding: 22px 24px; flex: 1; }
.auth .tabs { margin-bottom: 14px; }
.auth .tabs button { flex: 1; }
