/* ==========================================================================
   Property Photo Correction — Light landing + processing workspace
   ========================================================================== */

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  display: block;
  height: 46px;
  width: auto;
  flex: 0 0 auto;
}

@media (min-width: 768px) {
  .brand-logo {
    height: 58px;
  }
}

:root {
  --bg-app: #f7f9fc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f7f9fc;
  --bg-surface-hover: #eef3ff;
  --bg-inset: #eef2f7;
  --bg-muted: #f7f9fc;

  --border-subtle: #e8eef6;
  --border-medium: #d7dee8;
  --border-accent: rgba(47, 107, 255, 0.35);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --brand: #2f6bff;
  --brand-hover: #1d4ed8;
  --accent: #22c55e;
  --accent-hover: #16a34a;
  --accent-subtle: rgba(34, 197, 94, 0.12);
  --accent-cyan: #2f6bff;
  --accent-cyan-hover: #1d4ed8;
  --accent-cyan-subtle: rgba(47, 107, 255, 0.12);
  --accent-emerald: #22c55e;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --ink: #0f172a;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-pill: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);

  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html, body {
  min-height: 100%;
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f5f5f7; }
::-webkit-scrollbar-thumb { background: #c7c7cc; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #a1a1a6; }

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.hero-band {
  background:
    radial-gradient(1200px 420px at 80% -10%, rgba(47, 107, 255, 0.10), transparent 60%),
    linear-gradient(180deg, #f4f8ff 0%, #f7f9fc 100%);
}

.upload-band {
  background:
    radial-gradient(920px 420px at 50% 12%, rgba(47, 107, 255, 0.12), transparent 64%),
    linear-gradient(180deg, #e8eef8 0%, #dce6f3 48%, #e9eef6 100%);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(47, 107, 255, 0.08);
  color: #2f6bff;
  font-size: 12px;
  font-weight: 600;
}

.hero-photo-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #dbe4f0;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.10);
  height: auto;
}

.hero-photo-card img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  vertical-align: top;
}

.hero-photo-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  background: #2f6bff;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(47, 107, 255, 0.28);
}

.hero-photo-card:last-child .hero-photo-badge,
.compare-slider .hero-photo-badge.right-3 {
  left: auto;
  right: 12px;
}

.feature-point h3 {
  margin-top: 16px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.feature-point p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.55;
  color: #64748b;
}

.feature-icon {
  display: flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid #e8eef6;
  border-radius: 14px;
  background: #fff;
  color: #2f6bff;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.faq-item {
  background: #fff;
  border: 1px solid #e8eef6;
  border-radius: 16px;
  padding: 16px 20px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: #64748b;
}

/* Upload card */
.upload-card {
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, min-height 0.25s ease;
  container-type: inline-size;
}

.upload-card:hover {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.08);
}

.upload-card.dragover {
  border-color: var(--accent) !important;
  background: #f0fdf4 !important;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

.upload-card.has-files {
  border-style: solid !important;
  border-color: var(--accent) !important;
  background: #fff;
  min-height: 140px;
  cursor: default;
}

.upload-card.has-files .upload-idle { display: none; }
.upload-card.has-files .upload-ready { display: flex !important; }

.edit-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 560px;
  margin: 18px auto 0;
}

.edit-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e8eef6;
  border-radius: 14px;
  background: #f7f9fc;
  cursor: pointer;
}

.edit-option input {
  margin-top: 3px;
  accent-color: #2f6bff;
}

.edit-option span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.edit-option strong {
  font-size: 14px;
  font-weight: 650;
  color: #0f172a;
}

.edit-option small {
  font-size: 12px;
  color: #64748b;
}

.wm-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  background: #f7f9fc;
  border: 1px solid #e8eef6;
  overflow: visible;
}

.wm-panel[hidden] { display: none !important; }

.wm-preview {
  border-radius: 12px;
  overflow: hidden;
  background: #e8eef6;
  line-height: 0;
}

.wm-preview-stage {
  position: relative;
  display: block;
  width: 100%;
}

#wm-preview-photo {
  display: block;
  width: 100%;
  height: auto;
}

#wm-preview-mark,
.wm-preview-fallback {
  position: absolute;
  pointer-events: none;
}

.wm-preview-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border-radius: 4px;
  background: #fff;
  color: #0f172a;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.16);
}

