:root {
  /* Color Palette - Solid corporate SaaS theme */
  --bg-app: #f4f7f6; /* Very light gray/greenish off-white */
  --bg-sidebar: #101c2c; /* Deep navy */
  --bg-sidebar-hover: rgba(255, 255, 255, 0.05);
  --bg-sidebar-active: #22c55e; /* Green */
  
  --bg-card: #ffffff;
  
  /* Accents */
  --green: #22c55e;
  --green-light: #dcfce7;
  --blue: #3b82f6;
  --blue-light: #dbeafe;
  --orange: #f59e0b;
  --orange-light: #fef3c7;
  --red: #ef4444;
  --red-light: #fee2e2;
  --purple: #a855f7;
  --purple-light: #f3e8ff;
  
  /* Text */
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-sidebar: #94a3b8;
  
  /* Borders */
  --border-light: #e2e8f0;
  
  /* Shadows */
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

a {
  text-decoration: none;
  color: var(--blue);
}

/* App Shell & Sidebar */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background: var(--bg-sidebar);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand-logo {
  color: var(--green);
}

.brand-logo span {
  font-size: 32px;
}

.brand strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

nav {
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.nav-item {
  border: none;
  background: transparent;
  color: var(--text-sidebar);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 14px;
  transition: all 0.2s;
  width: 100%;
}

.nav-item span:first-child {
  font-size: 20px;
}

.nav-item .chevron {
  margin-left: auto;
  font-size: 18px;
}

.nav-item:hover {
  background: var(--bg-sidebar-hover);
  color: white;
}

.nav-item.active {
  background: var(--bg-sidebar-active);
  color: white;
}

.sidebar-footer {
  margin-top: auto;
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.role-card {
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.role-icon {
  color: var(--text-sidebar);
}

.role-info b {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: white;
  margin-bottom: 2px;
}

.role-info span {
  display: block;
  font-size: 11px;
  color: var(--text-sidebar);
  margin-bottom: 6px;
}

.role-info a {
  font-size: 11px;
  color: var(--green);
}

/* Main Area */
.main {
  margin-left: 250px;
  width: calc(100% - 250px);
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 70px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-left h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.mobile-menu {
  display: none;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.notification-btn {
  position: relative;
  color: var(--text-muted);
}

.badge-dot {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
  display: grid;
  place-items: center;
}

.user-details b {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.user-details span {
  display: flex;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
}

.user-details span .material-symbols-rounded {
  font-size: 16px;
}

/* Content Area */
.content-area {
  padding: 30px;
  flex: 1;
}

.view {
  display: none;
}
.view.active {
  display: block;
}

/* Card General */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(0,0,0,0.03);
  overflow: hidden;
}

.card-header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
}

.card-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

/* Top Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(0,0,0,0.03);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
}
.stat-icon span { font-size: 28px; }

.stat-icon.blue { background: var(--blue-light); color: var(--blue); }
.stat-icon.green { background: var(--green-light); color: var(--green); }
.stat-icon.orange { background: var(--orange-light); color: var(--orange); }
.stat-icon.red { background: var(--red-light); color: var(--red); }

.stat-info {
  flex: 1;
}

.stat-info span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.stat-info strong {
  display: block;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1;
}

.stat-info small, .stat-info a {
  font-size: 11px;
  font-weight: 500;
}

.stat-info a {
  display: flex;
  align-items: center;
  gap: 2px;
}
.stat-info a span { font-size: 14px; }

/* Text Colors */
.text-green { color: var(--green); }
.text-blue { color: var(--blue); }
.text-orange { color: var(--orange); }
.text-red { color: var(--red); }

/* Charts Row */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

/* Donut Chart Container */
.donut-chart-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  gap: 40px;
}

.donut-wrapper {
  position: relative;
  width: 200px;
  height: 200px;
}

.donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.donut-center strong {
  display: block;
  font-size: 24px;
  font-weight: 700;
}

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

.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
}

.legend-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.legend-color.green { background: var(--green); }
.legend-color.orange { background: var(--orange); }
.legend-color.red { background: var(--red); }
.legend-color.blue { background: var(--blue); }

.legend-val {
  font-weight: 700;
  margin-left: auto;
  padding-left: 20px;
}
.legend-pct {
  color: var(--text-muted);
  width: 50px;
  text-align: right;
}

.alert-box {
  margin: 0 20px 20px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
}
.alert-box.green {
  background: var(--green-light);
  color: #166534;
}

/* Line Chart Container */
.dropdown-select {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  outline: none;
  background: white;
}

.line-chart-container {
  padding: 20px;
  height: 250px;
}

.chart-summary {
  display: flex;
  border-top: 1px solid var(--border-light);
  padding: 20px;
}

.summary-item {
  flex: 1;
  text-align: center;
}
.summary-item:first-child {
  border-right: 1px solid var(--border-light);
}

.summary-item span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.summary-item strong {
  font-size: 24px;
}

/* Bottom Row */
.bottom-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

/* Table */
.table-responsive {
  overflow-x: auto;
}

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

th, td {
  padding: 16px 20px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

th {
  font-weight: 600;
  color: var(--text-muted);
  background: #fdfdfd;
}

td {
  font-weight: 500;
}

.card-footer {
  padding: 16px 20px;
  text-align: center;
}
.view-all-link {
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pill {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
  text-align: center;
}

.pill-outline-green {
  border: 1px solid var(--green);
  color: var(--green);
}
.pill-outline-blue {
  border: 1px solid var(--blue);
  color: var(--blue);
}
.pill-bg-green {
  background: var(--green-light);
  color: #166534;
}
.pill-bg-orange {
  background: var(--orange-light);
  color: #92400e;
}
.pill-bg-red {
  background: var(--red-light);
  color: #991b1b;
}

.icon-action {
  color: var(--blue);
  background: var(--blue-light);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-action span { font-size: 18px; }

/* Quick Actions */
.actions-list {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-btn {
  width: 100%;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.action-btn:hover {
  background: white;
  border-color: #cbd5e1;
  box-shadow: var(--shadow-card);
}

.action-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
}
.action-icon span { font-size: 20px; }
.action-icon.green { background: var(--green); color: white; }
.action-icon.blue { background: var(--blue); color: white; }
.action-icon.purple { background: var(--purple); color: white; }
.action-icon.orange { background: var(--orange); color: white; }

.action-text {
  flex: 1;
}
.action-text strong {
  display: block;
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: 2px;
}
.action-text span {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.action-btn .arrow {
  color: var(--green);
}

/* Buttons */
.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary { background: var(--green); color: white; }
.btn-outline { background: transparent; border: 1px solid var(--border-light); }
.icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* Footer */
.app-footer {
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--border-light);
  margin-top: auto;
}

/* Forms (Detailed) */
#assessment.view.active {
  height: calc(100vh - 130px);
}
#assessment .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.assessment-layout { 
  display: grid; 
  grid-template-columns: 1fr 280px; 
  flex: 1; 
  overflow-y: auto; 
}
.form-main { padding: 30px; border-right: 1px solid var(--border-light); }
.form-side { padding: 30px; background: #fdfdfd; }
.form-side .sticky { position: sticky; top: 0; }
.form-side .sticky { position: sticky; top: 0; }

.toolbar { padding: 20px; border-bottom: 1px solid var(--border-light); }
.search-wrap { display: flex; align-items: center; position: relative; max-width: 300px; }
.search-wrap span { position: absolute; left: 12px; color: var(--text-muted); font-size: 20px; }
.search-wrap input { width: 100%; border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 10px 12px 10px 40px; outline: none; transition: border-color 0.2s; }
.search-wrap input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-light); }

.stepper-container { padding: 16px 20px; border-bottom: 1px solid var(--border-light); background: #fdfdfd; border-top: 1px solid var(--border-light); }
.stepper { display: flex; gap: 12px; overflow-x: auto; padding: 4px 0; scroll-behavior: smooth; }
.stepper::-webkit-scrollbar { height: 4px; }
.stepper::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }

.step { min-width: 160px; border: 1px solid var(--border-light); background: white; padding: 12px 16px; border-radius: var(--radius-sm); cursor: pointer; text-align: left; transition: all 0.2s; }
.step b { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; color: var(--text-main); }
.step span { display: block; color: var(--text-muted); font-size: 11px; }
.step:hover { border-color: #cbd5e1; }
.step.active { border-color: var(--blue); background: var(--blue-light); }
.step.active b { color: var(--blue); }
.step.done { border-color: var(--green); background: #f0fdf4; }
.step.done b { color: #166534; }
.full { width: 100%; }
.mt-2 { margin-top: 12px; }
.mt-4 { margin-top: 24px; }

.section-title { font-size: 20px; font-weight: 600; margin: 0 0 6px 0; }
.section-sub { font-size: 13px; color: var(--text-muted); margin: 0 0 24px 0; }

.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text-main); }

.field input:not([type="radio"]), .field textarea, .field select {
  width: 100%; border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 10px 14px;
  background: white; outline: none; font-size: 14px; transition: all 0.2s; color: var(--text-main);
}
.field input:focus:not([type="radio"]), .field textarea:focus, .field select:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-light);
}
.field textarea { min-height: 100px; resize: vertical; }

.choice-group { display: flex; gap: 8px; flex-wrap: wrap; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice label {
  display: block; border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 8px 16px;
  font-size: 13px; font-weight: 500; cursor: pointer; background: white; transition: all 0.2s; color: var(--text-main); margin: 0;
}
.choice label:hover { border-color: #cbd5e1; background: #f8fafc; }
.choice input:checked + label { background: var(--blue-light); border-color: var(--blue); color: #1e3a8a; font-weight: 600; }

.rating-grid { border: 1px solid var(--border-light); border-radius: var(--radius-sm); overflow: hidden; }
.rating-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border-light); background: white; }
.rating-row:last-child { border-bottom: none; }
.rating-row .name { font-size: 13px; font-weight: 500; }

/* Evidence Box Styling */
.evidence-box {
  margin-top: 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.evidence-text {
  min-height: 60px !important;
  background: white !important;
  border-color: var(--border-light) !important;
}
.evidence-text.small {
  min-height: 40px !important;
  font-size: 12px !important;
  padding: 8px 10px !important;
}
.evidence-file {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  color: var(--text-muted);
}
.evidence-file .material-symbols-rounded {
  font-size: 18px;
  color: var(--blue);
}
.evidence-file-input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}
.evidence-file-input-wrapper .file-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}
.evidence-file-input-wrapper input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}

.rating-evidence {
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  gap: 12px;
}
.rating-evidence:last-child {
  border-bottom: none;
}
.rating-evidence .evidence-text {
  flex: 2;
  margin: 0;
}
.rating-evidence .evidence-file {
  flex: 1;
  margin: 0;
}
.rate-btns { display: flex; gap: 8px; }

.rate-btn {
  border: 1px solid var(--border-light); background: white; border-radius: var(--radius-sm); padding: 6px 12px;
  text-align: center; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; color: var(--text-main);
}
.rate-btn:hover { background: #f8fafc; }
.rate-btn.selected.good { background: var(--green-light); border-color: var(--green); color: #166534; }
.rate-btn.selected.avg { background: var(--orange-light); border-color: var(--orange); color: #92400e; }
.rate-btn.selected.poor { background: var(--red-light); border-color: var(--red); color: #991b1b; }

.form-actions { display: flex; justify-content: space-between; border-top: 1px solid var(--border-light); padding-top: 24px; }

.side-score { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border-light); }
.side-score span { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.side-score strong { font-size: 24px; font-weight: 700; color: var(--green); }

.autosave { color: var(--text-muted); font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 6px; }

/* Modal & Review Form */
.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; padding: 20px; z-index: 50; }

/* Document View - Premium Paper Aesthetic */
.doc-toolbar {
  background: white;
  border-bottom: 1px solid var(--border-light);
  padding: 16px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -30px -30px 30px -30px;
  position: sticky;
  top: 70px;
  z-index: 5;
}
.doc-toolbar h3 { margin: 0; font-size: 18px; }
.doc-toolbar-actions { display: flex; gap: 12px; }
.doc-toolbar-actions .material-symbols-rounded { font-size: 18px; }
.doc-container { display: flex; justify-content: center; }

.doc-paper {
  background: white;
  width: 100%;
  max-width: 900px;
  min-height: 1100px; /* Rough A4 ratio */
  padding: 60px 80px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
  border-radius: 4px;
  margin-bottom: 40px;
  color: #1e293b;
  position: relative;
}

/* Watermark */
.doc-paper::before {
  content: 'CONFIDENTIAL';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  font-size: 120px;
  font-weight: 800;
  color: rgba(0,0,0,0.02);
  z-index: 0;
  pointer-events: none;
}

.doc-paper * {
  position: relative;
  z-index: 1;
}

/* Header */
.doc-letterhead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 4px solid var(--green);
  padding-bottom: 20px;
  margin-bottom: 40px;
}
.doc-letterhead-left {
  display: flex;
  gap: 16px;
  align-items: center;
}
.doc-letterhead-logo {
  color: var(--green);
}
.doc-letterhead-logo span {
  font-size: 48px;
}
.doc-letterhead-titles h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
}
.doc-letterhead-titles p {
  margin: 4px 0 0 0;
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
.doc-letterhead-right {
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
}
.doc-letterhead-right p {
  margin: 2px 0;
}
.doc-letterhead-right strong {
  color: #0f172a;
}

/* Institution Meta */
.doc-meta-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.doc-meta-info h2 {
  margin: 0 0 8px 0;
  font-size: 22px;
  color: #0f172a;
}
.doc-meta-info p {
  margin: 0;
  font-size: 14px;
  color: #475569;
}
.doc-meta-score {
  text-align: center;
}
.doc-meta-score span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 6px;
}
.doc-meta-score .rating-badge {
  font-size: 18px;
  font-weight: 700;
  padding: 8px 24px;
  border-radius: 30px;
  display: inline-block;
  text-transform: uppercase;
}
.rating-badge.good { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.rating-badge.average { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.rating-badge.poor { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* Sections */
.doc-section {
  margin-bottom: 40px;
  page-break-inside: avoid;
}
.doc-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.doc-section-title::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  background: var(--blue);
  border-radius: 2px;
}

/* Fields Grid */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 40px;
}
.doc-field {
  display: flex;
  flex-direction: column;
}
.doc-field.full {
  grid-column: 1 / -1;
}
.doc-label {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 4px;
}
.doc-value {
  font-size: 14px;
  color: #0f172a;
  font-weight: 500;
  line-height: 1.4;
}

/* Evidence Box */
.doc-evidence {
  margin-top: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 13px;
  color: #475569;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.doc-evidence strong {
  color: #0f172a;
  font-size: 11px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.5px;
}
.doc-evidence strong .material-symbols-rounded {
  font-size: 14px;
  color: var(--blue);
}
.doc-evidence-file {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed #cbd5e1;
}

/* Table styling for doc */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 13px;
}
.doc-table th, .doc-table td {
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  text-align: left;
}
.doc-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}
.doc-table td {
  color: #0f172a;
}
.doc-table td:first-child {
  font-weight: 500;
}
.doc-table .feedback-cell {
  color: #475569;
  font-style: italic;
  font-size: 12px;
}

/* Print Styles */
@media print {
  body {
    background: white;
  }
  .sidebar, .topbar, .doc-toolbar {
    display: none !important;
  }
  .main {
    margin: 0 !important;
    width: 100% !important;
  }
  .content-area {
    padding: 0 !important;
  }
  .doc-paper {
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
  }
}

.modal.show { display: flex; animation: modalFadeIn 0.2s ease-out; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(4px); }
.modal-card { position: relative; width: min(720px, 100%); background: white; border-radius: var(--radius-lg); padding: 32px; z-index: 1; box-shadow: 0 20px 40px rgba(0,0,0,0.1); border: 1px solid var(--border-light); animation: modalSlideUp 0.3s ease-out; }

@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalSlideUp { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.modal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; border-bottom: 1px solid var(--border-light); padding-bottom: 20px; }
.modal-head h3 { margin: 0; font-size: 20px; font-weight: 700; }

.review-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 24px 0; }
.review-card { background: #f8fafc; border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 16px; }
.review-card span { font-size: 11px; color: var(--text-muted); display: block; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.review-card b { font-size: 14px; display: block; margin-top: 6px; color: var(--text-main); font-weight: 600; }

.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border-light); }

/* Toast */
.toast {
  position: fixed; bottom: 30px; right: 30px; background: white; color: var(--text-main); border: 1px solid var(--border-light);
  border-radius: var(--radius-md); padding: 14px 20px; font-size: 14px; font-weight: 600; opacity: 0; transform: translateY(20px);
  pointer-events: none; transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55); z-index: 100; display: flex; align-items: center;
  gap: 10px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}
