/* Global variables & Premium Light Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --font-family: 'Outfit', sans-serif;
  
  /* Color Palette (Clean Modern Light Theme) */
  --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
  --sidebar-bg: rgba(255, 255, 255, 0.85);
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-bg-hover: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(15, 23, 42, 0.08);
  --glass-border-focus: rgba(79, 70, 229, 0.4);
  
  --text-main: #0f172a;     /* Deep slate for main copy */
  --text-muted: #64748b;    /* Slate grey for subtext */
  --text-dark: #0f172a;
  
  /* Accent colors */
  --color-primary: #4f46e5; /* Indigo */
  --color-primary-hover: #4338ca;
  --color-secondary: #0891b2; /* Teal */
  --color-secondary-hover: #0e7490;
  --color-success: #10b981;
  --color-danger: #ef4444;
  --color-warning: #f59e0b;
  --color-info: #3b82f6;

  /* Soft light theme shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.05), 0 10px 10px -5px rgba(15, 23, 42, 0.03);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-family);
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.03);
}
::-webkit-scrollbar-thumb {
  background: rgba(79, 70, 229, 0.15);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(79, 70, 229, 0.35);
}

/* Main Layout Grid */
.app-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* Sidebar Overlay (Mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999;
}
.sidebar-overlay.show {
  display: block;
}

/* Sidebar Styling */
.sidebar {
  background: var(--sidebar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--glass-border);
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3.5rem;
}

.logo-icon {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.logo-text {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, var(--text-main), #475569);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.nav-item {
  width: 100%;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-link:hover {
  background: rgba(15, 23, 42, 0.04);
  color: var(--text-main);
}

.nav-link.active {
  background: rgba(79, 70, 229, 0.06);
  color: var(--color-primary);
  border: 1px solid rgba(79, 70, 229, 0.15);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.04);
}

.nav-link-icon {
  font-size: 1.2rem;
  display: inline-block;
  text-align: center;
  width: 20px;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--glass-border);
  padding-top: 1.5rem;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.user-profile-link {
  text-decoration: none;
  color: inherit;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
  cursor: pointer;
}

.user-profile-link:hover {
  background: rgba(79, 70, 229, 0.06);
  border-color: rgba(79, 70, 229, 0.12);
}

.user-profile-link.active {
  background: rgba(79, 70, 229, 0.1);
  border-color: rgba(79, 70, 229, 0.2);
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(79, 70, 229, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--color-primary);
  border: 2px solid rgba(79, 70, 229, 0.2);
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

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

.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.15);
  color: var(--color-danger);
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.logout-btn:hover {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

/* Mobile Toggler Button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast);
  line-height: 1;
}

.mobile-menu-toggle:hover {
  background: rgba(15, 23, 42, 0.05);
}

/* Main Area Layout */
.main-area {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
}

.top-bar {
  padding: 1.5rem 2.5rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.content-container {
  padding: 2.5rem;
  flex-grow: 1;
}

/* Utility Cards & Panels */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  transition: box-shadow var(--transition-normal);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
  color: #fff;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-hover) 100%);
  color: #fff;
  box-shadow: 0 4px 10px rgba(8, 145, 178, 0.15);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(8, 145, 178, 0.25);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--color-danger);
}

.btn-danger:hover {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.07);
}

.btn-sm {
  padding: 0.5rem 0.95rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 1.25rem;
}

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

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.85rem 1.2rem;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--glass-border-focus);
}

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

.form-select option {
  background-color: #ffffff;
  color: var(--text-main);
}

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

/* Dashboard Widgets */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--glass-border-focus);
}

.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: var(--shadow-sm);
}

.stat-icon.held {
  background: rgba(79, 70, 229, 0.08);
  color: var(--color-primary);
  border: 1px solid rgba(79, 70, 229, 0.15);
}

.stat-icon.spare {
  background: rgba(16, 185, 129, 0.08);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.stat-icon.expired {
  background: rgba(245, 158, 11, 0.08);
  color: var(--color-warning);
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.stat-icon.lost {
  background: rgba(239, 68, 68, 0.08);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-main);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Lists and Tables */
.table-header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.search-wrapper {
  position: relative;
  max-width: 400px;
  flex-grow: 1;
}

.search-wrapper input {
  padding-left: 2.75rem;
}

.search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}

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

.custom-table th {
  background: rgba(15, 23, 42, 0.03);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.custom-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--glass-border);
  font-size: 0.95rem;
  color: var(--text-main);
  vertical-align: middle;
}

