:root {
  color-scheme: light;
  --ink: #101828;
  --muted: #667085;
  --soft: #f6f8fb;
  --panel: #ffffff;
  --line: #dde4ee;
  --nav: #0b1220;
  --nav-2: #111c31;
  --blue: #2563eb;
  --cyan: #0891b2;
  --green: #059669;
  --gold: #d97706;
  --rose: #e11d48;
  --violet: #7c3aed;
  --shadow: 0 18px 45px rgba(15, 23, 42, .10);
  --soft-shadow: 0 10px 24px rgba(15, 23, 42, .06);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: #eef3f9;
  color: var(--ink);
}

button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 30px; margin-bottom: 5px; letter-spacing: 0; }
h2 { font-size: 20px; margin-bottom: 8px; letter-spacing: 0; }
h3 { font-size: 16px; margin-bottom: 10px; letter-spacing: 0; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; color: var(--muted); }
.eyebrow { display: inline-block; font-size: 11px; font-weight: 850; color: var(--cyan); letter-spacing: .08em; margin-bottom: 8px; }

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 25% 15%, rgba(37, 99, 235, .12), transparent 28%),
    radial-gradient(circle at 78% 18%, rgba(124, 58, 237, .10), transparent 24%),
    linear-gradient(180deg, #eef3f9, #e9eef7);
}

.login-panel {
  width: min(100%, 460px);
  margin: 0;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 14px;
  padding: 30px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .12);
  display: grid;
  gap: 16px;
}

.brand-lockup, .brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-lockup {
  align-items: flex-start;
}

.logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: block;
  background: transparent;
  border: 0;
  padding: 0;
  object-fit: cover;
  overflow: hidden;
}

.logo-slot {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  color: #62718b;
  background: transparent;
  border: 0;
  padding: 0;
  object-fit: cover;
  overflow: hidden;
}

.drawer-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.workspace {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 288px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--nav), var(--nav-2));
  color: white;
  padding: 22px 16px;
}

.brand-block {
  padding: 8px 8px 22px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  margin-bottom: 16px;
}

