/* ==========================================================================
   VMTS SURVEY PORTAL — CLINIK-INSPIRED MODERN DASHBOARD
   Prodi D3 Keperawatan Waikabubak · Poltekkes Kemenkes Kupang
   Design: Indigo Sidebar | Light Gray-Blue BG | White Cards
   ========================================================================== */

:root {
  /* ── PRIMARY INDIGO/BLUE PALETTE (Clinik-inspired) ── */
  --primary:        #4361EE;
  --primary-dark:   #3A0CA3;
  --primary-mid:    #3D52D5;
  --primary-light:  #EEF2FF;
  --primary-glow:   rgba(67, 97, 238, 0.22);

  /* ── SIDEBAR ── */
  --sidebar-from:   #4361EE;
  --sidebar-to:     #3A0CA3;
  --sidebar-width:  230px;

  /* ── ACCENT COLORS ── */
  --accent-cyan:    #4CC9F0;
  --accent-violet:  #7B2FBE;
  --accent-green:   #06D6A0;
  --accent-orange:  #F8961E;

  /* ── SEMANTIC COLORS ── */
  --success:        #06D6A0;
  --success-light:  #ECFDF5;
  --warning:        #F8961E;
  --warning-light:  #FFF7ED;
  --danger:         #EF4444;
  --danger-light:   #FEF2F2;
  --info:           #4CC9F0;
  --info-light:     #E0F7FF;

  /* ── BACKGROUNDS & SURFACES ── */
  --app-bg:         #ECEEFF;
  --surface:        #FFFFFF;
  --surface-2:      #F7F8FF;
  --light-surface:  #FFFFFF;

  /* ── BORDERS ── */
  --border-color:   #E4E7FF;
  --border-focus:   #4361EE;

  /* ── TEXT ── */
  --text-primary:   #0F112E;
  --text-secondary: #32355C;
  --text-muted:     #525785;
  --text-white:     #FFFFFF;

  /* ── SHADOWS ── */
  --shadow-xs:  0 1px 3px rgba(67, 97, 238, 0.06);
  --shadow-sm:  0 2px 8px rgba(67, 97, 238, 0.07);
  --shadow-md:  0 8px 24px rgba(67, 97, 238, 0.09);
  --shadow-lg:  0 16px 40px rgba(67, 97, 238, 0.12);
  --shadow-xl:  0 24px 60px rgba(67, 97, 238, 0.16);

  /* ── RADIUS ── */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   20px;
  --radius-2xl:  24px;
  --radius-full: 999px;

  --font-main: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;

  /* Legacy aliases */
  --kemenkes-teal:        var(--primary);
  --kemenkes-teal-dark:   var(--primary-dark);
  --kemenkes-teal-light:  var(--primary-light);
  --kemenkes-teal-glow:   var(--primary-glow);
  --kemenkes-navy:        #1A1A3E;
  --kemenkes-navy-light:  #2D2D6B;
  --light-bg:             var(--app-bg);
}

/* ==========================================================================
   RESET & GLOBAL BASE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--app-bg);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
  zoom: 90%;
}

/* ==========================================================================
   APP HEADER — CLEAN WHITE TOP BAR
   ========================================================================== */
.app-header {
  background: var(--surface);
  color: var(--text-primary);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 0 var(--border-color), var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 200;
  flex-shrink: 0;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
}

.brand-logo {
  width: 42px;
  height: 42px;
  background: #ffffff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(15, 17, 46, 0.08);
  flex-shrink: 0;
  padding: 3px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-title h1 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brand-title p {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 1px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-nav-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 3px 10px var(--primary-glow);
  transition: all 0.2s ease;
  font-family: var(--font-main);
}

.header-nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px var(--primary-glow);
}

.active-period-badge {
  background: var(--primary-light);
  border: 1px solid rgba(67, 97, 238, 0.2);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

.active-period-badge span { color: var(--primary); font-weight: 700; }

/* ==========================================================================
   LAYOUT — SIDEBAR + MAIN
   ========================================================================== */
.app-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - 64px);
}

/* ==========================================================================
   SIDEBAR — INDIGO GRADIENT (Clinik style)
   ========================================================================== */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: linear-gradient(175deg, var(--sidebar-from) 0%, var(--sidebar-to) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem 1rem;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
  position: relative;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  pointer-events: none;
}

