/* Liquid Glass Theme */

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

/* RESET & SCROLLBAR */
* { box-sizing: border-box; }

/* Force dark system UI for native controls (scrollbars, selects) */
:root { color-scheme: dark; }

/* Custom Scrollbar - Sleek & Dark */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.3); }

:root {
  /* Palette - Monochrome Luxury */
  --bg-base: #050505; /* Deepest Black/Grey */
  --card-surface: #0b0b0b;
  --control-surface: #171717;
  --input-surface: #151515;
  --progress-track: #232323;
  --card-border: #292929;
  --control-border: #343434;
  --input-border: #303030;
  --focus-border: #767676;
  
  /* Glass Interface */
  --glass-surface: var(--card-surface);
  --glass-border: var(--card-border);
  --glass-blur: 0px;
  
  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #9ca3af;
  --text-tertiary: #8b93a1;
  --color-success: #34c759;
  --color-warning: #ff9f0a;
  --color-danger: #ff3b30;
  --color-info: #0a84ff;

  /* Metrics */
  --radius-container: 22px;
  --radius-element: 10px;
  --anim-smooth: cubic-bezier(0.2, 0.8, 0.2, 1);
}

body {
  margin: 0;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: "Segoe UI", "Inter", sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  line-height: 1.6;
}

/* Background - Pure & Clean to prevent pixelation */
.liquid-bg {
  position: fixed; inset: 0; z-index: -1;
  background-color: var(--bg-base);
  background-image: none;
}

.app-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
}

/* Typography */
.display-title {
  font-size: 32px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 40px;
}

/* Glass Panel */
.glass-panel {
  background: var(--glass-surface);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-container);
  padding: 48px;
  box-shadow: 0 18px 42px rgba(0,0,0,0.42);
}

.card-panel { background: var(--card-surface); border: 1px solid var(--card-border); border-radius: var(--radius-container); padding: 36px; }
.brand-kicker { color: var(--text-primary); font-size: 14px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.ui-brand-row { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; font-size: 14px; letter-spacing: 2px; }
.ui-brand-row strong { font-weight: 700; }
.ui-brand-detail { margin-left: auto; color: var(--text-secondary); font-size: 11px; letter-spacing: 0; }
.idp-page .glass-panel { background: var(--card-surface); border-color: var(--card-border); }

/* Inputs */
.form-group { margin-bottom: 24px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.label-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 16px;
  height: 16px;
  margin: 0 6px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.28);
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  text-transform: none;
  letter-spacing: 0;
  cursor: help;
  vertical-align: middle;
  background: rgba(255,255,255,0.06);
}

.label-info-icon:hover,
.label-info-icon:focus {
  border-color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.12);
  outline: none;
}

.label-info-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  min-width: 220px;
  max-width: 300px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(15, 15, 15, 0.95);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
  white-space: normal;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 30;
}

.label-info-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: rgba(15, 15, 15, 0.95) transparent transparent transparent;
}

.label-info-icon:hover .label-info-tooltip,
.label-info-icon:focus .label-info-tooltip,
.label-info-icon.is-open .label-info-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.liquid-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--input-surface);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-element);
  transition: all 0.2s var(--anim-smooth);
}

.liquid-input:focus {
  outline: none;
  border-color: var(--focus-border);
  background: var(--input-surface);
}

/* Custom Select CSS */
.liquid-select { display: none; } /* Hide original select */

.custom-select-wrapper {
  position: relative;
  user-select: none;
  width: 100%;
}

.custom-select-trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-element);
  cursor: pointer;
  transition: all 0.2s var(--anim-smooth);
}

.custom-select-trigger:hover {
  background: rgba(255,255,255,0.08);
}

.custom-select-trigger::after {
  content: '';
  width: 8px; height: 8px;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s;
  margin-left: 12px;
}

.custom-select-wrapper.open .custom-select-trigger::after {
  transform: rotate(225deg) translateY(2px);
}

