/* EduCreative NxT portal: shared styles for the sign-in page and the app. No external assets. */
:root {
  --navy-950: #061231;
  --navy-900: #0b1f4b;
  --navy-800: #13306b;
  --navy-700: #1e3f86;
  --violet-600: #5b3fe0;
  --violet-500: #6d4aff;
  --violet-100: #ede9fe;
  --violet-50: #f5f3ff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #5b6478;
  --line: #e3e8f1;
  --line-2: #d3dae6;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --green: #15803d;
  --green-bg: #dcfce7;
  --amber: #92400e;
  --amber-bg: #fef3c7;
  --red: #b91c1c;
  --red-bg: #fee2e2;
  --blue: #1d4ed8;
  --blue-bg: #dbeafe;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 20px rgba(15, 23, 42, .05);
  --focus: 0 0 0 3px rgba(109, 74, 255, .35);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; display: block; }
a { color: var(--violet-600); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; color: var(--ink); }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- form controls ---------- */
label, .label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 0 6px; }
.field { margin-bottom: 16px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=search],
select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 10px 12px; min-height: 42px; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet-500); box-shadow: var(--focus); }
input[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--red); }
input[readonly] { background: var(--bg); color: var(--muted); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); margin: 6px 0; }
.check input { width: 18px; height: 18px; accent-color: var(--violet-500); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 76px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent;
  color: var(--violet-600); font: 600 13px var(--font); padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.pw-toggle:hover { background: var(--violet-50); }
.field-error { color: var(--red); font-size: 12.5px; margin-top: 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2);
  background: #fff; color: var(--ink); border-radius: var(--radius-sm); padding: 9px 14px; min-height: 40px;
  font: 600 14px var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--bg); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { background: var(--violet-500); border-color: var(--violet-500); color: #fff; }
.btn.primary:hover { background: var(--violet-600); border-color: var(--violet-600); }
.btn.dark { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.btn.dark:hover { background: var(--navy-800); }
.btn.danger { color: var(--red); border-color: #f3c4c4; }
.btn.danger:hover { background: var(--red-bg); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--violet-50); }
.btn.sm { min-height: 32px; padding: 5px 10px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled, .btn[aria-disabled=true] { opacity: .5; cursor: not-allowed; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn:not(.primary):not(.dark).loading::after { border-color: var(--line-2); border-top-color: var(--violet-500); }
@keyframes spin { to { transform: rotate(360deg); } }
.linkbtn { background: none; border: 0; padding: 0; font: 600 13px var(--font); color: var(--violet-600); cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }

/* ---------- alerts, pills ---------- */
.alert { border-radius: var(--radius-sm); padding: 11px 14px; font-size: 13.5px; border: 1px solid transparent; margin-bottom: 12px; }
.alert.error { background: var(--red-bg); color: #7f1d1d; border-color: #fecaca; }
.alert.warn { background: var(--amber-bg); color: #78350f; border-color: #fde68a; }
.alert.ok { background: var(--green-bg); color: #14532d; border-color: #bbf7d0; }
.alert.info { background: var(--violet-50); color: #3b2a8a; border-color: var(--violet-100); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 3px 9px;
  border-radius: 99px; background: #eef2f8; color: var(--ink-2); white-space: nowrap; letter-spacing: .01em; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.plain::before { display: none; }
.st-draft { background: #eef2f8; color: #475569; }
.st-needs_changes, .st-publish_unconfirmed, .st-partially_published, .st-publishing { background: var(--amber-bg); color: var(--amber); }
.st-pending_approval { background: var(--violet-100); color: var(--violet-600); }
.st-approved, .st-scheduled { background: var(--blue-bg); color: var(--blue); }
.st-published { background: var(--green-bg); color: var(--green); }
.st-rejected, .st-failed { background: var(--red-bg); color: var(--red); }
.tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 2px 7px; border-radius: 6px; background: #eef2f8; color: var(--muted); }
.tag.violet { background: var(--violet-100); color: var(--violet-600); }

/* ====================================================================
   Sign-in page
   ==================================================================== */
body.auth { background: #eef1f8; }
.auth-shell { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-brand { position: relative; overflow: hidden; color: #fff; padding: 40px 48px; display: flex; flex-direction: column;
  background: radial-gradient(60% 50% at 80% 25%, rgba(124, 92, 255, .45), transparent 70%),
              radial-gradient(50% 45% at 15% 85%, rgba(91, 63, 224, .35), transparent 70%),
              linear-gradient(160deg, var(--navy-900), var(--navy-950)); }
.auth-brand::after { content: ""; position: absolute; inset: auto -120px -160px auto; width: 420px; height: 420px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 0 0 60px rgba(255, 255, 255, .025), 0 0 0 130px rgba(255, 255, 255, .02); }
.brand-row { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.brand-row img { width: 42px; height: 42px; border-radius: 12px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .15); }
.brand-row strong { display: block; font-size: 17px; letter-spacing: .01em; }
.brand-row span { display: block; font-size: 12.5px; color: #c7cff0; }
.auth-hero { margin-top: auto; margin-bottom: auto; max-width: 440px; position: relative; z-index: 1; padding: 40px 0; }
.auth-hero .eyebrow { color: #c4b5fd; font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.auth-hero h2 { color: #fff; font-size: 38px; line-height: 1.12; letter-spacing: -.02em; margin-bottom: 16px; }
.auth-hero p { color: #cdd5f3; font-size: 15px; }
.auth-points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; }
.auth-points li { display: flex; gap: 10px; align-items: center; color: #e2e7fb; font-size: 14px; }
.auth-points svg { width: 18px; height: 18px; color: #a78bfa; flex: none; }
.auth-foot { position: relative; z-index: 1; font-size: 12px; color: #93a0cf; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 28px; letter-spacing: -.02em; margin-bottom: 6px; }
.auth-card .lead { color: var(--muted); margin-bottom: 28px; }
.auth-row { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 20px; }
.auth-mobile-brand { display: none; }
.auth-note { margin-top: 24px; font-size: 12.5px; color: var(--muted); text-align: center; }
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { min-height: 100vh; align-items: flex-start; padding-top: 56px; }
  .auth-mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 32px; }
  .auth-mobile-brand img { width: 38px; height: 38px; border-radius: 11px; }
  .auth-mobile-brand strong { display: block; color: var(--navy-900); }
  .auth-mobile-brand span { display: block; font-size: 12px; color: var(--muted); }
}

/* ====================================================================
   App shell
   ==================================================================== */
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; background: var(--navy-900); color: #dbe2f7;
  display: flex; flex-direction: column; z-index: 40; }
.sb-brand { display: flex; align-items: center; gap: 11px; padding: 20px 20px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.sb-brand img { width: 38px; height: 38px; border-radius: 11px; }
.sb-brand strong { display: block; color: #fff; font-size: 15px; }
.sb-brand span { display: block; font-size: 12px; color: #9fb0db; }
.sb-nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.sb-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sb-section { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #7f8fbd; padding: 14px 10px 6px; }
.sb-link { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; color: #cdd6f1;
  text-decoration: none; font-weight: 500; }
.sb-link svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.sb-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sb-link[aria-current=page] { background: rgba(124, 92, 255, .22); color: #fff; box-shadow: inset 3px 0 0 #a78bfa; }
.sb-link .count { margin-left: auto; font-size: 11.5px; font-weight: 700; background: rgba(255, 255, 255, .12); color: #fff;
  border-radius: 99px; padding: 1px 8px; }
.sb-link .soon { margin-left: auto; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #9fb0db; }
.sb-foot { border-top: 1px solid rgba(255, 255, 255, .08); padding: 14px 14px 16px; }
.sb-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; min-width: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--violet-500), #8b5cf6);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.sb-user .who { min-width: 0; }
.sb-user strong { display: block; color: #fff; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user span { display: block; font-size: 12px; color: #9fb0db; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-signout { width: 100%; justify-content: flex-start; background: rgba(255, 255, 255, .06); border-color: transparent; color: #e2e7fb; }
.sb-signout:hover { background: rgba(255, 255, 255, .12); }

.shell { margin-left: 260px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 14px 28px;
  background: rgba(245, 247, 251, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 19px; letter-spacing: -.01em; }
.topbar .spacer { flex: 1; }
.menu-btn { display: none; }
.mode { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; padding: 6px 11px; border-radius: 99px; }
.mode::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.mode.draft_only { background: var(--amber-bg); color: var(--amber); }
.mode.read_only { background: var(--blue-bg); color: var(--blue); }
.mode.live { background: var(--red-bg); color: var(--red); }
main.view { padding: 24px 28px 48px; width: 100%; max-width: 1400px; }
main.view:focus { outline: none; }
.scrim { display: none; }

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  .sidebar.open { transform: none; }
  .scrim.open { display: block; position: fixed; inset: 0; background: rgba(6, 18, 49, .45); z-index: 35; }
  .shell { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 12px 16px; }
  main.view { padding: 18px 16px 40px; }
}
@media (max-width: 560px) { .topbar .hide-sm { display: none; } }

/* ---------- page building blocks ---------- */
.page-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .grow { flex: 1; min-width: 220px; }
.page-head h2 { font-size: 24px; letter-spacing: -.02em; }
.page-head p { color: var(--muted); margin-top: 4px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h3 { font-size: 15px; }
.card-head p { color: var(--muted); font-size: 12.5px; }
.card-head .grow { flex: 1; }
.card-body { padding: 16px 20px; }
.ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--violet-50); color: var(--violet-600); flex: none; }
.ic svg { width: 18px; height: 18px; }
.grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.cols-2 > .grid, .split { align-items: start; align-content: start; }
.cols-half { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .cols-2, .split { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .cols-half { grid-template-columns: 1fr; } }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.stack > * + * { margin-top: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* KPI cards */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
@media (max-width: 1200px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { display: block; text-decoration: none; color: inherit; padding: 16px 18px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi:hover { border-color: #c9c1fb; }
.kpi .k-top { display: flex; align-items: center; justify-content: space-between; }
.kpi .k-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.kpi .k-val { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin-top: 8px; color: var(--navy-900); }
.kpi .k-sub { font-size: 12px; color: var(--muted); }
.kpi .ic { width: 30px; height: 30px; }
.kpi.accent { background: linear-gradient(150deg, var(--navy-900), var(--navy-700)); border-color: var(--navy-900); }
.kpi.accent .k-label, .kpi.accent .k-sub { color: #c7d0f0; }
.kpi.accent .k-val { color: #fff; }
.kpi.accent .ic { background: rgba(255, 255, 255, .12); color: #fff; }
.k-amber .ic { background: var(--amber-bg); color: var(--amber); }
.k-blue .ic { background: var(--blue-bg); color: var(--blue); }
.k-green .ic { background: var(--green-bg); color: var(--green); }
.k-red .ic { background: var(--red-bg); color: var(--red); }

.greet h2 { font-size: 26px; letter-spacing: -.02em; }
.greet p { color: var(--muted); margin-top: 4px; }

/* quick actions */
.qa { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .qa { grid-template-columns: 1fr; } }
.qa a { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none; color: inherit; }
.qa a:hover { border-color: #c9c1fb; background: var(--violet-50); }
.qa strong { display: block; font-size: 14px; }
.qa span { display: block; font-size: 12.5px; color: var(--muted); }
.qa .chev { margin-left: auto; color: var(--muted); width: 16px; height: 16px; }

/* list rows */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; color: var(--ink); text-decoration: none; }
a.title:hover { color: var(--violet-600); }
.list .meta { font-size: 12.5px; color: var(--muted); }
.thumb { width: 44px; height: 54px; border-radius: 8px; object-fit: cover; background: var(--navy-900); flex: none; }
.thumb.ph { display: grid; place-items: center; color: #9fb0db; font-size: 11px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--violet-500); flex: none; }

/* week strip */
.strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.strip a { text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-height: 74px; display: block; }
.strip a:hover { border-color: #c9c1fb; }
.strip .d { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.strip .n { font-size: 17px; font-weight: 800; color: var(--navy-900); }
.strip .today { border-color: var(--violet-500); background: var(--violet-50); }
.strip .bars { display: flex; gap: 3px; margin-top: 6px; flex-wrap: wrap; }
.strip .bar { height: 5px; flex: 1 0 14px; border-radius: 3px; background: #cbd5e1; }
.bar.st-pending_approval { background: var(--violet-500); }
.bar.st-approved, .bar.st-scheduled { background: #3b82f6; }
.bar.st-published { background: #16a34a; }
.bar.st-failed, .bar.st-rejected { background: #dc2626; }
.bar.st-needs_changes, .bar.st-publish_unconfirmed, .bar.st-partially_published, .bar.st-publishing { background: #f59e0b; }
@media (max-width: 560px) { .strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* tables */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); background: #f8fafd; padding: 10px 14px;
  border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #fafbff; }
.tbl .cell-title { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.tbl .cell-title a { font-weight: 600; color: var(--ink); text-decoration: none; }
.tbl .cell-title a:hover { color: var(--violet-600); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.toolbar input[type=search] { max-width: 300px; }
.toolbar select { width: auto; min-width: 150px; }

/* empty / loading / error */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .ic { margin: 0 auto 12px; width: 44px; height: 44px; border-radius: 12px; }
.empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.skeleton { border-radius: 10px; background: linear-gradient(90deg, #eef1f7, #f6f8fc, #eef1f7); background-size: 200% 100%;
  animation: shimmer 1.2s infinite; height: 96px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a, .tabs button { background: none; border: 0; font: 600 14px var(--font); color: var(--muted); padding: 10px 12px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.tabs [aria-selected=true], .tabs [aria-current=page] { color: var(--violet-600); border-bottom-color: var(--violet-500); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; background: #fff; }
.seg button { border: 0; background: none; font: 600 13px var(--font); color: var(--muted); padding: 6px 12px; border-radius: 7px; cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--navy-900); color: #fff; }

/* calendar */
.cal-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cal-head h3 { font-size: 17px; min-width: 160px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal .dow { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #f8fafd; }
.cal .cell { min-height: 118px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; }
.cal .cell:nth-child(7n) { border-right: 0; }
.cal .cell.out { background: #fafbfd; }
.cal .cell.out .num { color: #b6c0d2; }
.cal .num { font-size: 12px; font-weight: 700; color: var(--ink-2); margin: 2px 4px 6px; }
.cal .cell.today .num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--violet-500); color: #fff; margin: 0 0 4px; }
.chip { display: block; width: 100%; text-align: left; font-size: 12px; font-weight: 600; padding: 4px 7px; margin-bottom: 4px;
  border-radius: 6px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left: 3px solid currentColor; }
.chip:hover { filter: brightness(.96); }
.legend { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line); }
.agenda { display: none; }
@media (max-width: 760px) { .cal { display: none; } .agenda { display: block; } }

/* post detail & preview */
.phone { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; max-width: 420px; }
.phone .hd { display: flex; align-items: center; gap: 9px; padding: 10px 12px; font-weight: 700; font-size: 13.5px; }
.phone .av { width: 30px; height: 30px; border-radius: 50%; background: var(--navy-900); display: grid; place-items: center; }
.phone .av img { width: 30px; height: 30px; border-radius: 50%; }
.phone .media { position: relative; background: var(--navy-900); }
.phone .media .ph { aspect-ratio: 4 / 5; display: grid; place-items: center; color: #c7d0f0; text-align: center; padding: 24px; font-size: 13px; }
.phone .cap { padding: 10px 12px 14px; white-space: pre-wrap; font-size: 13px; word-wrap: break-word; }
.phone .tags { color: #2563eb; }
.slide-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .9); cursor: pointer; display: grid; place-items: center; }
.slide-nav svg { width: 16px; height: 16px; }
.slide-nav.l { left: 8px; } .slide-nav.r { right: 8px; }
.slide-count { position: absolute; top: 8px; right: 10px; background: rgba(6, 18, 49, .7); color: #fff; font-size: 11.5px; padding: 2px 8px; border-radius: 99px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.counter { font-size: 12px; color: var(--muted); text-align: right; margin-top: 4px; }
.counter.over { color: var(--red); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sugg { border: 1px dashed var(--line-2); background: #fff; border-radius: 10px; padding: 8px 10px; font: 13px var(--font);
  text-align: left; cursor: pointer; color: var(--ink-2); }
.sugg:hover { border-color: var(--violet-500); background: var(--violet-50); }

/* media grid */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; padding: 16px; }
.mitem { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; text-decoration: none; color: inherit; }
.mitem:hover { border-color: #c9c1fb; }
.mitem img, .mitem .vid { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--navy-900); }
.mitem .vid { display: grid; place-items: center; color: #fff; }
.mitem .vid svg { width: 34px; height: 34px; }
.mitem .cap { padding: 9px 10px; font-size: 12.5px; }
.mitem .cap strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* toast & dialog */
.toast { position: fixed; right: 20px; bottom: 20px; max-width: 420px; background: var(--navy-900); color: #fff; padding: 12px 16px;
  border-radius: 12px; box-shadow: 0 10px 30px rgba(6, 18, 49, .3); z-index: 60; font-size: 13.5px; }
.toast.bad { background: #7f1d1d; }
dialog { border: 0; border-radius: 16px; padding: 0; width: min(460px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(6, 18, 49, .35); }
dialog::backdrop { background: rgba(6, 18, 49, .45); }
dialog .dlg-body { padding: 22px 22px 8px; }
dialog h3 { font-size: 17px; margin-bottom: 8px; }
dialog p { color: var(--ink-2); }
dialog .dlg-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px 20px; }

/* forced password change */
.focus-page { max-width: 480px; margin: 40px auto; }

.center-row { justify-content: center; margin-top: 14px; }
.cal-head .spacer { flex: 1; }
.w-auto { width: auto; }
.phone .hd .muted { margin-left: auto; font-weight: 500; }
pre.mono { white-space: pre-wrap; margin: 0; }
.card h3 a.title { color: var(--ink); text-decoration: none; }
.card h3 a.title:hover { color: var(--violet-600); }
@media (max-width: 560px) { .mode .long { display: none; } }
