@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,700;1,400&family=Outfit:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #F7F4EE;
  --bg2: #EDE8DF;
  --surface: #FFFFFF;
  --surface2: #F2EDE4;
  --border: #DDD8CE;
  --text: #18170F;
  --text2: #5C5849;
  --text3: #A09A8E;
  --accent: #1B4332;
  --accent2: #2D6A4F;
  --accent3: #40916C;
  --accent-glow: rgba(27,67,50,0.1);
  --gold: #B7791F;
  --gold-bg: #FEF3C7;
  --red: #B91C1C;
  --red-bg: #FEE2E2;
  --blue: #1D4ED8;
  --blue-bg: #DBEAFE;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
  --r: 12px;
  --r-lg: 20px;
  --t: 0.2s;
}

[data-theme="dark"] {
  --bg: #0F110E;
  --bg2: #161917;
  --surface: #1A1D1A;
  --surface2: #202420;
  --border: #2A2E2A;
  --text: #EAE6DC;
  --text2: #9A9488;
  --text3: #5C5850;
  --accent: #52B788;
  --accent2: #40916C;
  --accent3: #74C69D;
  --accent-glow: rgba(82,183,136,0.12);
  --gold: #D97706;
  --gold-bg: #1C1A10;
  --red: #EF4444;
  --red-bg: #1C1010;
  --blue: #60A5FA;
  --blue-bg: #1A1C35;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.3);
  --shadow: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.45);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.55);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  min-height: 100vh;
  transition: background var(--t), color var(--t);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: 'Outfit', sans-serif; border: none; background: none; color: inherit; }
input, textarea, select { font-family: 'Outfit', sans-serif; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* PAGES */
.page { display: none; min-height: 100vh; animation: fadeUp 0.3s ease; }
.page.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* TOPBAR */
.topbar {
  height: 58px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.3px;
}
.topbar-sep { width: 1px; height: 18px; background: var(--border); }
.spacer { flex: 1; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--t);
  white-space: nowrap;
  cursor: pointer;
  border: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent2); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.btn-ghost { color: var(--text2); padding: 8px 12px; border-radius: 8px; }
