/* ── Ocoxe Preview · Linear Design System ────────────────────────────────────
   Typography:  Inter Variable — weights 300/400/510/590
   Fonts:       font-feature-settings "cv01" "ss03" globally (Linear's identity)
   Color:       Near-black canvas · translucent white surfaces · flat indigo accent
   Components:  6px radius buttons · 8px radius cards · semi-transparent borders
   Philosophy:  Darkness as space. Elevation through luminance, not shadows.
   ─────────────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* ── Variables ────────────────────────────────────────────────────────────── */
:root {
  /* Backgrounds — luminance stacking model */
  --bg:            #08090a;   /* deepest canvas */
  --panel:         #0f1011;   /* header, sidebar */
  --surface:       #191a1b;   /* cards, elevated */
  --surface-hover: #28282c;   /* hover states */
  --surface-input: rgba(255, 255, 255, 0.02);

  /* Borders — always semi-transparent white, never solid dark */
  --border:        rgba(255, 255, 255, 0.05);
  --border-std:    rgba(255, 255, 255, 0.08);
  --border-solid:  rgb(36, 40, 44);
  --border-pill:   rgb(35, 37, 42);

  /* Text */
  --text-1: #f7f8f8;   /* primary — slightly warm white, not harsh */
  --text-2: #d0d6e0;   /* body — cool silver gray */
  --text-3: #8a8f98;   /* muted — placeholders, meta */
  --text-4: #62666d;   /* subtle — timestamps, disabled */

  /* Brand — the ONLY chromatic color in the system */
  --brand:        #5e6ad2;   /* CTA button background */
  --accent:       #7170ff;   /* interactive links, active */
  --accent-hover: #828fff;   /* hover on accent elements */

  /* Status */
  --success:    #10b981;
  --success-bg: rgba(16, 185, 129, 0.08);
  --success-br: rgba(16, 185, 129, 0.15);
  --error:      #ef4444;
  --error-bg:   rgba(239, 68, 68, 0.08);
  --error-br:   rgba(239, 68, 68, 0.15);

  /* Shadows — Linear's multi-layer dialog stack */
  --shadow-dialog:
    rgba(0, 0, 0, 0) 0px 8px 2px,
    rgba(0, 0, 0, 0.01) 0px 5px 2px,
    rgba(0, 0, 0, 0.04) 0px 3px 2px,
    rgba(0, 0, 0, 0.07) 0px 1px 1px,
    rgba(0, 0, 0, 0.08) 0px 0px 1px;
  --shadow-elevated: rgba(0, 0, 0, 0.4) 0px 2px 4px;
  --shadow-focus:    rgba(0, 0, 0, 0.1) 0px 4px 12px;
  --shadow-ring:     rgba(0, 0, 0, 0.2) 0px 0px 0px 1px;

  /* Radius — Linear's sharp, tool-like scale */
  --r-micro: 2px;   /* inline badges, toolbar buttons */
  --r-sm:    4px;   /* small containers */
  --r:       6px;   /* buttons, inputs */
  --r-card:  8px;   /* cards, dropdowns */
  --r-panel: 12px;  /* panels, modals */
  --r-full:  9999px;

  /* Spacing (8px base) */
  --sp-1: 4px;   --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;
  --sp-5: 20px;  --sp-6: 24px;  --sp-8: 32px;  --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px;
}

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

html { scroll-behavior: smooth; }

body {
  /* Linear's Inter with OpenType geometric alternates — non-negotiable */
  font-family: 'Inter', 'SF Pro Display', -apple-system, system-ui,
               'Segoe UI', sans-serif;
  font-feature-settings: "cv01", "ss03";
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.165px;
  color: var(--text-2);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button {
  font-family: inherit;
  font-feature-settings: "cv01", "ss03";
  cursor: pointer;
  border: none;
  background: none;
}

input {
  font-family: inherit;
  font-feature-settings: "cv01", "ss03";
}

input, button { outline: none; }

code, pre {
  font-family: ui-monospace, 'SF Mono', Menlo, 'Cascadia Code', monospace;
  font-feature-settings: normal;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--brand);
  border-radius: var(--r-sm);
  flex-shrink: 0;
}

.logo-name {
  font-size: 14px;
  font-weight: 510;
  letter-spacing: -0.15px;
  color: var(--text-1);
}

