/* ══════════════════════════════════════════════════
   DrZea Drive — Stylesheet
   Diseño inspirado en macOS · Paleta negro y dorado
   ══════════════════════════════════════════════════ */

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

/* ── Variables light ───────────────────────────── */
:root {
  --bg:          #F2F2F7;
  --surface:     rgba(255,255,255,0.85);
  --surface-blur:rgba(255,255,255,0.72);
  --sidebar-bg:  rgba(248,248,250,0.90);
  --border:      rgba(0,0,0,0.08);
  --border-soft: rgba(0,0,0,0.05);
  --text:        #1C1C1E;
  --text-2:      #3C3C43;
  --text-muted:  #8E8E93;
  --gold:        #B8920C;
  --gold-bg:     rgba(184,146,12,0.08);
  --gold-border: rgba(184,146,12,0.25);
  --danger:      #FF3B30;
  --success:     #34C759;
  --warning:     #FF9500;
  --blue:        #007AFF;
  --radius:      10px;
  --radius-lg:   14px;
  --radius-sm:   7px;
  --shadow:      0 2px 10px rgba(0,0,0,0.07), 0 0 1px rgba(0,0,0,0.08);
  --shadow-lg:   0 8px 30px rgba(0,0,0,0.12), 0 0 1px rgba(0,0,0,0.08);
  --sidebar-w:   220px;
  --topbar-h:    52px;
  --transition:  0.16s cubic-bezier(0.4,0,0.2,1);
  --font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Variables dark ─────────────────────────────── */
.dark {
  --bg:          #0E0E10;
  --surface:     rgba(28,28,32,0.92);
  --surface-blur:rgba(28,28,32,0.80);
  --sidebar-bg:  rgba(18,18,20,0.95);
  --border:      rgba(255,255,255,0.08);
  --border-soft: rgba(255,255,255,0.04);
  --text:        #F2F2F7;
  --text-2:      #EBEBF0;
  --text-muted:  #636366;
  --gold:        #D4A017;
  --gold-bg:     rgba(212,160,23,0.10);
  --gold-border: rgba(212,160,23,0.22);
  --shadow:      0 2px 12px rgba(0,0,0,0.35);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.50);
}

/* ── Reset ──────────────────────────────────────── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { font-size:14px; -webkit-font-smoothing:antialiased; }
body {
  font-family: var(--font);
  background:  var(--bg);
  color:       var(--text);
  min-height:  100vh;
  transition:  background var(--transition), color var(--transition);
}
a { color:inherit; text-decoration:none; }
button, input, select, textarea { font-family:var(--font); }
input, select, textarea {
  background:  var(--bg);
  border:      1px solid var(--border);
  border-radius: var(--radius-sm);
  color:       var(--text);
  padding:     8px 11px;
  font-size:   13px;
  width:       100%;
  transition:  border-color var(--transition), box-shadow var(--transition);
  outline:     none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow:   0 0 0 3px var(--gold-bg);
}
textarea { resize: vertical; }
svg { display:inline-block; flex-shrink:0; vertical-align:middle; }

/* ══ LAYOUT ══════════════════════════════════════ */
.sidebar {
  position: fixed; top:0; left:0; bottom:0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  display: flex; flex-direction: column;
  z-index: 100;
  transition: background var(--transition);
}

.sidebar-header {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border-soft);
}

.sidebar-brand {
  display: flex; align-items: center; gap: 9px;
}
.sidebar-logo-icon {
  width: 30px; height: 30px;
  background: var(--text);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
}
.sidebar-logo-img {
  width: 30px; height: 30px; border-radius: 8px; object-fit: contain;
}
.sidebar-brand-name {
  font-size: 14px; font-weight: 600; letter-spacing: -0.2px;
  color: var(--text);
}

/* ── Sidebar nav ─────────────────────────────── */
.sidebar-nav {
  flex: 1; padding: 10px 8px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 1px;
}

.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all var(--transition);
  border: none; background: transparent;
  position: relative;
}
.nav-item svg { color: var(--text-muted); transition: color var(--transition); }
.nav-item:hover {
  background: var(--border-soft);
  color: var(--text);
}
.nav-item:hover svg { color: var(--text); }
.nav-item.active {
  background: var(--gold-bg);
  color: var(--gold);
  font-weight: 600;
}
.nav-item.active svg { color: var(--gold); }

.nav-divider {
  height: 1px; background: var(--border-soft);
  margin: 6px 4px;
}
.badge {
  margin-left: auto;
  background: var(--gold); color: #000;
  font-size: 10px; font-weight: 700;
  border-radius: 99px; padding: 1px 6px;
  min-width: 18px; text-align: center;
}