.btn-ghost:hover { background: var(--surface2); color: var(--text); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-sm { padding: 6px 13px; font-size: 12.5px; }
.btn-icon { width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: 9px; }

/* BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.badge-open { background: var(--accent-glow); color: var(--accent2); }
.badge-private { background: var(--red-bg); color: var(--red); }
.badge-pending { background: var(--gold-bg); color: var(--gold); }
.badge-sent { background: var(--accent-glow); color: var(--accent2); }

/* FORMS */
.fg { margin-bottom: 15px; }
.fg label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 5px;
}
.fi {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: var(--surface2);
  color: var(--text);
  font-size: 14px;
  transition: all var(--t);
  outline: none;
}
.fi:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-glow); }
.fi::placeholder { color: var(--text3); }
.fi-select { appearance: none; 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='%23999' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
textarea.fi { resize: vertical; min-height: 70px; }
.fi-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* MODAL */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.overlay.open { display: flex; animation: fadeIn 0.2s; }
.modal {
  background: var(--surface);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.28s ease;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 22px 0; }
.modal-title { font-family: 'Playfair Display', serif; font-size: 21px; font-weight: 500; }
.modal-body { padding: 18px 22px 22px; }
.modal-close { width: 28px; height: 28px; border-radius: 7px; display: flex; align-items: center; justify-content: center; color: var(--text3); transition: all var(--t); }
.modal-close:hover { background: var(--surface2); color: var(--text); }
@keyframes modalIn { from { transform: translateY(16px) scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* TOASTS */
#toasts { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 500;
  min-width: 250px;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  pointer-events: all;
}
.toast.out { animation: toastOut 0.25s ease forwards; }
.toast-success { background: var(--accent); color: #fff; }
.toast-error { background: var(--red); color: #fff; }
.toast-info { background: var(--blue); color: #fff; }
.toast-warning { background: var(--gold); color: #fff; }
@keyframes toastIn { from { transform: translateX(110%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { to { transform: translateX(110%); opacity: 0; } }

/* TOGGLE */
.toggle-wrap { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle { width: 40px; height: 22px; background: var(--border); border-radius: 11px; position: relative; transition: background var(--t); flex-shrink: 0; }
.toggle::after { content: ''; position: absolute; width: 16px; height: 16px; background: #fff; border-radius: 50%; top: 3px; left: 3px; transition: transform var(--t); box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.toggle.on { background: var(--accent); }
.toggle.on::after { transform: translateX(18px); }

/* UPLOAD ZONE */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--r);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t);
  background: var(--surface2);
}
.upload-zone:hover, .upload-zone.drag { border-color: var(--accent); background: var(--accent-glow); }
.upload-zone.has-file { border-style: solid; border-color: var(--accent); background: var(--accent-glow); }
.upload-zone p { font-size: 13px; color: var(--text2); margin-top: 6px; }
.upload-fname { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--accent); margin-top: 5px; font-weight: 500; display: none; }

/* SPINNER */
.spin { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spinAnim 0.6s linear infinite; flex-shrink: 0; }
@keyframes spinAnim { to { transform: rotate(360deg); } }

/* CARD */
.card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r); }

/* DIVIDER */
.divider { height: 1px; background: var(--border); margin: 18px 0; }

/* ADMIN LAYOUT */
.admin-layout { display: flex; min-height: calc(100vh - 58px); }
.sidebar {
  width: 210px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 58px;
  height: calc(100vh - 58px);
  overflow-y: auto;
}
.nav-label { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); padding: 10px 10px 4px; }
.nav-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text2);
  transition: all 0.18s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.nav-btn:hover { background: var(--surface2); color: var(--text); }
.nav-btn.active { background: var(--accent-glow); color: var(--accent); }
.nav-badge { margin-left: auto; background: var(--red); color: #fff; border-radius: 10px; padding: 1px 6px; font-size: 10px; font-weight: 700; }
.admin-main { flex: 1; padding: 28px 32px; min-width: 0; overflow-x: hidden; }
.section { display: none; animation: fadeUp 0.25s ease; }
.section.active { display: block; }
.page-title { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 600; margin-bottom: 3px; }
.page-sub { font-size: 13.5px; color: var(--text2); margin-bottom: 24px; }

/* STATS GRID */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon { width: 38px; height: 38px; border-radius: 9px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.stat-val { font-family: 'Playfair Display', serif; font-size: 30px; font-weight: 600; line-height: 1; }
.stat-lbl { font-size: 12.5px; color: var(--text2); margin-top: 4px; }
.stat-note { font-size: 11.5px; margin-top: 6px; font-weight: 500; }

/* TABLE */
.tbl-wrap { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r); overflow: hidden; }
.tbl-head { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); gap: 10px; }
.tbl-head h3 { font-size: 14px; font-weight: 600; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 10px 16px; font-size: 11px; font-weight: 700; color: var(--text3); letter-spacing: 0.06em; text-transform: uppercase; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 16px; font-size: 13.5px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface2); }
.td-actions { display: flex; gap: 6px; align-items: center; }

/* ARTICLES GRID */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.art-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.art-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.art-card-bar { height: 4px; }
.art-card-body { padding: 15px; }
.art-card-tags { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; margin-bottom: 9px; }
.art-card-title { font-family: 'Playfair Display', serif; font-size: 16px; font-weight: 600; line-height: 1.3; margin-bottom: 6px; }
.art-card-sub { font-size: 12.5px; color: var(--text2); line-height: 1.5; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art-card-meta { font-size: 11.5px; color: var(--text3); margin-bottom: 12px; display: flex; gap: 8px; }
.art-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* CLIENT PAGE */
.client-hero {
  background: var(--accent);
  padding: 70px 32px 56px;
  position: relative;
  overflow: hidden;
}
.client-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.07) 0%, transparent 60%);
}
.client-hero-inner { max-width: 1160px; margin: 0 auto; position: relative; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.client-hero-title { font-family: 'Playfair Display', serif; font-size: 52px; font-weight: 700; color: #fff; letter-spacing: -1.5px; line-height: 0.95; margin-bottom: 14px; }
.client-hero-title em { font-style: italic; font-weight: 400; }
.client-hero-sub { color: rgba(255,255,255,0.7); font-size: 15px; font-weight: 300; line-height: 1.7; max-width: 380px; }
.hero-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-stat {
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 16px 20px;
  text-align: center;
  min-width: 90px;
}
.hero-stat-val { font-family: 'Playfair Display', serif; font-size: 30px; font-weight: 600; color: #fff; line-height: 1; }
.hero-stat-lbl { font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 3px; }

.client-body { max-width: 1160px; margin: 0 auto; padding: 0 32px; }
.issue-section { padding: 56px 0; }
.issue-section + .issue-section { border-top: 1px solid var(--border); }
.issue-header { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; justify-content: space-between; }
.issue-num { font-family: 'Playfair Display', serif; font-size: 72px; font-weight: 700; color: var(--border); line-height: 0.85; user-select: none; }
.issue-info .issue-name { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 600; }
.issue-info .issue-meta { font-size: 13px; color: var(--text2); margin-top: 2px; }
.issue-tags { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text3); }

.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.cl-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.28s ease, box-shadow 0.28s, border-color 0.2s;
}
.cl-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-xl); border-color: var(--accent); }
.cl-card-img { height: 130px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.cl-card-img svg { opacity: 0.3; transition: opacity 0.2s, transform 0.3s; }
.cl-card:hover .cl-card-img svg { opacity: 0.5; transform: scale(1.1); }
.cl-card-img-badge { position: absolute; top: 12px; right: 12px; }
.cl-card-body { padding: 18px; }
.cl-card-issue { font-size: 10.5px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text3); margin-bottom: 7px; }
.cl-card-title { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 600; line-height: 1.3; margin-bottom: 7px; color: var(--text); }
.cl-card-sub { font-size: 13px; color: var(--text2); line-height: 1.55; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cl-card-footer { display: flex; align-items: center; justify-content: space-between; }
.cl-read-btn { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--accent); transition: gap 0.2s; }
.cl-card:hover .cl-read-btn { gap: 9px; }
.cl-lock { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--red); background: var(--red-bg); padding: 5px 10px; border-radius: 7px; }
.cl-views { font-size: 12px; color: var(--text3); display: flex; align-items: center; gap: 4px; }

