/* Light Theme - Premium World-Class Cinematic CSS Design System */
:root {
  --bg-primary: #f6f8fc;
  --bg-secondary: #ffffff;
  --bg-sidebar: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-border: rgba(15, 23, 42, 0.06);
  --card-border-hover: rgba(37, 99, 235, 0.25);
  
  --text-main: #0f172a;      /* Deep Slate */
  --text-muted: #475569;     /* Slate Muted */
  --text-disabled: #94a3b8;  /* Light Grey */
  
  --blue: #2563eb;           /* Brand Blue */
  --blue-hover: #1d4ed8;
  --blue-glow: rgba(37, 99, 235, 0.06);
  
  --purple: #7c3aed;
  --purple-glow: rgba(124, 58, 237, 0.06);
  
  --cyan: #0891b2;
  --cyan-glow: rgba(8, 145, 178, 0.06);
  
  --emerald: #059669;
  --emerald-glow: rgba(5, 150, 105, 0.06);
  
  --red: #dc2626;
  
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-title: 'Outfit', sans-serif;
  
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.03), 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 20px 50px -12px rgba(15, 23, 42, 0.08);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  height: 100vh;
}

/* App Container Layout */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Sidebar Styling - Clean Light Glassmorphism */
.sidebar {
  width: 290px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  flex-shrink: 0;
  overflow-y: auto;
  box-shadow: 4px 0 30px rgba(15, 23, 42, 0.015);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--border-radius-md);
  background: #ffffff;
  border: 1.5px solid rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.brand-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.brand h2 {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

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

.control-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 36px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-group label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.control-group label i {
  width: 14px;
  height: 14px;
  color: var(--blue);
}

/* Form Controls - High Legibility Dropdowns & Inputs */
.form-input {
  width: 100%;
  background-color: #f8fafc;
  border: 1.5px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--border-radius-md);
  color: var(--text-main);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-body);
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.01);
}

.form-input:focus {
  border-color: var(--blue);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

/* Dropdown Option Fixing (Resolves hidden dropdown text bug) */
select.form-input {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

/* Custom Select Container & Dropdown Styling */
.custom-select-container {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  width: 100%;
  background-color: #f8fafc;
  border: 1.5px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--border-radius-md);
  color: var(--text-main);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.01);
  font-family: var(--font-body);
}

.custom-select-trigger:focus,
.custom-select-container.open .custom-select-trigger {
  border-color: var(--blue);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.custom-select-arrow {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform 0.25s ease, color 0.25s ease;
}

.custom-select-container.open .custom-select-arrow {
  transform: rotate(180deg);
  color: var(--blue);
}

.custom-select-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background-color: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--border-radius-md);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  z-index: 100;
  max-height: 280px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.custom-select-container.open .custom-select-options {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.custom-select-option {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.custom-select-option:hover {
  background-color: #f1f5f9;
}

.custom-select-option.active {
  background-color: var(--blue-glow);
  color: var(--blue);
  font-weight: 600;
}

.net-id-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-family: monospace;
}

.custom-select-option.active .net-id-sub {
  color: var(--blue);
  opacity: 0.8;
}

/* Custom Datepicker Container & Calendar Card */
.custom-datepicker-container {
  position: relative;
  width: 100%;
}

.custom-datepicker-trigger {
  width: 100%;
  background-color: #f8fafc;
  border: 1.5px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--border-radius-md);
  color: var(--text-main);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.01);
  font-family: var(--font-body);
}

.custom-datepicker-trigger:focus,
.custom-datepicker-container.open .custom-datepicker-trigger {
  border-color: var(--blue);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.custom-datepicker-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: color 0.25s ease;
}

.custom-datepicker-container.open .custom-datepicker-icon {
  color: var(--blue);
}

.custom-datepicker-calendar {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background-color: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--border-radius-md);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  z-index: 100;
  padding: 12px;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.custom-datepicker-container.open .custom-datepicker-calendar {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

/* Calendar Header */
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

/* Calendar View Selector Toggles */
.calendar-selectors {
  display: flex;
  gap: 2px;
  align-items: center;
}

.cal-view-toggle {
  background: transparent;
  border: none;
  font-family: var(--font-title);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  outline: none;
  padding: 4px 8px;
  border-radius: var(--border-radius-sm);
  transition: all 0.25s ease;
}

.cal-view-toggle:hover,
.cal-view-toggle.active {
  background-color: #f1f5f9;
  color: var(--blue);
}

/* Calendar Month & Year Selection Grids */
.calendar-months-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px 0;
}

.calendar-years-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px 4px 8px 0;
  max-height: 160px;
  overflow-y: auto;
}