.wm-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding-right: 4px;
  overflow: visible;
}

.wm-file-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: visible;
}

.wm-file-anchor {
  position: relative;
  flex: 0 0 auto;
  overflow: visible;
}

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

.wm-file-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #d7dee8;
  background: #fff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.wm-file-btn:hover {
  border-color: #2f6bff;
  color: #2f6bff;
}

.wm-file-btn.is-missing,
.wm-file-btn.is-missing:hover {
  border-color: #e11d48;
  color: #e11d48;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.wm-missing-note {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 30;
  width: max-content;
  max-width: 220px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #fecdd3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  color: #e11d48;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.wm-missing-note::before,
.wm-missing-note::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 7px solid transparent;
}

.wm-missing-note::before {
  border-top-color: #fecdd3;
}

.wm-missing-note::after {
  margin-top: -1px;
  border-width: 6px;
  border-top-color: #fff;
}

.wm-missing-note[hidden] { display: none !important; }

.wm-file-name,
.wm-label {
  margin: 0;
  font-size: 11px;
  color: #94a3b8;
}

.wm-file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wm-label {
  margin-bottom: 6px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.wm-sliders {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.wm-grid {
  display: grid;
  grid-template-columns: repeat(3, 22px);
  gap: 4px;
}

.wm-cell {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid #d7dee8;
  background: #fff;
  cursor: pointer;
}

.wm-cell:hover { border-color: #93b4ff; }

.wm-cell.is-on {
  background: #2f6bff;
  border-color: #2f6bff;
}

.wm-range {
  display: flex;
  flex-direction: column;
  gap: 0;
  font-size: 12px;
  color: #64748b;
}

.wm-range strong { color: #0f172a; }

.wm-range input[type="range"] {
  width: 100%;
  height: 4px;
  margin: 7px 0 0;
  appearance: none;
  border-radius: 999px;
  background: #e2e8f0;
  outline: none;
}

.wm-range input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2f6bff;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(47, 107, 255, 0.35);
}

.wm-range input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: #2f6bff;
  cursor: pointer;
}

@media (max-width: 640px) {
  .wm-panel { grid-template-columns: 1fr; }
  .wm-controls { padding: 2px 4px 4px; }
}

.thumb-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.thumb-strip[hidden] { display: none !important; }

.thumb-item {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e8eef6;
  background: #e8eef6;
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  cursor: pointer;
}

/* Compare slider */
.compare-slider {
  container-type: inline-size;
  position: relative;
  cursor: ew-resize;
}

.compare-slider > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-slider__before {
  z-index: 1;
}

.compare-slider__before img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100cqi;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: inherit;
}

.compare-slider__handle {
  z-index: 2;
}

.compare-slider__badge,
.compare-slider__caption {
  z-index: 3;
  pointer-events: none;
}

.compare-slider__knob {
  cursor: grab;
  transition: transform 0.15s ease;
}

.compare-slider__knob:active,
.compare-slider.is-dragging .compare-slider__knob {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.08);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 8px 20px 16px;
  background: rgba(255,255,255,0.96);
}

.mobile-menu:not([hidden]) {
  display: flex;
}

.mobile-menu__link {
  padding: 12px 4px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-menu__link:last-child { border-bottom: none; }
.mobile-menu__link:hover { color: var(--text-primary); }

.feature-tile {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Workspace */
.workspace {
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.35s ease-out;
}

.workspace.workspace--active {
  display: flex;
  padding-bottom: 24px;
}

body:has(.workspace--active) {
  padding-bottom: 24px;
}

.workspace--idle {
  display: none;
}

.controls-hub {
  margin-top: 4px;
}

.universal-card {
  background: #fff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
}

.universal-card-top {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.universal-icon-wrap {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-muted);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.universal-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.universal-title-row h2 {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.universal-pill-active {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent-subtle);
  color: var(--accent-hover);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.universal-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 820px;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.rule-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-muted);
  border-radius: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.rule-badge i { color: var(--accent); font-size: 12px; }

.params-collapse-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 0;
}

.params-collapse-toggle:hover { color: var(--text-primary); }

.params-drawer {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.params-drawer.open { display: grid; }

.param-item label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.param-item label .val-badge,
.param-item .val-badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-hover);
  font-weight: 600;
}

.param-item input[type="range"] {
  width: 100%;
  appearance: none;
  background: var(--bg-inset);
  height: 5px;
  border-radius: var(--radius-pill);
  outline: none;
}

.param-item input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.param-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 5px;
}