.brand-block h2 { margin: 0; }
.brand-block p { margin: 2px 0 0; color: #a8b4c7; font-size: 12px; }

.nav-list {
  display: grid;
  gap: 7px;
}

.nav-list button,
.entry-module-list button,
.module-stack button {
  text-align: left;
  border-radius: 8px;
  background: transparent;
}

.nav-list button {
  color: #d8e0ec;
  padding: 12px;
  display: grid;
  gap: 3px;
}

.nav-list button small,
.entry-module-list button small,
.module-stack button small {
  color: #94a3b8;
  font-size: 11px;
}

.nav-list button.active,
.nav-list button:hover {
  background: rgba(255,255,255,.10);
  color: white;
}

.nav-list button.active {
  box-shadow: inset 3px 0 0 var(--cyan);
}

.main {
  padding: 26px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn, .icon-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 800;
  background: #e7edf5;
  color: #142033;
}

.btn.small { min-height: 34px; padding: 7px 10px; font-size: 13px; }
.btn.primary { background: linear-gradient(135deg, var(--blue), var(--cyan)); color: white; }
.btn.ghost { background: white; border: 1px solid var(--line); }
.btn.danger { background: #fff1f2; color: #be123c; }
.wide-btn { width: 100%; }

.notice {
  display: none;
  padding: 11px 13px;
  border-radius: 8px;
  background: #ecfdf3;
  color: #047857;
  margin-bottom: 14px;
  font-weight: 700;
}
.notice.show { display: block; }
.notice.error { background: #fff1f2; color: #be123c; }

.hero-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: end;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(37,99,235,.10), rgba(8,145,178,.06)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
  margin-bottom: 18px;
}

.hero-panel h2 {
  font-size: 28px;
  margin-bottom: 7px;
}

.filters, .toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.compact {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 750;
}

input, select, textarea {
  width: 100%;
  border: 1px solid #cfd8e6;
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--ink);
  background: white;
}

textarea { min-height: 88px; resize: vertical; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
  padding: 18px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpi {
  min-height: 138px;
  border-radius: 8px;
  padding: 16px;
  text-align: left;
  color: white;
  box-shadow: var(--soft-shadow);
  display: grid;
  align-content: space-between;
}

.kpi span { font-size: 13px; opacity: .92; }
.kpi strong { font-size: 28px; letter-spacing: 0; }
.kpi small { opacity: .88; }
.kpi.blue { background: linear-gradient(135deg, #1d4ed8, #0891b2); }
.kpi.green { background: linear-gradient(135deg, #047857, #10b981); }
.kpi.gold { background: linear-gradient(135deg, #b45309, #f59e0b); }
.kpi.violet { background: linear-gradient(135deg, #6d28d9, #a855f7); }
.kpi.rose { background: linear-gradient(135deg, #be123c, #fb7185); }

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 16px;
}

.span-2 { grid-column: span 2; }

.attendance-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.attendance-donut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.attendance-donut-group {
  display: grid;
  gap: 14px;
}

.attendance-donut-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.attendance-donut-card {
  background: #fffefa;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: none;
}

.attendance-donut-card.faculty {
  background: linear-gradient(180deg, #f7fbff, #fff);
}

.attendance-donut {
  --p: 0;
  --q: 0;
  width: min(210px, 100%);
  margin: 10px auto 14px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--blue) calc(var(--p) * 1%), #edf2fb 0);
}

.attendance-donut.faculty {
  background: conic-gradient(var(--green) calc(var(--p) * 1%), #edf7f2 0);
}

.attendance-donut > div {
  width: 66%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: white;
  display: grid;
  place-items: center;
  align-content: center;
  box-shadow: inset 0 0 0 1px var(--line);
}

.attendance-donut strong {
  font-size: 26px;
}

.attendance-donut span {
  font-size: 12px;
  color: var(--muted);
}

.chart-card {
  box-shadow: none;
  background: #fffefa;
}

.chart-bars {
  display: grid;
  gap: 12px;
}

.chart-row {
  display: grid;
  grid-template-columns: 120px 1fr 44px;
  align-items: center;
  gap: 12px;
}

.chart-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  color: #2c2833;
}

.chart-track {
  height: 12px;
  border-radius: 999px;
  background: #ece8df;
  overflow: hidden;
}

.chart-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.chart-track i.tone-green { background: linear-gradient(90deg, #1aa56d, #36d18c); }
.chart-track i.tone-orange { background: linear-gradient(90deg, #d98a11, #f7b94d); }
.chart-track i.tone-purple { background: linear-gradient(90deg, #6d56ff, #9b7cff); }

.planner-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.planner-item {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.planner-item b {
  display: block;
  margin-bottom: 5px;
}

.planner-item small {
  color: var(--muted);
  line-height: 1.45;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.course-bars {
  display: grid;
  gap: 15px;
}

.course-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  align-items: center;
}

.course-row small,
.mini-list small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.bar-track {
  height: 14px;
  border-radius: 999px;
  background: #e8eef6;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.donut {
  --p: 0;
  width: 172px;
  aspect-ratio: 1;
  margin: 12px auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--rose) calc(var(--p) * 1%), #e8eef6 0);
}

.donut span {
  width: 112px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: white;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 900;
}

.split-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.split-stats div {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.split-stats b, .split-stats small { display: block; }
.split-stats small { color: var(--muted); }

.module-stack, .mini-list {
  display: grid;
  gap: 9px;
}

.module-stack button,
.mini-list span {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
}

.mini-list button.batch-chip {
  appearance: none;
  width: 100%;
  text-align: left;
  display: grid;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  color: var(--ink);
}

.attendance-filters {
  margin: 16px 0 18px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  gap: 16px;
}

.module-card {
  min-height: 185px;
}

.module-card strong {
  display: block;
  font-size: 42px;
  margin: 12px 0 6px;
}

.module-card.accent {
  background: linear-gradient(135deg, #10213f, #123b5a);
  color: white;
}

.module-card.accent .muted,
.module-card.accent p {
  color: #d8e6f7;
}

.entry-layout {
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.entry-module-list {
  display: grid;
  gap: 8px;
  position: sticky;
  top: 18px;
}

.entry-module-list button {
  background: white;
  border: 1px solid var(--line);
  padding: 13px;
  box-shadow: var(--soft-shadow);
}

.entry-module-list button.active {
  color: white;
  background: linear-gradient(135deg, #10213f, #1d4ed8);
}

.entry-module-list button.active small {
  color: #d8e6f7;
}

.entry-form {
  min-height: 520px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.wide { grid-column: 1 / -1; }
.submit-btn { margin-top: 18px; }

.smart-picker {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.chip-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.chip-row button {
  min-height: 30px;
  border-radius: 999px;
  padding: 5px 10px;
  background: white;
  border: 1px solid var(--line);
  color: #344054;
  font-weight: 800;
}

.chip-row button.active {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.picker-result {
  display: grid;
  gap: 7px;
}

.suggestion {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  text-align: left;
}

.suggestion span {
  color: var(--muted);
  font-size: 12px;
}

.selected-row {
  background: #ecfdf3;
  color: #047857;
  border-radius: 8px;
  padding: 10px;
  font-weight: 800;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: #64748b;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 850;
  background: #e0f2fe;
  color: #0369a1;
}

.pill.good { background: #dcfce7; color: #047857; }
.pill.bad { background: #ffe4e6; color: #be123c; }
.pill.warn { background: #fef3c7; color: #b45309; }

.progress-pill {
  display: inline-grid;
  grid-template-columns: 92px 38px;
  align-items: center;
  gap: 8px;
}

.progress-pill i {
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  display: block;
}

.progress-pill b { font-size: 12px; }

.drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(15, 23, 42, .48);
}

.drawer.open { display: block; }

.drawer-panel {
  margin-left: auto;
  width: min(860px, 100%);
  height: 100%;
  overflow-y: auto;
  background: #f8fafc;
  padding: 24px;
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr);
  gap: 16px;
  margin-bottom: 16px;
}

.stack {
  display: grid;
  gap: 16px;
}

.month-card {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 9px;
}

.big-number {
  font-size: 36px;
  font-weight: 900;
  margin: 14px 0 8px;
}

@media (max-width: 1080px) {
  .workspace { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .analytics-grid, .module-grid, .kpi-grid { grid-template-columns: 1fr 1fr; }
  .span-2 { grid-column: span 1; }
  .entry-layout { grid-template-columns: 1fr; }
  .entry-module-list { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-visual { padding: 32px 22px; align-items: center; }
  .login-copy h1 { font-size: 42px; }
  .login-stats { grid-template-columns: 1fr; }
  .main { padding: 16px; }
  .topbar, .hero-panel { grid-template-columns: 1fr; flex-direction: column; }
  .analytics-grid, .module-grid, .kpi-grid, .profile-grid, .form-grid { grid-template-columns: 1fr; }
  .entry-module-list { grid-template-columns: 1fr; }
  .course-row { grid-template-columns: 1fr; }
}

/* Cloud-style simplified UI refresh */
:root {
  --cloud-bg: #f7f9fc;
  --cloud-card: #ffffff;
  --cloud-line: #e8edf5;
  --cloud-blue: #2f6fed;
  --cloud-sky: #12a9d6;
  --cloud-text: #172033;
}

body {
  background:
    radial-gradient(circle at 18% 8%, rgba(47, 111, 237, .10), transparent 26%),
    radial-gradient(circle at 92% 18%, rgba(18, 169, 214, .10), transparent 28%),
    var(--cloud-bg);
}

.workspace {
  grid-template-columns: 248px 1fr;
  gap: 18px;
  padding: 16px;
}

.sidebar {
  height: calc(100vh - 32px);
  border: 1px solid var(--cloud-line);
  border-radius: 18px;
  background: rgba(255,255,255,.86);
  color: var(--cloud-text);
  box-shadow: 0 20px 60px rgba(15, 23, 42, .08);
}

.brand-block {
  border-bottom: 1px solid var(--cloud-line);
}

.brand-block p,
.nav-list button small {
  color: #718096;
}

.nav-list button {
  color: #344054;
  padding: 11px 12px;
}

.nav-list button.active,
.nav-list button:hover {
  background: #eef6ff;
  color: #174ea6;
}

.nav-list button.active {
  box-shadow: inset 3px 0 0 var(--cloud-blue);
}

.main {
  padding: 4px 8px 24px 0;
}

.topbar {
  background: rgba(255,255,255,.74);
  border: 1px solid var(--cloud-line);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .05);
}

.hero-panel,
.panel,
.cloud-card {
  border-radius: 18px;
  border: 1px solid var(--cloud-line);
  box-shadow: 0 18px 48px rgba(15, 23, 42, .06);
}

.hero-panel {
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(236,246,255,.96));
}

.hero-panel h2,
.cloud-card h2 {
  letter-spacing: 0;
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 16px;
}

.cloud-card {
  background: rgba(255,255,255,.92);
  padding: 18px;
}

.span-3 { grid-column: span 3; }

.cash-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.cash-flow.large {
  gap: 16px;
}

.cash-step {
  min-height: 150px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  border: 1px solid var(--cloud-line);
}

.cash-step.alert {
  background: linear-gradient(180deg, #fff7ed, #ffffff);
}

.cash-step span,
.snapshot-list span {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.cash-step strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 28px;
  letter-spacing: 0;
}

.cash-step small {
  color: #718096;
}

.flow-meter {
  height: 10px;
  border-radius: 999px;
  background: #e8eef6;
  overflow: hidden;
}

.flow-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cloud-blue), var(--cloud-sky));
}

.cash-step.alert .flow-meter i {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.finance-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.finance-summary-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f8fbff;
}

.finance-summary-card span {
  font-size: 12px;
  font-weight: 850;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.finance-summary-card strong {
  font-size: 24px;
  letter-spacing: 0;
}

.finance-summary-card small {
  color: var(--muted);
}

.finance-summary-card.bank { background: #eef6ff; }
.finance-summary-card.management { background: #f1f5ff; }
.finance-summary-card.expense { background: #fff7ed; }
.finance-summary-card.pending { background: #f0fdf4; }

.snapshot-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.snapshot-list div {
  background: #f8fbff;
  border: 1px solid var(--cloud-line);
  border-radius: 14px;
  padding: 12px;
}

.snapshot-list b {
  display: block;
  font-size: 22px;
}

.focus-list,
.module-stack {
  display: grid;
  gap: 10px;
}

.focus-list button,
.module-stack button {
  background: #f8fbff;
  border: 1px solid var(--cloud-line);
  border-radius: 14px;
  padding: 12px;
}

.kpi {
  border-radius: 16px;
}

.smart-picker {
  background: #ffffff;
  border-radius: 16px;
}

.suggestion {
  border-radius: 14px;
}

.chip-row button {
  border-radius: 999px;
}

.entry-module-list button {
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.entry-module-list button.active {
  background: linear-gradient(135deg, var(--cloud-blue), var(--cloud-sky));
}

@media (max-width: 1080px) {
  .workspace {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .sidebar {
    height: auto;
  }
  .main {
    padding: 0;
  }
  .ops-grid {
    grid-template-columns: 1fr 1fr;
  }
  .span-3 {
    grid-column: span 2;
  }
  .cash-flow {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .ops-grid,
  .cash-flow,
  .snapshot-list {
    grid-template-columns: 1fr;
  }
  .span-3 {
    grid-column: span 1;
  }
}

/* Entry portal simplification and premium operations polish */
.entry-workspace {
  grid-template-columns: 218px minmax(0, 1fr);
}

.entry-workspace .sidebar {
  padding: 18px 12px;
}

.entry-workspace .brand-block {
  padding: 6px 8px 16px;
  margin-bottom: 12px;
}

.entry-workspace .brand-block h2 {
  font-size: 18px;
}

.entry-workspace .nav-list {
  gap: 5px;
}

.entry-workspace .nav-list button {
  min-height: 43px;
  display: flex;
  align-items: center;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 850;
}

.entry-workspace .nav-list button small {
  display: none;
}

.entry-workspace .topbar {
  min-height: 78px;
  align-items: center;
  background: rgba(255,255,255,.9);
}

.entry-workspace .topbar h1 {
  margin: 0;
  font-size: 25px;
}

.entry-workspace .entry-layout {
  display: block;
}

.entry-workspace .entry-module-list {
  display: none;
}

.entry-workspace .entry-form {
  width: 100%;
  max-width: none;
  min-height: auto;
  margin: 0;
  padding: 26px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(250,253,255,.98));
  box-shadow: 0 22px 60px rgba(15, 23, 42, .07);
}

.entry-workspace .stack {
  width: 100%;
  max-width: none;
  margin: 0;
}

.entry-workspace .stack .entry-form {
  margin-bottom: 16px;
}

.entry-workspace .section-head {
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--cloud-line);
}

.entry-workspace .section-head h2 {
  margin: 0;
  font-size: 21px;
}

.entry-workspace .form-grid {
  gap: 16px;
}

.entry-workspace label {
  color: #475467;
  font-size: 13px;
  font-weight: 850;
}

.entry-workspace input,
.entry-workspace select,
.entry-workspace textarea {
  margin-top: 7px;
  min-height: 44px;
  border-radius: 12px;
  border-color: #d8e2ef;
  background: #fbfdff;
}

.entry-workspace textarea {
  min-height: 116px;
}

.entry-workspace .smart-picker {
  border-radius: 16px;
  background: #f7fbff;
  padding: 14px;
}

.entry-workspace .suggestion {
  background: white;
}

.entry-workspace .submit-btn {
  min-height: 46px;
  border-radius: 12px;
  padding-inline: 22px;
}

textarea[name="ai_text"] {
  min-height: 144px;
  border-color: #b7d7ff;
  background: linear-gradient(180deg, #f7fbff, #ffffff);
}

textarea[name="ai_text"]:focus {
  outline: 3px solid rgba(47, 111, 237, .14);
  border-color: var(--cloud-blue);
}

@media (max-width: 1080px) {
  .entry-workspace {
    grid-template-columns: 1fr;
  }
  .entry-workspace .sidebar {
    height: auto;
  }
  .entry-workspace .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .entry-workspace .nav-list,
  .entry-workspace .form-grid {
    grid-template-columns: 1fr;
  }
  .entry-workspace .entry-form {
    padding: 18px;
  }
}

/* Reference-inspired dashboard redesign */
:root {
  --premium-bg: #e9eef5;
  --premium-shell: #fffefa;
  --premium-ink: #20212a;
  --premium-sidebar: #1d1a2a;
  --premium-sidebar-2: #151320;
  --premium-purple: #7653ff;
  --premium-lavender: #dcd7ff;
  --premium-line: #ece8df;
  --premium-soft: #f8f7f2;
}

body {
  background:
    #fffefa;
}

.workspace {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  gap: 0;
  grid-template-columns: 270px minmax(0, 1fr);
  background: var(--premium-shell);
  border: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.sidebar {
  height: auto;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, var(--premium-sidebar), var(--premium-sidebar-2));
  color: #f7f4ff;
  box-shadow: none;
  padding: 24px 18px;
}

.brand-block {
  border-bottom: 0;
  padding: 4px 6px 22px;
}

.brand-block .logo-mark {
  width: 46px;
  height: 46px;
  border-radius: 0;
  background: transparent;
}

.brand-block h2 {
  color: #ffffff;
  font-size: 20px;
}

.brand-block p {
  color: #938ea7;
}

.nav-list {
  gap: 8px;
}

.nav-list button {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  border-radius: 12px;
  color: #aaa5ba;
  padding: 11px 13px;
  font-weight: 800;
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  opacity: .9;
}

.nav-label {
  min-width: 0;
  line-height: 1.05;
}

.nav-list button small {
  display: none;
}

.nav-list button.active,
.nav-list button:hover {
  background: rgba(255,255,255,.08);
  color: #ffffff;
  box-shadow: none;
}

.nav-list button.active span::before,
.nav-list button:hover span::before {
  background: var(--premium-purple);
}

.main {
  padding: 0;
  background: var(--premium-shell);
}

.topbar {
  min-height: 72px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--premium-line);
  border-radius: 0;
  background: rgba(255,254,250,.96);
  box-shadow: none;
  padding: 20px 26px;
  align-items: center;
}

.topbar h1 {
  margin: 0;
  font-size: 26px;
  color: var(--premium-ink);
}

.topbar .muted,
.topbar .eyebrow {
  display: none;
}

#view {
  padding: 0 26px 28px;
}

.hero-panel {
  margin: 0 -26px;
  min-height: 86px;
  padding: 14px 26px;
  border: 0;
  border-bottom: 1px solid var(--premium-line);
  border-radius: 0;
  box-shadow: none;
  background: #fffefa;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.hero-panel > div:first-child {
  display: none;
}

.hero-panel h2,
.hero-panel p {
  display: none;
}

.filters.compact {
  margin-left: 0;
  border-radius: 14px;
  background: #ffffff;
  border-color: var(--premium-line);
  box-shadow: 0 12px 30px rgba(32, 33, 42, .05);
}

.premium-dashboard {
  display: grid;
  gap: 0;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  border-bottom: 1px solid var(--premium-line);
}

.dash-metric {
  min-height: 150px;
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 14px;
  padding: 22px 26px;
  border-right: 1px solid var(--premium-line);
  background: #fffefa;
}

.dash-metric:last-child {
  border-right: 0;
}

.metric-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  font-weight: 950;
}

.metric-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.metric-icon.orange { background: #fff1df; color: #f59e0b; }
.metric-icon.green { background: #e8fbef; color: #16a34a; }
.metric-icon.blue { background: #edf4ff; color: #3b82f6; }
.metric-icon.good { background: #ebfbf4; color: #079669; }
.metric-icon.bad { background: #ffe9ee; color: #e11d48; }
.metric-icon.purple { background: #eeeaff; color: #7653ff; }
.metric-icon.violet { background: #f1eaff; color: #7c3aed; }
.metric-icon.warn { background: #fff5da; color: #d99a12; }

.dash-metric p {
  margin: 0 0 6px;
  color: #45424f;
  font-weight: 850;
}

.dash-metric strong {
  display: block;
  font-size: 27px;
  line-height: 1;
  letter-spacing: 0;
}

.dash-metric small {
  display: block;
  margin-top: 12px;
  font-weight: 850;
}

.green,
.good { color: #159464; }
.orange,
.warn { color: #d99a12; }
.blue,
.info { color: #3476d9; }
.violet { color: #7c3aed; }
.bad { color: #d92d4a; }

.dashboard-canvas {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.dashboard-main {
  border-right: 0;
}

.panel.board-panel,
.rail-card {
  border: 0;
  border-bottom: 1px solid var(--premium-line);
  border-radius: 0;
  box-shadow: none;
  background: #fffefa;
  padding: 24px 26px;
}

.board-head {
  align-items: center;
}

.section-head h2,
.rail-head h2 {
  color: var(--premium-ink);
  font-size: 22px;
}

.segmented {
  display: inline-flex;
  gap: 8px;
  padding: 5px;
  border-radius: 13px;
  background: #f2f1ed;
}

.segmented button {
  min-width: 82px;
  min-height: 38px;
  border-radius: 10px;
  background: transparent;
  color: #77717e;
  font-weight: 850;
}

.segmented button.active {
  background: white;
  color: #26232d;
  box-shadow: 0 10px 22px rgba(32, 33, 42, .10);
}

.board-flow {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.flow-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 14px 0 18px;
  color: #6b6678;
  font-size: 13px;
}

.flow-summary b {
  color: #26232d;
}

.cash-step {
  border: 1px solid #eeeae1;
  border-radius: 18px;
  background: #fffdfa;
  box-shadow: none;
}

.board-flow .cash-step:nth-child(1) {
  background: linear-gradient(180deg, #f3fbff, #ffffff);
  border-color: #cfeeff;
}

.board-flow .cash-step:nth-child(2) {
  background: linear-gradient(180deg, #f2fff8, #ffffff);
  border-color: #ccefdc;
}

.board-flow .cash-step:nth-child(3) {
  background: linear-gradient(180deg, #fff7e8, #ffffff);
  border-color: #ffe0a8;
}

.cash-step strong {
  font-size: 25px;
}

.cash-step.fade {
  opacity: .5;
}

.lower-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.lower-grid .board-panel:first-child {
  border-right: 1px solid var(--premium-line);
}

.premium-bars .bar-track {
  height: 8px;
  background: #efede8;
}

.bar-fill.tone-1 { background: #7653ff; }
.bar-fill.tone-2 { background: #32c8b7; }
.bar-fill.tone-3 { background: #ff7d91; }

.premium-actions button {
  display: grid;
  gap: 4px;
  border: 1px solid #eeeae1;
  border-radius: 14px;
  background: #fffdfa;
}

.premium-actions b {
  color: #24212b;
}

.premium-actions small {
  color: #908a99;
}

.product-cell {
  display: inline-grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 12px;
}

.product-cell i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f5efe8;
  color: var(--premium-purple);
  font-style: normal;
  font-weight: 950;
}

.product-cell b {
  color: #5d45d7;
}

th {
  color: #34313b;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}

td {
  color: #36333e;
}

tr:hover td {
  background: #fffaf1;
}

.right-rail {
  min-width: 0;
}

.rail-card {
  padding: 26px 24px;
}

.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.rail-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
}

.rail-status span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 850;
}

.status-orb,
.dot {
  width: 13px;
  height: 13px;
  display: inline-block;
  border-radius: 999px;
}

.status-orb.good,
.dot.green { background: #21c17a; }
.status-orb.warn,
.dot.orange { background: #f5b642; }
.status-orb.info,
.dot.blue { background: #4b83ff; }
.dot.purple { background: #7653ff; }
.dot.pink { background: #ff72c6; }

.donut-card {
  --p: 72;
  width: min(230px, 80%);
  aspect-ratio: 1;
  margin: 12px auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--premium-purple) calc(var(--p) * 1%), var(--premium-lavender) 0);
}

.donut-card.online {
  background: conic-gradient(#4b83ff calc(var(--p) * 1%), #dbeafe 0);
}

.donut-card.cash {
  background: conic-gradient(#f59e0b calc(var(--p) * 1%), #fde9c4 0);
}

.donut-card > div {
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fffefa;
  display: grid;
  place-items: center;
  align-content: center;
}

.donut-card strong {
  font-size: 26px;
}

.donut-card span {
  color: #aaa4b0;
  font-size: 13px;
}

.legend-list,
.sales-list {
  display: grid;
  gap: 14px;
}

.legend-list span,
.sales-list span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #4d4956;
}

.legend-list i,
.sales-list i {
  margin-right: 8px;
}

.entry-workspace {
  grid-template-columns: 238px minmax(0, 1fr);
}

.entry-workspace .sidebar {
  min-height: 100vh;
}

.entry-workspace .nav-list button {
  color: #aaa5ba;
}

.entry-workspace .nav-list button.active,
.entry-workspace .nav-list button:hover {
  color: #ffffff;
}

.entry-workspace .entry-form {
  margin-top: 26px;
  border: 1px solid var(--premium-line);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(38, 45, 60, .08);
}

.entry-shell {
  display: grid;
  gap: 16px;
}

.entry-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  background: linear-gradient(135deg, #ffffff, #f7fbff);
}

.entry-hero h2 {
  font-size: 24px;
  margin-bottom: 4px;
}

.row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.course-library-card {
  margin-top: 18px;
}

.entry-manage-card {
  margin-top: 18px;
}

.entry-manage-card .library-list {
  margin-top: 16px;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-admin-list {
  margin-top: 14px;
}

.course-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.library-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.library-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.library-row small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.attendance-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.attendance-data-card {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.attendance-data-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.attendance-data-head strong {
  font-size: 15px;
}

.attendance-data-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.attendance-data-stats span {
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.attendance-data-stats b {
  font-size: 19px;
}

.attendance-data-stats small {
  color: var(--muted);
}

.flow-meter.slim {
  height: 8px;
}

.batch-grid {
  display: grid;
  gap: 12px;
}

.batch-card {
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.batch-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15,23,42,.08);
}

.finance-control {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 0;
  border-top: 1px solid var(--premium-line);
}

.finance-flow-card {
  border: 0;
  border-right: 1px solid var(--premium-line);
  border-bottom: 1px solid var(--premium-line);
  border-radius: 0;
  box-shadow: none;
  padding: 26px;
  grid-column: 1 / -1;
}

.money-flow {
  display: grid;
  gap: 18px;
}

.finance-still-large {
  background: linear-gradient(135deg, #edf4ff, #ffffff 42%, #f8f5ff);
}

.finance-still-large .cash-hero {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  margin: 10px 0 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1d4ed8, #7c3aed);
  color: #fff;
  box-shadow: 0 18px 40px rgba(76, 29, 149, .18);
}

.finance-still-large .cash-hero strong {
  font-size: 38px;
  line-height: 1;
  letter-spacing: 0;
}

.finance-still-large .cash-hero span {
  font-size: 13px;
  font-weight: 800;
  opacity: .9;
}

.finance-expense-large {
  background: linear-gradient(135deg, #fff8f2, #ffffff 44%, #fff1f2);
}

.finance-expense-large .cash-hero {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  margin: 10px 0 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #b45309, #ef4444);
  color: #fff;
  box-shadow: 0 18px 40px rgba(239, 68, 68, .18);
}

.finance-expense-large .cash-hero strong {
  font-size: 38px;
  line-height: 1;
  letter-spacing: 0;
}

.finance-expense-large .cash-hero span {
  font-size: 13px;
  font-weight: 800;
  opacity: .95;
}

.finance-still-lines {
  display: grid;
  gap: 10px;
}

.still-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(191,219,254,.9);
}

.still-line span {
  color: #475569;
  font-weight: 800;
}

.still-line b {
  color: #0f172a;
  font-weight: 950;
  text-align: right;
}

.still-line.green {
  background: #ecfdf3;
  border-color: #bbf7d0;
}

.still-line.green span,
.still-line.green b {
  color: #047857;
}

.still-line.red {
  background: #fff1f2;
  border-color: #fecdd3;
}

.still-line.red span,
.still-line.red b {
  color: #be123c;
}

.still-line.final {
  background: #ede9fe;
  border-color: #ddd6fe;
}

.flow-branches,
.cash-breakdown {
  display: grid;
  gap: 14px;
}

.flow-branches {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cash-breakdown {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 14px;
  border-top: 1px dashed #ded8ce;
}

.flow-node {
  min-height: 132px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  border: 1px solid #eeeae1;
  border-radius: 18px;
  padding: 18px;
  background: #fffdfa;
}

.flow-node.net {
  min-height: 120px;
  background: linear-gradient(135deg, #1d1a2a, #342653);
  color: white;
}

.flow-node.online {
  background: linear-gradient(180deg, #eef5ff, #ffffff);
  border-color: #cfe1ff;
}

.flow-node.cash {
  background: linear-gradient(180deg, #fff7e6, #ffffff);
  border-color: #ffe0a8;
}

.flow-node.management {
  background: linear-gradient(180deg, #f3efff, #ffffff);
  border-color: #ded4ff;
}

.flow-node.bank {
  background: linear-gradient(180deg, #effdf6, #ffffff);
  border-color: #c9efd8;
}

.flow-node.pending {
  background: linear-gradient(180deg, #fff1f2, #ffffff);
  border-color: #ffd0d7;
}

.flow-node span {
  color: #66606f;
  font-weight: 850;
}

.flow-node.net span,
.flow-node.net small {
  color: #c9c4d8;
}

.flow-node strong {
  font-size: 30px;
}

.flow-node .flow-meter {
  height: 9px;
}

.flow-node.online .flow-meter i { background: #4b83ff; }
.flow-node.cash .flow-meter i { background: #f59e0b; }
.flow-node.management .flow-meter i { background: #7653ff; }
.flow-node.bank .flow-meter i { background: #21c17a; }
.flow-node.pending .flow-meter i { background: #ef4444; }

.payment-donut-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 18px;
}

.finance-donut {
  width: 100%;
  margin: 0;
}

@media (max-width: 1180px) {
  .workspace {
    margin: 0;
    min-height: 100vh;
    border-radius: 0;
    padding: 0;
  }
  .metric-strip {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
  .dashboard-canvas {
    grid-template-columns: 1fr;
  }
  .dashboard-main {
    border-right: 0;
  }
  .right-rail {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--premium-line);
  }
  .rail-card {
    border-right: 1px solid var(--premium-line);
  }
}

@media (max-width: 900px) {
  .workspace,
  .entry-workspace {
    grid-template-columns: 1fr;
  }
  .sidebar {
    min-height: 0;
  }
  .metric-strip,
  .lower-grid,
  .right-rail,
  .finance-control,
  .flow-branches,
  .cash-breakdown,
  .payment-donut-grid,
  .attendance-charts,
  .attendance-data-grid,
  .planner-grid {
    grid-template-columns: 1fr;
  }
  .chart-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .dash-metric,
  .lower-grid .board-panel:first-child,
  .rail-card {
    border-right: 0;
  }
  .board-flow {
    grid-template-columns: 1fr;
  }
}