/* ── Sidebar footer ──────────────────────────── */
.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--border-soft);
  display: flex; flex-direction: column; gap: 10px;
}
.user-chip {
  display: flex; align-items: center; gap: 9px;
}
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--text-muted); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
  letter-spacing: 0.3px;
}
.user-avatar.gold { background: var(--gold); color: #000; }
.user-avatar.sm   { width: 26px; height: 26px; font-size: 10px; }
.user-avatar.lg   { width: 42px; height: 42px; font-size: 14px; }
.user-info { display: flex; flex-direction: column; overflow: hidden; }
.user-name  { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role  { font-size: 11px; color: var(--gold); }

.sidebar-controls {
  display: flex; gap: 6px;
}

/* ── Icon button ─────────────────────────────── */
.icon-btn {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 11px; font-weight: 600;
}
.icon-btn:hover {
  background: var(--gold-bg);
  border-color: var(--gold-border);
  color: var(--gold);
}

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

/* ── Topbar ──────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--surface-blur);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 22px; gap: 12px;
  position: sticky; top: 0; z-index: 50;
}
.topbar-left { flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.page-title { font-size: 15px; font-weight: 600; }

/* ── Breadcrumb ──────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center; gap: 4px;
  flex-wrap: wrap;
}
.bc-item {
  display: flex; align-items: center; gap: 5px;
  color: var(--text-muted); font-size: 13px; font-weight: 500;
  transition: color var(--transition);
}
.bc-item:last-child { color: var(--text); font-weight: 600; }
.bc-item:hover { color: var(--gold); }
.bc-sep { color: var(--text-muted); opacity: 0.4; }

/* ── Search ──────────────────────────────────── */
.search-wrap {
  position: relative; display: flex; align-items: center;
}
.search-wrap svg {
  position: absolute; left: 9px; color: var(--text-muted); pointer-events: none;
}
.search-wrap input {
  padding-left: 30px; width: 220px;
  border-radius: 8px; font-size: 13px;
  background: var(--border-soft);
  border-color: transparent;
}
.search-wrap input:focus { width: 280px; }

/* ── View toggle ─────────────────────────────── */
.view-toggle { display: flex; gap: 2px; background: var(--border-soft); border-radius: var(--radius-sm); padding: 2px; }
.view-btn {
  width: 28px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; border-radius: 5px;
  color: var(--text-muted); cursor: pointer; transition: all var(--transition);
}
.view-btn.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ── Content area ────────────────────────────── */
.content-area {
  flex: 1; padding: 22px 26px;
}

/* ══ ITEMS GRID ══════════════════════════════════ */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 14px 12px;
  cursor: default;
  transition: all var(--transition);
  position: relative;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow);
}
.item-card:hover {
  border-color: var(--gold-border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.item-card.folder-card { cursor: pointer; }

.item-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.folder-icon { background: var(--gold-bg); color: var(--gold); }
.file-icon   { background: var(--border-soft); color: var(--text-muted); }
.file-icon.pdf { background: rgba(255,59,48,0.08); color: #FF3B30; }
.file-icon.doc { background: rgba(0,122,255,0.08); color: #007AFF; }
.file-icon.xls { background: rgba(52,199,89,0.08); color: #34C759; }
.file-icon.img { background: rgba(175,82,222,0.08); color: #AF52DE; }
.file-icon.zip { background: rgba(255,149,0,0.08); color: #FF9500; }
.file-icon.vid { background: rgba(255,59,48,0.08); color: #FF3B30; }

.item-meta {
  display: flex; flex-direction: column; gap: 3px; overflow: hidden;
}
.item-name {
  font-size: 12px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text);
}
.item-sub { font-size: 11px; color: var(--text-muted); }

.item-actions {
  display: flex; gap: 5px;
  opacity: 0; transition: opacity var(--transition);
  flex-wrap: wrap;
}
.item-card:hover .item-actions { opacity: 1; }

/* ── Action buttons ──────────────────────────── */
.act-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text-muted);
  cursor: pointer; transition: all var(--transition);
  font-size: 11px;
}
.act-btn:hover { background: var(--gold-bg); border-color: var(--gold-border); color: var(--gold); }
.act-btn.danger:hover { background: rgba(255,59,48,0.08); border-color: rgba(255,59,48,0.3); color: var(--danger); }

/* ══ LIST VIEW ═══════════════════════════════════ */
.items-list { display: flex; flex-direction: column; }
.list-header {
  display: grid; grid-template-columns: 1fr 130px 90px 100px;
  padding: 8px 14px;
  background: var(--border-soft);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-muted);
  border: 1px solid var(--border);
}
.list-row {
  display: grid; grid-template-columns: 1fr 130px 90px 100px;
  padding: 10px 14px; align-items: center;
  border: 1px solid var(--border); border-top: none;
  background: var(--surface); transition: background var(--transition);
  cursor: default;
}
.list-row:last-child { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.list-row:hover { background: var(--gold-bg); }
.list-name {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.list-icon { color: var(--text-muted); }
.list-icon.pdf { color: #FF3B30; }
.list-icon.doc { color: #007AFF; }
.list-icon.xls { color: #34C759; }
.list-icon.img { color: #AF52DE; }
.list-date, .list-size { font-size: 12px; color: var(--text-muted); }
.list-acts { display: flex; gap: 5px; }

/* ══ ANNOUNCEMENTS ═══════════════════════════════ */
.announcements-strip { margin-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.announcement-card {
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex; align-items: flex-start; gap: 10px;
}
.announcement-card svg { color: var(--gold); flex-shrink: 0; margin-top: 2px; }
.announcement-card strong { font-size: 13px; font-weight: 600; color: var(--text); }
.announcement-card p { font-size: 12px; color: var(--text-muted); margin-top: 3px; line-height: 1.5; }
.ann-close { background: none; border: none; color: var(--text-muted); cursor: pointer; margin-left: auto; }

/* ══ EMPTY STATE ═════════════════════════════════ */
.empty-state {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px; gap: 12px;
  color: var(--text-muted);
}
.empty-state svg { opacity: 0.3; }
.empty-state p { font-size: 14px; }

/* ══ BUTTONS ═════════════════════════════════════ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--text); color: var(--bg);
  border: none; border-radius: var(--radius-sm);
  padding: 8px 16px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  position: relative; overflow: hidden;
}
.dark .btn-primary { background: #fff; color: #000; }
.btn-primary::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), #F0C040);
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 16px; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all var(--transition);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }

/* ══ MODALS ══════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.15s ease;
}
.modal-overlay.hidden { display: none; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%; max-width: 520px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s cubic-bezier(0.4,0,0.2,1);
}
.modal.modal-sm { max-width: 400px; }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.modal-header h2 {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600;
}
.modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-top: 18px;
}
.modal-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }

/* ── Drop zone ───────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 36px 20px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: var(--text-muted); transition: all var(--transition);
}
.drop-zone.drag-over {
  border-color: var(--gold); background: var(--gold-bg);
}
.drop-zone svg { opacity: 0.5; }

.file-preview-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.file-preview-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  background: var(--border-soft); border-radius: var(--radius-sm);
  font-size: 12px;
}
.file-preview-item svg { color: var(--text-muted); }

/* ── Progress ────────────────────────────────── */
.progress-bar { height: 4px; background: var(--border); border-radius: 99px; overflow: hidden; margin: 16px 0 8px; }
.progress-fill { height: 100%; background: var(--gold); border-radius: 99px; transition: width 0.3s; width: 0; }

/* ── Share link ──────────────────────────────── */
.share-link-result {
  margin-top: 14px; padding: 12px;
  background: var(--border-soft); border-radius: var(--radius-sm);
  display: flex; gap: 8px;
}
.share-link-result input { flex: 1; font-size: 12px; }

/* ══ FORMS ═══════════════════════════════════════ */
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 5px;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.form-group label:has(input[type=checkbox]) {
  display: flex; align-items: center; gap: 8px;
  text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text);
  font-weight: 500; cursor: pointer;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ══ ADMIN ════════════════════════════════════════ */
.section-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 18px; gap: 16px;
}
.section-desc { font-size: 13px; color: var(--text-muted); }
.section-footer { margin-top: 22px; display: flex; justify-content: flex-end; }

/* ── Data table ──────────────────────────────── */
.data-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
.data-table thead tr {
  background: var(--border-soft);
  border-bottom: 1px solid var(--border);
}
.data-table th {
  padding: 10px 16px; text-align: left;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted);
}
.data-table th.center, .data-table td.center { text-align: center; }
.data-table td {
  padding: 11px 16px; border-bottom: 1px solid var(--border-soft);
  color: var(--text);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--border-soft); }
.row-actions { display: flex; gap: 5px; justify-content: flex-end; }
.muted { color: var(--text-muted); }
.small { font-size: 11px; }

/* ── User row ────────────────────────────────── */
.user-row-info {
  display: flex; align-items: center; gap: 9px; font-weight: 500;
}

/* ── Status ──────────────────────────────────── */
.status-dot {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500;
  background: none; border: none; cursor: default;
  color: var(--text-muted);
}
.status-dot::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-muted);
}
.status-dot.active { color: var(--success); }
.status-dot.active::before { background: var(--success); }
button.status-dot { cursor: pointer; }
button.status-dot:hover { opacity: 0.7; }

/* ── Badge pill ──────────────────────────────── */
.badge-pill {
  display: inline-block; padding: 2px 8px;
  border-radius: 99px; font-size: 11px; font-weight: 600;
  background: var(--border-soft); color: var(--text-muted);
}
.badge-pill.gold { background: var(--gold-bg); color: var(--gold); }

/* ── Permissions ─────────────────────────────── */
.user-select-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 12px;
}
.user-select-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center; transition: all var(--transition);
  box-shadow: var(--shadow);
}
.user-select-card:hover {
  border-color: var(--gold-border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.user-select-card svg { color: var(--text-muted); margin-top: auto; }
.perm-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 18px;
}
.back-link {
  display: flex; align-items: center; gap: 5px;
  color: var(--text-muted); font-size: 13px;
  transition: color var(--transition);
}
.back-link:hover { color: var(--gold); }
.perm-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.perm-table { width: 100%; }
.folder-tree-icon { color: var(--gold); margin-right: 4px; }

/* ── Settings grid ───────────────────────────── */
.settings-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.settings-card h3 {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600;
  margin-bottom: 16px; color: var(--text);
}

.logo-upload-area {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 20px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
}
.logo-preview { max-width: 120px; max-height: 80px; object-fit: contain; }
.logo-placeholder { color: var(--text-muted); opacity: 0.4; }

/* ── Modules grid ────────────────────────────── */
.modules-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 10px;
}
.module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex; align-items: center; gap: 14px;
  transition: all var(--transition);
}
.module-card.on { border-color: var(--gold-border); }
.module-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--border-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0; transition: all var(--transition);
}
.module-card.on .module-icon { background: var(--gold-bg); color: var(--gold); }
.module-body { flex: 1; }
.module-name { display: block; font-size: 13px; font-weight: 600; color: var(--text); }
.module-desc { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── Toggle switch ───────────────────────────── */
.toggle-switch {
  position: relative; cursor: pointer;
  display: inline-block;
}
.toggle-switch input[type=checkbox] { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-switch input[type=hidden] { display: none; }
.toggle-track {
  display: block; width: 40px; height: 22px;
  background: var(--border); border-radius: 99px;
  transition: background var(--transition);
  position: relative;
}
.toggle-switch input[type=checkbox]:checked ~ .toggle-track {
  background: var(--gold);
}
.toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: white; border-radius: 50%;
  transition: left var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.toggle-switch input[type=checkbox]:checked ~ .toggle-track .toggle-thumb {
  left: 21px;
}

/* ══ LOGIN PAGE ══════════════════════════════════ */
.login-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}
.login-bg {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at 20% 80%, var(--gold-bg) 0%, transparent 55%),
              radial-gradient(ellipse at 80% 15%, rgba(0,122,255,0.04) 0%, transparent 55%);
  pointer-events: none;
}
.login-top-controls {
  position: fixed; top: 16px; right: 16px;
  display: flex; gap: 8px; z-index: 10;
}
.ctrl-btn {
  @extend .icon-btn;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: 7px 12px;
  cursor: pointer;
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center;
  transition: all var(--transition);
}
.ctrl-btn:hover { border-color: var(--gold); color: var(--gold); }

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  width: 100%; max-width: 400px;
  box-shadow: var(--shadow-lg);
  position: relative; z-index: 1;
}
.login-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
}
.site-logo-img { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; }
.default-logo {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--text); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-main { display: block; font-size: 15px; font-weight: 700; color: var(--text); }
.brand-sub  { display: block; font-size: 12px; color: var(--text-muted); }
.login-title {
  font-size: 20px; font-weight: 700; margin-bottom: 22px;
  color: var(--text);
}
.login-hint { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 14px; }

/* ── Alert ───────────────────────────────────── */
.alert {
  padding: 10px 13px; border-radius: var(--radius-sm);
  font-size: 13px; margin-bottom: 14px;
}
.alert-error {
  background: rgba(255,59,48,0.08);
  border: 1px solid rgba(255,59,48,0.25);
  color: var(--danger);
}
.alert-success {
  background: rgba(52,199,89,0.08);
  border: 1px solid rgba(52,199,89,0.25);
  color: var(--success);
}

/* ══ SHARE PAGE ══════════════════════════════════ */
.share-body { background: var(--bg); }
.share-page { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.share-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; border-bottom: 1px solid var(--border); margin-bottom: 24px;
}
.share-brand { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600; }
.share-container { padding-bottom: 40px; }
.share-title-bar {
  display: flex; align-items: center; gap: 14px; margin-bottom: 22px;
}
.share-title-bar h1 { font-size: 18px; font-weight: 700; }

/* ══ ANIMATIONS ══════════════════════════════════ */
@keyframes fadeIn  { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px) } to { opacity: 1; transform: translateY(0) } }

/* ── Utility ─────────────────────────────────── */
.hidden { display: none !important; }
.center { text-align: center; }
