@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-inverse: #ffffff;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --border-focus: #0d9488;
  --primary: #0d9488;
  --primary-hover: #0f766e;
  --primary-light: rgba(13, 148, 136, 0.1);
  --primary-text: #0f766e;
  --primary-gradient: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-light: rgba(99, 102, 241, 0.1);
  --accent-text: #4338ca;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --success: #10b981;
  --success-hover: #059669;
  --success-light: rgba(16, 185, 129, 0.1);
  --success-text: #047857;
  --warning: #f59e0b;
  --warning-hover: #d97706;
  --warning-light: rgba(245, 158, 11, 0.1);
  --warning-text: #b45309;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --danger-light: rgba(239, 68, 68, 0.1);
  --danger-text: #b91c1c;
  --info: #0284c7;
  --info-light: rgba(2, 132, 199, 0.1);
  --info-text: #0369a1;
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.04), 0 1px 2px 0 rgba(0, 0, 0, 0.02);
  --shadow-md: 0 8px 16px -2px rgba(15, 23, 42, 0.06), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 24px rgba(13, 148, 136, 0.22);
  --shadow-glow-accent: 0 0 24px rgba(99, 102, 241, 0.22);
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  --sidebar-width: 270px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg-base: #06090f;
  --bg-surface: #0b111e;
  --bg-card: #0f172a;
  --bg-subtle: #162036;
  --bg-hover: #1e2d4d;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --text-inverse: #06090f;
  --border-color: #1e293b;
  --border-light: #162036;
  --border-focus: #14b8a6;
  --primary: #14b8a6;
  --primary-hover: #2dd4bf;
  --primary-light: rgba(20, 184, 166, 0.16);
  --primary-text: #5eead4;
  --primary-gradient: linear-gradient(135deg, #14b8a6 0%, #38bdf8 100%);
  --accent: #818cf8;
  --accent-hover: #a5b4fc;
  --accent-light: rgba(129, 140, 248, 0.16);
  --accent-text: #c7d2fe;
  --accent-gradient: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
  --success: #34d399;
  --success-hover: #6ee7b7;
  --success-light: rgba(52, 211, 153, 0.16);
  --success-text: #a7f3d0;
  --warning: #fbbf24;
  --warning-hover: #fcd34d;
  --warning-light: rgba(251, 191, 36, 0.16);
  --warning-text: #fde68a;
  --danger: #f87171;
  --danger-hover: #fca5a5;
  --danger-light: rgba(248, 113, 113, 0.16);
  --danger-text: #fecaca;
  --info: #38bdf8;
  --info-light: rgba(56, 189, 248, 0.16);
  --info-text: #bae6fd;
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 20px 0 rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 30px 0 rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 28px rgba(20, 184, 166, 0.28);
  --shadow-glow-accent: 0 0 28px rgba(129, 140, 248, 0.28);
}

[data-font-size="sm"] {
  font-size: 13.5px;
}
[data-font-size="md"] {
  font-size: 15px;
}
[data-font-size="lg"] {
  font-size: 16.5px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 15px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-main);
  line-height: 1.25;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--primary-hover);
}

.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  transition: transform var(--transition-normal);
  backdrop-filter: blur(16px);
}

.sidebar-header {
  padding: 24px 22px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border-color);
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
  flex-shrink: 0;
}
.brand-icon.admin-icon {
  background: var(--accent-gradient);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

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

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.15;
}

.brand-tagline {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
}
.brand-tagline.admin-tagline {
  color: var(--accent);
}

.sidebar-nav {
  padding: 16px 14px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  padding: 14px 12px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.nav-link:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}
.nav-link:hover svg {
  transform: scale(1.08);
}

.nav-link.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}
.nav-link.active.admin-link {
  background: var(--accent-light);
  color: var(--accent);
}
.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3.5px;
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  background: var(--primary);
}
.nav-link.active.admin-link::before {
  background: var(--accent);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.user-snippet {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
}

.user-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--primary-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.88rem;
  flex-shrink: 0;
}
.user-avatar-sm.admin-avatar {
  background: var(--accent-gradient);
}

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

.user-display-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: 72px;
  padding: 0 32px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.breadcrumb-separator {
  color: var(--text-light);
  font-size: 0.8rem;
}

