@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Sarabun:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --font-sans: 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-doc: 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Theme: Minimal Navy & Soft Pastel */
  --bg-navy-dark: #162a45;
  --bg-navy-main: #1e3a5f;
  --bg-navy-light: #244b7a;
  --bg-navy-gradient: linear-gradient(135deg, #152840 0%, #1e3a5f 50%, #254d7d 100%);
  
  --bg-body: #f0f4f8;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-dark: #0f172a;

  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-light: #dbeafe;

  --color-success: #16a34a;
  --color-success-light: #dcfce7;
  --color-warning: #d97706;
  --color-warning-light: #fef3c7;
  --color-danger: #dc2626;
  --color-danger-light: #fee2e2;
  --color-purple: #7c3aed;
  --color-purple-light: #ede9fe;

  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.08);
  --shadow-primary: 0 4px 14px rgba(37, 99, 235, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ========================================================
   FULLPAGE AUTHENTICATION SCREEN (หน้าเข้าสู่ระบบ)
   ======================================================== */
/* ========================================================
   FULLPAGE AUTHENTICATION SCREEN (หน้าเข้าสู่ระบบ - 100% VIEWPORT FIT)
   ======================================================== */
.auth-page-wrapper {
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-navy-gradient);
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 1rem;
  box-sizing: border-box;
  overflow-y: auto;
}

.auth-header-brand {
  text-align: center;
  color: #ffffff;
  margin-bottom: 0.85rem;
}

.auth-header-brand h1 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.auth-header-brand p {
  font-size: 0.8rem;
  color: #93c5fd;
  margin-top: 2px;
}

.auth-card-standalone {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 400px;
  padding: 1.35rem 1.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  animation: fadeIn 0.3s ease;
  box-sizing: border-box;
}

.auth-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 1.5rem;
  margin-bottom: 0.65rem;
}

.auth-icon-circle.admin-badge {
  background: #eff6ff;
  color: #2563eb;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.18);
}

.auth-role-tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: var(--radius-md);
  padding: 3px;
  width: 100%;
  margin-bottom: 0.85rem;
  gap: 4px;
}

.auth-role-tab {
  flex: 1;
  padding: 6px 10px;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-role-tab.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.auth-title-exact {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.15rem;
  text-align: center;
}

.auth-subtitle-exact {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 0.85rem;
  text-align: center;
}

.auth-form-exact {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: left;
}

.auth-label-exact {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e293b;
}

.auth-label-exact .req-star {
  color: #ef4444;
  margin-left: 2px;
}

.auth-control-exact {
  font-family: var(--font-sans);
  width: 100%;
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-md);
  background-color: #ffffff;
  color: #0f172a;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.auth-control-exact::placeholder {
  color: #9ca3af;
}

.auth-control-exact:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.auth-btn-primary {
  width: 100%;
  padding: 0.65rem 1rem;
  background-color: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.25rem;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.auth-btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-1px);
}

.auth-btn-primary.auth-btn-admin {
  background-color: #ef4444;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.25);
}

.auth-btn-primary.auth-btn-admin:hover {
  background-color: #dc2626;
}

.auth-btn-secondary {
  width: 100%;
  padding: 0.5rem;
  background: transparent;
  color: #64748b;
  border: none;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.15rem;
}

.auth-btn-secondary:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* ========================================================
   MAIN APPLICATION LAYOUT & TOP NAVY BANNER
   ======================================================== */
.app-container-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* App Wrapper */
.app-wrapper {
  flex: 1;
  margin-left: 270px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: all 0.3s ease;
}

/* TOP NAVY BANNER (ตรงตามภาพตัวอย่าง) */
.top-navy-banner {
  background: var(--bg-navy-gradient);
  color: #ffffff;
  padding: 1.5rem 2rem 1.75rem 2rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.15);
  position: relative;
  z-index: 10;
}

.top-navy-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.top-navy-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.top-navy-icon-box {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #ffffff;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.top-navy-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.top-navy-teacher-name {
  font-size: 0.875rem;
  color: #cbd5e1;
  margin-top: 2px;
}

.top-navy-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-navy-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.btn-navy-action:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.btn-navy-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.15rem;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-navy-logout:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fee2e2;
  transform: translateY(-1px);
}

/* Navy Header Year Select */
.year-selector-container {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
}

.year-select-navy {
  background: transparent;
  color: #ffffff;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}

.year-select-navy option {
  background: #1e3a5f;
  color: #ffffff;
  font-weight: 500;
  padding: 4px;
}

/* Historical View Banner */
.history-view-banner {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-left: 5px solid #2563eb;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.history-banner-text {
  font-size: 0.9rem;
  color: #1e3a8a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Translucent Institution Info Pill (ตรงตามภาพตัวอย่าง) */
.top-navy-info-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.15rem;
  margin-top: 1rem;
  max-width: 600px;
}

.top-navy-info-pill .inst-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #ffffff;
}

.top-navy-info-pill .inst-dept {
  font-size: 0.775rem;
  color: #93c5fd;
  margin-top: 1px;
}

/* Content Container */
.app-content {
  padding: 1.5rem 2rem 2.5rem 2rem;
  flex: 1;
}

/* ========================================================
   MINIMAL STAT CARDS (ตรงตามภาพตัวอย่าง 3 การ์ดหลัก)
   ======================================================== */
