/* ============================================
   iOS Liquid Glass Design System
   Modern, Clean, Translucent
   ============================================ */

:root {
  /* Background Colors - Deep Dark with Blue Tint */
  --bg-base: #0a0a0f;
  --bg-primary: #0d0d14;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a24;
  --bg-elevated: #222230;

  /* Glass Materials - Translucent Layers */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-bg-hover: rgba(255, 255, 255, 0.06);
  --glass-bg-active: rgba(255, 255, 255, 0.08);
  --glass-thick: rgba(30, 30, 45, 0.7);
  --glass-medium: rgba(30, 30, 45, 0.5);
  --glass-thin: rgba(30, 30, 45, 0.3);

  /* Glass Border - Subtle Light Edge */
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-light: rgba(255, 255, 255, 0.12);
  --glass-border-glow: rgba(255, 255, 255, 0.15);

  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-tertiary: rgba(255, 255, 255, 0.45);
  --text-placeholder: rgba(255, 255, 255, 0.3);

  /* Accent Colors - Vibrant iOS */
  --accent: #007AFF;
  --accent-light: #5AC8FA;
  --accent-soft: rgba(0, 122, 255, 0.15);
  --accent-glow: rgba(0, 122, 255, 0.4);

  /* Semantic Colors - Vibrant */
  --success: #32D74B;
  --success-soft: rgba(50, 215, 75, 0.15);
  --success-glow: rgba(50, 215, 75, 0.4);

  --warning: #FFD60A;
  --warning-soft: rgba(255, 214, 10, 0.15);
  --warning-glow: rgba(255, 214, 10, 0.4);

  --danger: #FF453A;
  --danger-soft: rgba(255, 69, 58, 0.15);
  --danger-glow: rgba(255, 69, 58, 0.4);

  --purple: #BF5AF2;
  --purple-soft: rgba(191, 90, 242, 0.15);
  --purple-glow: rgba(191, 90, 242, 0.4);

  --teal: #64D2FF;
  --teal-soft: rgba(100, 210, 255, 0.15);
  --teal-glow: rgba(100, 210, 255, 0.4);

  /* Legacy Aliases - Used by remote, features, backMenu, weedauth */
  --bg-void: #06060b;
  --bg-body: var(--bg-base);
  --border-soft: rgba(255, 255, 255, 0.08);
  --text-dim: rgba(255, 255, 255, 0.45);
  --text-muted: rgba(255, 255, 255, 0.7);
  --radius-pill: 9999px;
  --accent-lime: #a3e635;
  --accent-lime-soft: rgba(163, 230, 53, 0.15);
  --accent-lime-glow: rgba(163, 230, 53, 0.4);
  --font-display: var(--font-sans);
  --gradient-primary-text: linear-gradient(135deg, #007AFF 0%, #5AC8FA 50%, #BF5AF2 100%);
  --glass-blur: blur(24px);

  /* Separator */
  --separator: rgba(255, 255, 255, 0.06);
  --separator-light: rgba(255, 255, 255, 0.1);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Monaco, "Cascadia Code", monospace;

  /* Font Sizes */
  --text-xs: 0.6875rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-md: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 1.875rem;
  --text-3xl: 2.25rem;

  /* Font Weights */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Border Radius - Smooth Liquid */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  /* Blur - Frosted Glass */
  --blur-xs: 8px;
  --blur-sm: 16px;
  --blur-md: 24px;
  --blur-lg: 40px;
  --blur-xl: 64px;

  /* Shadows - Soft Depth */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 40px rgba(0, 122, 255, 0.15);
  --shadow-glow-lg: 0 0 80px rgba(0, 122, 255, 0.2);

  /* Inner Shadow for Glass Depth */
  --inner-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
  --inner-shadow-top: inset 0 1px 0 rgba(255, 255, 255, 0.08);

  /* Transitions - Smooth */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --transition-fast: 150ms var(--ease-out);
  --transition-base: 250ms var(--ease-out);
  --transition-slow: 400ms var(--ease-out);

  /* Z-Index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal-backdrop: 300;
  --z-modal: 400;
  --z-toast: 500;
}

/* ============================================
   Reset & Base
   ============================================ */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-base);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Ambient Background Glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(0, 122, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(191, 90, 242, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(100, 210, 255, 0.03) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}

::selection {
  background: var(--accent);
  color: var(--text-primary);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-md); }
h6 { font-size: var(--text-base); }

p {
  color: var(--text-secondary);
  line-height: 1.6;
}

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

a:hover {
  color: var(--accent-light);
}

small {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

code, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

code {
  background: var(--glass-bg);
  padding: 0.2em 0.5em;
  border-radius: var(--radius-sm);
  color: var(--teal);
  border: 1px solid var(--glass-border);
}

pre {
  background: var(--glass-thick);
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  overflow-x: auto;
}

pre code {
  background: none;
  padding: 0;
  border: none;
}

hr {
  border: none;
  height: 1px;
  background: var(--separator);
  margin: var(--space-6) 0;
}

/* ============================================
   Layout
   ============================================ */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container--wide { max-width: 1400px; }
.container--narrow { max-width: 800px; }

.center-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-6);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.stack--sm { gap: var(--space-2); }
.stack--lg { gap: var(--space-6); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-4);
}