.toast span.material-symbols-rounded { color: var(--green); }
.toast.show { opacity: 1; transform: translateY(0); }

/* Bottom Navigation - Premium Mobile App Style */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 100;
  padding: 8px 16px max(8px, env(safe-area-inset-bottom)) 16px;
  box-shadow: 0 -4px 30px rgba(0,0,0,0.03);
}
.bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
  color: #94a3b8;
  border: none;
  background: none;
  font-size: 11px;
  gap: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 32px;
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.bottom-nav-item .material-symbols-rounded {
  font-size: 24px;
  z-index: 1;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.bottom-nav-item.active {
  color: var(--blue);
  font-weight: 600;
}
.bottom-nav-item.active .nav-icon-wrapper {
  background: #eff6ff;
}
.bottom-nav-item.active .material-symbols-rounded {
  transform: translateY(-1px);
}
.bottom-nav-item:hover:not(.active) {
  color: var(--text-main);
}

/* Responsive */
@media (max-width: 1200px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .charts-row { grid-template-columns: 1fr; }
  .bottom-row { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sidebar { display: none !important; }
  .mobile-menu { display: none !important; }
  .bottom-nav { display: flex; }
  .main { margin-left: 0; width: 100%; padding-bottom: 70px; }
  .assessment-layout { grid-template-columns: 1fr; }
  .form-side { order: -1; border-bottom: 1px solid var(--border-light); border-left: none; }
  
  .doc-paper { padding: 40px; }
  .doc-letterhead { flex-direction: column; align-items: flex-start; gap: 16px; }
  .doc-letterhead-right { text-align: left; }
}

@media (max-width: 650px) {
  .field-grid { grid-template-columns: 1fr; }
  .rating-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .rate-btns { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .stats-row { grid-template-columns: 1fr; }
  
  .donut-chart-container { flex-direction: column; gap: 20px; padding: 20px; }
  .chart-legend { width: 100%; }
  .legend-item { justify-content: space-between; width: 100%; }
  
  .content-area { padding: 16px; }
  
  .topbar { padding: 0 16px; }
  
  .doc-grid { grid-template-columns: 1fr; gap: 16px; }
  .doc-paper { padding: 20px 16px; }
  .doc-meta-card { flex-direction: column; align-items: flex-start; gap: 16px; padding: 16px; }
  
  .rating-evidence { flex-direction: column; }
  .doc-evidence-file { flex-direction: column; align-items: flex-start; }
  
  .review-grid { grid-template-columns: 1fr; }
  
  .doc-table th, .doc-table td { padding: 8px; font-size: 12px; }
  
  .toast { right: 16px; bottom: 86px; left: 16px; }
  
  .modal-card { padding: 20px; }
}

@media (max-width: 480px) {
  .rate-btns { grid-template-columns: 1fr; }
  .doc-letterhead-logo span { font-size: 36px; }
  .doc-letterhead-titles h1 { font-size: 18px; }
  .doc-meta-info h2 { font-size: 18px; }
  .action-btn { flex-direction: column; align-items: flex-start; gap: 12px; }
  .action-btn .arrow { align-self: flex-end; margin-top: -30px; }
  
  .topbar-right .user-details { display: none; }
  .doc-toolbar { flex-direction: column; align-items: flex-start; gap: 12px; margin: -16px -16px 20px -16px; padding: 16px; }
}
