/* OakenGallery — Admin Panel Styles */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Montserrat:wght@300;400;500;600&display=swap');
@import 'tokens.css';

/* ── Design Tokens ─────────────────────────────────────────────────────────
   The admin uses the deep "Oaken Dark" register: forest-green-black surfaces
   with Oaken gold accents. Local names below map onto the brand tokens in
   tokens.css so the whole panel is driven from one source of truth.
   ────────────────────────────────────────────────────────────────────────── */
:root {
  --bg:           var(--og-green-black);   /* #0B1D13 forest black */
  --sidebar:      #081610;
  --surface:      #0F2419;
  --surface2:     #143020;
  --surface3:     #1B3A26;
  --border:       var(--og-gold-a14);
  --border-soft:  var(--og-gold-a08);
  --gold:         var(--og-gold);
  --gold-light:   var(--og-gold-light);
  --gold-pale:    var(--og-gold-a10);
  --gold-glow:    var(--og-gold-a20);
  --text:         var(--og-parchment);
  --text-muted:   var(--og-parchment-muted);
  --text-dim:     var(--og-parchment-dim);
  --danger:       #d95f5f;
  --danger-soft:  rgba(217,95,95,0.12);
  --success:      #5ebd7e;
  --success-soft: rgba(94,189,126,0.12);
  --warning:      #d4a43f;
  --warning-soft: rgba(212,164,63,0.12);
  --info:         #5b9dc9;
  --info-soft:    rgba(91,157,201,0.12);
  --sidebar-w:    264px;
  --topbar-h:     64px;
  --serif:        var(--og-serif);
  --sans:         var(--og-sans);
  --radius:       var(--og-r-card);
  --radius-lg:    var(--og-r-lg);
  --shadow:       var(--og-shadow-dark);
  --shadow-sm:    0 2px 10px rgba(0,0,0,0.3);
  --transition:   var(--og-transition);
}

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

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }
img { max-width: 100%; display: block; }

/* ── Layout Shell ───────────────────────────────────────────────────────── */
.admin-shell { display: flex; min-height: 100vh; }

/* ── Sidebar ────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--sidebar);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar-logo {
  padding: 1.5rem 1.25rem 1.25rem;
  border-bottom: 1px solid var(--border-soft);
}
.sidebar-logo img { height: 38px; width: auto; }

.sidebar-label {
  padding: 1.25rem 1.25rem 0.4rem;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.sidebar-nav { flex: 1; padding: 0.5rem 0.75rem; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
  position: relative;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--gold-pale); color: var(--text); }
.nav-item.active { background: var(--gold-pale); color: var(--gold); }
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -0.75rem; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--gold);
  border-radius: 0 3px 3px 0;
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.7; }
.nav-item.active svg, .nav-item:hover svg { opacity: 1; }

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 100px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 0.75rem 0.75rem 1.25rem;
  border-top: 1px solid var(--border-soft);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius);
  margin-bottom: 4px;
}
.sidebar-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--gold-pale);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--gold); flex-shrink: 0;
}
.sidebar-user-info { min-width: 0; }
.sidebar-user-name { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 10px; color: var(--text-muted); text-transform: capitalize; }

/* ── Main Content ───────────────────────────────────────────────────────── */
.main-area { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* ── Topbar ─────────────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-breadcrumb {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 13px; color: var(--text-muted); flex: 1;
}
.topbar-breadcrumb a { color: var(--text-dim); }
.topbar-breadcrumb .current { color: var(--text); font-weight: 500; }
.topbar-actions { display: flex; align-items: center; gap: 0.75rem; }

/* ── Page Content ───────────────────────────────────────────────────────── */
.page-content { padding: 2rem; flex: 1; }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}
.page-title { font-family: var(--serif); font-size: 2rem; font-weight: 400; color: var(--text); line-height: 1.2; }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 0.25rem; }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.card-title { font-family: var(--serif); font-size: 1.1rem; font-weight: 500; color: var(--text); }
.card-body { padding: 1.5rem; }
.card-body.p-0 { padding: 0; }