.param-item--checkbox {
  display: flex;
  align-items: flex-end;
  padding-bottom: 8px;
}

.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  color: var(--text-secondary);
}

.checkbox-wrap input[type="checkbox"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
}

.select-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-muted);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  font-size: 13px;
}

.reprocess-filename {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.reprocess-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Action bar */
.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 14px 18px;
}

.action-dock {
  z-index: 40;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.06);
  background: #fff;
}

.action-bar-left,
.action-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.queue-summary-text {
  font-size: 13px;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

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

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-muted);
}

.btn-ghost,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 10px;
}

.btn-ghost:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}

.btn-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
}

.btn-icon:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}

/* Progress */
.progress-container {
  display: none;
  background: #fff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.3s ease-out;
}

.progress-container.active { display: block; }

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

.processing-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.step-node {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
}

.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-muted);
  border: 1.5px solid var(--border-medium);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.25s ease;
}

.step-check { display: none; font-size: 11px; }

.step-labels { display: flex; flex-direction: column; }
.step-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.step-sub {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.75;
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border-subtle);
  margin: 0 10px;
}

.step-node.active .step-circle {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: var(--accent-hover);
  transform: scale(1.06);
}

.step-node.active .step-name { color: var(--text-primary); }
.step-node.active .step-sub { color: var(--accent-hover); opacity: 1; }

.step-node.completed .step-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.step-node.completed .step-number { display: none; }
.step-node.completed .step-check { display: block; }
.step-node.completed .step-name { color: var(--text-secondary); }
.step-line.completed { background: var(--accent); }

.progress-details-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.server-queue-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.08);
  color: var(--text-secondary);
}

.server-queue-banner[hidden] {
  display: none !important;
}

.server-queue-banner.is-waiting {
  border-color: rgba(234, 179, 8, 0.45);
  background: rgba(234, 179, 8, 0.12);
}

.queue-banner-icon {
  font-size: 15px;
  color: var(--accent-hover);
  width: 1.25em;
  text-align: center;
}

.server-queue-banner.is-waiting .queue-banner-icon {
  color: #ca8a04;
}

.queue-banner-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.queue-banner-copy strong {
  font-size: 13px;
  font-weight: 650;
  color: var(--text-primary);
}

.queue-banner-copy span {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.35;
}

.queue-banner-pos {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.16);
  color: var(--accent-hover);
}

.server-queue-banner.is-waiting .queue-banner-pos {
  background: rgba(234, 179, 8, 0.2);
  color: #a16207;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.progress-status-group {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 500;
}

.progress-eta-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent-subtle);
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.progress-eta-badge .eta-icon { color: var(--accent-hover); }
.progress-eta-badge .eta-label { color: var(--text-muted); font-size: 11.5px; }
.progress-eta-badge .eta-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
}

.progress-eta-badge.success {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
}

.progress-eta-badge.success .eta-icon,
.progress-eta-badge.success .eta-val { color: var(--accent-hover); }

.progress-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulseDot 1.4s infinite ease-in-out;
}

.progress-pulse-dot.success {
  background: var(--accent);
  animation: none;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.25); }
}

.progress-percentage {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--accent-hover);
}

.progress-bar-bg {
  height: 8px;
  background: var(--bg-inset);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #16a34a, #22c55e, #4ade80);
  border-radius: var(--radius-pill);
  transition: width 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.progress-bar-fill.success { background: var(--accent); }

.progress-stats-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 4px 10px;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.stat-pill strong {
  font-family: var(--font-mono);
  color: var(--text-primary);
  font-weight: 600;
}

.progress-footer {
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .processing-stepper { flex-wrap: wrap; gap: 12px; }
  .step-line { display: none; }
  .step-sub { display: none; }
}

/* Gallery */
.gallery-section { margin-top: 8px; }

.gallery-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.filter-tabs {
  display: inline-flex;
  background: #fff;
  border: 1px solid var(--border-medium);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
}

.filter-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 10px;
  cursor: pointer;
}

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

.filter-tab.active {
  background: var(--bg-muted);
  color: var(--accent-hover);
  font-weight: 650;
}