.sidebar::after {
  content: '';
  position: absolute;
  bottom: 60px; left: -80px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
  margin-top: 0.5rem;
}

.nav-item-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-family: var(--font-main);
  position: relative;
  z-index: 1;
}

.nav-item-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.nav-item-btn.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.2);
}

.nav-icon {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-footer {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  text-align: center;
}

.sidebar-footer p { margin-bottom: 2px; }
.sidebar-footer strong { color: rgba(255,255,255,0.9); }

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
.main-content {
  flex: 1;
  padding: 1.75rem 2rem 2.5rem;
  overflow-y: auto;
  background: var(--app-bg);
}

body.public-mode .main-content {
  max-width: 1240px;
  margin: 0 auto;
}

/* ==========================================================================
   VIEW SECTIONS
   ========================================================================== */
.view-section {
  display: none;
  animation: fadeSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-section.active { display: block; }

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

/* ==========================================================================
   PAGE HEADER
   ========================================================================== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.75rem;
}

.page-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-header p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 3px;
  font-weight: 500;
}

.page-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

/* ==========================================================================
   CARDS
   ========================================================================== */
.card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover { box-shadow: var(--shadow-md); }

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* ==========================================================================
   VMTS CARDS GRID
   ========================================================================== */
.vmts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.vmts-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.vmts-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.vmts-card.visi-border::before    { background: var(--primary); }
.vmts-card.misi-border::before    { background: var(--accent-violet); }
.vmts-card.tujuan-border::before  { background: var(--accent-green); }
.vmts-card.strategi-border::before{ background: var(--accent-orange); }

.vmts-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(67, 97, 238, 0.25);
}

.vmts-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1.1rem;
}

.vmts-badge-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.vmts-badge-icon.visi    { background: var(--primary-light); color: var(--primary); }
.vmts-badge-icon.misi    { background: #F0E8FF;              color: var(--accent-violet); }
.vmts-badge-icon.tujuan  { background: var(--success-light); color: var(--success); }
.vmts-badge-icon.strategi{ background: var(--warning-light); color: var(--warning); }

.vmts-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.vmts-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  font-weight: 400;
}

/* ==========================================================================
   STAT CARDS
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

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

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

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

.stat-icon.primary   { background: var(--primary-light); color: var(--primary); }
.stat-icon.secondary { background: #F0E8FF;              color: var(--accent-violet); }
.stat-icon.success   { background: var(--success-light); color: var(--success); }
.stat-icon.warning   { background: var(--warning-light); color: var(--warning); }

.stat-info h4 {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.stat-info .stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 1px;
  letter-spacing: -0.02em;
}

.stat-info .stat-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ==========================================================================
   BUTTONS — PILL SHAPE
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  font-family: var(--font-main);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 3px 10px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px var(--primary-glow);
}

.btn-secondary {
  background: var(--text-primary);
  color: white;
  box-shadow: 0 3px 10px rgba(26, 26, 62, 0.2);
}
.btn-secondary:hover { background: #2D2D6B; transform: translateY(-1px); }

.btn-success {
  background: var(--success);
  color: white;
  box-shadow: 0 3px 10px rgba(6, 214, 160, 0.25);
}
.btn-success:hover { background: #05B887; transform: translateY(-1px); }

.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.25);
}
.btn-danger:hover { background: #DC2626; transform: translateY(-1px); }

.btn-warning {
  background: var(--warning);
  color: white;
  box-shadow: 0 3px 10px rgba(248, 150, 30, 0.25);
}
.btn-warning:hover { background: #E07B10; transform: translateY(-1px); }

.btn-outline {
  background: var(--surface);
  border: 1.5px solid var(--border-color);
  color: var(--text-primary);
}
.btn-outline:hover {
  background: var(--primary-light);
  border-color: rgba(67, 97, 238, 0.3);
  color: var(--primary);
}

.btn-sm  { padding: 6px 14px; font-size: 0.78rem; }
.btn-lg  { padding: 12px 28px; font-size: 0.95rem; }

/* ==========================================================================
   FORM ELEMENTS
   ========================================================================== */