/* ── Stat Cards ─────────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}
.stat-card:hover { border-color: var(--border); transform: translateY(-1px); }
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: var(--gold-pale);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem; color: var(--gold);
}
.stat-icon svg { width: 20px; height: 20px; }
.stat-value { font-family: var(--serif); font-size: 2.4rem; font-weight: 400; color: var(--text); line-height: 1; margin-bottom: 0.25rem; }
.stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); font-weight: 600; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.btn-primary { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--bg); }

.btn-outline { background: transparent; color: var(--text-dim); border-color: var(--border); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-pale); }

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

.btn-ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: var(--gold-pale); }

.btn-sm { padding: 0.35rem 0.85rem; font-size: 12px; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 14px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* ── Tables ─────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-muted); font-weight: 600;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border-soft); transition: background var(--transition); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--gold-pale); }
tbody td { padding: 0.875rem 1rem; vertical-align: middle; color: var(--text-dim); }
tbody td.td-bold { color: var(--text); font-weight: 500; }
tbody td.td-mono { font-family: monospace; font-size: 12px; }
.td-actions { display: flex; align-items: center; gap: 0.35rem; justify-content: flex-end; }

/* ── Badges ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
}
.badge-published, .badge-active { background: var(--success-soft); color: var(--success); }
.badge-draft      { background: var(--surface3); color: var(--text-muted); }
.badge-proofing   { background: var(--info-soft); color: var(--info); }
.badge-approved   { background: var(--success-soft); color: var(--success); }
.badge-delivered  { background: var(--gold-pale); color: var(--gold); }
.badge-archived   { background: var(--warning-soft); color: var(--warning); }
.badge-warning    { background: var(--warning-soft); color: var(--warning); }
.badge-public     { background: var(--info-soft); color: var(--info); }
.badge-private    { background: var(--surface3); color: var(--text-muted); }
.badge-unlisted   { background: var(--warning-soft); color: var(--warning); }
.badge-unread     { background: var(--gold-pale); color: var(--gold); }
.badge-expired    { background: var(--danger-soft); color: var(--danger); }
.badge-read       { background: var(--surface3); color: var(--text-muted); }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }

label {
  display: block;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  font-weight: 600; color: var(--text-muted);
  margin-bottom: 0.4rem;
}
label .required { color: var(--danger); margin-left: 2px; }

input[type=text], input[type=email], input[type=password],
input[type=number], input[type=date], input[type=datetime-local],
input[type=url], select, textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23b8965a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}
select option { background: var(--surface2); color: var(--text); }
textarea { resize: vertical; min-height: 100px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 0.3rem; }
.form-error { font-size: 11px; color: var(--danger); margin-top: 0.3rem; }

/* ── Alerts / Flash ─────────────────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 1.25rem;
}
.alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--success-soft); color: var(--success); border: 1px solid rgba(94,189,126,0.2); }
.alert-danger  { background: var(--danger-soft);  color: var(--danger);  border: 1px solid rgba(217,95,95,0.2); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border: 1px solid rgba(212,164,63,0.2); }
.alert-info    { background: var(--info-soft);    color: var(--info);    border: 1px solid rgba(91,157,201,0.2); }

/* ── Pagination ─────────────────────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; gap: 0.25rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-soft);
  justify-content: flex-end;
}
.page-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--radius);
  font-size: 12px; font-weight: 500;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: all var(--transition);
}
.page-link:hover { background: var(--gold-pale); color: var(--gold); border-color: var(--border); }
.page-link.active { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.page-link.disabled { opacity: 0.35; pointer-events: none; }

/* ── Empty State ────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.empty-state svg { width: 48px; height: 48px; margin: 0 auto 1.25rem; opacity: 0.3; }
.empty-state h3 { font-family: var(--serif); font-size: 1.4rem; color: var(--text-dim); margin-bottom: 0.5rem; font-weight: 400; }
.empty-state p { font-size: 13px; max-width: 320px; margin: 0 auto 1.5rem; }

/* ── Media Grid ─────────────────────────────────────────────────────────── */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }

.media-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface2);
  border: 1px solid var(--border-soft);
  aspect-ratio: 1;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition);
}
.media-item:hover { border-color: var(--gold); transform: scale(1.01); }
.media-item.selected { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.media-item img { width: 100%; height: 100%; object-fit: cover; }

.media-item-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-start;
  padding: 0.5rem;
  opacity: 0; transition: opacity var(--transition);
}
.media-item:hover .media-item-overlay { opacity: 1; }
.media-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 0.5rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  font-size: 11px; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Dropzone ───────────────────────────────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  transition: border-color var(--transition), background var(--transition);
  cursor: pointer;
}
.dropzone:hover, .dropzone.drag-over { border-color: var(--gold); background: var(--gold-pale); }
.dropzone-icon { color: var(--gold); opacity: 0.6; margin: 0 auto 1rem; }
.dropzone-icon svg { width: 40px; height: 40px; }
.dropzone h3 { font-family: var(--serif); font-size: 1.25rem; font-weight: 400; color: var(--text-dim); margin-bottom: 0.35rem; }
.dropzone p { font-size: 12px; color: var(--text-muted); }
.dropzone-actions { display: flex; gap: 0.6rem; justify-content: center; margin-top: 1.1rem; }
.dropzone-note { display: flex; align-items: flex-start; gap: 0.5rem; margin-top: 1rem; padding: 0.7rem 0.85rem; background: var(--gold-pale); border: 1px solid var(--border-soft); border-radius: var(--radius); font-size: 12px; color: var(--text-dim); line-height: 1.4; }
.dropzone-note svg { color: var(--gold); margin-top: 1px; }

/* ── Upload Queue ───────────────────────────────────────────────────────── */
.upload-queue { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.upload-item { background: var(--surface2); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 0.75rem 1rem; }
.upload-item-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.upload-thumb { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; background: var(--surface3); flex-shrink: 0; }
.upload-thumb-video { display:flex; align-items:center; justify-content:center; color: var(--gold); background: var(--surface3); border-radius: 4px; }
.upload-name { font-size: 12px; font-weight: 500; color: var(--text); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-size { font-size: 11px; color: var(--text-muted); }
.upload-status { font-size: 11px; font-weight: 600; }
.upload-status.done { color: var(--success); }
.upload-status.error { color: var(--danger); }
.progress-bar { height: 3px; background: var(--surface3); border-radius: 100px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: 100px; transition: width 0.3s ease; }

/* Folder upload groups (one per gallery) */
.upload-group { border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; }
.upload-group-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.7rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border-soft); }
.upload-group-name { font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 0.5rem; }
.upload-group-name::before { content: ''; width: 15px; height: 12px; flex-shrink: 0; background: var(--gold); opacity: 0.55; -webkit-mask: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z'/%3E%3C/svg%3E"); mask: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z'/%3E%3C/svg%3E"); }
.upload-group-count { font-size: 11px; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; background: var(--surface3); border-radius: 100px; padding: 1px 8px; }
.upload-group-items { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.75rem; }
.upload-group-items .upload-item { background: var(--surface); }

/* ── Modal ──────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 900;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  max-width: 520px; width: 100%;
  transform: translateY(20px); transition: transform 0.2s;
}
.modal-backdrop.open .modal { transform: translateY(0); }
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-family: var(--serif); font-size: 1.2rem; font-weight: 500; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 0.25rem; border-radius: 4px; }
.modal-close:hover { color: var(--text); background: var(--surface2); }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border-soft); display: flex; justify-content: flex-end; gap: 0.75rem; }

/* ── Login Page ─────────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  padding: 1.5rem;
  position: relative; overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(174,151,111,0.04) 0%, transparent 70%);
  top: -200px; right: -200px;
  pointer-events: none;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow);
}
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo img { height: 52px; width: auto; margin: 0 auto 1rem; }
.login-subtitle { font-size: 12px; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; }
.login-title h1 { font-size: 1.4rem; font-weight: 400; color: var(--text); margin-bottom: 0.25rem; }
.login-title p { font-size: 13px; color: var(--text-muted); }

/* ── Toolbar / Filters ──────────────────────────────────────────────────── */
.toolbar { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.toolbar-search { position: relative; flex: 1; min-width: 200px; max-width: 320px; }
.toolbar-search svg { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--text-muted); pointer-events: none; }
.toolbar-search input { padding-left: 2.25rem; }
.toolbar select { width: auto; min-width: 140px; }

/* ── Cover Preview ──────────────────────────────────────────────────────── */
.cover-preview {
  width: 100%; aspect-ratio: 16/9;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.75rem;
}
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.cover-preview-placeholder { color: var(--text-muted); font-size: 12px; }

/* ── Copy Button ────────────────────────────────────────────────────────── */
.copy-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 0.2rem;
  border-radius: 4px; transition: color var(--transition);
  display: inline-flex; align-items: center;
}
.copy-btn:hover { color: var(--gold); }
.copy-btn svg { width: 14px; height: 14px; }