/* Custom Styled Scrollbar for Years Grid */
.calendar-years-grid::-webkit-scrollbar {
  width: 4px;
}
.calendar-years-grid::-webkit-scrollbar-track {
  background: transparent;
}
.calendar-years-grid::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.12);
  border-radius: 2px;
}

.calendar-month-item,
.calendar-year-item {
  padding: 8px 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text-main);
  background-color: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.03);
}

.calendar-month-item:hover,
.calendar-year-item:hover {
  background-color: #e2e8f0;
  color: var(--blue);
}

.calendar-month-item.active,
.calendar-year-item.active {
  background-color: var(--blue);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  border-color: transparent;
}

.cal-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.cal-btn:hover {
  background-color: #f1f5f9;
  color: var(--text-main);
}

.cal-btn i {
  width: 16px;
  height: 16px;
}

/* Calendar Weekdays */
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.calendar-weekdays span {
  display: block;
  padding: 4px 0;
}

/* Calendar Days Grid */
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.calendar-day:hover {
  background-color: #f1f5f9;
}

.calendar-day.active {
  background-color: var(--blue);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.calendar-day.inactive {
  color: var(--text-disabled);
  font-weight: 400;
}



/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--border-radius-sm);
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.20s ease;
  outline: none;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), #1d4ed8);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  background-color: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  color: var(--text-muted);
}

.btn-secondary:hover:not(:disabled) {
  background-color: #f8fafc;
  color: var(--text-main);
  border-color: rgba(15, 23, 42, 0.15);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--border-radius-sm);
  background-color: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--text-muted);
}

.btn-icon:hover:not(:disabled) {
  background-color: #f8fafc;
  color: var(--text-main);
}

.btn-icon:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-block {
  width: 100%;
}

/* Cached Dates List */
.cached-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}

.cached-section h3 {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cached-dates-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}

.cached-date-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background-color: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.cached-date-item:hover {
  background-color: #f8fafc;
  border-color: rgba(15, 23, 42, 0.12);
  transform: translateX(2px);
}

.cached-date-item.active {
  background: var(--blue-glow);
  border-color: var(--blue);
  color: var(--blue);
  font-weight: 600;
}

.cached-date-item i {
  width: 12px;
  height: 12px;
  color: var(--text-muted);
}

.cached-date-item.active i {
  color: var(--blue);
}

/* Sidebar Footer */
.sidebar-footer {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  padding-top: 16px;
  margin-top: 20px;
}

.footer-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.footer-info i {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.status-title {
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 600;
}

.status-val.online {
  color: var(--emerald);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-val.online::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--emerald);
}

/* Main Content Styling */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: var(--bg-primary);
  overflow-y: auto;
}

/* Topbar Header */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 36px;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 4px 30px rgba(15, 23, 42, 0.01);
}

.header-title h1 {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.header-title p {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 2px;
  font-weight: 500;
}

.date-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  padding: 8px 14px;
  border-radius: var(--border-radius-md);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  color: var(--text-main);
}

.date-badge i {
  width: 14px;
  height: 14px;
  color: var(--blue);
}

/* Dashboard View Scroll Grid */
.dashboard-view {
  padding: 24px 36px 36px 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Glassmorphism light card container utility */
.card-glass {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.card-glass:hover {
  border-color: rgba(37, 99, 235, 0.15);
  box-shadow: var(--shadow-lg);
}

/* Metrics Grid Row */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 18px;
}

.metric-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.metric-icon i {
  width: 24px;
  height: 24px;
}

.bg-blue-glow {
  background: var(--blue-glow);
  color: var(--blue);
  border: 1px solid rgba(37, 99, 235, 0.1);
}

.bg-purple-glow {
  background: var(--purple-glow);
  color: var(--purple);
  border: 1px solid rgba(124, 58, 237, 0.1);
}

.bg-cyan-glow {
  background: var(--cyan-glow);
  color: var(--cyan);
  border: 1px solid rgba(8, 145, 178, 0.1);
}

.bg-emerald-glow {
  background: var(--emerald-glow);
  color: var(--emerald);
  border: 1px solid rgba(5, 150, 105, 0.1);
}

.metric-info h3 {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-value {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  margin: 2px 0;
  letter-spacing: -0.5px;
}

.metric-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.metric-trend {
  font-size: 11px;
  font-weight: 600;
}

.font-purple {
  color: var(--purple);
}

/* Table Section Styling */
.table-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  width: 340px;
}

.search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  background-color: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: var(--border-radius-sm);
  color: var(--text-main);
  padding: 11px 14px 11px 40px;
  font-size: 13px;
  outline: none;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

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

.filter-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.toggle-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.filter-select {
  width: 190px;
  padding: 9px 12px;
}

/* Custom Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.08);
  transition: .25s;
  border: 1px solid rgba(15, 23, 42, 0.04);
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: #ffffff;
  transition: .25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

input:checked + .slider {
  background-color: var(--blue);
}

input:checked + .slider:before {
  transform: translateX(18px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Logs Table - High Premium light styling */
.table-container {
  overflow-x: auto;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--border-radius-md);
  background-color: #ffffff;
  max-height: 520px;
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}

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

