/* public/styles.css - Full-Stack RTA Planner Theme System & Admin Panel Layouts */

/* --- Google Fonts Integration --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- Custom Variables & Tokens --- */
:root {
  --font-display: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Color Palette (Deep Space & Neon Accents) */
  --bg-main: #090d16;
  --bg-gradient: radial-gradient(circle at top left, #0e1726 0%, #080b11 100%);
  --bg-card: rgba(17, 25, 40, 0.75);
  --bg-card-hover: rgba(26, 37, 58, 0.85);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;

  /* Text Colors */
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  /* Status Colors */
  --color-available: #10b981; /* Emerald */
  --color-pending: #f59e0b;   /* Amber */
  --color-sold: #ef4444;      /* Red */

  /* Category Accent Colors */
  --color-air: #06b6d4;       /* Cyan */
  --color-sea: #6366f1;       /* Indigo */
  --color-donate: #ec4899;    /* Rose */
  --color-sell: #10b981;      /* Emerald */

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.6);
  --shadow-glow-blue: 0 0 15px rgba(59, 130, 246, 0.25);
  --shadow-glow-cyan: 0 0 15px rgba(6, 182, 212, 0.25);

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Base Resets & Global Styles --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-main);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 4rem;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* --- Glassmorphism UI Components --- */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), border-color var(--transition-fast), box-shadow var(--transition-normal);
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

/* --- Layout Structure --- */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
}

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

.header-title-container h1 {
  font-size: 2.25rem;
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #1d4ed8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-title-container p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Navigation / Page Tab Selector */
.navigation-bar {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  margin-bottom: 2rem;
  width: fit-content;
}

.nav-tab-btn {
  background: transparent;
  border: none;
  padding: 0.6rem 1.25rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-tab-btn:hover {
  color: var(--text-primary);
}

.nav-tab-btn.active {
  background: var(--border-focus);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

/* --- Page View Toggles --- */
.page-view {
  display: none;
}

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

/* --- Statistics Widget Grid (Top) --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent, var(--border-focus));
}

.stat-card.air { --accent: var(--color-air); }
.stat-card.sea { --accent: var(--color-sea); }
.stat-card.donate { --accent: var(--color-donate); }
.stat-card.sell { --accent: var(--color-sell); }
.stat-card.financial { --accent: #8b5cf6; }

.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  display: flex;
  justify-content: space-between;
}

/* --- App Main Workspace Grid --- */
.workspace-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Filter & Action Bar --- */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.filter-row-primary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.category-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: calc(var(--radius-sm) - 2px);
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--border-focus);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.tab-btn.air.active { background-color: var(--color-air); }
.tab-btn.sea.active { background-color: var(--color-sea); }
.tab-btn.donate.active { background-color: var(--color-donate); }
.tab-btn.sell.active { background-color: var(--color-sell); }

.filter-row-secondary {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 250px;
}

.search-input {
  width: 100%;
  padding: 0.625rem 1rem 0.625rem 2.25rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.search-input:focus {
  border-color: var(--border-focus);
}

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

/* Custom Toggle Switch */
.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  transition: background var(--transition-fast);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform var(--transition-fast);
}

.toggle-checkbox {
  display: none;
}

.toggle-checkbox:checked + .toggle-switch {
  background: var(--border-focus);
}

.toggle-checkbox:checked + .toggle-switch::after {
  transform: translateX(16px);
}

/* --- Spreadsheet-style Grid Table --- */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.data-table th {
  background: rgba(10, 15, 25, 0.8);
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  padding: 1rem 0.75rem;
  border-bottom: 1px solid var(--border-glass);
}

.data-table tr {
  border-bottom: 1px solid var(--border-glass);
  transition: background-color var(--transition-fast);
  cursor: pointer;
}

.data-table tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.data-table td {
  padding: 0.85rem 0.75rem;
  vertical-align: middle;
}

.data-table td.cell-thumb {
  width: 60px;
}

.table-thumbnail {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
}

.table-thumbnail-placeholder {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.65rem;
}

.item-title-cell {
  font-weight: 600;
  color: var(--text-primary);
}

.item-sub-info {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge.status-available {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-available);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge.status-pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-pending);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge.status-sold {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-sold);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge.cat-air {
  background: rgba(6, 182, 212, 0.15);
  color: var(--color-air);
}

.badge.cat-sea {
  background: rgba(99, 102, 241, 0.15);
  color: var(--color-sea);
}

.badge.cat-donate {
  background: rgba(236, 72, 153, 0.15);
  color: var(--color-donate);
}

.badge.cat-sell {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-sell);
}

.price-val {
  font-family: var(--font-display);
  font-weight: 600;
}

.empty-state {
  padding: 3rem;
  text-align: center;
  color: var(--text-secondary);
}

.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.empty-state p {
  font-size: 0.875rem;
  max-width: 400px;
  margin: 0 auto 1.5rem auto;
}

/* --- Countdown & To-Do Timeline Widget (Sidebar) --- */
.timeline-panel {
  padding: 1.25rem;
}

.timeline-panel h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.timeline-count-badge {
  background: var(--border-focus);
  color: #ffffff;
  font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 550px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.timeline-item {
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
  transition: transform var(--transition-fast);
}

.timeline-item:hover {
  transform: translateX(4px);
  border-color: rgba(255, 255, 255, 0.12);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.timeline-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  max-width: 180px;
}

.timeline-item-deadline {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.countdown-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.countdown-badge.critical {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.countdown-badge.warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.countdown-badge.normal {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.timeline-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.timeline-buyer {
  font-weight: 500;
  color: var(--text-primary);
}

/* --- Common Interactive Elements (Buttons, Forms, Inputs) --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--border-focus);
  color: #ffffff;
}
.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow-blue);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
}

.btn-icon-only {
  padding: 0.4rem;
  border-radius: 50%;
}

.btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
}

/* --- Modals / Slide-over Drawers --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 12, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

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

.modal-container {
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-md);
  background: #0f1524;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

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

.modal-header h3 {
  font-size: 1.35rem;
  color: var(--text-primary);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--transition-fast);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
}

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

/* Form Groups */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group.col-span-2 {
  grid-column: span 2;
}

@media (max-width: 600px) {
  .form-group.col-span-2 {
    grid-column: span 1;
  }
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 0.625rem 0.85rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  border-color: var(--border-focus);
}

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

/* Radio buttons container */
.radio-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.25rem 0;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--text-primary);
}

.radio-input {
  cursor: pointer;
  accent-color: var(--border-focus);
}

/* --- Photo Upload & Gallery Viewers --- */
.photo-upload-zone {
  border: 2px dashed var(--border-glass);
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition-fast);
  background: rgba(0, 0, 0, 0.15);
}

.photo-upload-zone:hover {
  border-color: var(--border-focus);
}

.photo-upload-zone p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}

.photo-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-glass);
}

