/* ── Skolkollen Super Admin Portal — FVK family theme ───────── */
:root {
  --navy:       #15233e;   /* sidebar */
  --navy-2:     #1d2f4d;   /* sidebar hover */
  --navy-3:     #26395a;   /* sidebar toggle track */
  --ink:        #1e293b;   /* headings / body */
  --ink-soft:   #475569;
  --muted:      #64748b;
  --canvas:     #f6f4ee;   /* warm off-white page bg */
  --card:       #ffffff;
  --border:     #e8e4da;   /* warm card border */
  --line:       #eef0f3;
  --primary:    #1e3a5f;   /* navy button */
  --primary-d:  #16314f;
  --blue:       #2563eb;   /* active / links */
  --blue-soft:  #eaf1fe;
  --danger:     #dc2626;
  --danger-soft:#fdeaea;
  --green:      #16a34a;  --green-soft:  #dcfce7;
  --amber:      #d97706;  --amber-soft:  #fef3c7;
  --slate:      #64748b;  --slate-soft:  #eef1f5;
  --radius:     16px;
  --shadow:     0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.05);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--canvas);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
a { color: inherit; }

/* ── Family block logo ─────────────────────────────────────── */
.logo-mark {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5px;
  width: 30px; height: 30px; flex: none;
}
.logo-mark i { background: #fff; border-radius: 3px; }
.logo-mark i:nth-child(4) { background: var(--blue); }
.logo-mark i:nth-child(8) { background: var(--danger); }
.logo-mark--lg { width: 46px; height: 46px; gap: 4px; }
.logo-mark--ink i { background: var(--navy); }
.logo-mark--ink i:nth-child(4) { background: var(--blue); }
.logo-mark--ink i:nth-child(8) { background: var(--danger); }

/* ── App shell: sidebar + main ─────────────────────────────── */
#app { display: flex; min-height: 100vh; }

.sidebar {
  width: 248px; flex: none;
  background: var(--navy);
  color: #cdd6e6;
  display: flex; flex-direction: column;
  padding: 20px 16px;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 4px 6px 22px; }
.sidebar-brand .brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.sidebar-brand strong { color: #fff; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.sidebar-brand .brand-text span { color: #8595b3; font-size: 11.5px; font-weight: 500; }

.nav-label { color: #6b7b9c; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; padding: 0 8px 10px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  background: transparent; border: none; cursor: pointer;
  color: #c2cce0; font-family: inherit; font-size: 14.5px; font-weight: 600;
  padding: 11px 12px; border-radius: 11px;
  transition: background .12s, color .12s;
}
.nav-item svg { width: 19px; height: 19px; flex: none; opacity: .9; }
.nav-item:hover { background: var(--navy-2); color: #fff; }
.nav-item.active { background: #fff; color: var(--blue); }
.nav-item.active svg { color: var(--blue); opacity: 1; }
.nav-item .soon {
  margin-left: auto; font-size: 9.5px; font-weight: 700; letter-spacing: .04em;
  background: var(--navy-3); color: #9fb0d0; padding: 2px 6px; border-radius: 6px;
}
.nav-item.active .soon { background: var(--blue-soft); color: var(--blue); }

.sidebar-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 14px; padding-top: 18px; }
.lang-toggle { display: flex; background: var(--navy-3); border-radius: 10px; padding: 3px; }
.lang-toggle button {
  flex: 1; background: transparent; border: none; cursor: pointer;
  color: #9fb0d0; font-family: inherit; font-size: 13px; font-weight: 700;
  padding: 7px 0; border-radius: 8px; transition: background .12s, color .12s;
}
.lang-toggle button.active { background: #34486c; color: #fff; }

.user-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; }
.avatar {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  background: var(--navy-3); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.user-row .user-name { color: #e4e9f2; font-size: 13.5px; font-weight: 600; flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.signout { background: none; border: none; color: #8595b3; font-family: inherit;
  font-size: 12.5px; font-weight: 600; cursor: pointer; }
.signout:hover { color: #fff; }

/* ── Main area ─────────────────────────────────────────────── */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.view { max-width: 1080px; width: 100%; margin: 0 auto; padding: 34px 36px 20px; flex: 1; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.section-head h2 { font-size: 24px; font-weight: 800; margin: 0; color: var(--ink); letter-spacing: -.01em; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.loading { color: var(--muted); padding: 40px; grid-column: 1 / -1; text-align: center; }

/* ── Project card ──────────────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--shadow); transition: transform .1s, box-shadow .15s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(15,23,42,.06), 0 16px 40px rgba(15,23,42,.09); }
.card-head { display: flex; align-items: flex-start; gap: 13px; }
.card-icon {
  font-size: 22px; width: 46px; height: 46px; flex: none; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft, var(--slate-soft));
}
.card-title { flex: 1; min-width: 0; }
.card-title h3 { margin: 0; font-size: 17px; font-weight: 700; color: var(--ink); }
.card-title .slug { color: var(--muted); font-size: 12px; font-family: ui-monospace, monospace; }
.card-desc { color: var(--ink-soft); font-size: 13.5px; line-height: 1.5; margin: 0; min-height: 40px; }
.card-edit {
  border: none; background: transparent; color: var(--muted); cursor: pointer;
  font-size: 16px; padding: 2px 4px; border-radius: 8px; line-height: 1;
}
.card-edit:hover { color: var(--blue); background: var(--blue-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--slate-soft); color: var(--slate);
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.status-active   { background: var(--green-soft); color: var(--green); }
.chip.status-building { background: var(--amber-soft); color: var(--amber); }
.chip.status-paused   { background: var(--blue-soft);  color: var(--blue); }
.chip.status-archived { background: var(--slate-soft); color: var(--slate); }

.card-entity {
  display: flex; align-items: center; gap: 7px;
  color: var(--muted); font-size: 12px; font-weight: 500;
  padding-top: 2px; border-top: 1px solid var(--line);
}
.card-entity svg { width: 14px; height: 14px; flex: none; opacity: .7; }

.card-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.card-links a {
  font-size: 13px; font-weight: 600; text-decoration: none;
  padding: 7px 12px; border-radius: 9px; border: 1px solid var(--border);
  color: var(--ink); background: #fff; transition: background .12s, border-color .12s;
}
.card-links a:hover { background: var(--canvas); border-color: #d9d4c8; }
.card-links .slug { color: var(--muted); font-size: 12.5px; align-self: center; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn-primary, .btn-ghost, .btn-danger {
  font-family: inherit; font-size: 14px; font-weight: 600;
  border-radius: 10px; padding: 10px 18px; cursor: pointer; border: 1px solid transparent;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); }
.btn-ghost { background: #fff; color: var(--ink-soft); border-color: var(--border); }
.btn-ghost:hover { background: var(--canvas); }
.btn-danger { background: #fff; color: var(--danger); border-color: var(--danger-soft); }
.btn-danger:hover { background: var(--danger-soft); }

/* ── Empty / coming-soon views ─────────────────────────────── */
.placeholder {
  background: var(--card); border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 56px 32px; text-align: center; color: var(--muted);
}
.placeholder .ph-icon { font-size: 34px; }
.placeholder h3 { color: var(--ink); font-size: 19px; font-weight: 700; margin: 14px 0 8px; }
.placeholder p { max-width: 460px; margin: 0 auto; font-size: 14px; line-height: 1.6; }
.placeholder .ph-phase {
  display: inline-block; margin-bottom: 18px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .04em; color: var(--blue); background: var(--blue-soft);
  padding: 4px 11px; border-radius: 999px;
}

/* ── Login screen ──────────────────────────────────────────── */
.login-screen {
  position: fixed; inset: 0; background: var(--canvas);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100;
}
.login-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 22px;
  padding: 44px 38px; width: 100%; max-width: 380px; text-align: center; box-shadow: var(--shadow);
}
.login-card .logo-mark { margin: 0 auto; }
.login-card h1 { font-size: 26px; font-weight: 800; margin: 18px 0 2px; color: var(--ink); letter-spacing: -.02em; }
.login-card .tagline { color: var(--muted); margin: 0 0 28px; font-weight: 500; }
.btn-google {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; color: #1f2937; border: 1px solid var(--border); border-radius: 12px;
  padding: 13px 16px; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: box-shadow .15s, transform .08s;
}
.btn-google:hover { box-shadow: 0 6px 18px rgba(15,23,42,.1); transform: translateY(-1px); }
.login-error { color: var(--danger); margin-top: 16px; font-size: 14px; }

/* ── Modal ─────────────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.4); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 120;
}
.modal {
  background: var(--card); border-radius: 20px; padding: 28px;
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow);
}
.modal h3 { margin: 0 0 20px; font-size: 20px; font-weight: 800; color: var(--ink); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.form-grid label.full { grid-column: 1 / -1; }
.form-grid input, .form-grid select {
  font-family: inherit; font-size: 14px; color: var(--ink);
  background: #fff; border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px;
}
.form-grid input:focus, .form-grid select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.form-grid input[type="color"] { padding: 4px; height: 42px; }
.modal-actions { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.modal-actions .spacer { flex: 1; }

/* ── Project workspace ─────────────────────────────────────── */
#view-workspace { max-width: 1080px; width: 100%; margin: 0 auto; padding: 28px 36px 20px; flex: 1; }
.ws-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 8px; }
.ws-back { align-self: flex-start; background: none; border: none; color: var(--blue);
  font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 0; }
.ws-title { display: flex; align-items: center; gap: 13px; }
.ws-title h2 { margin: 0; font-size: 22px; font-weight: 800; }
.ws-title .slug { color: var(--muted); font-size: 12.5px; font-family: ui-monospace, monospace; }

.ws-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 16px 0 20px; }
.ws-tab { background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 14px; font-weight: 600; color: var(--muted); padding: 10px 14px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ws-tab:hover { color: var(--ink); }
.ws-tab.active { color: var(--blue); border-bottom-color: var(--blue); }

.ws-schools { display: grid; grid-template-columns: 260px 1fr; gap: 18px; }
.ws-master { display: flex; flex-direction: column; gap: 10px; }
.ws-search { font-family: inherit; font-size: 13.5px; background: #fff; color: var(--ink);
  border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; }
.ws-search:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.ws-list { display: flex; flex-direction: column; gap: 4px; }
.ws-list-item { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  background: #fff; border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
  padding: 11px 12px; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--ink); }
.ws-list-item:hover { background: var(--canvas); }
.ws-list-item.active { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-soft); }
.ws-li-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-li-meta { color: var(--muted); font-size: 12px; font-weight: 600; }
.ws-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ws-dot.green { background: var(--green); } .ws-dot.red { background: var(--danger); }

.ws-detail-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 18px; }
.ws-dh { display: flex; align-items: center; gap: 12px; }
.ws-dh h3 { margin: 0; font-size: 19px; font-weight: 800; flex: 1; }
.ws-id { color: var(--muted); font-size: 11.5px; font-family: ui-monospace, monospace;
  background: var(--slate-soft); padding: 3px 8px; border-radius: 6px; }
.ws-pill { font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; }
.ws-pill.active { background: var(--green-soft); color: var(--green); }
.ws-pill.trial { background: var(--amber-soft); color: var(--amber); }
.ws-pill.suspended { background: var(--danger-soft); color: var(--danger); }
.ws-pill.churned { background: var(--slate-soft); color: var(--slate); }

.ws-health-bar { height: 5px; border-radius: 999px; margin-bottom: 10px; }
.ws-health-bar.green { background: var(--green); }
.ws-health-bar.amber { background: var(--amber); }
.ws-health-bar.red { background: var(--danger); }
.ws-issue.red { background: var(--danger-soft); color: var(--danger); }
.ws-issue.amber { background: var(--amber-soft); color: var(--amber); }

.ws-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ws-section-h { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--muted);
  text-transform: uppercase; margin: 4px 0 10px; }
.ws-stats { display: flex; gap: 10px; margin-bottom: 16px; }
.ws-stat { flex: 1; background: var(--canvas); border-radius: 10px; padding: 10px; text-align: center; }
.ws-stat b { display: block; font-size: 19px; font-weight: 800; color: var(--ink); }
.ws-stat span { font-size: 11.5px; color: var(--muted); }
.ws-flags { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.ws-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-soft); }
.ws-fields { display: flex; flex-direction: column; gap: 8px; }
.ws-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.ws-field span { color: var(--muted); flex: none; }
.ws-field input { flex: 1; min-width: 0; text-align: right; font-family: inherit; font-size: 13px;
  color: var(--ink); background: #fff; border: 1px solid transparent; border-radius: 7px; padding: 5px 8px; }
.ws-field input:hover { border-color: var(--border); }
.ws-field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); text-align: left; }
.ws-field input.empty { background: var(--amber-soft); }
.ws-fees { background: var(--canvas); border-radius: 12px; padding: 16px; }
.ws-fee { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; padding: 5px 0; }
.ws-fee span { color: var(--ink-soft); } .ws-fee b { font-weight: 700; }
.ws-fee-in { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.ws-fee-in input { width: 78px; text-align: right; font-family: inherit; font-size: 13.5px; font-weight: 700;
  color: var(--ink); background: #fff; border: 1px solid var(--border); border-radius: 7px; padding: 4px 7px; }
.ws-fee-in input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.ws-status { font-family: inherit; font-size: 13px; font-weight: 600; color: var(--ink);
  background: #fff; border: 1px solid var(--border); border-radius: 9px; padding: 7px 10px; }
.ws-foot-seats input { width: 56px; font-family: inherit; font-size: 13px; color: var(--ink);
  background: #fff; border: 1px solid var(--border); border-radius: 7px; padding: 4px 7px; margin-left: 4px; }
.ws-save { font-size: 12.5px; font-weight: 700; color: var(--green); opacity: 0; transition: opacity .15s; }
.ws-save.show { opacity: 1; }
.ws-fee.total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; }
.ws-fee.total b { color: var(--blue); }
.ws-footer { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
.ws-foot-seats { font-size: 13px; color: var(--ink-soft); }
.ws-footer .spacer { flex: 1; }
.ws-empty { color: var(--muted); padding: 40px; text-align: center; }

@media (max-width: 760px) {
  #view-workspace { padding: 20px 16px; }
  .ws-schools { grid-template-columns: 1fr; }
  .ws-cols { grid-template-columns: 1fr; }
}

/* small action buttons reused by billing/admins */
.ic { background: none; border: none; cursor: pointer; font-size: 14px; color: var(--muted);
  padding: 4px 6px; border-radius: 7px; }
.ic:hover { background: var(--canvas); color: var(--ink); }
.ic.danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-mini { font-family: inherit; font-size: 12px; font-weight: 700; border: none; cursor: pointer;
  padding: 5px 9px; border-radius: 7px; }
.btn-mini.amber { background: var(--amber-soft); color: var(--amber); }
.btn-mini.green { background: var(--green-soft); color: var(--green); }
.ws-add { width: 100%; }

/* ── Overview tab ──────────────────────────────────────────── */
.ov-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.ov-stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; text-align: center; box-shadow: var(--shadow); }
.ov-stat b { display: block; font-size: 26px; font-weight: 800; color: var(--ink); }
.ov-stat span { font-size: 12.5px; color: var(--muted); }
.ov-note { color: var(--muted); font-size: 13px; margin-top: 16px; }

/* ── Billing tab ───────────────────────────────────────────── */
.bill-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.bill-toolbar select { font-family: inherit; font-size: 14px; background: #fff; color: var(--ink);
  border: 1px solid var(--border); border-radius: 9px; padding: 8px 11px; }
.bill-toolbar .spacer { flex: 1; }
.bill-scroll { overflow-x: auto; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); }
.bill-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bill-table th { text-align: left; color: var(--muted); font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: .04em; padding: 12px 10px; border-bottom: 1px solid var(--border); }
.bill-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.bill-table tr.paid { opacity: .7; }
.bill-table .num { text-align: right; } .bill-table .total { font-weight: 800; }
.bill-name { font-weight: 600; }
.bill-in { width: 72px; text-align: right; font-family: inherit; font-size: 13px; color: var(--ink);
  background: #fff; border: 1px solid transparent; border-radius: 6px; padding: 4px 6px; }
.bill-in:hover { border-color: var(--border); }
.bill-in:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-soft); }
.bill-in:disabled { background: transparent; color: var(--muted); }
.bill-actions { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.bill-table tfoot td { font-weight: 800; color: var(--ink); border-top: 2px solid var(--border); }

/* ── Admins tab ────────────────────────────────────────────── */
.adm-head h3 { margin: 0 0 4px; font-size: 18px; }
.adm-head p { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.adm-add { display: flex; gap: 8px; margin-bottom: 18px; }
.adm-add input { flex: 1; font-family: inherit; font-size: 14px; background: #fff; color: var(--ink);
  border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; }
.adm-list { display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.adm-row { display: flex; align-items: center; gap: 12px; background: var(--card);
  border: 1px solid var(--border); border-radius: 11px; padding: 12px 14px; }
.adm-shield { font-size: 16px; }
.adm-info { flex: 1; display: flex; flex-direction: column; }
.adm-info b { font-size: 14px; } .adm-info span { font-size: 12px; color: var(--muted); }

/* ── Settings modal ────────────────────────────────────────── */
.modal-wide { max-width: 680px; }
.set-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.set-head h3 { margin: 0; font-size: 19px; font-weight: 800; }
.set-body { display: grid; grid-template-columns: 170px 1fr; gap: 18px; min-height: 240px; }
.set-tabs { display: flex; flex-direction: column; gap: 3px; }
.stab { text-align: left; background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft); padding: 9px 11px; border-radius: 9px; }
.stab:hover { background: var(--canvas); }
.stab.active { background: var(--blue-soft); color: var(--blue); }
.set-pane { display: flex; flex-direction: column; gap: 14px; }
.set-f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.set-f input, .set-f select { font-family: inherit; font-size: 14px; color: var(--ink);
  background: #fff; border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; }
.set-check { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-soft); }
.set-hint { color: var(--muted); font-size: 12.5px; margin: 0; }
.set-add { display: flex; gap: 8px; }
.set-add input, .set-add select { font-family: inherit; font-size: 13.5px; background: #fff; color: var(--ink);
  border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; }
.set-add input { flex: 1; }
.set-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; max-height: 240px; overflow-y: auto; }
.set-row { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 8px 10px;
  background: var(--canvas); border-radius: 9px; }
.set-row > span:first-child { flex: 1; }
.set-row .mono { font-family: ui-monospace, monospace; }

/* ── Landing mini-cards (Monitoring / Deployment / Billing) ── */
.view-intro { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 22px; max-width: 640px; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.mini-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--border); border-radius: 13px; padding: 14px;
  box-shadow: var(--shadow); font-family: inherit; transition: transform .1s, box-shadow .15s; }
.mini-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(15,23,42,.1); }
.mini-icon { font-size: 20px; width: 40px; height: 40px; flex: none; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; }
.mini-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Knowledge agent ───────────────────────────────────────── */
#agent-fab { position: fixed; right: 22px; bottom: 22px; z-index: 200;
  width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--blue); color: #fff; font-size: 22px; box-shadow: 0 8px 24px rgba(37,99,235,.45); }