.logo-badge {
  font-size: 10px;
  font-weight: 510;
  letter-spacing: 0.2px;
  color: var(--text-4);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 1px 7px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.nav-count {
  font-size: 12px;
  font-weight: 510;
  color: var(--text-4);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  font-weight: 510;
  font-feature-settings: "cv01", "ss03";
  letter-spacing: -0.13px;
  line-height: 1;
  border-radius: var(--r);
  padding: 6px 12px;
  transition:
    background 0.1s ease,
    border-color 0.1s ease,
    color 0.1s ease,
    opacity 0.1s ease;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.btn:active { opacity: 0.8; }

/* Primary — flat brand indigo, Linear's only CTA color */
.btn-primary {
  background: var(--brand);
  color: #ffffff;
  border: 1px solid transparent;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* Ghost — translucent surface with solid dark border */
.btn-ghost {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-2);
  border: 1px solid var(--border-solid);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-1);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Danger */
.btn-danger {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error-br);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.14);
}

/* Size variants */
.btn-sm {
  font-size: 12px;
  padding: 4px 8px;
  gap: 5px;
}

.btn-full { width: 100%; justify-content: center; }

/* Upload primary — slightly larger than standard */
.btn-upload {
  font-size: 14px;
  font-weight: 510;
  padding: 8px 16px;
}

/* Delete btn — starts muted */
.btn-delete { color: var(--text-4); }
.btn-delete:hover {
  color: var(--error);
  border-color: var(--error-br);
  background: var(--error-bg);
}

/* Link button */
.link-btn {
  color: var(--accent);
  background: none;
  border: none;
  font-size: inherit;
  font-weight: 510;
  font-family: inherit;
  font-feature-settings: "cv01", "ss03";
  cursor: pointer;
  padding: 0;
  transition: color 0.1s;
}
.link-btn:hover { color: var(--accent-hover); }

/* ── Spinner ──────────────────────────────────────────────────────────────── */
.spinner {
  width: 13px;
  height: 13px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-top-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}

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

/* ── Main Content ─────────────────────────────────────────────────────────── */
.main-content {
  padding: var(--sp-12) 0 var(--sp-20);
}

/* ── Section Labels ───────────────────────────────────────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 510;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--text-4);
  margin-bottom: var(--sp-2);
  font-feature-settings: "cv01", "ss03";
}

.section-title {
  font-size: 20px;
  font-weight: 590;
  letter-spacing: -0.24px;
  color: var(--text-1);
  line-height: 1.33;
}

.section-desc {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-3);
  line-height: 1.6;
  letter-spacing: -0.182px;
  margin-top: 6px;
  max-width: 480px;
}

/* ── Upload Section ───────────────────────────────────────────────────────── */
.upload-section {
  margin-bottom: var(--sp-16);
}

.section-header {
  margin-bottom: var(--sp-6);
}

.upload-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-std);
  border-radius: var(--r-card);
  padding: var(--sp-6);
}

/* ── Drop Zone ────────────────────────────────────────────────────────────── */
.drop-zone {
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--r-card);
  padding: var(--sp-8) var(--sp-6);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.1s, background 0.1s;
  margin-bottom: var(--sp-5);
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.drop-zone:hover,
.drop-zone.drop-zone--active {
  border-color: rgba(113, 112, 255, 0.4);
  background: rgba(94, 106, 210, 0.04);
}

.drop-zone:focus-visible {
  outline: 1px solid var(--brand);
  outline-offset: 2px;
}

.drop-zone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
}

.drop-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-std);
  border-radius: var(--r-card);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-1);
  color: var(--text-3);
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}

.drop-zone:hover .drop-icon,
.drop-zone.drop-zone--active .drop-icon {
  background: rgba(94, 106, 210, 0.1);
  border-color: rgba(94, 106, 210, 0.3);
  color: var(--accent);
}

.drop-title {
  font-size: 14px;
  font-weight: 510;
  letter-spacing: -0.182px;
  color: var(--text-2);
}

.drop-sub {
  font-size: 13px;
  color: var(--text-4);
  letter-spacing: -0.13px;
}

.drop-hint {
  font-size: 11px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  color: var(--text-4);
  margin-top: 4px;
  letter-spacing: 0.1px;
}

/* File selected state */
.drop-zone-file {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  width: 100%;
}

.file-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-std);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  flex-shrink: 0;
}

.file-info {
  flex: 1;
  text-align: left;
  overflow: hidden;
}

