/* ==========================================================================
   Hostel Management System (HMS) - Modern Dashboard Stylesheet
   Color Theme: Professional Indigo/Blue & Clean White
   Author: College Minor Project Single Page Application
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  --secondary: #475569;
  --accent: #0ea5e9;
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --info: #06b6d4;
  --info-light: #ecfeff;
  --purple: #8b5cf6;
  --purple-light: #f5f3ff;

  /* Surfaces & Backgrounds */
  --bg-main: #f1f5f9;
  --bg-card: #ffffff;
  --bg-sidebar: #0f172a;
  --bg-sidebar-hover: #1e293b;
  --bg-sidebar-active: #2563eb;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;

  /* Dimensions & Spacing */
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 80px;
  --topbar-height: 70px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --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.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 14px 25px -4px rgba(37, 99, 235, 0.12), 0 8px 10px -6px rgba(37, 99, 235, 0.08);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Base & Reset --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 0.925rem;
  line-height: 1.5;
}

/* Smooth Scrolling & Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* --- App Layout Structure --- */
#app-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  width: 100%;
}

/* --- Sidebar Styling --- */
#sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1040;
  transition: transform var(--transition-normal), width var(--transition-normal);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
}

.sidebar-header {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #ffffff;
}

.brand-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4);
}

.brand-text h5 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.2px;
  color: #ffffff;
}

.brand-text span {
  font-size: 0.7rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 0.85rem;
}

.nav-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 0.5rem 0.75rem 0.25rem;
  margin-top: 0.5rem;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-nav-item .nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: #94a3b8;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  text-decoration: none;
  position: relative;
}

.sidebar-nav-item .nav-link i {
  font-size: 1.15rem;
  width: 24px;
  margin-right: 0.85rem;
  text-align: center;
  transition: transform var(--transition-fast);
}

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

.sidebar-nav-item .nav-link:hover i {
  transform: scale(1.1);
}

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

.sidebar-nav-item .nav-badge {
  margin-left: auto;
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.6);
}

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

.user-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.user-meta h6 {
  font-size: 0.85rem;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}

.user-meta small {
  color: #94a3b8;
  font-size: 0.72rem;
}

/* Sidebar Backdrop on Mobile */
.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1030;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal);
}

.sidebar-backdrop.show {
  opacity: 1;
  visibility: visible;
}

/* --- Main Content Area --- */
#main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-main);
  transition: margin-left var(--transition-normal);
}

/* --- Topbar / Header --- */
#topbar {
  height: var(--topbar-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 0 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: var(--shadow-sm);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sidebar-toggle-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--secondary);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.sidebar-toggle-btn:hover {
  background-color: var(--border-light);
  color: var(--primary);
}

.topbar-page-info h4 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar-page-info span.date-indicator {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Global Search Trigger */
.global-search-trigger {
  display: flex;
  align-items: center;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.45rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 240px;
}

.global-search-trigger:hover {
  border-color: var(--primary);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.global-search-trigger kbd {
  margin-left: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

/* Topbar Action Buttons */
.topbar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.topbar-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.3);
}

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

/* Profile Dropdown */
.profile-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: #ffffff;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.profile-pill:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.profile-pill .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
}

/* --- Section Container --- */
.content-body {
  padding: 1.75rem;
  flex: 1;
}

.page-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

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

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

/* --- Page Header Banner --- */
.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.3px;
}

.section-header p {
  color: var(--text-muted);
  margin: 0.25rem 0 0 0;
  font-size: 0.875rem;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* --- Modern Card Styling --- */
.hms-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
  overflow: hidden;
}

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

.card-header-clean {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #ffffff;
}

.card-header-clean h5 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-body-clean {
  padding: 1.5rem;
}

/* --- Dashboard Stat Cards --- */
.stat-card {
  padding: 1.35rem 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  border-top-left-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-lg);
}

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