.selection-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 560px), 1fr));
  gap: 20px;
}

.photo-card {
  background: #fff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.photo-card:hover {
  border-color: #c7c7cc;
  box-shadow: var(--shadow-md);
}

.photo-card.excluded {
  opacity: 0.55;
  filter: grayscale(0.15);
}

.photo-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.photo-filename {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.card-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.side-by-side-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: #fff;
  min-height: 240px;
}

.photo-side {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  min-height: 240px;
}

.photo-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 240px;
}

.photo-side-label {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 11px;
  font-weight: 650;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.photo-side-label.label-after {
  background: var(--accent);
}

.grid-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.22) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.22) 1px, transparent 1px);
  background-size: 12.5% 12.5%;
  pointer-events: none;
  z-index: 1;
}

.grid-overlay.active { display: block; }

.photo-card-footer {
  padding: 12px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.metrics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.metric-pill {
  font-size: 11.5px;
  background: var(--bg-muted);
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 8px;
}

.metric-pill b { color: var(--text-primary); }

.metric-warning {
  font-size: 12px;
  color: #b45309;
  background: #fffbeb;
  padding: 4px 8px;
  border-radius: 8px;
}

.card-bottom-actions {
  display: flex;
  gap: 8px;
}

.card-status-pending,
.card-status-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 220px;
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-muted);
}

.card-status-error { color: var(--accent-rose); }

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border-medium);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Modals */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(29, 29, 31, 0.45);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop.open,
.modal-backdrop.active,
.modal-backdrop[style*="display: flex"],
.modal-backdrop.show {
  display: flex;
}

