/* ==========================================================================
   MyMesyuarat 2.0 - Sistem Pengurusan Mesyuarat Kerajaan Digital
   Sistem Reka Bentuk Moden & Responsif
   ========================================================================== */

:root {
  --primary-900: #0f172a;
  --primary-800: #1e293b;
  --primary-700: #1e3a8a;
  --primary-600: #1d4ed8;
  --primary-500: #2563eb;
  --primary-400: #3b82f6;
  --primary-100: #dbeafe;
  --primary-50: #eff6ff;

  --accent-gold: #d97706;
  --accent-gold-light: #fef3c7;
  --accent-gold-hover: #b45309;

  --success-600: #16a34a;
  --success-100: #dcfce7;
  --warning-600: #d97706;
  --warning-100: #fef3c7;
  --danger-600: #dc2626;
  --danger-100: #fee2e2;
  --info-600: #0284c7;
  --info-100: #e0f2fe;

  --gray-900: #0f172a;
  --gray-800: #1e293b;
  --gray-700: #334155;
  --gray-600: #475569;
  --gray-500: #64748b;
  --gray-400: #94a3b8;
  --gray-300: #cbd5e1;
  --gray-200: #e2e8f0;
  --gray-100: #f1f5f9;
  --gray-50: #f8fafc;
  --white: #ffffff;

  --sidebar-width: 280px;
  --header-height: 70px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.06);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
  font-family: var(--font-main);
  background-color: #f4f6f9;
  color: var(--gray-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ==========================================================================
   1. LOGIN VIEW (Exact Authentic Replica + Modernized UX)
   ========================================================================== */
.login-view-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at 10% 20%, #eff6ff 0%, #f1f5f9 90%);
  padding: 24px;
  position: relative;
}

.login-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #1e3a8a 0%, #d97706 50%, #dc2626 100%);
}

.login-demo-bar {
  position: fixed;
  top: 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--gray-300);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 50;
  font-size: 13px;
  color: var(--gray-700);
}

.login-demo-bar select {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300);
  font-weight: 500;
  color: var(--primary-700);
  background: white;
  cursor: pointer;
}

.modern-login-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  padding: 40px 36px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  animation: fadeIn 0.4s ease-out;
}

.login-logo-container {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.gov-emblem-svg {
  height: 60px;
  width: auto;
}

.brand-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-800);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.brand-title span {
  color: var(--accent-gold);
}

.brand-subtitle {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-500);
  font-weight: 600;
}

.login-welcome-text h2 {
  color: #1e293b;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.login-welcome-text p {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 28px;
}

.modern-login-btn {
  width: 100%;
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
  transition: all var(--transition-normal);
}

.modern-login-btn:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(30, 64, 175, 0.35);
}

.mdid-badge-icon {
  background: white;
  color: #1e40af;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.login-help-text {
  text-align: left;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 12.5px;
  color: var(--gray-600);
  line-height: 1.6;
}

.login-help-text a {
  color: var(--primary-600);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  cursor: pointer;
}

.login-help-text a:hover {
  text-decoration: underline;
}

.login-register-link {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 20px;
}

.login-register-link a {
  color: var(--primary-600);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--primary-600);
  padding-bottom: 1px;
}

.login-version {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #94a3b8;
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   2. MAIN PORTAL APP LAYOUT
   ========================================================================== */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.app-sidebar {
  width: var(--sidebar-width);
  background: #0f172a;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.15);
  transition: transform var(--transition-normal);
}

.sidebar-brand {
  height: var(--header-height);
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #1e293b;
  background: #090e1a;
}

.sidebar-brand .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #2563eb, #1e3a8a);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.sidebar-brand-text h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #ffffff;
  line-height: 1.2;
}

.sidebar-brand-text p {
  font-size: 10.5px;
  color: #94a3b8;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sidebar-user-card {
  padding: 16px 20px;
  margin: 12px 14px;
  background: #1e293b;
  border-radius: var(--radius-md);
  border: 1px solid #334155;
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-gold);
}

.user-info-text {
  flex: 1;
  min-width: 0;
}

.user-info-text .user-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-info-text .user-role-badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(217, 119, 6, 0.2);
  color: #fbbf24;
  font-weight: 600;
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 8px 12px;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #64748b;
  padding: 12px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: #94a3b8;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 3px;
}

.nav-item:hover {
  background: #1e293b;
  color: #ffffff;
}

.nav-item.active {
  background: var(--primary-600);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.35);
}

.nav-item .nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.nav-badge {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #090e1a;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid #334155;
  color: #f87171;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
  justify-content: center;
}

.btn-logout:hover {
  background: rgba(220, 38, 38, 0.15);
  border-color: #ef4444;
}

/* MAIN CONTENT WRAPPER */
.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* TOP HEADER */
.app-header {
  height: var(--header-height);
  background: #ffffff;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.btn-toggle-sidebar {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--gray-700);
  cursor: pointer;
}

.header-committee-picker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-committee-picker select {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary-800);
  background: var(--gray-50);
  cursor: pointer;
  outline: none;
}

.header-committee-picker select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-quick-search {
  position: relative;
  width: 240px;
}

.header-quick-search input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border-radius: var(--radius-full);
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
  font-size: 13px;
  outline: none;
  transition: all var(--transition-fast);
}

.header-quick-search input:focus {
  width: 280px;
  background: #ffffff;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.header-quick-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 13px;
}

.header-role-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-50);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--primary-100);
}

.header-role-switcher label {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-700);
  text-transform: uppercase;
}