.photo-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  background: rgba(239, 68, 68, 0.85);
  border-radius: 50%;
  border: none;
  color: white;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Swipeable Gallery (Modal View) */
.gallery-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: #06090f;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-glass);
}

.gallery-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform var(--transition-normal);
  cursor: grab;
}

.gallery-track:active {
  cursor: grabbing;
}

.gallery-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  user-select: none;
}

.gallery-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast);
  font-weight: bold;
  z-index: 10;
}

.gallery-nav:hover {
  background: rgba(17, 24, 39, 0.9);
}

.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }

.gallery-indicators {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.4rem;
  z-index: 10;
}

.gallery-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.gallery-indicator.active {
  background: #ffffff;
  width: 16px;
  border-radius: 4px;
}

/* Detail view styling */
.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
  .detail-meta-grid {
    grid-template-columns: 1fr;
  }
}

.detail-section-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0.25rem;
  margin-bottom: 0.75rem;
}

.detail-label-value {
  margin-bottom: 0.75rem;
}

.detail-label-value label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}

.detail-label-value span {
  font-size: 0.95rem;
  font-weight: 500;
}

.detail-notes-box {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--text-primary);
}

/* Label print dialog options */
.label-options {
  background: rgba(0,0,0,0.25);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
  padding: 1rem;
  margin-bottom: 1rem;
}

/* --- Administration Control Panel Styles --- */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.admin-card {
  padding: 1.5rem;
}

.admin-card h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-btn-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.console-box {
  background: #05070c;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-family: monospace;
  font-size: 0.8rem;
  color: #10b981;
  max-height: 180px;
  overflow-y: auto;
  white-space: pre-wrap;
  margin-top: 1rem;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

.admin-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border-glass);
  font-size: 0.9rem;
}

.admin-stat-row:last-child {
  border-bottom: none;
}

.admin-stat-label {
  color: var(--text-secondary);
}

.admin-stat-val {
  font-weight: 600;
  color: var(--text-primary);
}