/* VIEWER */
.viewer-topbar { padding: 0 24px; }
.viewer-body { max-width: 920px; margin: 0 auto; padding: 28px 24px; }
.viewer-meta {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 22px;
}
.viewer-meta-bar { height: 5px; background: linear-gradient(90deg, var(--accent), var(--accent3)); }
.viewer-meta-body { padding: 22px 24px; }
.viewer-meta-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.viewer-title { font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 600; line-height: 1.25; margin-bottom: 8px; }
.viewer-sub { font-size: 14.5px; color: var(--text2); line-height: 1.65; }
.viewer-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 12px; font-size: 13px; font-weight: 500; color: var(--accent); }
.pdf-shell {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.pdf-titlebar {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface2);
}
.traffic { display: flex; gap: 6px; }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.pdf-filename { flex: 1; text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text3); }
.pdf-iframe-wrap { height: 750px; background: #525659; }
.pdf-empty { height: 440px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--surface2); }

/* ANALYTICS */
.analytics-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.analytics-grid-3 { display: grid; grid-template-columns: 5fr 3fr; gap: 18px; margin-bottom: 18px; }
.chart-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r); padding: 20px; }
.chart-title { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.chart-sub { font-size: 12px; color: var(--text3); margin-bottom: 16px; }
.bar-col-wrap { display: flex; align-items: flex-end; gap: 6px; height: 150px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bar-col-v { font-size: 10px; color: var(--text3); font-weight: 500; }
.bar-col-bar { width: 100%; max-width: 38px; border-radius: 5px 5px 0 0; transition: height 1s cubic-bezier(0.4,0,0.2,1); }
.bar-col-lbl { font-size: 9.5px; color: var(--text3); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 44px; }
.hbar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.hbar-lbl { width: 72px; font-size: 12.5px; color: var(--text2); text-align: right; }
.hbar-track { flex: 1; height: 18px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 4px; transition: width 1s cubic-bezier(0.4,0,0.2,1); }
.hbar-val { width: 30px; font-size: 12px; font-weight: 500; text-align: right; }
.device-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--surface2); border-radius: 9px; margin-bottom: 7px; }
.device-icon { width: 30px; height: 30px; border-radius: 7px; display: flex; align-items: center; justify-content: center; background: var(--accent-glow); color: var(--accent); flex-shrink: 0; }
.device-info { flex: 1; }
.device-name { font-size: 13px; font-weight: 500; }
.device-bar { height: 3px; background: var(--border); border-radius: 2px; margin-top: 4px; }
.device-bar-fill { height: 3px; background: var(--accent); border-radius: 2px; transition: width 1s; }

/* LOG LIST */
.log-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--border); transition: background 0.15s; font-size: 13px; }
.log-item:hover { background: var(--surface2); }
.log-item:last-child { border-bottom: none; }
.log-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.log-msg { flex: 1; color: var(--text); line-height: 1.4; }
.log-time { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text3); white-space: nowrap; margin-top: 1px; }