/* ============================================
   Glass Cards - Liquid Glass Effect
   ============================================ */

.card {
  position: relative;
  background: var(--glass-thick);
  backdrop-filter: blur(var(--blur-lg));
  -webkit-backdrop-filter: blur(var(--blur-lg));
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md), var(--inner-shadow-top);
  transition: all var(--transition-base);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05) 0%,
    transparent 50%,
    transparent 100%
  );
  pointer-events: none;
}

.card--interactive:hover {
  border-color: var(--glass-border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card--highlight {
  border-color: var(--accent-soft);
  box-shadow: var(--shadow-md);
}

.card--elevated {
  background: var(--glass-medium);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   Buttons - Glass Style
   ============================================ */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: 1.4;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
  min-height: 44px;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.15) 0%,
    transparent 50%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::before {
  opacity: 1;
}

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

.btn--primary {
  background: linear-gradient(180deg, #0A84FF 0%, #007AFF 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px var(--accent-glow), var(--inner-shadow-top);
}

.btn--primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #3BA0FF 0%, #0A84FF 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.btn--primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn--secondary {
  background: var(--glass-medium);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  color: var(--accent);
  border: 1px solid var(--glass-border-light);
  box-shadow: var(--shadow-sm), var(--inner-shadow-top);
}

.btn--secondary:hover:not(:disabled) {
  background: var(--glass-thick);
  border-color: var(--accent-soft);
  box-shadow: var(--shadow-md), 0 0 20px var(--accent-glow);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}

.btn--ghost:hover:not(:disabled) {
  background: var(--glass-bg);
  color: var(--text-primary);
  border-color: var(--glass-border-light);
}

.btn--danger {
  background: linear-gradient(180deg, #FF5E54 0%, #FF453A 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px var(--danger-glow);
}

.btn--danger:hover:not(:disabled) {
  box-shadow: 0 6px 24px var(--danger-glow);
}

.btn--sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  min-height: 36px;
}

.btn--lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-md);
  min-height: 52px;
}

/* ============================================
   Form Elements - Glass Style
   ============================================ */

.field-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="datetime-local"],
textarea,
select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--glass-thin);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  min-height: 48px;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-placeholder);
}

input:hover:not(:disabled):not(:focus),
textarea:hover:not(:disabled):not(:focus),
select:hover:not(:disabled):not(:focus) {
  border-color: var(--glass-border-light);
  background: var(--glass-medium);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--glass-medium);
  box-shadow: 0 0 0 4px var(--accent-soft), 0 0 20px var(--accent-glow);
}

input:disabled,
textarea:disabled,
select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' fill-opacity='0.5' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-10);
}

input[type="checkbox"],
input[type="radio"] {
  width: 22px;
  height: 22px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent);
}

/* ============================================
   Toggle Switch - iOS Style
   ============================================ */

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 51px;
  height: 31px;
  flex-shrink: 0;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--glass-medium);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 27px;
  height: 27px;
  left: 1px;
  top: 1px;
  background: linear-gradient(180deg, #ffffff 0%, #f0f0f0 100%);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
  background: linear-gradient(180deg, #34D759 0%, #32D74B 100%);
  border-color: transparent;
  box-shadow: 0 0 16px var(--success-glow);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--glass-thin);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
}

.toggle-text {
  flex: 1;
}

.toggle-title {
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.toggle-sub {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ============================================
   Pills / Badges - Glass Style
   ============================================ */

.pill-label {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--radius-full);
  background: var(--glass-medium);
  backdrop-filter: blur(var(--blur-xs));
  -webkit-backdrop-filter: blur(var(--blur-xs));
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}

.pill-label--muted {
  background: var(--glass-thin);
  color: var(--text-tertiary);
}

.pill-label--accent {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
  box-shadow: 0 0 12px var(--accent-glow);
}

.pill-label--success {
  background: var(--success-soft);
  color: var(--success);
  border-color: transparent;
  box-shadow: 0 0 12px var(--success-glow);
}

.pill-label--warning {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: transparent;
  box-shadow: 0 0 12px var(--warning-glow);
}

.pill-label--danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: transparent;
  box-shadow: 0 0 12px var(--danger-glow);
}