.ops-code,
.ops-log {
  background: var(--surface2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-family: Consolas, Monaco, 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.7;
  overflow: auto;
  padding: 1rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.ops-log {
  max-height: 420px;
}

/* Hide hamburger on desktop */
#sidebar-toggle { display: none; }

/* ── Sidebar overlay (mobile) ───────────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(2px);
  z-index: 199;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar.open ~ .sidebar-overlay,
  .sidebar-overlay.open { display: block; }
  .main-area { margin-left: 0; }
  .form-row { grid-template-columns: 1fr; }
  #sidebar-toggle { display: flex !important; }
  .topbar { padding: 0 1.25rem; gap: 0.75rem; }
}

@media (max-width: 600px) {
  .page-content { padding: 0.875rem; }
  .topbar { padding: 0 0.875rem; }
  .topbar-breadcrumb { font-size: 11px; }
  .topbar-actions .btn-ghost span { display: none; }

  .page-header { flex-direction: column; gap: 0.75rem; }
  .page-title { font-size: 1.5rem; }

  /* Stat cards — 2 columns, tighter */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.25rem; }
  .stat-card { padding: 0.875rem 1rem; }
  .stat-icon { width: 32px; height: 32px; margin-bottom: 0.625rem; }
  .stat-icon svg { width: 16px; height: 16px; }
  .stat-value { font-size: 1.75rem; }
  .stat-label { font-size: 9px; }

  /* Dashboard 2-col → single col */
  .dashboard-grid { grid-template-columns: 1fr !important; }

  /* Cards tighter */
  .card-header { padding: 0.75rem 1rem; }
  .card-body { padding: 1rem; }
  .card-title { font-size: 1rem; }

  /* Contact list items tighter */
  .contact-row { padding: 0.625rem 0.875rem !important; }
  .contact-row p { font-size: 11px !important; }

  /* Quick action buttons full-width */
  .quick-actions-list { gap: 0.5rem !important; }
  .quick-actions-list .btn { font-size: 12px; padding: 0.5rem 0.875rem; }

  .media-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 0.5rem; }
  .table-wrap table { font-size: 12px; }
  thead th { font-size: 9px; padding: 0.6rem 0.75rem; }
  tbody td { padding: 0.625rem 0.75rem; }
}

/* ── Dashboard (action-first) ─────────────────────────────────────────────── */
.dash-header-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.dash-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.5rem; align-items: start; margin-top: 1.5rem; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }

/* Needs-you alert list */
.dash-alerts { display: flex; flex-direction: column; }
.dash-alert {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.85rem 1rem; text-decoration: none;
  border-bottom: 1px solid var(--border-soft);
  transition: background var(--transition);
}
.dash-alert:last-child { border-bottom: none; }
.dash-alert:hover { background: var(--gold-pale); }
.dash-alert-ic {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.dash-alert-ic svg { width: 17px; height: 17px; }
.dash-alert--info .dash-alert-ic { background: var(--info-soft);    color: var(--info); }
.dash-alert--warn .dash-alert-ic { background: var(--warning-soft); color: var(--warning); }
.dash-alert--err  .dash-alert-ic { background: var(--danger-soft);  color: var(--danger); }
.dash-alert-body { flex: 1; min-width: 0; }
.dash-alert-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.dash-alert-sub { font-size: 11.5px; color: var(--text-muted); }
.dash-alert-count {
  font-size: 15px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums; margin-left: auto;
}
.dash-alert-arrow { color: var(--text-muted); flex-shrink: 0; display: flex; }

/* All-clear empty state */
.dash-allclear { text-align: center; padding: 2.5rem 1.5rem; }
.dash-allclear-ic {
  width: 46px; height: 46px; margin: 0 auto 0.9rem; border-radius: 50%;
  background: var(--success-soft); color: var(--success);
  display: flex; align-items: center; justify-content: center;
}
.dash-allclear h3 { font-size: 15px; color: var(--text-dim); font-weight: 500; margin-bottom: 0.2rem; }
.dash-allclear p { font-size: 12.5px; color: var(--text-muted); }

/* Activity feed */
.dash-feed { display: flex; flex-direction: column; }
.dash-feed-row {
  display: flex; align-items: flex-start; gap: 0.7rem;
  padding: 0.7rem 1rem; border-bottom: 1px solid var(--border-soft);
}
.dash-feed-row:last-child { border-bottom: none; }
.dash-feed-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: var(--gold); }
.dash-feed-body { flex: 1; min-width: 0; }
.dash-feed-text { font-size: 12.5px; color: var(--text-dim); line-height: 1.45; }
.dash-feed-text b { color: var(--text); font-weight: 600; }
.dash-feed-time { font-size: 11px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* Recent projects */
.dash-projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; padding: 1rem; }
@media (max-width: 520px) { .dash-projects { grid-template-columns: 1fr; } }
.dash-proj {
  display: flex; gap: 0.7rem; align-items: center;
  padding: 0.55rem; border: 1px solid var(--border-soft); border-radius: 10px;
  text-decoration: none; transition: border-color var(--transition), background var(--transition);
}
.dash-proj:hover { border-color: var(--border); background: var(--surface2); }
.dash-proj-cover { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--surface3); }
.dash-proj-body { min-width: 0; flex: 1; }
.dash-proj-title { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-proj-meta { font-size: 11px; color: var(--text-muted); margin-top: 3px; display: flex; gap: 0.5rem; align-items: center; }

/* Storage strip */
.dash-storage {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem; margin-top: 1.5rem;
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius);
}
.dash-storage-ic { width: 36px; height: 36px; border-radius: 9px; background: var(--gold-pale); color: var(--gold); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dash-storage-body { flex: 1; }
.dash-storage-val { font-size: 14px; font-weight: 600; color: var(--text); }
.dash-storage-sub { font-size: 11.5px; color: var(--text-muted); }
.dash-storage-link { font-size: 12px; white-space: nowrap; }

/* ── Guided wizard (gallery create) ───────────────────────────────────────── */
.wizard { max-width: 720px; }
.wizard-steps { display: flex; align-items: center; list-style: none; margin: 0 0 1.75rem; padding: 0; }
.wizard-step { display: flex; align-items: center; gap: 0.5rem; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--text-muted); white-space: nowrap; }
.wizard-step:not(:last-child)::after { content: ''; width: 2rem; height: 1px; background: var(--border); margin: 0 0.85rem; }
.wizard-step-n { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface3); color: var(--text-muted); font-size: 12px; font-weight: 700; flex-shrink: 0; border: 1px solid var(--border-soft); transition: background .2s, color .2s, border-color .2s; }
.wizard-step.active { color: var(--gold); }
.wizard-step.active .wizard-step-n { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.wizard-step.done .wizard-step-n { background: var(--success-soft); color: var(--success); border-color: transparent; }

.wizard-panel { display: none; }
.wizard-panel.active { display: block; animation: wiz-in .25s ease; }
@keyframes wiz-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wizard-panel.active { animation: none; } }

.wizard-nav { display: flex; justify-content: space-between; gap: 0.75rem; margin-top: 1.25rem; }

.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg label { display: flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.9rem; font-size: 13px; cursor: pointer; color: var(--text-dim); background: transparent; transition: background .15s, color .15s; }
.seg label:not(:last-child) { border-right: 1px solid var(--border); }
.seg label:has(input:checked) { background: var(--gold-pale); color: var(--gold); }
.seg input { accent-color: var(--gold); }

.wizard-review { display: grid; grid-template-columns: auto 1fr; gap: 0.55rem 1.25rem; margin: 0; font-size: 13px; }
.wizard-review dt { color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; padding-top: 2px; }
.wizard-review dd { margin: 0; color: var(--text); }