.breadcrumb-current {
  font-weight: 700;
  color: var(--text-main);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.accessibility-controls {
  display: inline-flex;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 2px 4px;
}

.font-size-btn {
  background: none;
  border: none;
  padding: 4px 9px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.font-size-btn:hover {
  color: var(--text-main);
}

.font-size-btn.active {
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}

.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: var(--bg-hover);
  color: var(--primary);
  transform: rotate(15deg);
}

.theme-toggle-btn svg {
  width: 18px;
  height: 18px;
}

.content-body {
  padding: 32px;
  flex: 1;
}

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

.page-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 0.94rem;
  color: var(--text-muted);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal), border-color var(--transition-normal);
  overflow: hidden;
  margin-bottom: 24px;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(13, 148, 136, 0.25);
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card-body {
  padding: 24px;
}

.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.45);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-color);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--text-light);
  color: var(--text-main);
}

.btn-accent {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}
.btn-accent:hover {
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}
.btn-danger:hover {
  background: var(--danger-hover);
  color: #ffffff;
}

.btn-sm {
  padding: 7px 13px;
  font-size: 0.82rem;
  border-radius: var(--radius-xs);
}

.btn-lg {
  padding: 14px 26px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-main);
}
.btn-outline:hover {
  background: var(--bg-subtle);
}

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

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

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stat-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-icon svg {
  width: 21px;
  height: 21px;
}
.stat-icon.green {
  background: var(--success-light);
  color: var(--success);
}
.stat-icon.red {
  background: var(--danger-light);
  color: var(--danger);
}
.stat-icon.teal {
  background: var(--primary-light);
  color: var(--primary);
}
.stat-icon.indigo {
  background: var(--accent-light);
  color: var(--accent);
}
.stat-icon.amber {
  background: var(--warning-light);
  color: var(--warning);
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  line-height: 1.15;
  margin-bottom: 6px;
}

.stat-subtext {
  font-size: 0.82rem;
  color: var(--text-muted);
}

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

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

.form-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 7px;
  letter-spacing: -0.01em;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 0.94rem;
  color: var(--text-main);
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  transition: all var(--transition-fast);
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.16);
  background-color: var(--bg-surface);
}

.form-control::placeholder {
  color: var(--text-light);
}

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

.form-helper {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 5px;
}

.form-error {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 5px;
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary);
}
.badge-success {
  background: var(--success-light);
  color: var(--success);
}
.badge-warning {
  background: var(--warning-light);
  color: var(--warning-text);
}
.badge-danger {
  background: var(--danger-light);
  color: var(--danger);
}
.badge-accent {
  background: var(--accent-light);
  color: var(--accent);
}
.badge-neutral {
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.alert {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.92rem;
  border: 1px solid transparent;
}

.alert-success {
  background: var(--success-light);
  color: var(--success-text);
  border-color: rgba(16, 185, 129, 0.25);
}

.alert-warning {
  background: var(--warning-light);
  color: var(--warning-text);
  border-color: rgba(245, 158, 11, 0.25);
}

.alert-danger {
  background: var(--danger-light);
  color: var(--danger-text);
  border-color: rgba(239, 68, 68, 0.25);
}

.alert-primary {
  background: var(--primary-light);
  color: var(--primary-text);
  border-color: rgba(13, 148, 136, 0.25);
}

.custom-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.92rem;
}

.custom-table th {
  padding: 13px 20px;
  text-align: left;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-color);
}

.custom-table td {
  padding: 16px 20px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  transition: background var(--transition-fast);
}

.custom-table tbody tr:hover td {
  background: var(--bg-subtle);
}

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

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.progress-bar-container {
  width: 100%;
  height: 10px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-bar-fill.safe {
  background: linear-gradient(90deg, #10b981 0%, #14b8a6 100%);
}
.progress-bar-fill.warning {
  background: linear-gradient(90deg, #f59e0b 0%, #f97316 100%);
}
.progress-bar-fill.danger {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-state-img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  margin-bottom: 20px;
  box-shadow: var(--shadow-glow);
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 420px;
  margin-bottom: 20px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 15, 0.65);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 560px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: scale(0.96);
  transition: transform var(--transition-normal);
}

.modal-backdrop.active .modal-card {
  transform: scale(1);
}

.modal-header {
  padding: 22px 26px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-xs);
  transition: color var(--transition-fast);
}
.modal-close-btn:hover {
  color: var(--danger);
}

.modal-body {
  padding: 26px;
  max-height: 75vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 18px 26px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  z-index: 45;
  backdrop-filter: blur(16px);
  padding: 0 12px;
  align-items: center;
  justify-content: space-around;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.bottom-nav-item svg {
  width: 20px;
  height: 20px;
}

.bottom-nav-item.active {
  color: var(--primary);
}

.ai-suggestion-badge {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(13, 148, 136, 0.2);
  animation: fadeIn 0.3s ease;
}

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

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: radial-gradient(ellipse at top left, rgba(13, 148, 136, 0.12), transparent 50%),
              radial-gradient(ellipse at bottom right, rgba(99, 102, 241, 0.12), transparent 50%),
              var(--bg-base);
}

.auth-card-split {
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.auth-side-panel {
  background: linear-gradient(135deg, #091322 0%, #0f172a 100%);
  color: #ffffff;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-side-panel::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 240px;
  height: 240px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle, rgba(13, 148, 136, 0.35), transparent 70%);
}

.auth-side-panel::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 240px;
  height: 240px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle, rgba(99, 102, 241, 0.35), transparent 70%);
}

