/* ============================================================
   Big Image Vault — shared design tokens & components
   Dark, technical, viewfinder-inspired. Plain CSS, no framework.
   ============================================================ */

:root {
  /* Palette */
  --bg:        #0b0d12;
  --surface:   #12151c;
  --surface-2: #171b24;
  --surface-3: #1e2330;
  --border:    #232836;
  --text:      #e7e9ee;
  --text-dim:  #8b93a3;
  --text-faint:#5b6376;

  --accent:       #4fd8c4;
  --accent-dim:   #2e6e64;
  --accent-wash:  rgba(79, 216, 196, 0.12);

  --warn:   #e0b84c;
  --danger: #e05a5a;
  --danger-wash: rgba(224, 90, 90, 0.12);
  --ok:     #4fd88a;

  /* Type */
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  --radius: 8px;
  --radius-sm: 5px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
}

body {
  overflow-x: hidden;
  /* faint grid, evokes tile boundaries of the deep-zoom viewer */
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
  background-color: var(--bg);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at top, rgba(79,216,196,0.06), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* ---------- Header / brand mark ---------- */

.site-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  max-width: 1100px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.01em;
  color: var(--text);
}

.brand .mark {
  width: 26px;
  height: 26px;
  flex: none;
  color: var(--accent);
}

.brand .sub {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-left: 4px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.05s ease;
}
.btn:hover { background: var(--surface-3); border-color: var(--text-faint); text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #06201b;
}
.btn-accent:hover { background: #6be3d2; border-color: #6be3d2; }

.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger-wash); }

.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ---------- Toggle pills (used for Public / Downloads switches) ---------- */

.pill-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s ease;
}
.pill-toggle .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-faint);
  transition: background 0.15s ease;
}
.pill-toggle.is-on {
  border-color: var(--accent-dim);
  background: var(--accent-wash);
  color: var(--accent);
}
.pill-toggle.is-on .dot { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.pill-toggle:hover { border-color: var(--text-faint); }

/* ---------- Status badges ---------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.status .dot { width: 6px; height: 6px; border-radius: 50%; }
.status-ready .dot { background: var(--ok); }
.status-ready { color: var(--ok); }
.status-processing .dot { background: var(--warn); box-shadow: 0 0 6px var(--warn); }
.status-processing { color: var(--warn); }
.status-queued .dot { background: var(--text-faint); }
.status-queued { color: var(--text-dim); }
.status-error .dot { background: var(--danger); }
.status-error { color: var(--danger); }

/* ---------- Cards (public gallery) ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--accent-dim); transform: translateY(-2px); }

.card .thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #05070a;
  overflow: hidden;
}
.card .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.card:hover .thumb img { transform: scale(1.04); }

/* Signature: viewfinder corner brackets reveal on hover */
.card .thumb .corner {
  position: absolute;
  width: 20px; height: 20px;
  border-color: var(--accent);
  border-style: solid;
  border-width: 0;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.card .thumb .corner.tl { top: 8px; left: 8px; border-top-width: 2px; border-left-width: 2px; transform: translate(4px, 4px); }
.card .thumb .corner.tr { top: 8px; right: 8px; border-top-width: 2px; border-right-width: 2px; transform: translate(-4px, 4px); }
.card .thumb .corner.bl { bottom: 8px; left: 8px; border-bottom-width: 2px; border-left-width: 2px; transform: translate(4px, -4px); }
.card .thumb .corner.br { bottom: 8px; right: 8px; border-bottom-width: 2px; border-right-width: 2px; transform: translate(-4px, -4px); }
.card:hover .thumb .corner { opacity: 1; transform: translate(0, 0); }

.card .body { padding: 14px; }
.card .name {
  font-size: 13.5px;
  color: var(--text);
  margin-bottom: 4px;
  word-break: break-all;
}
.card .dims {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  margin-bottom: 12px;
}
.card .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.card .actions a {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 6px;
  touch-action: manipulation;
}
.card .actions a:hover { color: var(--accent); border-color: var(--accent-dim); text-decoration: none; }
.card .actions a.primary { color: var(--accent); border-color: var(--accent-dim); background: var(--accent-wash); }

/* ---------- Table (admin dashboard) ---------- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 500;
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  vertical-align: middle;
}
tbody tr:hover { background: var(--surface); }
td.mono, .mono { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-dim); }
td.filename { max-width: 260px; word-break: break-all; }

/* ---------- Upload dropzone ---------- */

.dropzone {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 34px 24px;
  text-align: center;
  background: var(--surface);
  margin-bottom: 32px;
}
.dropzone input[type=file] {
  color: var(--text-dim);
  font-size: 13px;
}
.dropzone .row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
progress {
  width: 100%;
  height: 8px;
  accent-color: var(--accent);
}
progress::-webkit-progress-bar { background: var(--surface-3); border-radius: 999px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }

/* ---------- Empty state ---------- */

.empty {
  text-align: center;
  color: var(--text-faint);
  padding: 80px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* ---------- Section heading ---------- */

.section-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin: 4px 0 6px;
}
.section-lede {
  color: var(--text-dim);
  font-size: 13.5px;
  margin: 0 0 28px;
  max-width: 60ch;
}

@media (max-width: 640px) {
  .wrap, .site-header { padding-left: 16px; padding-right: 16px; }
}