.stat-card.stat-blue::before { background: var(--primary); }
.stat-card.stat-indigo::before { background: var(--purple); }
.stat-card.stat-green::before { background: var(--success); }
.stat-card.stat-orange::before { background: var(--warning); }
.stat-card.stat-red::before { background: var(--danger); }
.stat-card.stat-cyan::before { background: var(--info); }

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

.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.indigo { background: var(--purple-light); color: var(--purple); }
.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.orange { background: var(--warning-light); color: var(--warning); }
.stat-icon.red { background: var(--danger-light); color: var(--danger); }
.stat-icon.cyan { background: var(--info-light); color: var(--info); }

.stat-info span.stat-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.stat-info h3.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  line-height: 1.2;
}

.stat-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* --- Filter & Action Toolbars --- */
.table-toolbar {
  background: #ffffff;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.search-input-group {
  position: relative;
  min-width: 260px;
  flex: 1;
  max-width: 380px;
}

.search-input-group i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.search-input-group input {
  padding-left: 2.5rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

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

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.filter-group select {
  font-size: 0.85rem;
  border-radius: var(--radius-md);
  border-color: var(--border-color);
  padding: 0.45rem 2rem 0.45rem 0.85rem;
}

/* --- Custom Styled Tables --- */
.hms-table-container {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-responsive {
  margin: 0;
}

.hms-table {
  width: 100%;
  margin-bottom: 0;
  vertical-align: middle;
}

.hms-table thead th {
  background-color: #f8fafc;
  color: var(--secondary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.hms-table tbody td {
  padding: 0.95rem 1rem;
  font-size: 0.875rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-light);
}

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

.hms-table tbody tr:hover {
  background-color: #f8fafc;
}

/* Table User Cell */
.user-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar-sm-table {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.user-details h6 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

.user-details span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Action Buttons in Tables --- */
.action-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-icon-action {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--secondary);
  font-size: 0.825rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon-action:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.3);
}

.btn-icon-action.btn-danger-hover:hover {
  background: var(--danger-light);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-icon-action.btn-success-hover:hover {
  background: var(--success-light);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.3);
}

/* --- Status Badges --- */
.status-pill {
  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;
  line-height: 1.2;
}

.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.status-paid {
  background-color: var(--success-light);
  color: #065f46;
}
.status-paid::before { background-color: var(--success); }

.status-partial {
  background-color: var(--warning-light);
  color: #92400e;
}
.status-partial::before { background-color: var(--warning); }

.status-pending {
  background-color: var(--danger-light);
  color: #991b1b;
}
.status-pending::before { background-color: var(--danger); }

.status-available {
  background-color: var(--success-light);
  color: #065f46;
}
.status-available::before { background-color: var(--success); }

.status-full {
  background-color: var(--danger-light);
  color: #991b1b;
}
.status-full::before { background-color: var(--danger); }

.status-maintenance {
  background-color: var(--warning-light);
  color: #92400e;
}
.status-maintenance::before { background-color: var(--warning); }

.status-in-progress {
  background-color: var(--info-light);
  color: #155e75;
}
.status-in-progress::before { background-color: var(--info); }

.status-resolved {
  background-color: var(--success-light);
  color: #065f46;
}
.status-resolved::before { background-color: var(--success); }

/* Priority Badges */
.badge-priority {
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-transform: uppercase;
}

.priority-low { background: #e2e8f0; color: #475569; }
.priority-medium { background: var(--info-light); color: var(--info); }
.priority-high { background: var(--warning-light); color: var(--warning); }
.priority-urgent { background: var(--danger-light); color: var(--danger); }

/* --- Room Cards Grid --- */
.room-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
  height: 100%;
  position: relative;
}

.room-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.room-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.room-number-badge {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.room-type-tag {
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-main);
  color: var(--secondary);
  font-weight: 600;
}

.bed-visualizer {
  display: flex;
  gap: 0.5rem;
  margin: 0.85rem 0;
  flex-wrap: wrap;
}

.bed-chip {
  flex: 1;
  min-width: 45px;
  padding: 0.45rem 0.25rem;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.bed-chip.occupied {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.bed-chip.vacant {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.room-meta-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1rem 0;
  font-size: 0.825rem;
  color: var(--secondary);
}

.room-meta-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.3rem 0;
  border-bottom: 1px dashed var(--border-light);
}

.room-meta-list li:last-child {
  border-bottom: none;
}

/* Room Occupancy Progress */
.occupancy-progress {
  height: 6px;
  border-radius: var(--radius-full);
  background-color: var(--bg-main);
  overflow: hidden;
  margin-bottom: 1rem;
}

.occupancy-progress .progress-bar {
  border-radius: var(--radius-full);
}

/* --- Empty States --- */
.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
}

.empty-state-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.empty-state h5 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.875rem;
  max-width: 360px;
  margin: 0 auto 1.25rem auto;
}

/* --- Modal Styles --- */
.modal-content {
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 1.5rem;
  background: #f8fafc;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.modal-header .modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  background: #f8fafc;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

/* Form Controls Inside Modals */
.form-label {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 0.35rem;
}

.form-control, .form-select {
  border-radius: var(--radius-md);
  border-color: var(--border-color);
  font-size: 0.875rem;
  padding: 0.55rem 0.85rem;
  transition: all var(--transition-fast);
}

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

/* Buttons */
.btn-primary {
  background: var(--primary-gradient);
  border: none;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  font-weight: 600;
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
  border-radius: var(--radius-md);
  font-weight: 600;
}

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

/* --- Toast Container --- */
.toast-container {
  z-index: 1090;
}

.custom-toast {
  border-radius: var(--radius-md);
  border: none;
  box-shadow: var(--shadow-lg);
  background: #ffffff;
  overflow: hidden;
}

/* --- Details Modal Layout --- */
.details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.detail-item {
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.detail-item span.label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.detail-item h6.value {
  margin: 0;
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--text-main);
  word-break: break-word;
}

/* --- Fee Receipt Modal Styling --- */
.receipt-box {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  background: #ffffff;
}

.receipt-header {
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.receipt-header h4 {
  font-weight: 800;
  margin-bottom: 0.2rem;
  color: var(--primary);
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.875rem;
}

.receipt-row.total-row {
  border-top: 2px solid var(--text-main);
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  font-weight: 800;
  font-size: 1rem;
}

/* --- Quick Actions on Dashboard --- */
.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.quick-action-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.3);
  transform: translateY(-2px);
}

.quick-action-btn i {
  font-size: 1.4rem;
}

/* --- Responsive Layout Breakpoints --- */
@media (max-width: 991.98px) {
  #sidebar {
    transform: translateX(-100%);
  }

  #sidebar.mobile-open {
    transform: translateX(0);
  }

  #main-wrapper {
    margin-left: 0;
  }

  .global-search-trigger {
    width: 180px;
  }
}

@media (max-width: 767.98px) {
  #topbar {
    padding: 0 1rem;
  }

  .content-body {
    padding: 1rem;
  }

  .global-search-trigger {
    display: none;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input-group {
    max-width: 100%;
  }

  .filter-group {
    width: 100%;
    justify-content: space-between;
  }

  .filter-group select {
    flex: 1;
  }
}

/* --- Print Styling --- */
@media print {
  body {
    background-color: #ffffff !important;
    color: #000000 !important;
  }

  #sidebar,
  #topbar,
  .table-toolbar,
  .action-btn-group,
  .btn-icon-action,
  .section-actions,
  .no-print,
  .modal-footer {
    display: none !important;
  }

  #main-wrapper {
    margin-left: 0 !important;
  }

  .content-body {
    padding: 0 !important;
  }

  .hms-card,
  .hms-table-container {
    border: 1px solid #ddd !important;
    box-shadow: none !important;
  }

  .modal {
    position: static !important;
    display: block !important;
  }

  .modal-dialog {
    max-width: 100% !important;
    margin: 0 !important;
  }

  .modal-content {
    box-shadow: none !important;
    border: none !important;
  }
}