.auth-form-panel {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-normal);
}
[data-theme="dark"] .landing-nav {
  background: rgba(11, 17, 30, 0.85);
}

.landing-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.landing-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  flex-wrap: nowrap;
  flex-shrink: 1;
}

.landing-links a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  white-space: nowrap;
}
.landing-links a:hover {
  color: var(--primary);
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.landing-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
}

.hero-section {
  padding: 80px 0 60px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 20px;
  border: 1px solid rgba(13, 148, 136, 0.25);
}

.hero-title {
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}

.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-accent-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.14rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-image-wrap {
  position: relative;
}

.hero-image {
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border: 1px solid var(--border-color);
  object-fit: cover;
  transition: transform var(--transition-normal);
}
.hero-image:hover {
  transform: translateY(-4px);
}

.marketing-features {
  padding: 80px 0;
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 52px;
}

.section-tag {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.feature-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.feature-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.feature-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.landing-footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  padding: 60px 0 32px;
  margin-top: 80px;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}

.footer-col-title {
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-main);
  margin-bottom: 16px;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-list a {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.footer-links-list a:hover {
  color: var(--primary);
}

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 28px 0;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

.dashboard-greeting-card {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.12) 0%, rgba(99, 102, 241, 0.08) 100%), var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.greeting-avatar {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-xl);
  object-fit: cover;
  box-shadow: var(--shadow-glow);
  border: 2px solid var(--bg-surface);
  flex-shrink: 0;
}

.chart-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
}

.chart-wrap {
  position: relative;
  flex: 1;
  width: 100%;
}

.budget-progress-tile {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 12px;
  transition: all var(--transition-fast);
}

.budget-progress-tile:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
}

.auth-wrapper,
.auth-container,
.auth-split-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: radial-gradient(circle at 10% 20%, rgba(13, 148, 136, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
              var(--bg-base);
}

.auth-card-split {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  width: 100%;
  max-width: 980px;
  min-height: 580px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 20px 40px -15px rgba(0, 0, 0, 0.1);
}

.auth-side-panel,
.auth-brand-side {
  background: linear-gradient(145deg, #090e17 0%, #0f172a 50%, #1e1b4b 100%);
  padding: 44px 38px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  color: #ffffff;
}

.auth-side-panel::before,
.auth-brand-side::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -40%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.auth-side-panel::after,
.auth-brand-side::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -20%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.auth-form-panel,
.auth-form-side {
  padding: 44px 40px;
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 38px;
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-title {
  font-size: 1.65rem;
  font-weight: 800;
  margin-top: 12px;
}

.auth-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
}

@media (max-width: 1024px) {
  :root {
    --sidebar-width: 240px;
  }
  .hero-section {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 0;
  }
  .hero-title {
    font-size: 2.8rem;
  }
  .auth-card-split {
    grid-template-columns: 1fr;
  }
  .auth-side-panel {
    display: none;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  }
  .main-content {
    margin-left: 0;
    padding-bottom: 74px;
  }
  .mobile-menu-btn {
    display: block;
  }
  .bottom-nav {
    display: flex;
  }
  .content-body {
    padding: 20px 16px;
  }
  .topbar {
    padding: 0 16px;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .landing-links {
    display: none;
  }
  .dashboard-greeting-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

/* ===== PAGINATION ===== */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-summary {
  font-size: 0.84rem;
  color: var(--text-muted);
  font-weight: 500;
}

.pagination-summary span {
  color: var(--text-main);
  font-weight: 700;
}

.custom-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.custom-pagination .page-item {
  list-style: none;
}

.custom-pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.custom-pagination .page-link:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.15);
}

.custom-pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.35);
  cursor: default;
  transform: none;
}

.custom-pagination .page-item.disabled .page-link {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  background: var(--bg-subtle);
}

/* Prev / Next get slightly wider pill shape */
.custom-pagination .page-item:first-child .page-link,
.custom-pagination .page-item:last-child .page-link {
  padding: 0 14px;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