.form-group { margin-bottom: 1.1rem; }

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.875rem;
  border: 1.5px solid #D8DBFF;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text-primary);
  transition: all 0.2s ease;
  font-family: var(--font-main);
  font-weight: 500;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.12);
}

.form-control::placeholder { color: var(--text-muted); font-weight: 400; }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239EA3C8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  background: var(--surface);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-xs);
}

/* ==========================================================================
   TABLES
   ========================================================================== */
.table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.custom-table th {
  background: var(--surface-2);
  color: var(--text-secondary);
  font-weight: 800;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.custom-table td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  color: var(--text-primary);
  font-weight: 500;
}

.custom-table tbody tr:last-child td { border-bottom: none; }
.custom-table tbody tr:hover { background: var(--primary-light); }

/* ==========================================================================
   BADGES
   ========================================================================== */
.badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.badge-primary   { background: var(--primary-light); color: var(--primary); }
.badge-secondary { background: #F0E8FF;              color: var(--accent-violet); }
.badge-success   { background: var(--success-light); color: #059669; }
.badge-warning   { background: var(--warning-light); color: #C2610A; }
.badge-danger    { background: var(--danger-light);  color: var(--danger); }
.badge-dark      { background: #EDEDF7;              color: var(--text-secondary); }

/* ==========================================================================
   CHARTS GRID
   ========================================================================== */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
}

/* ==========================================================================
   WELCOME HERO BANNER (Indigo Gradient Banner)
   ========================================================================== */
.welcome-hero-card {
  background: linear-gradient(135deg, #4361EE 0%, #3A0CA3 100%) !important;
  border-radius: var(--radius-2xl);
  padding: 2.25rem 2.5rem;
  color: #FFFFFF !important;
  margin-bottom: 1.5rem;
  box-shadow: 0 12px 32px var(--primary-glow);
  position: relative;
  overflow: hidden;
}

.welcome-hero-card::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.welcome-hero-card::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.welcome-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF !important;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
}

.welcome-hero-card h1 {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
  color: #FFFFFF !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.welcome-hero-card p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.92) !important;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero-prodi-img-box {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 3.5px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  background: #ffffff;
  flex-shrink: 0;
}

.hero-prodi-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.hero-prodi-img-box:hover .hero-prodi-img {
  transform: scale(1.08);
}

/* ==========================================================================
   SURVEY FORM
   ========================================================================== */
.survey-welcome-card {
  max-width: 640px;
  margin: 2rem auto;
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
}

.survey-welcome-card .icon-box {
  width: 72px;
  height: 72px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.25rem;
  box-shadow: 0 6px 16px var(--primary-glow);
}

.verification-form {
  max-width: 420px;
  margin: 1.5rem auto 0;
  text-align: left;
}

.survey-question-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}

.survey-question-card:hover {
  border-color: rgba(67, 97, 238, 0.3);
  box-shadow: var(--shadow-sm);
}

.q-category-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.07em;
  margin-bottom: 7px;
  background: var(--primary-light);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.q-text {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.1rem;
  line-height: 1.5;
}

.likert-options {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.likert-option { flex: 1; text-align: center; }
.likert-option input[type="radio"] { display: none; }

.likert-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 6px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--surface-2);
  height: 100%;
}

.likert-label .score-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-muted);
}

.likert-label .score-desc {
  font-size: 0.68rem;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
}