/* --- Media Print Rules --- */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    padding-bottom: 0 !important;
    font-size: 12pt;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Hide standard UI elements */
  header,
  .navigation-bar,
  .stats-grid,
  .filter-bar,
  .timeline-panel,
  .modal-overlay,
  .btn,
  th:last-child,
  td:last-child {
    display: none !important;
  }

  /* Force table container to fit print */
  .table-container {
    border: none !important;
    overflow-x: visible !important;
  }

  .data-table {
    width: 100% !important;
    border: 1px solid #000000 !important;
    font-size: 10pt;
  }

  .data-table th {
    background: #e5e7eb !important;
    color: #000000 !important;
    border-bottom: 2px solid #000000 !important;
    border-right: 1px solid #000000 !important;
    padding: 6px !important;
  }

  .data-table td {
    padding: 6px !important;
    border-bottom: 1px solid #cccccc !important;
    border-right: 1px solid #cccccc !important;
    color: #000000 !important;
  }

  /* Remove background badges */
  .badge {
    background: transparent !important;
    border: none !important;
    color: #000000 !important;
    padding: 0 !important;
  }

  .table-thumbnail, .table-thumbnail-placeholder {
    display: none !important;
  }

  /* --- Printed Label Sheet Mode --- */
  body.printing-labels {
    background: #ffffff !important;
  }

  body.printing-labels .container {
    display: none !important;
  }

  body.printing-labels #print-labels-sheet-view {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.12in !important;
    width: 8.5in !important;
    padding: 0.5in 0.2in !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
  }

  .physical-label {
    box-sizing: border-box !important;
    height: 1.0in !important;
    width: 2.625in !important;
    border: 1px dashed #666666 !important;
    padding: 0.1in !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    page-break-inside: avoid !important;
    font-family: 'Inter', sans-serif !important;
    color: #000000 !important;
    background: #ffffff !important;
  }

  .physical-label .label-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 1px solid #000000 !important;
    padding-bottom: 2px !important;
  }

  .physical-label .label-sn {
    font-size: 14pt !important;
    font-weight: 800 !important;
    font-family: 'Outfit', sans-serif !important;
  }

  .physical-label .label-category {
    font-size: 7pt !important;
    font-weight: 700 !important;
    border: 1px solid #000000 !important;
    padding: 0 4px !important;
    text-transform: uppercase !important;
  }

  .physical-label .label-title {
    font-size: 9pt !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-top: 4px !important;
    flex-grow: 1 !important;
  }

  .physical-label .label-footer {
    display: flex !important;
    justify-content: space-between !important;
    font-size: 6.5pt !important;
    color: #555555 !important;
  }
}

/* Hide labels-container in browser view */
#print-labels-sheet-view {
  display: none;
}

/* Direct table row CRUD actions styling */
.row-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
}

.row-actions .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  height: 26px;
  min-width: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.row-actions .btn svg {
  width: 12px;
  height: 12px;
}

/* Dedicated Deadlines Tab Page Styling */
#page-deadlines .timeline-panel {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

#page-deadlines .timeline-panel h2 {
  display: none; /* Already covered by page title card */
}

#page-deadlines .timeline-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  max-height: none;
  overflow-y: visible;
  padding-right: 0;
}

#page-deadlines .timeline-item {
  background: var(--bg-card);
  padding: 1.15rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), border-color var(--transition-fast), box-shadow var(--transition-normal);
}

#page-deadlines .timeline-item:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-md);
}

#page-deadlines .timeline-item-title {
  max-width: 240px;
  font-size: 0.95rem;
}

#page-deadlines .timeline-item-deadline {
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

#page-deadlines .timeline-meta {
  border-top: 1px solid var(--border-glass);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
}

/* --- Authentication Page Blocker Overlay --- */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 12, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.auth-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 2.25rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h2 {
  font-size: 1.75rem;
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #1d4ed8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.auth-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.auth-error-box {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  margin-top: 1rem;
  text-align: center;
}

.form-error-box {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  text-align: left;
  display: none;
}

/* --- Bug Tracker Page Layout & Styles --- */
.bugs-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .bugs-layout {
    grid-template-columns: 1fr;
  }
}

.bug-report-card {
  padding: 1.5rem;
}

.bugs-dashboard {
  display: flex;
  flex-direction: column;
}

.bugs-dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.75rem;
}

.bug-count-pill {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.bugs-list-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-height: 700px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.bug-card {
  position: relative;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  border-left: 4px solid var(--text-secondary);
  transition: transform 0.2s, box-shadow 0.2s;
}

.bug-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.bug-card.border-critical { border-left-color: #ef4444; }
.bug-card.border-high { border-left-color: #f97316; }
.bug-card.border-medium { border-left-color: #eab308; }
.bug-card.border-low { border-left-color: #3b82f6; }

.bug-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.bug-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.bug-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
  align-items: center;
}

.bug-description {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.bug-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.bug-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.bug-status-widget {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.bug-status-select {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.bug-status-select:focus {
  outline: none;
  border-color: var(--accent-color);
}

.severity-pill {
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.severity-pill.critical {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.severity-pill.high {
  background: rgba(249, 115, 22, 0.15);
  border: 1px solid rgba(249, 115, 22, 0.3);
  color: #fb923c;
}

.severity-pill.medium {
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.3);
  color: #fde047;
}

.severity-pill.low {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

.status-badge {
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.open {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-badge.in-progress {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-badge.resolved {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-badge.closed {
  background: rgba(156, 163, 175, 0.1);
  color: #d1d5db;
  border: 1px solid rgba(156, 163, 175, 0.2);
}

.btn-bug-delete {
  background: transparent;
  border: none;
  color: rgba(239, 68, 68, 0.7);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.btn-bug-delete:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.no-bugs-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  color: var(--text-secondary);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  text-align: center;
  background: rgba(255, 255, 255, 0.01);
}