#agent-fab:hover { background: #1d4ed8; }
#agent-panel { position: fixed; right: 22px; bottom: 86px; z-index: 200;
  width: 360px; max-width: calc(100vw - 44px); height: 480px; max-height: calc(100vh - 120px);
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 20px 60px rgba(15,23,42,.25); display: flex; flex-direction: column; overflow: hidden; }
.agent-head { display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; background: var(--navy); color: #fff; font-weight: 700; font-size: 14px; }
.agent-head .ic { color: #cdd6e6; }
.agent-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.agent-bubble { max-width: 85%; font-size: 13.5px; line-height: 1.5; padding: 9px 12px; border-radius: 12px; white-space: pre-wrap; }
.agent-bubble.assistant { background: var(--canvas); color: var(--ink); align-self: flex-start; border-bottom-left-radius: 4px; }
.agent-bubble.user { background: var(--blue); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.agent-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.agent-input input { flex: 1; font-family: inherit; font-size: 14px; color: var(--ink);
  background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.agent-input input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.agent-input button { padding: 0 16px; }

.appfoot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 22px; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 760px) {
  #app { flex-direction: column; }
  .sidebar { width: auto; height: auto; position: relative; flex-direction: column; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-item { width: auto; }
  .nav-item .soon { display: none; }
  .sidebar-bottom { flex-direction: row; align-items: center; }
  .lang-toggle { width: 110px; }
  .view { padding: 24px 18px; }
  .form-grid { grid-template-columns: 1fr; }
}