.likert-option input[type="radio"]:checked + .likert-label {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.likert-option input[type="radio"]:checked + .likert-label .score-val,
.likert-option input[type="radio"]:checked + .likert-label .score-desc {
  color: var(--primary);
  font-weight: 800;
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 62, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-content {
  background: var(--surface);
  width: 90%;
  max-width: 600px;
  border-radius: var(--radius-2xl);
  box-shadow: 0 30px 60px rgba(26, 26, 62, 0.25);
  overflow: hidden;
  animation: modalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 { font-size: 1.05rem; font-weight: 700; }

.modal-close-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  font-family: var(--font-main);
}

.modal-close-btn:hover { background: rgba(255,255,255,0.25); }

.modal-body {
  padding: 1.5rem;
  max-height: 72vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 1rem 1.5rem;
  background: var(--surface-2);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--text-primary);
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  max-width: 360px;
  animation: toastIn 0.3s ease;
  font-family: var(--font-main);
}

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

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

/* ==========================================================================
   CUSTOM CONFIRM / ALERT DIALOG
   ========================================================================== */
.modal-content.custom-dialog-content {
  max-width: 400px;
  border-radius: var(--radius-2xl);
  text-align: center;
  padding: 2rem 1.5rem;
  overflow: visible;
  box-shadow: 0 30px 60px rgba(26, 26, 62, 0.3);
  animation: dialogPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes dialogPop {
  0%   { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}

.custom-dialog-header {
  display: flex;
  justify-content: center;
  margin-bottom: 1.1rem;
}

.dialog-icon-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 8px 20px var(--primary-glow);
}

.dialog-icon-badge.danger {
  background: var(--danger-light);
  color: var(--danger);
  box-shadow: 0 8px 20px rgba(239,68,68,0.2);
}

.dialog-icon-badge.warning {
  background: var(--warning-light);
  color: var(--warning);
  box-shadow: 0 8px 20px rgba(248,150,30,0.2);
}

.custom-dialog-body h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.custom-dialog-body p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.custom-dialog-footer {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* ==========================================================================
   RESPONSIVE (MOBILE-FRIENDLY & TABLET OPTIMIZATIONS)
   ========================================================================== */
@media (max-width: 960px) {
  body { zoom: 100%; font-size: 14px; }
  
  .app-header {
    height: auto;
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
  }
  
  .brand-title h1 { font-size: 0.95rem; }
  .brand-title p { font-size: 0.68rem; }
  
  .header-controls {
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    justify-content: flex-end;
  }
  
  .header-nav-btn { padding: 6px 12px; font-size: 0.78rem; }

  .app-layout {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 60px);
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 150;
    box-shadow: 0 4px 14px rgba(58, 12, 163, 0.25);
  }
  
  .sidebar::before, .sidebar::after { display: none; }
  
  .nav-menu {
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-menu::-webkit-scrollbar { display: none; }
  
  .nav-item-btn {
    white-space: nowrap;
    padding: 8px 14px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
    color: rgba(255, 255, 255, 0.92);
  }
  
  .nav-item-btn.active {
    background: #FFFFFF;
    color: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }
  
  .sidebar-footer { display: none; }
  
  .main-content {
    padding: 1.25rem 1rem 2rem;
    height: auto;
  }
  
  .vmts-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .charts-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
  
  .likert-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }
  
  .likert-label {
    padding: 8px 4px;
    min-height: 52px;
  }
  .likert-label .score-val { font-size: 1rem; }
  .likert-label .score-desc { font-size: 0.65rem; word-break: break-word; }
}

@media (max-width: 640px) {
  .main-content { padding: 0.85rem 0.75rem 2rem; }
  
  .card, .vmts-card, .stat-card, .survey-question-card, .survey-welcome-card {
    padding: 1rem;
    border-radius: var(--radius-lg);
  }
  
  .page-header { flex-direction: column; gap: 0.75rem; align-items: flex-start; }
  .page-header h2 { font-size: 1.25rem; }
  
  .stats-grid { grid-template-columns: 1fr; }
  .filter-bar { padding: 0.85rem; gap: 8px; flex-direction: column; align-items: stretch; }
  .filter-bar .form-control { width: 100%; }
  
  .likert-options {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  
  .likert-label {
    flex-direction: row;
    justify-content: flex-start;
    padding: 10px 14px;
    gap: 12px;
    text-align: left;
    min-height: 44px;
  }
  
  .likert-label .score-val { font-size: 1.1rem; min-width: 24px; text-align: center; }
  .likert-label .score-desc { font-size: 0.8rem; text-align: left; margin-top: 0; }
  
  .table-container { margin: 0 -0.5rem; width: calc(100% + 1rem); border-radius: var(--radius-md); }
  .custom-table th, .custom-table td { padding: 10px 12px; font-size: 0.78rem; }
  
  .modal-content { width: 95%; max-width: 100%; border-radius: var(--radius-lg); }
  .modal-header { padding: 1rem; }
  .modal-body { padding: 1rem; }
  .modal-footer { padding: 0.75rem 1rem; flex-direction: column; }
  .modal-footer .btn { width: 100%; justify-content: center; }
}