.file-name {
  display: block;
  font-size: 13px;
  font-weight: 510;
  letter-spacing: -0.13px;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  display: block;
  font-size: 12px;
  color: var(--text-4);
  margin-top: 2px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

.file-remove {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-4);
  border: 1px solid var(--border-solid);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.1s, border-color 0.1s, background 0.1s;
}

.file-remove:hover {
  color: var(--error);
  border-color: var(--error-br);
  background: var(--error-bg);
}

/* ── Form Fields ──────────────────────────────────────────────────────────── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 12px;
  font-weight: 510;
  letter-spacing: -0.1px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.label-required {
  color: var(--brand);
}

.label-optional {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-4);
  margin-left: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper .input-icon {
  position: absolute;
  left: 12px;
  color: var(--text-4);
  pointer-events: none;
  flex-shrink: 0;
}

.input-wrapper input {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-std);
  border-radius: var(--r);
  color: var(--text-1);
  font-family: inherit;
  font-feature-settings: "cv01", "ss03";
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.165px;
  padding: 8px 36px 8px 32px;
  transition: border-color 0.1s, background 0.1s, box-shadow 0.1s;
}

.input-wrapper input::placeholder {
  color: var(--text-4);
}

.input-wrapper input:focus {
  border-color: var(--brand);
  background: rgba(94, 106, 210, 0.04);
  box-shadow: var(--shadow-focus);
}

.input-toggle {
  position: absolute;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  color: var(--text-4);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.1s;
  border-radius: var(--r-sm);
}
.input-toggle:hover { color: var(--text-2); }

/* Slug preview */
.slug-preview {
  font-size: 11px;
  color: var(--text-4);
  letter-spacing: -0.1px;
  padding: 0 2px;
}
.slug-preview code {
  color: var(--accent);
  font-size: 11px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

/* ── Form Submit ──────────────────────────────────────────────────────────── */
.form-submit {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.btn-content,
.btn-loading {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Upload Progress ──────────────────────────────────────────────────────── */
.upload-progress {
  margin-top: var(--sp-3);
}

.progress-bar {
  height: 2px;
  background: var(--border);
  border-radius: var(--r-full);
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-fill {
  height: 100%;
  background: var(--brand);
  border-radius: var(--r-full);
  width: 0%;
  transition: width 0.3s ease;
}

.progress-label {
  font-size: 11px;
  font-weight: 510;
  color: var(--text-4);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

/* ── Projects Section ─────────────────────────────────────────────────────── */
.projects-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--sp-5);
}

.projects-count {
  font-size: 11px;
  font-weight: 510;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  color: var(--text-4);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-solid);
  border-radius: var(--r-full);
  padding: 2px 8px;
  margin-top: 4px;
}

/* ── Empty State ──────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--sp-16) var(--sp-6);
  border: 1px dashed var(--border);
  border-radius: var(--r-card);
}

.empty-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-std);
  border-radius: var(--r-card);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-4);
  color: var(--text-4);
}

.empty-state h3 {
  font-size: 15px;
  font-weight: 510;
  letter-spacing: -0.165px;
  color: var(--text-3);
  margin-bottom: 4px;
}

.empty-state p {
  font-size: 13px;
  color: var(--text-4);
  letter-spacing: -0.13px;
}

/* ── Projects Grid ────────────────────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;                         /* hairline grid gaps */
  background: var(--border);        /* gap color via background trick */
  border: 1px solid var(--border-std);
  border-radius: var(--r-card);
  overflow: hidden;
}

/* ── Project Card ─────────────────────────────────────────────────────────── */
.project-card {
  background: var(--bg);           /* base; hover elevates */
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: background 0.1s;
}

.project-card:hover {
  background: rgba(255, 255, 255, 0.02);
}

.card-header {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}

.card-title {
  font-size: 14px;
  font-weight: 510;
  letter-spacing: -0.182px;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-slug code {
  font-size: 11px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  color: var(--text-4);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 510;
  font-feature-settings: "cv01", "ss03";
  padding: 1px 6px 1px 4px;
  border-radius: var(--r-full);
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-lock {
  background: transparent;
  color: var(--text-3);
  border: 1px solid var(--border-pill);
}

.badge-public {
  background: transparent;
  color: var(--text-4);
  border: 1px solid var(--border-pill);
}

/* Preview URL */
.card-url { overflow: hidden; }

.preview-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  color: var(--text-4);
  transition: color 0.1s;
  word-break: break-all;
}

.preview-link:hover { color: var(--accent); }

/* Meta */
.card-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-4);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

.meta-dot { color: var(--text-4); font-size: 10px; }

/* Card actions */
.card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}

