/* ==========================================================================
   GEARCHECK - Custom CSS Design System (Premium Dark Glassmorphism)
   ========================================================================== */

/* Design Tokens & Theme Variables */
:root {
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-header: 'Outfit', sans-serif;
  --font-mono: 'Fira Code', monospace;

  /* Color Palette (Harmonious HSL) */
  --bg-app: #080c14;
  --bg-card: rgba(16, 23, 42, 0.65);
  --bg-card-hover: rgba(22, 32, 58, 0.8);
  --border-glass: rgba(255, 255, 255, 0.07);
  --border-glass-focus: rgba(20, 184, 166, 0.4);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Accents */
  --accent-teal: #14b8a6;
  --accent-teal-glow: rgba(20, 184, 166, 0.25);
  --accent-violet: #8b5cf6;
  --accent-violet-glow: rgba(139, 92, 246, 0.25);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-red: #f43f5e;
  --accent-red-glow: rgba(244, 63, 94, 0.25);
  --accent-amber: #f59e0b;
  
  /* Shadows */
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  --shadow-inset: inset 0 2px 4px 0 rgba(255, 255, 255, 0.03);
  
  /* Layout */
  --border-radius-lg: 16px;
  --border-radius-md: 12px;
  --border-radius-sm: 8px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease-out;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Ambient Background Lights */
.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
}

.blob-1 {
  width: 400px;
  height: 400px;
  top: -100px;
  right: -50px;
  background: radial-gradient(circle, var(--accent-violet) 0%, transparent 70%);
}

.blob-2 {
  width: 500px;
  height: 500px;
  bottom: -150px;
  left: -100px;
  background: radial-gradient(circle, var(--accent-teal) 0%, transparent 70%);
}

.blob-3 {
  width: 300px;
  height: 300px;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
}

/* Main Layout Grid */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 16px;
  gap: 16px;
}

/* Header Component */
.app-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 16px 24px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-glass), var(--shadow-inset);
  border-radius: var(--border-radius-lg);
  gap: 24px;
}

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

.brand-icon {
  width: 28px;
  height: 28px;
  color: var(--accent-teal);
  filter: drop-shadow(0 0 8px var(--accent-teal-glow));
}

.brand h1 {
  font-family: var(--font-header);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 1.5px;
  background: linear-gradient(135deg, #ffffff 30%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.version-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-teal);
  background: rgba(20, 184, 166, 0.1);
  padding: 2px 6px;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(20, 184, 166, 0.2);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-self: center;
}

.active-job-info {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.active-job-info .label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.active-job-info .value {
  font-family: var(--font-header);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
}

.status-badge.unlocked {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-amber);
  border-color: rgba(245, 158, 11, 0.2);
}

.status-badge.locked {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.2);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Progress Indicator */
.progress-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
}

.progress-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: right;
  font-family: var(--font-mono);
}

.progress-bar-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-teal) 0%, var(--accent-emerald) 100%);
  box-shadow: 0 0 8px var(--accent-emerald-glow);
  width: 0%;
  border-radius: 9999px;
  transition: width 0.4s cubic-bezier(0.1, 0.8, 0.25, 1);
}

.progress-bar-fill.complete {
  background: linear-gradient(90deg, var(--accent-emerald) 0%, #34d399 100%);
  box-shadow: 0 0 12px var(--accent-emerald-glow);
}

/* App Body Structure */
.app-body {
  display: grid;
  grid-template-columns: 320px 1fr;
  flex: 1;
  gap: 16px;
  min-height: 0; /* Important for scroll containment */
}

/* Sidebar Components */
.app-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.sidebar-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-glass), var(--shadow-inset);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
}

.card-icon {
  width: 18px;
  height: 18px;
  color: var(--accent-teal);
}

.card-header h2 {
  font-family: var(--font-header);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.5px;
  color: var(--text-primary);
}

.section-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Template Preset Buttons */
.template-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 4px;
}

.template-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.template-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(20, 184, 166, 0.25);
  transform: translateX(4px);
}

.template-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  flex: 1;
}

.template-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.template-actions {
  display: flex;
  gap: 4px;
  opacity: 0.2;
  transition: var(--transition-fast);
}

.template-item:hover .template-actions {
  opacity: 1;
}