.minimal-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.minimal-stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.15rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.minimal-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.stat-icon-square {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.stat-icon-green {
  background: var(--color-success-light);
  color: var(--color-success);
}

.stat-icon-blue {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.stat-icon-yellow {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.stat-icon-purple {
  background: var(--color-purple-light);
  color: var(--color-purple);
}

.minimal-stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}

.minimal-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* Minimal Action Toolbar */
.action-toolbar-minimal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.btn-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  background: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.925rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  box-shadow: var(--shadow-primary);
  transition: all 0.2s ease;
}

.btn-primary-action:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

/* Minimal Empty State / Welcome Container */
.minimal-empty-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.empty-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.35rem;
}

.empty-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ========================================================
   SIDEBAR STYLING
   ======================================================== */
.app-sidebar {
  width: 250px;
  background: var(--bg-navy-dark);
  margin: 1rem 0 1rem 1rem;
  border-radius: var(--radius-lg);
  padding: 1.25rem 0.85rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
  color: #fff;
  transition: all 0.3s ease;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.6rem 1.25rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0.75rem;
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.sidebar-logo.admin-logo {
  background: #dc2626;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

.sidebar-title {
  font-size: 0.925rem;
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
}

.sidebar-subtitle {
  font-size: 0.75rem;
  color: #94a3b8;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.sidebar-nav-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  padding: 0.65rem 0.6rem 0.25rem 0.6rem;
  font-weight: 700;
}

.nav-link-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-link-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-link-btn.active {
  background: var(--color-primary);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.nav-link-btn.active.admin-active {
  background: #dc2626;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

.nav-icon {
  font-size: 1.05rem;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.sidebar-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  gap: 0.5rem;
}

.sidebar-user-flex {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
  flex: 1;
}

.sidebar-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 2px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.sidebar-user-info {
  overflow: hidden;
  flex: 1;
}

.sidebar-user-name {
  font-size: 0.825rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  word-break: break-word;
}

.sidebar-user-role {
  font-size: 0.675rem;
  color: #94a3b8;
  line-height: 1.25;
  margin-top: 2px;
}

.sidebar-auth-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sidebar-auth-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
}

/* ========================================================
   CARDS, TABLES, FORMS & INDICATORS
   ======================================================== */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
}

.card-subtitle {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  width: 100%;
}

.table-custom {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}

.table-custom th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.table-custom td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

.table-custom tr:hover td {
  background: #f8fafc;
}

/* Minimal Chart Grids */
.charts-grid-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.chart-card-minimal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}

.chart-header-minimal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.chart-title-minimal {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
}

.chart-canvas-wrapper {
  position: relative;
  height: 250px;
  width: 100%;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-control {
  font-family: var(--font-sans);
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Table Input Customization for crystal clear numbers */
.table-custom input.form-control {
  padding: 0.35rem 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  height: 38px;
  border-radius: 6px;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  box-sizing: border-box;
}

.table-custom input.form-control:focus {
  border-color: #2563eb;
  background-color: #f0f7ff;
}

.table-num-input {
  text-align: center !important;
  font-family: var(--font-sans) !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  color: #1e293b !important;
  padding: 0.35rem 0.2rem !important;
  -moz-appearance: textfield;
}

.table-num-input::-webkit-outer-spin-button,
.table-num-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Indicator Cards */
.indicator-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
}

.indicator-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.indicator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.indicator-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.indicator-badge {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
}

.score-selector {
  display: flex;
  align-items: center;
  gap: 4px;
}

.score-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.score-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.score-btn.active {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-draft {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.badge-submitted {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.badge-approved {
  background: var(--color-success-light);
  color: var(--color-success);
}

.badge-revision {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
}

.btn-success {
  background: var(--color-success);
  color: #ffffff;
}

.btn-danger {
  background: var(--color-danger);
  color: #ffffff;
}

.btn-outline {
  background: #ffffff;
  border-color: #cbd5e1;
  color: var(--text-main);
}

.btn-outline:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

/* Tab Panes */
.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Admin Filters */
.admin-filter-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

/* ========================================================
   GLOBAL MODAL BACKDROP & DIALOG (MODAL POPUP)
   ======================================================== */
.modal-backdrop {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(15, 23, 42, 0.65) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  z-index: 9999 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
  animation: modalFadeIn 0.2s ease-out;
  overflow-y: auto;
}

.modal-card {
  background: #ffffff !important;
  border-radius: 16px !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
  width: 100% !important;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.75rem !important;
  position: relative !important;
  animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.modal-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  border-bottom: 1.5px solid #f1f5f9 !important;
  padding-bottom: 0.85rem !important;
  margin-bottom: 1.25rem !important;
}

.modal-title {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin: 0 !important;
}

.modal-close {
  background: #f1f5f9 !important;
  border: none !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  font-size: 1rem !important;
  color: #64748b !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
}

.modal-close:hover {
  background: #fee2e2 !important;
  color: #ef4444 !important;
  transform: rotate(90deg);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Modal Overlay */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-overlay.show {
  display: flex;
}

.auth-card-exact {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  padding: 1.75rem;
}

.auth-close-btn {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: #64748b;
  cursor: pointer;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: #0f172a;
  color: #ffffff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  animation: toastIn 0.3s ease;
}

.toast.success { border-left: 4px solid var(--color-success); }
.toast.danger { border-left: 4px solid var(--color-danger); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* File Upload & Drop Zone Styles */
.file-drop-zone {
  border: 2px dashed #3b82f6;
  background: #f8fafc;
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.file-drop-zone:hover {
  background: #eff6ff;
  border-color: #1d4ed8;
  transform: translateY(-1px);
}

.file-drop-zone.dragover {
  background: #dbeafe;
  border-color: #2563eb;
}

/* Responsive */
@media (max-width: 992px) {
  .app-sidebar {
    transform: translateX(-110%);
  }
  .app-sidebar.show {
    transform: translateX(0);
  }
  .app-wrapper {
    margin-left: 0;
  }
}