.custom-options {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  min-width: 320px;
  background: #111111;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-element);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px);
  transition: all 0.2s var(--anim-smooth);
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

.custom-options-list {
  flex: 1;
  min-width: 0;
  max-height: 340px;
  overflow-y: auto;
  overflow-x: hidden;
}

.custom-select-wrapper.open .custom-options {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.custom-option {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s;
  color: var(--text-secondary);
  line-height: 1.4;
  overflow: visible;
}

.custom-option-label {
  min-width: 0;
  flex: 1 1 auto;
  white-space: normal;
  word-break: break-word;
}

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

.custom-option.selected {
  color: var(--text-primary);
  background: rgba(255,255,255,0.1);
  font-weight: 500;
}

.custom-optgroup {
  padding: 10px 16px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 2px;
  background: rgba(0,0,0,0.2);
  pointer-events: none;
}

.option-recommended-badge {
  display: inline-block;
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #0d0d0d;
  background: #34c759;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.option-not-recommended-badge {
  display: inline-block;
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  background: #ff3b30;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

/* Custom select search box */
.custom-select-search {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 10px;
  background: #111111;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.custom-select-search input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
}

.custom-select-search input::placeholder {
  color: var(--text-secondary);
}

.custom-select-search input:focus {
  border-color: rgba(255,255,255,0.25);
  background-color: rgba(255,255,255,0.1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
}

.custom-select-no-results {
  padding: 18px 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
}

.custom-option.keyboard-focused {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  outline: none;
}

/* Category filter bar */
.custom-select-filter {
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  background: #111111;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  top: 42px; /* sits just below the search bar */
  z-index: 1;
}

.filter-btn {
  flex: 1;
  padding: 5px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

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

.filter-btn.active {
  background: rgba(255,255,255,0.11);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.15);
}

/* Alpha-jump rail */
.custom-alpha-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 2px;
  background: rgba(0,0,0,0.25);
  border-left: 1px solid rgba(255,255,255,0.06);
  overflow-y: auto;
  max-height: 340px;
  scrollbar-width: none;
}
.custom-alpha-rail::-webkit-scrollbar { display: none; }

.alpha-letter {
  background: none;
  border: none;
  color: rgba(255,255,255,0.18);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 0;
  width: 22px;
  text-align: center;
  border-radius: 3px;
  cursor: default;
  font-family: inherit;
  line-height: 1.7;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.alpha-letter.has-match {
  color: var(--text-secondary);
  cursor: pointer;
}

.alpha-letter.has-match:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}

.alpha-letter.active {
  background: rgba(255,255,255,0.15);
  color: var(--text-primary);
}

/* ── Mobile bottom sheet ───────────────────────────────────────────────────── */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.32s ease;
  -webkit-tap-highlight-color: transparent;
}

.sheet-backdrop.visible { opacity: 1; }

.sheet-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #131313;
  border-radius: 20px 20px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.6);
  z-index: 10001;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sheet-panel.visible { transform: translateY(0); }

.sheet-handle {
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin: 10px auto 0;
  flex-shrink: 0;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.sheet-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.sheet-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: background 0.2s;
  flex-shrink: 0;
}

.sheet-close:hover,
.sheet-close:active { background: rgba(255, 255, 255, 0.16); }

.sheet-body {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.sheet-list {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Alpha rail inside the sheet fills the full height of sheet-body */
.sheet-body .custom-alpha-rail {
  max-height: none;
  align-self: stretch;
  padding: 8px 3px;
  font-size: 10px;
}

/* Search bar inside sheet gets a bit more padding for touch targets */
.sheet-list .custom-select-search {
  padding: 10px 12px;
}

.sheet-list .custom-select-search input {
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: 15px;
}

/* Bigger tap targets for options on mobile */
.sheet-list .custom-option {
  padding: 14px 18px;
  font-size: 15px;
}

/* File Upload */
.file-upload-wrapper { position: relative; width: 100%; }

.file-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 64px;
  background: rgba(255,255,255,0.03);
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius-element);
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
  position: relative;
  overflow: hidden;
}

.file-upload-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.file-upload-btn.has-file {
  border-style: solid;
  background: rgba(255,255,255,0.08);
}
.file-upload-btn.has-file span { color: var(--text-primary); font-weight: 500; }

.file-preview { display: none; }
.file-content-wrapper { display: flex; align-items: center; gap: 10px; z-index: 2; }
.file-upload-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 3; }