.pill-label--purple {
  background: var(--purple-soft);
  color: var(--purple);
  border-color: transparent;
  box-shadow: 0 0 12px var(--purple-glow);
}

/* ============================================
   Stat List
   ============================================ */

.stat-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.stat-list li {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.stat-list__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
}

.stat-list__value {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

/* ============================================
   Tables - Glass Style
   ============================================ */

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  background: var(--glass-thin);
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
  border: 1px solid var(--glass-border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

th, td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
}

th {
  font-weight: var(--weight-semibold);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  background: var(--glass-bg);
  border-bottom: 1px solid var(--separator);
}

td {
  color: var(--text-primary);
  border-bottom: 1px solid var(--separator);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--glass-bg-hover);
}

.cell-truncate {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================
   Empty State
   ============================================ */

.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
}

.empty-state h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.empty-state p {
  color: var(--text-tertiary);
}

/* ============================================
   Toast Notifications - Glass Style
   ============================================ */

.toast-stack {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 400px;
  width: 100%;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--glass-thick);
  backdrop-filter: blur(var(--blur-lg));
  -webkit-backdrop-filter: blur(var(--blur-lg));
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  opacity: 0;
  transform: translateX(100%);
  transition: all var(--transition-base);
}

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

.toast--success {
  border-color: rgba(50, 215, 75, 0.3);
  box-shadow: var(--shadow-lg), 0 0 30px var(--success-glow);
}

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

.toast--error {
  border-color: rgba(255, 69, 58, 0.3);
  box-shadow: var(--shadow-lg), 0 0 30px var(--danger-glow);
}

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

.toast__icon {
  font-size: var(--text-lg);
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast__content {
  flex: 1;
  min-width: 0;
}

.toast__title {
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.toast__message {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.toast__close {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: var(--space-1);
  font-size: var(--text-lg);
  line-height: 1;
  transition: color var(--transition-fast);
}

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

/* ============================================
   Modal - Glass Style
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--glass-thick);
  backdrop-filter: blur(var(--blur-xl));
  -webkit-backdrop-filter: blur(var(--blur-xl));
  border-radius: var(--radius-2xl);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(20px);
  transition: transform var(--transition-base);
}

.modal-overlay:not(.hidden) .modal {
  transform: scale(1) translateY(0);
}

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

.modal-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
}

.modal-close {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  color: var(--text-tertiary);
  font-size: var(--text-lg);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

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

.modal-body {
  padding: var(--space-6);
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--separator);
}

/* ============================================
   Loading Modal
   ============================================ */

.loading-modal {
  background: var(--glass-thick);
  backdrop-filter: blur(var(--blur-xl));
  -webkit-backdrop-filter: blur(var(--blur-xl));
  border-radius: var(--radius-2xl);
  border: 1px solid var(--glass-border);
  padding: var(--space-8);
  text-align: center;
  min-width: 300px;
}

.loading-modal__spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto var(--space-5);
  box-shadow: 0 0 20px var(--accent-glow);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-modal__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
}

.loading-modal__status {
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}

.loading-modal__sub {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* ============================================
   File Input
   ============================================ */

.file-input {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
}

.file-input input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.file-input__button {
  padding: var(--space-2) var(--space-4);
  background: var(--glass-medium);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.file-input__button:hover {
  background: var(--glass-thick);
  border-color: var(--glass-border-light);
}

.file-input__label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-input__hint {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: var(--space-2);
}

.file-input-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.file-input-group {
  padding: var(--space-4);
  background: var(--glass-thin);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
}

/* ============================================
   Status Indicators
   ============================================ */

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  border-radius: 50%;
}

.status--ok {
  background: var(--success-soft);
  color: var(--success);
  box-shadow: 0 0 8px var(--success-glow);
}

.status--fail {
  background: var(--danger-soft);
  color: var(--danger);
  box-shadow: 0 0 8px var(--danger-glow);
}

/* ============================================
   Utilities
   ============================================ */

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  :root {
    --text-3xl: 1.75rem;
    --text-2xl: 1.5rem;
    --text-xl: 1.25rem;
  }

  .container {
    padding: 0 var(--space-4);
  }

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

  .toast-stack {
    top: auto;
    bottom: var(--space-6);
    left: var(--space-4);
    right: var(--space-4);
    max-width: none;
  }
}

/* ============================================
   Scrollbar - Minimal
   ============================================ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--glass-border-light);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--glass-border) transparent;
}