/* QR */
.qr-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r); padding: 26px; display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; margin-bottom: 22px; }
.qr-box { background: var(--surface); border: 2px solid var(--border); border-radius: 12px; padding: 14px; display: inline-block; }
.qr-url { font-family: 'JetBrains Mono', monospace; font-size: 12px; background: var(--surface2); padding: 9px 12px; border-radius: 8px; color: var(--text); word-break: break-all; border: 1px solid var(--border); margin-bottom: 12px; }

/* SETTINGS */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.settings-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r); padding: 22px; }
.settings-card h3 { font-size: 14.5px; font-weight: 600; margin-bottom: 4px; }
.settings-card p { font-size: 13px; color: var(--text2); margin-bottom: 16px; line-height: 1.5; }

/* LOGIN */
.login-wrap { display: flex; min-height: 100vh; }
.login-left { flex: 1; background: var(--accent); display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 60px; position: relative; overflow: hidden; min-width: 0; }
.login-left::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='15'/%3E%3C/g%3E%3C/svg%3E"); }
.login-right { width: 420px; flex-shrink: 0; display: flex; flex-direction: column; justify-content: center; padding: 52px 42px; background: var(--surface); overflow-y: auto; }
.login-tabs { display: flex; background: var(--surface2); border-radius: 10px; padding: 3px; gap: 3px; margin-bottom: 26px; }
.login-tab { flex: 1; padding: 8px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--text2); transition: all 0.18s; text-align: center; cursor: pointer; border: none; background: none; }
.login-tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.login-logo-big { font-family: 'Playfair Display', serif; font-size: 54px; font-weight: 700; color: #fff; letter-spacing: -2px; line-height: 0.9; text-align: center; margin-bottom: 6px; }
.login-logo-big em { font-style: italic; font-weight: 400; }
.login-tagline { color: rgba(255,255,255,0.65); font-size: 14px; text-align: center; max-width: 280px; line-height: 1.7; margin-bottom: 48px; }
.login-counts { display: flex; gap: 0; background: rgba(0,0,0,0.2); border-radius: 14px; padding: 18px 20px; }
.login-count { flex: 1; text-align: center; padding: 0 12px; border-right: 1px solid rgba(255,255,255,0.15); }
.login-count:last-child { border-right: none; }
.login-count-v { font-family: 'Playfair Display', serif; font-size: 28px; color: #fff; font-weight: 400; }
.login-count-l { font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 2px; }

/* REQUEST FORM MODAL */
.req-notice { background: var(--gold-bg); border: 1.5px solid var(--gold); border-radius: 10px; padding: 12px 14px; font-size: 13px; color: var(--gold); margin-bottom: 18px; border-left: 4px solid var(--gold); }

/* SEND PREVIEW */
.send-preview { background: var(--surface2); border-radius: 10px; padding: 14px; margin-bottom: 16px; border-left: 3px solid var(--accent); }
.send-preview-lbl { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text3); margin-bottom: 3px; }
.send-preview-val { font-size: 13.5px; color: var(--text); margin-bottom: 10px; }
.send-preview-val:last-child { margin-bottom: 0; }

/* EMPTY */
.empty { text-align: center; padding: 60px 20px; color: var(--text3); }
.empty svg { opacity: 0.2; margin-bottom: 12px; }
.empty h3 { font-size: 15px; font-weight: 500; color: var(--text2); margin-bottom: 4px; }
.empty p { font-size: 13px; }

/* TABS */
.filter-tabs { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 18px; }
.filter-tab {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  cursor: pointer;
  transition: all 0.18s;
}
.filter-tab:hover { border-color: var(--accent); color: var(--accent); }
.filter-tab.active { border-color: var(--accent); background: var(--accent); color: #fff; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .analytics-grid-2, .analytics-grid-3 { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .fi-row { grid-template-columns: 1fr; }
  .qr-card { grid-template-columns: 1fr; text-align: center; }
  .client-hero-title { font-size: 38px; }
  .issue-num { font-size: 52px; }
}
@media (max-width: 768px) {
  .login-left { display: none; }
  .login-right { width: 100%; }
  .admin-layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border); padding: 8px; }
  .nav-label { display: none; }
  .sidebar .spacer-bottom { display: none; }
  .admin-main { padding: 18px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .client-body { padding: 0 16px; }
}