/* Buttons */
.btn-apple {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-element);
  border: none;
  cursor: pointer;
  transition: all 0.2s var(--anim-smooth);
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  width: auto;
}

.btn-primary {
  background: #ffffff !important; /* Force White background */
  color: #000000 !important; /* Force Black text */
  font-weight: 700;
}
.btn-primary:hover {
  background: #e0e0e0 !important;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--control-surface);
  color: var(--text-primary);
  border: 1px solid var(--control-border);
}
.btn-secondary:hover {
  background: #242424;
  border-color: var(--focus-border);
}

/* Delete Button Specifics */
.btn-icon {
  width: 40px; /* Fixed width */
  height: 40px; /* Fixed height */
  flex-shrink: 0; /* Prevent shrinking */
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 59, 48, 0.15) !important;
  color: #FF3B30 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
}
.btn-icon i { font-size: 16px; }
.btn-icon:hover {
  background: rgba(255, 59, 48, 0.25) !important;
}

/* Edit Button Variant */
.btn-icon.btn-edit {
  background: rgba(10, 132, 255, 0.14) !important;
  color: #0a84ff !important;
}
.btn-icon.btn-edit:hover {
  background: rgba(10, 132, 255, 0.24) !important;
}

/* Grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* Item Summary Card - Flex Fix */
.item-summary-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-element);
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between; /* Push items apart */
  gap: 16px;
  width: 100%; /* Ensure full width */
}

/* Progress */
.progress-pills { display: flex; gap: 6px; justify-content: center; margin-bottom: 48px; }
.pill { width: 32px; height: 2px; background: rgba(255,255,255,0.1); transition: all 0.3s; }
.pill.active { background: var(--text-primary); width: 48px; }

/* Checkbox */
.liquid-checkbox {
  display: flex; align-items: flex-start;
  padding: 16px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-element);
  cursor: pointer;
  position: relative;
}

/* Hide Native Checkbox */
.liquid-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  width: 18px; height: 18px;
  border: 1px solid var(--text-secondary);
  border-radius: 4px;
  margin-right: 12px;
  position: relative;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-top: 2px;
}
.liquid-checkbox input:checked + .checkmark {
  background: var(--text-primary);
  border-color: var(--text-primary);
}
.liquid-checkbox input:checked + .checkmark::after {
  content: ''; position: absolute; top: 2px; left: 6px;
  width: 4px; height: 8px; border-right: 2px solid #000; border-bottom: 2px solid #000;
  transform: rotate(45deg);
}

/* Store Badge */
.store-badge {
  display: flex; flex-direction: column; align-items: flex-start;
  padding-left: 16px; border-left: 1px solid var(--glass-border);
}
.store-badge-label {
  font-size: 9px; text-transform: uppercase; color: var(--text-tertiary); letter-spacing: 0.1em;
}
.store-badge-name {
  font-size: 13px; font-weight: 500; color: var(--text-primary);
}

/* Badges (Status / Notices) */
.status-badges {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
  line-height: 1.2;
}
.status-pending {
  background: rgba(255, 149, 0, 0.15);
  color: #ff9500;
  border-color: rgba(255, 149, 0, 0.25);
}
.badge-danger {
  background: rgba(255, 59, 48, 0.15);
  color: #ff3b30;
  border-color: rgba(255, 59, 48, 0.25);
}

/* Wizard */
.wizard-steps { display: none; opacity: 0; transform: translateX(10px); transition: all 0.4s var(--anim-smooth); }
.wizard-steps.active { display: block; opacity: 1; transform: translateX(0); }