.custom-table tbody tr {
  transition: background-color var(--transition-fast);
}

.custom-table tbody tr:hover {
  background-color: rgba(15, 23, 42, 0.015);
}

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

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-active, .badge-spare {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.badge-disabled {
  background: rgba(100, 116, 139, 0.1);
  color: #475569;
  border: 1px solid rgba(100, 116, 139, 0.15);
}

.badge-held {
  background: rgba(79, 70, 229, 0.1);
  color: #4f46e5;
  border: 1px solid rgba(79, 70, 229, 0.15);
}

.badge-expired {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.badge-lost {
  background: rgba(239, 68, 68, 0.1);
  color: #e11d48;
  border: 1px solid rgba(239, 68, 68, 0.15);
}

/* Actions Menu */
.actions-cell {
  display: flex;
  gap: 0.5rem;
}

/* Modal form popup styling */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  z-index: 1001;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  color: var(--text-main);
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  cursor: pointer;
  transition: color var(--transition-fast);
  line-height: 1;
}

.close-modal:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* File Upload Display Styling */
.thumbnail {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--glass-border);
  cursor: pointer;
}

.file-link {
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.file-link:hover {
  text-decoration: underline;
}

/* Grid splits */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

/* Timeline Components */
.timeline-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.timeline-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.timeline-card {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  transition: all var(--transition-fast);
}

.timeline-card-active {
  border-color: rgba(79, 70, 229, 0.35);
  background: rgba(79, 70, 229, 0.06);
}

.timeline-card:hover {
  border-color: rgba(79, 70, 229, 0.2);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-sm);
}

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

.timeline-period {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timeline-period-sep {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.timeline-present {
  color: var(--color-primary);
  font-weight: 600;
}

.timeline-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-checkout {
  background: rgba(79, 70, 229, 0.08);
  color: var(--color-primary);
  border: 1px solid rgba(79, 70, 229, 0.15);
}

.badge-return {
  background: rgba(16, 185, 129, 0.08);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.badge-active-hold {
  background: rgba(79, 70, 229, 0.12);
  color: var(--color-primary);
  border: 1px solid rgba(79, 70, 229, 0.25);
}

.timeline-details p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.timeline-details strong {
  color: var(--text-main);
}

.timeline-notes {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px dashed rgba(15, 23, 42, 0.08);
  font-size: 0.85rem;
  color: #334155;
}

.timeline-empty {
  color: var(--text-muted);
  text-align: center;
  padding: 2rem;
  font-style: italic;
}

.history-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.history-link:hover {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

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

.toast {
  background: #ffffff;
  border-left: 4px solid var(--color-primary);
  color: var(--text-main);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-width: 280px;
  border-top: 1px solid rgba(15, 23, 42, 0.03);
  border-right: 1px solid rgba(15, 23, 42, 0.03);
  border-bottom: 1px solid rgba(15, 23, 42, 0.03);
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.toast.error {
  border-left-color: var(--color-danger);
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
}

.toast-close:hover {
  color: var(--text-main);
}

/* Login Page Form Design */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-card {
  width: 90%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-lg);
}

.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 1rem;
}

.login-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.login-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.15);
  color: var(--color-danger);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  text-align: center;
  font-weight: 500;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.history-modal-content {
  max-width: 720px;
}

.history-modal-body {
  max-height: 60vh;
  overflow-y: auto;
}

.history-modal-body .timeline-list {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.history-modal-body .timeline-title {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .split-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

@media (max-width: 768px) {
  .app-container {
    grid-template-columns: 1fr; /* Single column */
  }

  .sidebar-overlay.show {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -260px; /* Hidden off-screen */
    width: 260px;
    height: 100vh;
    box-shadow: var(--shadow-lg);
    background: #ffffff;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sidebar.open {
    left: 0; /* Slide in menu */
  }

  .mobile-menu-toggle {
    display: block; /* Show hamburger button */
  }

  .top-bar {
    padding: 1rem 1.5rem;
  }

  .content-container {
    padding: 1.5rem;
  }

  .page-title {
    font-size: 1.25rem;
  }

  .glass-panel {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .stat-card {
    padding: 1.25rem;
  }
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .modal-content {
    width: 95%;
  }
  
  .modal-body {
    padding: 1.25rem;
  }
  
  .modal-footer {
    padding: 1rem 1.25rem;
  }

  .btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
  }
}
