/* CSC Portal – admin control panel */
:root {
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --primary: #0f766e; --primary-600: #115e59; --primary-50: #f0fdfa; --secondary: #6366f1;
  --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --line: #e5e7eb; --bg: #f4f6fb; --surface: #fff; --surface-2: #f8fafc;
  --green: #059669; --green-bg: #d1fae5; --red: #dc2626; --red-bg: #fee2e2; --amber: #b45309; --amber-bg: #fef3c7; --blue: #2563eb; --blue-bg: #dbeafe;
  --side: #0b1120; --radius: 16px; --shadow: 0 1px 2px rgba(15,23,42,.04), 0 4px 16px -6px rgba(15,23,42,.08);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; } h3 { font-size: 1rem; } h4 { font-size: .9rem; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
.ic { width: 18px; height: 18px; flex-shrink: 0; }
.ic-lg { width: 36px; height: 36px; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; } .right { text-align: right; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
.pre { white-space: pre-wrap; word-wrap: break-word; }
.mt { margin-top: 22px; }
.text-red { color: var(--red); display: block; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.flex-gap { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.link { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; font-size: .85rem; color: var(--primary); cursor: pointer; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-weight: 600; font-size: .9rem; border-radius: 10px; border: 1px solid transparent; padding: 9px 16px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn .ic { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--surface); border-color: #fecaca; color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .82rem; border-radius: 8px; }
.btn-block { width: 100%; padding: 12px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; color: inherit; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.sm { width: 28px; height: 28px; font-size: .9rem; color: var(--muted); }

/* badges */
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-gray { background: #f1f5f9; color: var(--muted); }
.pill { font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #f1f5f9; color: var(--muted); }

/* layout */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 250px; background: var(--side); color: #cbd5e1; display: flex; flex-direction: column; z-index: 60; transition: transform .25s; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px; color: #fff; border-bottom: 1px solid rgba(148,163,184,.12); }
.side-brand strong { display: block; font-size: .95rem; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-brand small { color: #64748b; font-size: .72rem; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--primary), var(--secondary)); flex-shrink: 0; }
.brand-mark.big { width: 64px; height: 64px; border-radius: 18px; margin-bottom: 20px; }
.side-nav { flex: 1; padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.side-nav a, .side-foot a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: #94a3b8; font-weight: 500; font-size: .9rem; }
.side-nav a:hover, .side-foot a:hover { background: rgba(148,163,184,.1); color: #fff; }
.side-nav a.active { background: linear-gradient(135deg, rgba(15,118,110,.95), rgba(15,118,110,.6)); color: #fff; }
.side-nav span { flex: 1; }
.count { font-style: normal; font-size: .7rem; font-weight: 700; background: #ef4444; color: #fff; border-radius: 999px; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 6px; }
.side-foot { padding: 10px; border-top: 1px solid rgba(148,163,184,.12); }
.main { margin-left: 250px; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: rgba(244,246,251,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 1.3rem; margin: 0; flex: 1; }
.menu-btn { display: none; }
.who { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .88rem; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; display: grid; place-items: center; font-weight: 700; }
.content { padding: 24px 28px 60px; }
.main > .alert { margin: 16px 28px 0; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 22px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head.wrap { flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.card-head p { margin: 2px 0 0; }
.section-title { font-size: 1rem; padding-bottom: 10px; margin: 6px 0 16px; border-bottom: 1px solid var(--line); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; }
.grid-2 > .card, .grid-2-1 > .card { margin-bottom: 22px; }
.empty { color: var(--muted); text-align: center; padding: 26px 10px; margin: 0; }

/* alerts */
.alert { padding: 11px 16px; border-radius: 12px; margin-bottom: 16px; font-size: .9rem; border: 1px solid transparent; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

/* forms */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: .78rem; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.field input, .field select, .field textarea, .input, .inline-actions select, .rollback-form select {
  width: 100%; font: inherit; font-size: .9rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15,118,110,.14); }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: .9rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.span-2 { grid-column: span 2; }
.inline-form { display: flex; gap: 8px; }
.inline-form .input { flex: 1; }
.inline-actions, .rollback-form { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.inline-actions select, .rollback-form select { width: auto; padding: 5px 8px; font-size: .8rem; }

/* switch */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px; transition: background .2s; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px rgba(15,118,110,.3); }
.switch.sm { width: 34px; height: 20px; }
.switch.sm span::before { width: 14px; height: 14px; }
.switch.sm input:checked + span::before { transform: translateX(14px); }
.switch.busy { opacity: .5; pointer-events: none; }

/* kpis */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 22px; }
.kpi { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); color: var(--ink); transition: transform .15s; }
a.kpi:hover { transform: translateY(-2px); }
.kpi small { color: var(--muted); font-size: .78rem; display: block; }
.kpi strong { font-size: 1.6rem; line-height: 1.1; display: block; }
.kpi em { font-style: normal; color: var(--muted); font-size: .75rem; }
.kpi-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; }
.c1 { background: #eef2ff; color: #4f46e5; } .c2 { background: #ecfeff; color: #0891b2; } .c3 { background: #fef3c7; color: #b45309; } .c4 { background: #fce7f3; color: #db2777; } .c5 { background: #d1fae5; color: #059669; }

/* charts */
.legend { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); }
.lg { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.lg.v, .bar.v { background: linear-gradient(180deg, var(--primary), #818cf8); }
.lg.e, .bar.e { background: linear-gradient(180deg, #f59e0b, #fcd34d); }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 220px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; border-bottom: 1px solid var(--line); }
.bar { width: 42%; max-width: 16px; min-height: 2px; border-radius: 4px 4px 0 0; transition: height .4s; }
.bar-col small { font-size: .7rem; color: var(--muted); margin-top: 4px; }
.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: 60px 1fr 50px; align-items: center; gap: 10px; font-size: .82rem; }
.hbar div { background: #f1f5f9; border-radius: 6px; height: 10px; overflow: hidden; }
.hbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary)); border-radius: 6px; }
.hbar b { text-align: right; }
.rank { margin: 0; padding-left: 20px; }
.rank li { padding: 4px 0; }
.rank li span { display: inline-block; max-width: 80%; }
.rank b { float: right; }

/* lists */
.kv { list-style: none; padding: 0; margin: 0 0 12px; }
.kv li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .88rem; }
.kv li > span:first-child { color: var(--muted); }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list small { display: block; color: var(--muted); font-size: .8rem; }
.list .right small { margin-top: 4px; }

/* tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); padding: 10px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table td small { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.table tr:hover > td { background: #fafbff; }
.table.compact td, .table.compact th { padding: 8px 10px; }
.detail-row > td { background: var(--surface-2) !important; }
.detail { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; padding: 6px 0; }
.pager { display: flex; justify-content: center; gap: 4px; padding: 14px; }
.pager a, .pager span { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; font-weight: 600; font-size: .85rem; color: var(--ink-2); }
.pager a:hover { background: var(--surface-2); }
.pager a.active { background: var(--primary); color: #fff; }

.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: .88rem; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); }
.tabs a em { font-style: normal; color: var(--muted); margin-left: 4px; font-weight: 500; }
.tabs a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabs a.active em { color: #94a3b8; }
.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; padding: 16px 18px; }
.filters .field { margin: 0; min-width: 140px; }
.filters .grow { flex: 1; min-width: 220px; }
.filter-actions { display: flex; gap: 8px; }

/* services admin */
.page-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.page-card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: border-color .2s; }
.page-card.active { border-color: var(--primary); }
.page-card.off .pc-link { opacity: .5; }
.pc-link { display: block; padding: 16px 16px 12px; color: var(--ink); }
.pc-link strong { display: block; margin-top: 8px; }
.pc-link small { color: var(--muted); }
.pc-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); }
.pc-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--surface-2); border-top: 1px solid var(--line); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search-mini { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; color: var(--muted); }
.search-mini input { border: 0; outline: 0; font: inherit; font-size: .85rem; padding: 6px 0; width: 170px; }
.grp { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.grp summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; background: var(--surface-2); list-style: none; }
.grp summary::-webkit-details-marker { display: none; }
.grp summary::before { content: "▸"; color: var(--muted); transition: transform .2s; }
.grp[open] summary::before { transform: rotate(90deg); }
.grp-title { font-weight: 700; flex: 1; }
.grp-tools { display: flex; align-items: center; gap: 12px; }
.svc-rows { padding: 4px 0; }
.svc-row { display: grid; grid-template-columns: 150px 1fr 150px 30px 40px; align-items: center; gap: 12px; padding: 7px 14px; border-top: 1px solid #f1f5f9; font-size: .88rem; }
.svc-row code { font-size: .72rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-row .svc-fee { color: var(--muted); font-size: .8rem; }
.svc-row.off .svc-name { color: var(--muted); text-decoration: line-through; }

.dlg { border: 0; border-radius: 18px; padding: 24px; width: min(460px, 92vw); box-shadow: 0 30px 60px -20px rgba(15,23,42,.4); }
.dlg::backdrop { background: rgba(15,23,42,.5); }

/* chat console */
.chat-console { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 150px); min-height: 480px; }
.cc-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.cc-list-head { display: flex; justify-content: space-between; align-items: center; padding: 12px; border-bottom: 1px solid var(--line); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; font: inherit; font-size: .82rem; font-weight: 600; padding: 6px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.cc-sound { font-size: .78rem; color: var(--muted); display: flex; gap: 4px; align-items: center; }
.cc-sessions { overflow-y: auto; flex: 1; }
.cc-item { display: block; width: 100%; text-align: left; border: 0; background: none; font: inherit; padding: 12px 14px; border-bottom: 1px solid #f1f5f9; cursor: pointer; }
.cc-item:hover { background: var(--surface-2); }
.cc-item.active { background: var(--primary-50); }
.cc-item .row1 { display: flex; justify-content: space-between; gap: 8px; }
.cc-item strong { font-size: .9rem; }
.cc-item small { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.cc-item p { margin: 3px 0 0; font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-item .unread { background: #ef4444; color: #fff; font-size: .68rem; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.cc-thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.cc-empty { flex: 1; display: grid; place-content: center; text-align: center; color: var(--muted); }
.cc-empty .ic { margin: 0 auto 10px; opacity: .4; }
.cc-active { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.cc-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.cc-head > div:nth-child(2) { flex: 1; min-width: 0; }
.cc-head strong { display: block; }
.cc-head small { color: var(--muted); font-size: .8rem; }
.cc-actions { display: flex; gap: 6px; }
.cc-back { display: none; transform: rotate(180deg); }
.cc-messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.cm { max-width: 70%; padding: 9px 13px; border-radius: 14px; font-size: .88rem; white-space: pre-wrap; word-wrap: break-word; }
.cm time { display: block; font-size: .68rem; opacity: .6; margin-top: 3px; }
.cm-visitor { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.cm-admin { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.cm-system { align-self: center; color: var(--muted); font-size: .78rem; }
.cc-compose { display: flex; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); align-items: flex-end; }
.cc-compose textarea { flex: 1; font: inherit; font-size: .9rem; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; resize: none; outline: 0; }
.cc-compose textarea:focus { border-color: var(--primary); }

/* themes */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.theme-card { border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.theme-card.active { border-color: var(--green); }
.theme-preview { height: 130px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.theme-preview img { width: 100%; height: 100%; object-fit: cover; }
.swatches { display: flex; gap: 8px; }
.swatches i { width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,.15); border: 2px solid #fff; }
.theme-body { padding: 14px; }
.theme-body strong { display: block; }
.theme-body small { color: var(--muted); font-size: .78rem; display: block; margin-bottom: 8px; }

/* updates */
.version-hero { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.ver { font-size: 2.2rem; font-weight: 800; background: linear-gradient(120deg, var(--primary), var(--secondary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.release { border: 1px solid #c7d2fe; background: #f5f7ff; border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.notes { font-size: .88rem; margin: 10px 0; }
.steps-mini { font-size: .82rem; color: var(--ink-2); padding-left: 18px; margin: 10px 0 14px; }
pre.log { background: #0b1120; color: #cbd5e1; padding: 14px 16px; border-radius: 12px; font-size: .8rem; overflow: auto; max-height: 420px; margin: 0; white-space: pre-wrap; }

/* busy overlay */
.busy-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(15,23,42,.65); backdrop-filter: blur(4px); display: grid; place-content: center; text-align: center; color: #fff; padding: 20px; }
.spinner { width: 54px; height: 54px; border: 5px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; margin: 0 auto 18px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 10px; z-index: 210; font-size: .9rem; box-shadow: 0 10px 30px rgba(0,0,0,.25); }

/* login */
.login-page { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.login-art { background: radial-gradient(circle at 20% 20%, rgba(6,182,212,.35), transparent 50%), linear-gradient(135deg, #042f2e, #0f766e); color: #fff; display: grid; place-items: center; padding: 40px; }
.login-art > div { max-width: 380px; }
.login-art h2 { font-size: 2rem; }
.login-art p { color: #99f6e4; font-size: 1.05rem; }
.login-box { display: grid; place-items: center; padding: 30px 16px; }
.login-card { width: 100%; max-width: 400px; padding: 34px; }
.login-card h1 { font-size: 1.6rem; margin-bottom: 4px; }

/* responsive */
@media (max-width: 1200px) { .kpis { grid-template-columns: repeat(3, 1fr); } .page-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); }
  body.side-open .sidebar { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.4); }
  .main { margin-left: 0; }
  .menu-btn { display: inline-grid; }
  .grid-2, .grid-2-1, .detail { grid-template-columns: 1fr; }
  .chat-console { grid-template-columns: 1fr; }
  .chat-console.thread-open .cc-list { display: none; }
  .chat-console:not(.thread-open) .cc-thread { display: none; }
  .cc-back { display: inline-grid; }
  .login-page { grid-template-columns: 1fr; }
  .login-art { display: none; }
}
@media (max-width: 640px) {
  .content { padding: 16px; }
  .topbar { padding: 12px 16px; }
  .kpis, .page-cards, .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .svc-row { grid-template-columns: 1fr 30px 40px; }
  .svc-row code, .svc-row .svc-fee { display: none; }
  .who { display: none; }
  .cc-actions .btn { padding: 5px 8px; }
}

/* auth server additions */
.kpis-4 { grid-template-columns: repeat(4, 1fr); }
.mb { margin-bottom: 18px; }
.mt-s { margin-top: 8px; }
.nomb > * { margin-bottom: 0; }
.tabs.pad { padding: 12px 14px 0; }
.hbar.wide { grid-template-columns: 140px 1fr 60px; }
.hbar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card.highlight { border-color: #a7f3d0; background: #f0fdf4; }
textarea.input { resize: vertical; }
code { background: #eef2f7; padding: 1px 6px; border-radius: 6px; font-size: .85em; }
@media (max-width: 1200px) { .kpis-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .kpis-4 { grid-template-columns: 1fr; } }