/* Drawer - Desktop: Centered Floating Modal */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8); 
  /* Removed blur to prevent pixelation on gradients */
  z-index: 999; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; 
  top: 50%; left: 50%;
  width: 100%; max-width: 600px;
  max-height: 85vh;
  background: var(--card-surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-container);
  transform: translate(-50%, -50%) scale(0.95);
  transition: all 0.3s var(--anim-smooth);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  display: flex; flex-direction: column;
}

.drawer.open { 
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.drawer-content-wrapper {
  width: 100%;
  padding: 32px 40px;
  overflow-y: auto;
  flex: 1;
}

.drawer-close {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text-secondary);
  border: none; border-radius: var(--radius-element); cursor: pointer; font-size: 20px;
  padding: 0; transition: color 0.2s, background 0.2s;
}
.drawer-close:hover { color: var(--text-primary); background: #242424; }

/* Responsive - Mobile: Bottom Sheet */
@media (max-width: 768px) {
  .app-container { padding: 32px 16px; }
  .glass-panel { padding: 24px; border-radius: 20px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  header { flex-direction: row; justify-content: space-between; }
  .store-badge { align-items: flex-end; border-left: none; border-right: 1px solid var(--glass-border); padding-left: 0; padding-right: 16px; text-align: right; }
  
  /* Mobile Drawer Overrides */
  .drawer {
    top: auto; bottom: 0; left: 0; right: 0;
    width: 100%; max-width: 100%;
    height: auto; max-height: 90vh;
    border-radius: 22px 22px 0 0;
    transform: translateY(100%);
    border: none; border-top: 1px solid var(--glass-border);
  }
  
  .drawer.open {
    transform: translateY(0);
  }
  
  .drawer-content-wrapper { padding: 24px 20px; }
  .btn-apple { width: 100%; }
}

/* First-party human verification */
.custom-captcha {
  margin: 24px 0;
  padding: 18px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}
.custom-captcha-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.custom-captcha-question {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.custom-captcha-answer {
  width: 96px;
  flex: 0 0 96px;
  text-align: center;
}
.custom-captcha-help {
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
}
@media (max-width: 420px) {
  .custom-captcha-row {
    align-items: stretch;
    flex-direction: column;
  }
  .custom-captcha-answer {
    width: 100%;
    flex-basis: auto;
  }
}

/* Progress Bar */
.progress-bar-container {
  width: 240px;
  height: 7px;
  background: var(--progress-track);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: var(--text-primary);
  width: 0%;
  transition: width 0.5s ease-out;
  border-radius: 3px;
}

.alert, .alert-error, .alert-success, .alert-warning, .status-error {
  padding: 12px 14px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-element);
  background: var(--control-surface);
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.alert-error, .status-error { color: var(--color-danger); border-color: rgba(255,59,48,.4); }
.alert-success { color: var(--color-success); border-color: rgba(52,199,89,.4); }
.alert-warning { color: var(--color-warning); border-color: rgba(255,159,10,.4); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 12px; border-bottom: 1px solid var(--card-border); text-align: left; }
.data-table th { color: var(--text-secondary); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
*:focus-visible { outline: 1px solid var(--focus-border); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.idp-dialog-backdrop {
  position: fixed; inset: 0; z-index: 50000; display: grid; place-items: center;
  padding: 20px; background: rgba(0,0,0,.84);
}
.idp-dialog-card {
  width: min(520px, 100%); padding: 28px 34px 30px; border: 1px solid var(--card-border);
  border-radius: var(--radius-container); background: var(--card-surface);
}
.idp-dialog-brand { margin-bottom: 28px; font-size: 14px; font-weight: 700; letter-spacing: 2px; }
.idp-dialog-card h2 { margin: 0 0 9px; font-size: 25px; line-height: 1.25; }
.idp-dialog-card p { margin: 0 0 22px; color: var(--text-secondary); white-space: pre-wrap; }
.idp-dialog-input { margin-bottom: 18px; }
.idp-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