/* Archive List styling */
.archive-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
  max-height: 280px;
  padding-right: 4px;
}

.archive-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.archive-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(16, 185, 129, 0.25);
}

.archive-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.archive-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.archive-badge {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.archive-date {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.empty-state {
  text-align: center;
  padding: 20px 10px;
  color: var(--text-muted);
  font-size: 0.8rem;
  border: 1px dashed rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-sm);
}

/* Main Workspace View */
.app-workspace {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-glass), var(--shadow-inset);
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* Empty Workspace State */
.workspace-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 40px;
  text-align: center;
  max-width: 500px;
  margin: auto;
}

.empty-glow {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.15) 0%, transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.empty-icon {
  width: 42px;
  height: 42px;
  color: var(--text-muted);
}

.workspace-empty h3 {
  font-family: var(--font-header);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.workspace-empty p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Loaded Workspace View */
.workspace-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.job-title-edit-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.job-title {
  font-family: var(--font-header);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.workspace-status-indicator {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Lock Notification Banner */
.lock-banner {
  margin: 16px 24px 0 24px;
  border-radius: var(--border-radius-md);
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border: 1px solid transparent;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lock-banner.unlocked {
  background: rgba(245, 158, 11, 0.05);
  border-color: rgba(245, 158, 11, 0.15);
}

.lock-banner.locked {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.15);
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.banner-icon {
  font-size: 1.2rem;
}

.lock-banner p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.lock-banner strong {
  color: var(--text-primary);
}

/* Form Styling - Add Item Box */
.add-item-box {
  padding: 16px 24px;
}

.flex-row {
  display: flex;
  gap: 12px;
}

input[type="text"], select {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  padding: 10px 16px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition-fast);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

input[type="text"]:focus, select:focus {
  border-color: var(--accent-teal);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 2px var(--accent-teal-glow);
}

input[type="text"] {
  flex: 1;
}

select {
  width: 180px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 36px;
  appearance: none;
}

/* Search and Filters Bar */
.search-filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  background: rgba(0, 0, 0, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  gap: 16px;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 320px;
}

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

.search-box input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  font-size: 0.8rem;
  border-radius: var(--border-radius-sm);
}

.filter-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  padding: 2px;
  border-radius: var(--border-radius-sm);
}

.filter-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition-fast);
}

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

.filter-tab.active {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
  box-shadow: var(--shadow-inset);
}

/* Checklist Display Container */
.checklist-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* Category Sections */
.category-section {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-md);
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: var(--transition-smooth);
}

.category-section:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.025);
}

.category-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

.category-title {
  font-family: var(--font-header);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.75px;
  color: var(--text-primary);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-title::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-teal);
}

.category-section[data-category="Lighting & Support"] .category-title::before {
  background-color: var(--accent-violet);
}
.category-section[data-category="Camera & Audio"] .category-title::before {
  background-color: var(--accent-teal);
}
.category-section[data-category="Drones & Kits"] .category-title::before {
  background-color: var(--accent-emerald);
}

.category-stats {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.item-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Equipment Item Styling */
.gear-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: var(--border-radius-sm);
  transition: var(--transition-fast);
}

.gear-item:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

.item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

/* Checkbox Customization */
.checkbox-container {
  display: block;
  position: relative;
  width: 20px;
  height: 20px;
  cursor: pointer;
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--text-muted);
  border-radius: 6px;
  transition: var(--transition-fast);
}

.checkbox-container:hover input ~ .checkmark {
  border-color: var(--accent-teal);
  background-color: rgba(20, 184, 166, 0.05);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--accent-emerald);
  border-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald-glow);
}

.checkmark::after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark::after {
  display: block;
}

.checkbox-container .checkmark::after {
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Checkbox Locked State */
.checkbox-container.disabled {
  cursor: not-allowed;
}

/* Item Name Editing & Display */
.item-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: var(--transition-fast);
}

.gear-item.checked {
  opacity: 0.5;
}

.gear-item.checked .item-text {
  text-decoration: line-through;
  color: var(--text-secondary);
}

/* Editing inline input */
.edit-item-input {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--accent-teal);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 4px;
  width: 80%;
  outline: none;
}

/* Action Controls (Edit, Delete) */
.item-actions {
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: var(--transition-fast);
}