.wizard-next { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.wizard-next a { display: flex; align-items: center; gap: 0.7rem; padding: 0.9rem 1rem; border: 1px solid var(--border-soft); border-radius: 10px; text-decoration: none; transition: border-color .15s, background .15s; }
.wizard-next a:hover { border-color: var(--border); background: var(--surface2); }
.wizard-next .wn-ic { width: 34px; height: 34px; border-radius: 9px; background: var(--gold-pale); color: var(--gold); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wizard-next .wn-ic svg { width: 17px; height: 17px; }
.wizard-next .wn-t { font-size: 13px; font-weight: 600; color: var(--text); }
.wizard-next .wn-s { font-size: 11px; color: var(--text-muted); }

/* ── Toggle switch (used by wizard, shares, settings) ─────────────────────── */
.toggle-wrap { display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; }
.toggle { position: relative; display: inline-block; width: 38px; height: 22px; flex-shrink: 0; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; cursor: pointer; background: var(--surface3); border: 1px solid var(--border); border-radius: 999px; transition: background .2s, border-color .2s; }
.toggle-slider::before { content: ''; position: absolute; height: 16px; width: 16px; left: 2px; top: 2px; background: var(--text-dim); border-radius: 50%; transition: transform .2s, background .2s; }
.toggle input:checked + .toggle-slider { background: var(--gold-pale); border-color: var(--gold); }
.toggle input:checked + .toggle-slider::before { transform: translateX(16px); background: var(--gold); }
.toggle input:focus-visible + .toggle-slider { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── Slide-over panel (consolidated share manager) ────────────────────────── */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.45); opacity: 0; visibility: hidden; transition: opacity .2s; z-index: 400; }
.drawer-backdrop.open { opacity: 1; visibility: visible; }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: min(460px, 100vw); background: var(--surface); border-left: 1px solid var(--border); box-shadow: -8px 0 40px rgba(0,0,0,0.45); transform: translateX(100%); transition: transform .25s ease; z-index: 401; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-soft); flex-shrink: 0; }
.drawer-head h2 { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; color: var(--text); line-height: 1.2; }
.drawer-head .drawer-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.drawer-close { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 0.3rem; border-radius: 6px; display: flex; }
.drawer-close:hover { color: var(--text); background: var(--surface3); }
.drawer-body { flex: 1; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 1.5rem; }
.drawer-section-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); font-weight: 700; margin-bottom: 0.6rem; display: flex; align-items: center; gap: 0.5rem; }
.drawer-loading { text-align: center; color: var(--text-muted); font-size: 13px; padding: 3rem 0; }

.share-url-row { display: flex; align-items: center; gap: 0.5rem; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.55rem 0.75rem; }
.share-url-row a { flex: 1; font-size: 12px; font-family: monospace; color: var(--gold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-handoff { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.share-handoff .btn { flex: 1; justify-content: center; }

.share-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.share-stat { background: var(--surface2); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 0.7rem 0.5rem; text-align: center; }
.share-stat b { display: block; font-size: 1.2rem; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.1; }
.share-stat span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }

.ext-req { border: 1px solid var(--warning-soft); background: var(--warning-soft); border-radius: var(--radius); padding: 0.75rem; margin-bottom: 0.5rem; }
.ext-req .ext-top { font-size: 13px; color: var(--text); font-weight: 600; }
.ext-req .ext-msg { font-size: 12px; color: var(--text-dim); margin: 0.3rem 0 0.55rem; }
.ext-req .ext-actions { display: flex; gap: 0.5rem; }

.drawer-danger { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; border-top: 1px solid var(--border-soft); padding-top: 1.1rem; }

/* ── Analytics ────────────────────────────────────────────────────────────── */
.trend { display: flex; align-items: flex-end; gap: 2px; height: 96px; border-bottom: 1px solid var(--border-soft); }
.trend-bar { flex: 1; background: var(--gold); opacity: 0.5; border-radius: 2px 2px 0 0; min-height: 2px; transition: opacity .15s; }
.trend-bar:hover { opacity: 0.85; }
.trend-bar.today { opacity: 1; background: var(--gold-light); }
.trend-axis { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: 0.04em; color: var(--text-muted); margin-top: 0.45rem; }
.an-bd { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.an-bd:last-child { border-bottom: none; }
.an-bd .an-bd-track { flex: 1; height: 6px; background: var(--surface3); border-radius: 999px; overflow: hidden; }
.an-bd .an-bd-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: 999px; }
.an-bd .an-bd-n { color: var(--text-muted); font-variant-numeric: tabular-nums; min-width: 3rem; text-align: right; }
.an-bd .an-bd-label { min-width: 8.5rem; color: var(--text-dim); }