.header-role-switcher select {
  background: transparent;
  border: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary-800);
  cursor: pointer;
  outline: none;
}

.btn-icon-badge {
  position: relative;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-700);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon-badge:hover {
  background: var(--gray-200);
}

.btn-icon-badge .badge-count {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--danger-600);
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

/* ==========================================================================
   3. PAGE VIEWS & COMPONENTS
   ========================================================================== */
.page-content {
  padding: 28px;
  flex: 1;
}

.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title-group h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.4px;
}

.page-title-group p {
  font-size: 13.5px;
  color: var(--gray-500);
  margin-top: 2px;
}

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

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-600);
  color: white;
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.25);
}

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

.btn-secondary {
  background: white;
  border-color: var(--gray-300);
  color: var(--gray-700);
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

.btn-gold {
  background: var(--accent-gold);
  color: white;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25);
}

.btn-gold:hover {
  background: var(--accent-gold-hover);
}

.btn-success {
  background: var(--success-600);
  color: white;
}

.btn-success:hover {
  background: #15803d;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
}

/* STATS GRID */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.stat-info .stat-label {
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  margin-bottom: 6px;
}

.stat-info .stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
}

.stat-info .stat-trend {
  font-size: 12px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-trend.positive { color: var(--success-600); }
.stat-trend.warning { color: var(--warning-600); }

.stat-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.stat-icon-blue { background: var(--primary-100); color: var(--primary-600); }
.stat-icon-gold { background: var(--accent-gold-light); color: var(--accent-gold); }
.stat-icon-green { background: var(--success-100); color: var(--success-600); }
.stat-icon-red { background: var(--danger-100); color: var(--danger-600); }

/* DASHBOARD MAIN LAYOUT */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.card-box {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  overflow: hidden;
}

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

.card-box-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-box-body {
  padding: 20px;
}

/* MEETING ITEM CARDS */
.meeting-list-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.meeting-item-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  background: white;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.meeting-item-card:hover {
  border-color: var(--primary-400);
  box-shadow: var(--shadow-md);
}

.meeting-item-card.ongoing {
  border-left: 5px solid var(--success-600);
  background: linear-gradient(90deg, #f0fdf4 0%, #ffffff 40%);
}

.meeting-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.meeting-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-ongoing { background: var(--success-100); color: var(--success-600); }
.badge-upcoming { background: var(--primary-100); color: var(--primary-600); }
.badge-completed { background: var(--gray-200); color: var(--gray-600); }
.badge-draft { background: var(--warning-100); color: var(--warning-600); }
.badge-category { background: #ede9fe; color: #6d28d9; }

.meeting-title-text {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--gray-900);
  margin-top: 4px;
}

.meeting-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 16px;
  font-size: 13px;
  color: var(--gray-600);
}

.meeting-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meeting-meta-item i {
  color: var(--primary-600);
  width: 14px;
}

.meeting-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
  flex-wrap: wrap;
  gap: 10px;
}

/* TABLE STYLES */
.data-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.gov-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.gov-table th {
  background: var(--gray-50);
  color: var(--gray-700);
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}

.gov-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-800);
  vertical-align: middle;
}

.gov-table tbody tr:hover {
  background: var(--primary-50);
}

/* PROGRESS BAR */
.progress-container {
  width: 100%;
  background: var(--gray-200);
  height: 8px;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

.progress-green { background: var(--success-600); }
.progress-amber { background: var(--warning-600); }
.progress-red { background: var(--danger-600); }

/* TAB CONTROLS */
.tab-nav-bar {
  display: flex;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 20px;
  gap: 8px;
}

.tab-btn {
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-500);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.tab-btn.active {
  color: var(--primary-600);
  border-bottom-color: var(--primary-600);
}

/* ==========================================================================
   4. MODALS & POPUPS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}

.modal-box.modal-lg {
  max-width: 860px;
}

.modal-box.modal-xl {
  max-width: 1020px;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--gray-50);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--gray-400);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.btn-close-modal:hover {
  background: var(--gray-200);
  color: var(--gray-800);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: var(--gray-50);
}

/* FORMS */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group.col-span-2 {
  grid-column: span 2;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-label span.req {
  color: var(--danger-600);
}

.form-control {
  width: 100%;
  padding: 9px 13px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--gray-800);
  background: white;
  outline: none;
  transition: border-color var(--transition-fast);
}

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

textarea.form-control {
  min-height: 90px;
  resize: vertical;
}

/* QR ATTENDANCE MODAL */
.qr-attendance-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 0;
}

.qr-code-box {
  background: white;
  padding: 16px;
  border-radius: 12px;
  border: 2px solid var(--primary-600);
  box-shadow: var(--shadow-md);
  margin-bottom: 16px;
}

.qr-live-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--success-600);
  background: var(--success-100);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--success-600);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

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

.toast {
  background: white;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  border-left: 5px solid var(--primary-600);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  max-width: 420px;
  animation: slideInRight 0.3s ease-out;
  color: var(--gray-800);
  font-size: 13px;
}

.toast.toast-success { border-left-color: var(--success-600); }
.toast.toast-danger { border-left-color: var(--danger-600); }
.toast.toast-warning { border-left-color: var(--warning-600); }

/* ANIMATIONS */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.show {
    transform: translateX(0);
  }
  .app-main {
    margin-left: 0;
  }
  .btn-toggle-sidebar {
    display: block;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-group.col-span-2 {
    grid-column: span 1;
  }
}