.logs-table th {
  background-color: #f8fafc;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  color: var(--text-muted);
  font-weight: 700;
  padding: 14px 18px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.logs-table td {
  padding: 13px 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  color: var(--text-main);
  white-space: nowrap;
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logs-table tbody tr {
  transition: background-color 0.15s ease;
}

.logs-table tbody tr:nth-child(even) {
  background-color: #fbfcfd;
}

.logs-table tbody tr:hover {
  background-color: #f1f5f9;
}

/* Table elements */
.time-badge {
  font-size: 11px;
  color: var(--blue);
  background-color: var(--blue-glow);
  padding: 3px 6px;
  border-radius: 4px;
  font-weight: 600;
  border: 1px solid rgba(37, 99, 235, 0.1);
}

.voucher-badge {
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--purple);
  background-color: var(--purple-glow);
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid rgba(124, 58, 237, 0.15);
}

.voucher-none {
  color: var(--text-disabled);
  font-style: italic;
  font-size: 12px;
}

.table-placeholder {
  text-align: center;
  padding: 80px 0;
}

.placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-disabled);
}

.placeholder-content i {
  width: 48px;
  height: 48px;
}

/* Pagination Container */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.limit-selector {
  display: flex;
  align-items: center;
  gap: 6px;
}

.limit-selector select {
  background-color: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  color: var(--text-main);
  border-radius: 4px;
  padding: 4px 8px;
  outline: none;
  font-weight: 500;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

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

.page-num {
  font-weight: 600;
  color: var(--text-main);
}

/* Loading & Progress Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.loader-box {
  width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 36px;
  background-color: #ffffff;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(37, 99, 235, 0.1);
  border-top: 4px solid var(--blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background-color: rgba(15, 23, 42, 0.05);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  border-radius: 3px;
  transition: width 0.4s ease;
}

#loader-title {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

#loader-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  font-weight: 500;
}

/* Animations */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

.animate-fade-in {
  animation: fadeIn 0.4s ease forwards;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.2);
}

/* Custom UI Toast Notifications */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
  max-width: 420px;
  width: calc(100vw - 48px);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-radius: var(--border-radius-md);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06), 0 4px 10px rgba(15, 23, 42, 0.04);
  border-left: 4px solid var(--blue);
  border-top: 1px solid rgba(15, 23, 42, 0.04);
  border-right: 1px solid rgba(15, 23, 42, 0.04);
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

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

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

.toast.warning {
  border-left-color: #f59e0b;
}

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.toast.error .toast-icon {
  color: var(--red);
}

.toast.success .toast-icon {
  color: var(--emerald);
}

.toast.warning .toast-icon {
  color: #f59e0b;
}

.toast-content {
  flex-grow: 1;
  padding-right: 8px;
}

.toast-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
  margin-bottom: 4px;
}

.toast-message {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
  word-break: break-word;
}

.toast-close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-disabled);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  transition: all 0.2s ease;
  margin-top: 2px;
  flex-shrink: 0;
}

.toast-close:hover {
  background-color: rgba(15, 23, 42, 0.05);
  color: var(--text-muted);
}

/* Dedicated Authentication Login Overlay */
.auth-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.12), transparent 45%),
              radial-gradient(circle at 80% 80%, rgba(8, 145, 178, 0.12), transparent 50%),
              rgba(246, 248, 252, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-login-overlay.active {
  display: flex;
}

.auth-login-card {
  width: 100%;
  max-width: 410px;
  background: #ffffff;
  border: 1.5px solid rgba(15, 23, 42, 0.08);
  border-radius: 22px;
  padding: 36px 32px;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.12), 0 8px 20px rgba(15, 23, 42, 0.04);
}

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

.auth-logo-wrap {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1.5px solid rgba(15, 23, 42, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.auth-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.auth-login-header h2 {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.4px;
  margin-bottom: 4px;
}

.auth-login-header p {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.auth-login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-error-msg {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 12.5px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 10px;
  text-align: center;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrap svg,
.auth-input-wrap i {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: var(--text-disabled);
  pointer-events: none;
}

.auth-input-wrap input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border-radius: 12px;
  border: 1.5px solid rgba(15, 23, 42, 0.1);
  background: #f8fafc;
  font-size: 13.5px;
  color: var(--text-main);
  font-family: var(--font-body);
  outline: none;
  transition: all 0.2s ease;
}

.auth-input-wrap input:focus {
  border-color: var(--blue);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.auth-submit-btn {
  margin-top: 6px;
  padding: 13px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
}