/* ── Alerts ───────────────────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.13px;
  padding: 9px 14px;
  border-radius: var(--r);
  margin-bottom: var(--sp-5);
  line-height: 1.4;
}

.alert-error {
  background: var(--error-bg);
  border: 1px solid var(--error-br);
  color: #fca5a5;
}

.alert-success {
  background: var(--success-bg);
  border: 1px solid var(--success-br);
  color: #6ee7b7;
}

/* ── Toast Notifications ──────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border-std);
  border-radius: var(--r-panel);
  padding: 10px 14px;
  min-width: 240px;
  max-width: 360px;
  box-shadow: var(--shadow-dialog);
  font-size: 13px;
  font-weight: 510;
  letter-spacing: -0.13px;
  color: var(--text-1);
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: all;
}

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

.toast-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 590;
  flex-shrink: 0;
}

.toast-success .toast-icon {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-br);
}
.toast-error .toast-icon {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error-br);
}
.toast-info .toast-icon {
  background: rgba(94, 106, 210, 0.1);
  color: var(--accent);
  border: 1px solid rgba(94, 106, 210, 0.2);
}

/* ── Delete Modal ─────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border-std);
  border-radius: var(--r-panel);
  padding: var(--sp-6) var(--sp-6);
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-dialog);
  transform: scale(0.96);
  transition: transform 0.15s ease;
}

.modal-overlay.open .modal-card {
  transform: scale(1);
}

.modal-icon {
  font-size: 24px;
  margin-bottom: var(--sp-3);
  display: block;
}

.modal-card h3 {
  font-size: 16px;
  font-weight: 590;
  letter-spacing: -0.2px;
  color: var(--text-1);
  margin-bottom: 6px;
}

.modal-card p {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.13px;
  color: var(--text-3);
  line-height: 1.6;
  margin-bottom: var(--sp-5);
}

.modal-actions {
  display: flex;
  gap: var(--sp-2);
  justify-content: center;
}

.modal-actions .btn {
  min-width: 100px;
  justify-content: center;
}

/* ── Auth Page ────────────────────────────────────────────────────────────── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--sp-6);
  background: var(--bg);
}

.auth-container {
  width: 100%;
  max-width: 360px;
}

.auth-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-std);
  border-radius: var(--r-panel);
  padding: var(--sp-8) var(--sp-6);
  box-shadow: var(--shadow-dialog);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: var(--sp-8);
}

.auth-heading {
  margin-bottom: var(--sp-6);
}

.auth-heading h1 {
  font-size: 18px;
  font-weight: 590;
  letter-spacing: -0.24px;
  color: var(--text-1);
  margin-bottom: 4px;
}

.auth-heading p {
  font-size: 13px;
  letter-spacing: -0.13px;
  color: var(--text-4);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.auth-form .input-wrapper input {
  padding: 9px 36px 9px 32px;
}

.auth-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-4);
  margin-top: var(--sp-5);
  letter-spacing: -0.1px;
}

.auth-note a {
  color: var(--accent);
  transition: color 0.1s;
}
.auth-note a:hover { color: var(--accent-hover); }

/* ── Card enter animation ─────────────────────────────────────────────────── */
@keyframes cardIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.project-card.card-new {
  animation: cardIn 0.2s ease forwards;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .main-content { padding: var(--sp-8) 0 var(--sp-12); }
  .container    { padding: 0 var(--sp-4); }

  .section-title { font-size: 17px; }

  .upload-card { padding: var(--sp-4); }

  .form-row {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }

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

  .projects-header { flex-direction: column; gap: var(--sp-2); }

  .card-actions .btn { font-size: 11px; padding: 3px 7px; }

  .modal-card { padding: var(--sp-5); }
  .modal-actions { flex-direction: column; }
  .modal-actions .btn { width: 100%; }

  #toast-container { left: 12px; right: 12px; }
  .toast { min-width: unset; max-width: 100%; }

  .nav-count { display: none; }
}

@media (max-width: 480px) {
  .drop-zone { padding: var(--sp-6) var(--sp-4); }
  .auth-card { padding: var(--sp-6) var(--sp-4); }
  .header-inner { height: 48px; }
}