.gear-item:hover .item-actions {
  opacity: 1;
}

.btn-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: var(--transition-fast);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.btn-icon.delete:hover {
  background: rgba(244, 63, 94, 0.1);
  color: var(--accent-red);
}

/* Footer Section Actions */
.workspace-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left, .footer-right {
  display: flex;
  gap: 12px;
}

/* Buttons System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--border-radius-sm);
  padding: 10px 18px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-fast);
  outline: none;
  white-space: nowrap;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.75rem;
  border-radius: 6px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-teal) 0%, var(--accent-violet) 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(20, 184, 166, 0.2);
}

.btn-primary:hover {
  filter: brightness(1.15);
  box-shadow: 0 4px 20px rgba(20, 184, 166, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-accent {
  background: var(--accent-teal);
  color: #0c0f17;
}

.btn-accent:hover {
  background: #2dd4bf;
  box-shadow: 0 0 10px var(--accent-teal-glow);
}

.btn-emerald {
  background: var(--accent-emerald);
  color: #0c0f17;
}

.btn-emerald:hover:not(:disabled) {
  background: #34d399;
  box-shadow: 0 0 10px var(--accent-emerald-glow);
}

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

.btn-danger {
  background: var(--accent-red);
  color: white;
}

.btn-danger:hover {
  background: #fb7185;
  box-shadow: 0 0 10px var(--accent-red-glow);
}

.btn-outline {
  background: transparent;
  border: 1px solid currentColor;
}

.btn-outline.btn-danger {
  color: var(--accent-red);
  border-color: rgba(244, 63, 94, 0.4);
}

.btn-outline.btn-danger:hover {
  background: rgba(244, 63, 94, 0.1);
  color: var(--accent-red);
}

.btn-outline.btn-secondary {
  color: var(--text-secondary);
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-outline.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.full-width {
  width: 100%;
}

.margin-top-sm {
  margin-top: 8px;
}

.margin-top-md {
  margin-top: 16px;
}

/* Modals System */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 6, 12, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

.modal-card {
  background: #0f172a;
  border: 1px solid var(--border-glass);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  border-radius: var(--border-radius-lg);
  width: 90%;
  max-width: 480px;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-lg {
  max-width: 640px;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-family: var(--font-header);
  font-size: 1.1rem;
  font-weight: 700;
}

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

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

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

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

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input {
  width: 100%;
}

/* Archive View Modal Custom styling */
.archive-meta-row {
  display: flex;
  gap: 24px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--border-radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.archive-items-view {
  max-height: 350px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.archive-view-category-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.archive-view-cat-title {
  font-family: var(--font-header);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-teal);
  letter-spacing: 1px;
}

.archive-view-items-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.archive-view-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.01);
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
}

.archive-view-item.checked {
  color: var(--text-primary);
  font-weight: 500;
}

.archive-view-icon {
  width: 12px;
  height: 12px;
}

.archive-view-icon.checked {
  color: var(--accent-emerald);
}

.archive-view-icon.unchecked {
  color: var(--text-muted);
}

/* Toast System */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  color: var(--text-primary);
  padding: 12px 18px;
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(20px);
  opacity: 0;
  animation: toast-in 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

.toast.success {
  border-left: 3px solid var(--accent-emerald);
}

.toast.info {
  border-left: 3px solid var(--accent-teal);
}

.toast.warning {
  border-left: 3px solid var(--accent-amber);
}

@keyframes toast-in {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Animations */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.animate-bounce {
  animation: bounce 2s infinite ease-in-out;
}

/* Responsive Grid Breakpoints */
@media (max-width: 992px) {
  .app-body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  
  .app-container {
    height: auto;
    overflow-y: auto;
  }
  
  .app-header {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 12px;
  }
  
  .brand {
    justify-content: center;
  }
  
  .header-status {
    justify-self: center;
  }
  
  .header-actions {
    justify-content: center;
  }
  
  .app-sidebar {
    max-height: none;
  }
}

@media (max-width: 576px) {
  .flex-row {
    flex-direction: column;
  }
  
  select {
    width: 100%;
  }
  
  .search-filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-box {
    max-width: none;
  }
  
  .archive-view-items-list {
    grid-template-columns: 1fr;
  }
  
  .workspace-footer {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
  
  .footer-left, .footer-right {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}