.modal-container {
  background: #fff;
  border-radius: 24px;
  width: min(100%, 720px);
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.modal-container--wide { width: min(100%, 1300px); }
.modal-container--narrow { width: min(100%, 580px); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.modal-body {
  padding: 20px;
  overflow: auto;
}

.modal-header-main {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.inspect-counter {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.modal-body--dark {
  position: relative;
  padding: 0;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 420px;
}

.inspect-hit {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 4;
  width: 30%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.inspect-hit--prev {
  left: 0;
  cursor: w-resize;
}

.inspect-hit--next {
  right: 0;
  cursor: e-resize;
}

.inspect-hit:disabled {
  cursor: default;
  pointer-events: none;
}

.inspect-viewport {
  position: relative;
  width: 100%;
  height: 65vh;
  max-height: 800px;
  display: flex;
  justify-content: center;
}

.inspect-side-by-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
  height: 100%;
  background: #fff;
}

.inspect-pane {
  position: relative;
  overflow: hidden;
  height: 100%;
  background: #fff;
}

.inspect-pane img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
}

.modal-footer--split {
  justify-content: space-between;
}

.limit-modal {
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(10px);
}

.limit-dialog {
  width: min(100%, 440px);
  padding: 28px 26px 22px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid #e8eef6;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
  text-align: center;
}

.limit-dialog-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: rgba(47, 107, 255, 0.1);
  color: #2f6bff;
  font-size: 18px;
}

.limit-dialog-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #94a3b8;
}

.limit-dialog-title {
  margin: 8px 0 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.limit-dialog-text {
  margin: 10px auto 0;
  max-width: 34ch;
  font-size: 14.5px;
  line-height: 1.55;
  color: #64748b;
}

.limit-dialog-text strong {
  color: #0f172a;
  font-weight: 650;
}

.limit-dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 22px;
}

.limit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.limit-btn--primary {
  background: #2f6bff;
  color: #fff;
  box-shadow: 0 8px 20px rgba(47, 107, 255, 0.28);
}

.limit-btn--primary:hover {
  background: #1d4ed8;
}

.limit-btn--quiet {
  background: #fff;
  color: #64748b;
  border-color: transparent;
}

.limit-btn--quiet:hover {
  background: #f7f9fc;
  color: #0f172a;
}

.modal-footer-actions {
  display: flex;
  gap: 10px;
}

.inspect-metrics {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

@media (max-width: 900px) {
  .side-by-side-container,
  .inspect-side-by-side {
    grid-template-columns: 1fr;
  }
  .inspect-viewport { height: auto; max-height: none; }
  .inspect-side-by-side { height: auto; }
  .inspect-pane { min-height: 240px; }
}

/* Speed check */
.speed-check-band {
  background: none;
}

.speed-check-card {
  display: grid;
  grid-template-columns: 240px 386px;
  gap: 20px 28px;
  align-items: center;
  width: 100%;
  max-width: 702px;
  margin: 0 auto;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid #e8eef6;
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.speed-meter-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.speed-gauge {
  position: relative;
  width: 211px;
}

.speed-gauge-svg {
  display: block;
  width: 100%;
  height: auto;
}

.speed-gauge-track {
  stroke: #e8eef6;
}

.speed-gauge-fill {
  transition: stroke-dashoffset 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.speed-gauge-readout {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -20%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1;
  pointer-events: none;
}

.speed-gauge-readout strong {
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.speed-gauge-readout span {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
}

.speed-gauge-ticks {
  display: flex;
  justify-content: space-between;
  width: 211px;
  margin-top: -2px;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}

.speed-status {
  margin-top: 10px;
  max-width: 216px;
  font-size: 14px;
  line-height: 1.4;
  color: #64748b;
}

.speed-check-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 48px;
  margin-top: 14px;
  padding: 0 19px;
  border: 0;
  border-radius: 999px;
  background: #2f6bff;
  color: #fff;
  font-size: 16px;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(47, 107, 255, 0.22);
  transition: background 0.15s ease, transform 0.15s ease;
}

.speed-check-btn:hover:not(:disabled) {
  background: #1d4ed8;
}

.speed-check-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.speed-check-btn.is-running i {
  animation: speed-spin 0.8s linear infinite;
}

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

.speed-estimate-col {
  min-width: 0;
  width: 386px;
  max-width: 100%;
}

.speed-batch-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #eef3ff;
}

.speed-batch-chip span {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.speed-batch-chip strong {
  font-size: 15px;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.speed-breakdown {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.speed-breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e8eef6;
}

.speed-breakdown dt {
  font-size: 13px;
  color: #64748b;
}

.speed-breakdown dd {
  font-size: 13px;
  font-weight: 650;
  color: #0f172a;
  text-align: right;
}

.speed-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #0f172a;
  color: #fff;
}

.speed-total span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.64);
}

.speed-total strong {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.speed-note {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}

.pricing-band {
  background:
    radial-gradient(720px 280px at 50% 0%, rgba(47, 107, 255, 0.12), transparent 68%),
    linear-gradient(180deg, #f7f9fc 0%, #f3f7ff 46%, #f7f9fc 100%);
}

.pricing-head {
  max-width: 560px;
  margin: 0 auto 36px;
  text-align: center;
}

.pricing-head h2 {
  margin-top: 14px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.12;
  color: #0f172a;
}

.pricing-head p:last-child {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.6;
  color: #64748b;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
}

.price-card {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 28px 26px 24px;
  border: 1px solid #e8eef6;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.price-card h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.price-card__lead {
  margin-top: 6px;
  min-height: 22px;
  font-size: 14px;
  color: #64748b;
}

.price-card__amount {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin-top: 18px;
}

.price-card__amount span {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.price-card__amount small {
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
  color: #64748b;
}

.price-card__vat,
.price-card__trial {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.price-card__trial {
  margin-top: 10px;
  color: #0f172a;
}

.price-card__quota {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(47, 107, 255, 0.08);
  color: #2f6bff;
  font-size: 13px;
  font-weight: 700;
}

.price-card__list {
  margin: 22px 0 26px;
  padding: 0;
  list-style: none;
}

.price-card__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  color: #334155;
  font-size: 14px;
  line-height: 1.4;
}

.price-card__list li::before {
  content: "";
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%232F6BFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.2 6.4 11 12.5 5'/%3E%3C/svg%3E") center / 14px 14px no-repeat,
    #eef3ff;
}

.price-card__btn {
  display: flex;
  height: 48px;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.price-card__btn--ghost {
  border: 1.5px solid #2f6bff;
  color: #2f6bff;
}

.price-card__btn--ghost:hover {
  background: #eef3ff;
}

.price-card__btn--solid {
  background: #fff;
  color: #1d4ed8;
}

.price-card__btn--solid:hover {
  background: #eef3ff;
}

.price-card--featured {
  border: 0;
  color: #fff;
  background:
    radial-gradient(380px 160px at 88% 0%, rgba(255, 255, 255, 0.22), transparent 62%),
    linear-gradient(165deg, #4b84ff 0%, #2f6bff 42%, #1d4ed8 100%);
  box-shadow: 0 22px 48px rgba(47, 107, 255, 0.32);
}

.price-card--featured .price-card__lead,
.price-card--featured .price-card__amount small,
.price-card--featured .price-card__vat {
  color: rgba(255, 255, 255, 0.78);
}

.price-card--featured .price-card__quota {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.price-card--featured .price-card__list li {
  color: rgba(255, 255, 255, 0.92);
}

.price-card--featured .price-card__list li::before {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%232F6BFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.2 6.4 11 12.5 5'/%3E%3C/svg%3E") center / 14px 14px no-repeat,
    #fff;
}

.price-card__badge {
  position: absolute;
  top: 22px;
  right: 22px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (min-width: 900px) {
  .pricing-head h2 {
    font-size: 42px;
  }

  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 380px));
    justify-content: center;
    gap: 22px;
    align-items: stretch;
  }
}

@media (max-width: 800px) {
  .speed-check-card {
    grid-template-columns: 1fr;
    padding: 18px 16px;
  }

  .speed-estimate-col {
    width: 100%;
  }

  .speed-total {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Accounts */
.auth-dialog {
  position: relative;
  text-align: left;
}

.auth-dialog .limit-dialog-title,
.auth-dialog .auth-reason {
  text-align: center;
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
}

.auth-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 18px;
  padding: 4px;
  border-radius: 999px;
  background: #f1f5f9;
}

.auth-tab {
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.auth-tab.is-on {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.auth-google {
  display: flex;
  min-height: 44px;
  justify-content: center;
  margin-top: 18px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 4px;
  color: #94a3b8;
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e8eef6;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.auth-field input {
  height: 44px;
  padding: 0 14px;
  border: 1px solid #d7dee8;
  border-radius: 12px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 400;
  color: #0f172a;
  outline: none;
}

.auth-field input:focus {
  border-color: #2f6bff;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.15);
}

.auth-hint {
  margin: -4px 0 0;
  font-size: 12px;
  color: #94a3b8;
}

.auth-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
}

.auth-form .limit-btn {
  margin-top: 4px;
}

.quota-note {
  margin: 4px 0 10px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
}

.quota-note strong {
  color: #0f172a;
}

.quota-note a,
.quota-note button {
  border: 0;
  background: none;
  padding: 0;
  color: #2f6bff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.quota-note.is-empty {
  color: #b45309;
}

/* Account page */
.account-page {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 20px 72px;
}

.account-page h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.045em;
  color: #0f172a;
}

.account-lead {
  margin-top: 8px;
  color: #64748b;
  font-size: 15px;
}

.account-card {
  margin-top: 22px;
  padding: 24px 24px 22px;
  border: 1px solid #e8eef6;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.account-card h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
}

.account-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
}

.account-big {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: #0f172a;
  line-height: 1;
}

.account-big small {
  font-size: 16px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0;
}

.account-meter {
  height: 10px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.account-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4b84ff, #2f6bff);
  transition: width 0.4s ease;
}

.account-muted {
  color: #64748b;
  font-size: 14px;
}

.account-plan {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.account-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(47, 107, 255, 0.1);
  color: #2f6bff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.account-actions .limit-btn {
  width: auto;
}

.account-alert {
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #ecfdf5;
  color: #047857;
  font-size: 14px;
}

.account-alert.is-warn {
  background: #fffbeb;
  color: #b45309;
}

.cookie-banner {
  position: fixed;
  z-index: 1100;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 16px 16px 18px;
  border: 1px solid #e8eef6;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16);
}

.cookie-banner__body {
  min-width: min(100%, 280px);
  flex: 1 1 280px;
}

.cookie-banner__title {
  margin: 0;
  color: #0f172a;
  font-size: 14px;
  font-weight: 750;
}

.cookie-banner__text,
.cookie-banner__details {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.cookie-banner__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-banner__actions .limit-btn {
  width: auto;
  min-width: 88px;
  height: 40px;
}

.cookie-banner__link {
  border: 0;
  background: none;
  padding: 8px 10px;
  color: #64748b;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.cookie-banner__link:hover {
  color: #0f172a;
}
