/* lms/style.css - Styling for VVIT Staff Leave Management System */
:root {
  --navy: #0B1F4B;
  --navy-light: #162e65;
  --navy-dark: #050f24;
  --gold: #D4A017;
  --gold-light: #e6b327;
  --off-white: #f8fafc;
  --bg-slate: #f1f5f9;
  --text-dark: #1a2340;
  --text-muted: #64748b;
  --border: #e2e8f0;
  
  --success: #15803d;
  --success-bg: #f0fdf4;
  --warning: #b45309;
  --warning-bg: #fffbeb;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --info: #0284c7;
  --info-bg: #f0f9ff;
  
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 4px 20px rgba(11,31,75,0.06);
  --shadow-lg: 0 10px 30px rgba(11,31,75,0.12);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive Grid Utilities */
.responsive-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}
.responsive-grid-2col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  align-items: start;
}
@media (max-width: 992px) {
  .responsive-grid-2,
  .responsive-grid-2col {
    grid-template-columns: 1fr;
  }
}


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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text-dark);
  background: var(--off-white);
  overflow-x: hidden;
  line-height: 1.5;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* --- Layout Structure --- */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar (Desktop) */
.sidebar {
  width: 260px;
  background: var(--navy-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.05);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: var(--transition);
}

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

.sidebar-logo {
  height: 40px;
  object-fit: contain;
}

.sidebar-title {
  font-family: 'Sora', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

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

.sidebar-menu {
  list-style: none;
  padding: 20px 12px;
  flex: 1;
  overflow-y: auto;
}

.sidebar-item {
  margin-bottom: 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #94a3b8;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius);
  transition: var(--transition);
}

.sidebar-link:hover, .sidebar-link.active {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.sidebar-link.active {
  border-left: 4px solid var(--gold);
}

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

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-dark);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

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

.user-name {
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.user-role {
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 600;
  text-transform: uppercase;
}

.logout-icon {
  color: #94a3b8;
  cursor: pointer;
  transition: var(--transition);
}
.logout-icon:hover {
  color: #f87171;
}

/* Main Content Area */
.main-wrapper {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-bottom: 40px;
}

.main-header {
  height: 70px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.page-title-area h2 {
  font-family: 'Sora', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
}

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

.notification-bell {
  position: relative;
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--text-muted);
  transition: var(--transition);
}
.notification-bell:hover {
  color: var(--navy);
}

.bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Content Frame */
.content-body {
  padding: 30px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* --- Components & Cards --- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
  transition: var(--transition);
}

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

.card-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Balances Grid */
.balance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.balance-card {
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.balance-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.balance-card.cl::before     { background: var(--info); }
.balance-card.el::before     { background: var(--success); }
.balance-card.rh::before     { background: var(--warning); }
.balance-card.scl\/ood::before { background: var(--navy); }
.balance-card.lop::before    { background: var(--danger); }

.balance-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.balance-val {
  font-family: 'Sora', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
}

.balance-lbl {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- Badges and Status Labels --- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-badge.draft { background: var(--bg-slate); color: var(--text-muted); }
.status-badge.sub_waiting { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(180,83,9,0.15); }
.status-badge.sub_rejected { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(185,28,28,0.15); }
.status-badge.sub_accepted, .status-badge.pending_hod { background: var(--info-bg); color: var(--info); border: 1px solid rgba(2,132,199,0.15); }
.status-badge.hod_approved, .status-badge.pending_principal { background: #faf5ff; color: #7c3aed; border: 1px solid rgba(124,58,237,0.15); }
.status-badge.approved { background: var(--success-bg); color: var(--success); border: 1px solid rgba(21,128,61,0.15); }
.status-badge.rejected { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(185,28,28,0.15); }
.status-badge.cancelled { background: var(--bg-slate); color: var(--text-muted); }

/* --- Forms Elements --- */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--navy);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  background: #fff;
  color: var(--text-dark);
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,160,23,0.1);
}

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  font-family: inherit;
  text-decoration: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--navy);
  color: #fff;
}
.btn-primary:hover {
  background: var(--navy-light);
  transform: translateY(-1px);
}

.btn-gold {
  background: var(--gold);
  color: var(--navy-dark);
}
.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-slate);
  color: var(--text-dark);
}
.btn-secondary:hover {
  background: var(--border);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background: #991b1b;
}

/* --- Wizard Flow --- */
.wizard-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  position: relative;
}

.wizard-steps::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--border);
  z-index: 1;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition);
}

.step-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.wizard-step.active .step-circle {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--navy-dark);
  box-shadow: 0 4px 12px rgba(212,160,23,0.25);
}
.wizard-step.active .step-label {
  color: var(--navy);
}

.wizard-step.completed .step-circle {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.wizard-panel {
  display: none;
}
.wizard-panel.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out forwards;
}

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

/* --- Timeline approval view --- */
.timeline {
  margin-top: 20px;
  position: relative;
  padding-left: 30px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 9px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
}

.timeline-marker {
  position: absolute;
  left: -30px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-item.completed .timeline-marker {
  border-color: var(--success);
  background: var(--success);
}
.timeline-item.pending .timeline-marker {
  border-color: var(--warning);
  background: #fff;
}
.timeline-item.rejected .timeline-marker {
  border-color: var(--danger);
  background: var(--danger);
}

.timeline-content {
  background: var(--off-white);
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.timeline-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
}

.timeline-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* --- Table styling --- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  text-align: left;
}

.table th {
  padding: 14px 18px;
  background: var(--navy-dark);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table td {
  padding: 14px 18px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

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

/* --- Notifications & Dialogs --- */
.notification-card {
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
  position: relative;
}

.notification-card.unread {
  border-left: 4px solid var(--gold);
  background: #fdfdfd;
}

.notification-card:hover {
  transform: translateX(4px);
}

.dialog-modal {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 500px;
  width: 90%;
  padding: 0;
  margin: auto;
  outline: none;
}

.dialog-modal::backdrop {
  background: rgba(11,31,75,0.4);
  backdrop-filter: blur(4px);
}

.modal-header {
  background: var(--navy);
  color: #fff;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  background: var(--off-white);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Alerts Banner */
.alert-banner {
  padding: 14px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 0.88rem;
}
.alert-banner.danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(185,28,28,0.15);
}

/* Mobile Bottom Navigation (Hidden by default on Desktop) */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  z-index: 1000;
}

.mobile-nav-inner {
  display: flex;
  height: 100%;
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 700;
}

.mobile-nav-link.active, .mobile-nav-link:hover {
  color: var(--navy);
}

.mobile-nav-link i {
  font-size: 1.25rem;
  margin-bottom: 2px;
}

/* Hamburger Button (hidden on desktop) */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--navy);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  transition: var(--transition);
}
.hamburger-btn:hover {
  background: var(--bg-slate);
}

/* Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5,15,36,0.5);
  z-index: 99;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show {
  display: block;
}

/* --- Responsive CSS --- */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 200;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .mobile-nav {
    display: block;
  }
  .content-body {
    padding: 20px 16px 80px 16px;
  }
  .hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  /* Responsive grids */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns: 2fr 1fr"],
  [style*="grid-template-columns: 2fr 1.2fr"],
  [style*="grid-template-columns: 1fr 2fr"] {
    grid-template-columns: 1fr !important;
  }
  .committee-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .main-header {
    padding: 0 16px;
  }
  .content-body {
    padding: 16px 12px 80px 12px;
  }
  .card {
    padding: 16px;
  }
  .table th, .table td {
    padding: 10px 12px;
    font-size: 0.82rem;
  }
  .balance-val {
    font-size: 1.6rem;
  }
  .poe-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

