/* ============================================================
   EOB LIVE — ADMIN PANEL (premium)
   Deep navy · royal blue · gold
   ============================================================ */
:root {
  --ink:      #050B1A;
  --navy-950: #081226;
  --navy-900: #0A1B3D;
  --navy-800: #0D2A5C;
  --royal:    #0D3B8C;
  --blue:     #1A56DB;
  --sky:      #3B82F6;
  --gold:     #F5C842;
  --amber:    #DFA81F;
  --gold-soft:#FFE9A8;
  --ice:      #EAF2FE;
  --ice-2:    #D9E8FB;
  --off:      #F5F8FD;
  --surface:  #FFFFFF;
  --text:     #0B1730;
  --muted:    #5C6B84;
  --border:   #E3EAF4;
  --red:      #E23B4E;
  --green:    #0E9F6E;
  --grad-brand: linear-gradient(135deg, var(--royal), var(--blue) 55%, var(--sky));
  --grad-gold:  linear-gradient(135deg, var(--gold), var(--amber));
  --grad-navy:  linear-gradient(160deg, #081226 0%, #0A1B3D 55%, #0D2A5C 100%);
  --shadow-sm: 0 2px 8px rgba(8, 18, 38, .07);
  --shadow-md: 0 8px 24px rgba(8, 18, 38, .10);
  --shadow-lg: 0 18px 48px rgba(8, 18, 38, .14);
  --shadow-blue: 0 10px 30px rgba(26, 86, 219, .28);
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-full: 999px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--off);
  background-image:
    radial-gradient(1100px 480px at 90% -10%, rgba(59, 130, 246, .07), transparent 60%),
    radial-gradient(800px 380px at -5% 15%, rgba(245, 200, 66, .05), transparent 55%);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
:focus-visible {
  outline: 3px solid rgba(26, 86, 219, .55);
  outline-offset: 2px;
  border-radius: 5px;
}
::selection { background: rgba(26, 86, 219, .16); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--off); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--navy-800), var(--royal));
  border-radius: 8px; border: 2px solid var(--off);
}

/* ============================================================
   LOGIN SCREEN
   ============================================================ */
#login-screen {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: var(--grad-navy);
  position: relative;
  overflow: hidden;
}
#login-screen::before, #login-screen::after {
  content: '';
  position: absolute; border-radius: 50%;
  filter: blur(70px); opacity: .5; pointer-events: none;
}
#login-screen::before {
  width: 420px; height: 420px;
  background: var(--blue);
  top: -120px; right: -80px;
}
#login-screen::after {
  width: 380px; height: 380px;
  background: var(--amber);
  bottom: -140px; left: -100px;
  opacity: .3;
}
.login-box {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 24px;
  padding: 42px 40px;
  box-shadow: 0 40px 100px rgba(5, 11, 26, .5);
  animation: loginIn .55s var(--ease-out) both;
}
@keyframes loginIn {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.login-logo img {
  height: 48px; border-radius: 12px;
  box-shadow: var(--shadow-md);
}
.login-logo-name {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 900; color: var(--navy-900);
}
.login-logo-name span { color: var(--amber); }
.login-h {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 900; color: var(--navy-900);
  margin-bottom: 6px;
}
.login-sub { font-size: .86rem; color: var(--muted); margin-bottom: 28px; }
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: .7rem; font-weight: 800; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 7px;
}
.form-label .req { color: var(--red); }
.form-control {
  width: 100%;
  padding: 11px 15px;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  font-size: .9rem; color: var(--text);
  background: var(--surface);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.form-control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(26, 86, 219, .12);
}
.login-err {
  font-size: .8rem; font-weight: 600; color: var(--red);
  margin: 6px 0 2px; display: none;
  padding: 8px 12px; border-radius: 9px;
  background: rgba(226, 59, 78, .08);
  border: 1px solid rgba(226, 59, 78, .2);
}
.login-btn {
  width: 100%;
  padding: 13px;
  border-radius: 11px;
  color: #fff;
  font-size: .95rem; font-weight: 800; letter-spacing: .4px;
  background: var(--grad-brand);
  box-shadow: var(--shadow-blue);
  margin-top: 10px;
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), opacity .2s;
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(26, 86, 219, .38); }
.login-btn:active { transform: translateY(0) scale(.98); }
.login-back { display: block; margin-top: 18px; text-align: center; font-size: .78rem; color: var(--muted); }
.login-back:hover { color: var(--blue); }
.login-hint { margin-top: 12px; text-align: center; font-size: .8rem; color: var(--muted); }
.login-hint a { color: var(--blue); font-weight: 700; cursor: pointer; }
.login-err-ok { color: var(--green); background: rgba(39, 174, 96, .1); border-color: rgba(39, 174, 96, .25); }
.login-btn-ghost { background: transparent; color: var(--blue); box-shadow: none; border: 1.5px solid var(--blue); }
.login-btn-ghost:hover { box-shadow: none; background: rgba(26, 86, 219, .08); }

/* ============================================================
   ADMIN LAYOUT
   ============================================================ */
#admin-app { display: none; min-height: 100vh; }
.admin-layout { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }

/* Sidebar */
.admin-sidebar {
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  background: var(--grad-navy);
  color: #fff;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, .06);
}
.as-logo { padding: 26px 22px 20px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.as-logo-row { display: flex; align-items: center; gap: 11px; margin-bottom: 6px; }
.as-logo-row img { height: 40px; border-radius: 11px; box-shadow: var(--shadow-md); }
.as-logo-name { font-family: var(--font-display); font-size: 1rem; font-weight: 900; }
.as-logo-name span { color: var(--gold); }
.as-logo-sub { font-size: .64rem; letter-spacing: 2.5px; text-transform: uppercase; color: rgba(255, 255, 255, .4); }

.as-nav { flex: 1; padding: 18px 14px; }
.a-tab {
  position: relative;
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 15px;
  border-radius: 12px;
  text-align: left;
  font-size: .86rem; font-weight: 600;
  color: rgba(255, 255, 255, .58);
  background: none;
  margin-bottom: 4px;
  transition: all .22s var(--ease);
}
.a-tab:hover { background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .92); transform: translateX(3px); }
.a-tab.active {
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.a-tab.active::before {
  content: '';
  position: absolute; left: -14px; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 24px; border-radius: 0 4px 4px 0;
  background: var(--grad-gold);
}
.a-tab-icon { font-size: 1.05rem; width: 22px; text-align: center; }

.as-footer { padding: 16px 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.as-logout {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 14px; border-radius: 11px;
  background: rgba(226, 59, 78, .14);
  border: 1px solid rgba(226, 59, 78, .28);
  color: #FCA5A5;
  font-size: .83rem; font-weight: 700;
  transition: all .2s var(--ease);
}
.as-logout:hover { background: var(--red); border-color: var(--red); color: #fff; transform: translateY(-1px); }

/* Main area */
.admin-main { min-width: 0; }
.admin-top-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  position: sticky; top: 0; z-index: 20;
  padding: 0 30px;
  height: 66px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.atb-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 900; color: var(--navy-900); }
.atb-right { display: flex; align-items: center; gap: 12px; }
.atb-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .7rem; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--green);
  background: rgba(14, 159, 110, .1);
  padding: 5px 14px; border-radius: var(--r-full);
}
.atb-badge .badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  animation: pulseDot 1.4s infinite;
}
@keyframes pulseDot { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }
.visit-btn {
  padding: 8px 18px; border-radius: var(--r-full);
  background: var(--grad-brand);
  color: #fff;
  font-size: .8rem; font-weight: 700;
  box-shadow: var(--shadow-blue);
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.visit-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(26, 86, 219, .36); }

.admin-body { padding: 30px; max-width: 1180px; }

/* ============================================================
   TAB PANELS
   ============================================================ */
.tab-panel { display: none; animation: fadeUp .4s var(--ease-out) both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
.panel-title {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 900; color: var(--navy-900);
  margin-bottom: 4px; letter-spacing: -.01em;
}
.panel-sub { font-size: .86rem; color: var(--muted); }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stat-card::after {
  content: '';
  position: absolute; right: -30px; top: -30px;
  width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, .12), transparent 70%);
}
.stat-icon {
  width: 40px; height: 40px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  background: var(--ice);
  margin-bottom: 12px;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 2.1rem; font-weight: 900; color: var(--navy-900);
  line-height: 1.1;
}
.stat-label {
  font-size: .68rem; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--muted); margin-top: 6px;
}
.stat-note { font-size: .73rem; color: var(--green); font-weight: 600; margin-top: 3px; }

/* Chart */
.chart-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.chart-title {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700; color: var(--navy-900);
  margin-bottom: 18px;
}
.chart-bars { display: flex; align-items: flex-end; gap: 10px; height: 170px; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: 1; }
.bar {
  width: 100%;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(to top, var(--royal), var(--sky));
  min-height: 5px;
  transition: height .6s var(--ease-out);
  box-shadow: 0 4px 14px rgba(26, 86, 219, .2);
}
.bar-col:nth-child(7) .bar { background: linear-gradient(to top, var(--amber), var(--gold)); box-shadow: 0 4px 14px rgba(223, 168, 31, .3); }
.bar-day { font-size: .66rem; color: var(--muted); white-space: nowrap; font-weight: 600; }
.bar-val { font-size: .66rem; font-weight: 800; color: var(--royal); }

/* Tables */
.data-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.table-head-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.table-head-title {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700; color: var(--navy-900);
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th {
  padding: 12px 18px;
  text-align: left;
  font-size: .66rem; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted);
  background: var(--off);
  border-bottom: 1px solid var(--border);
}
.data-table tbody tr { border-bottom: 1px solid var(--border); transition: background .15s var(--ease); }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--off); }
.data-table td { padding: 13px 18px; font-size: .86rem; vertical-align: middle; }
.art-title-cell { font-weight: 600; max-width: 300px; }
.rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--ice); color: var(--royal);
  font-size: .72rem; font-weight: 800;
}

/* Cat pills */
.cat-pill {
  display: inline-block;
  padding: 3px 11px; border-radius: var(--r-full);
  font-size: .6rem; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
  background: var(--ice); color: var(--royal);
}
.cat-sports { background: #D1FAE5; color: #065F46; }
.cat-politics { background: #EDE9FE; color: #5B21B6; }
.cat-entertainment { background: #FCE7F3; color: #9D174D; }
.cat-health { background: #CFFAFE; color: #164E63; }
.cat-gospel { background: #FEF3C7; color: #92400E; }
.cat-world { background: #FEF9C3; color: #713F12; }
.cat-news { background: var(--ice); color: #1E40AF; }

/* Action buttons */
.action-btns { display: flex; gap: 7px; }
.a-btn {
  padding: 6px 13px; border-radius: 8px;
  font-size: .73rem; font-weight: 700;
  transition: all .2s var(--ease);
}
.edit-btn { background: var(--ice); color: var(--royal); }
.edit-btn:hover { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-blue); }
.del-btn { background: rgba(226, 59, 78, .1); color: var(--red); }
.del-btn:hover { background: var(--red); color: #fff; }
.new-art-btn {
  padding: 10px 22px; border-radius: var(--r-full);
  background: var(--grad-brand); color: #fff;
  font-size: .82rem; font-weight: 700;
  box-shadow: var(--shadow-blue);
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.new-art-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(26, 86, 219, .36); }

/* ============================================================
   FORMS / UPLOAD
   ============================================================ */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 28px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.form-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700; color: var(--navy-900);
  margin-bottom: 22px; padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
}
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
textarea.form-control { min-height: 130px; resize: vertical; line-height: 1.6; }

/* Drop zones */
.drop-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.drop-zone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--r-md);
  padding: 30px 20px;
  text-align: center;
  overflow: hidden;
  cursor: pointer;
  background: var(--off);
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.drop-zone:hover, .drop-zone.over { border-color: var(--blue); background: var(--ice); }
.drop-zone input[type=file] {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.drop-icon { font-size: 2.1rem; margin-bottom: 8px; transition: transform .25s var(--ease-out); }
.drop-zone:hover .drop-icon { transform: translateY(-4px) scale(1.08); }
.drop-text { font-size: .8rem; color: var(--muted); }
.drop-text strong { color: var(--blue); }
.drop-preview { max-width: 190px; border-radius: 10px; margin: 12px auto 0; display: none; box-shadow: var(--shadow-md); }
.vid-preview { width: 100%; border-radius: 10px; margin-top: 12px; display: none; max-height: 190px; box-shadow: var(--shadow-md); }

/* Buttons */
.publish-btn, .save-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: var(--grad-brand);
  color: #fff;
  font-size: .96rem; font-weight: 800; letter-spacing: .4px;
  box-shadow: var(--shadow-blue);
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), opacity .2s;
}
.publish-btn:hover, .save-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(26, 86, 219, .38); }
.publish-btn:active, .save-btn:active { transform: translateY(0) scale(.99); }

/* Settings */
.settings-section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: .72rem; font-weight: 800; letter-spacing: 2.2px; text-transform: uppercase;
  color: var(--amber);
  margin: 24px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
.settings-section-title::before {
  content: '';
  width: 5px; height: 16px; border-radius: 3px;
  background: var(--grad-gold);
}
.settings-section-title:first-child { margin-top: 0; }
.save-btn { max-width: 260px; }

/* Info card (Firebase) */
.info-list { margin: 12px 0 0 18px; display: flex; flex-direction: column; gap: 8px; font-size: .86rem; color: var(--muted); line-height: 1.7; }
.info-list a { color: var(--blue); }
.info-list code {
  background: var(--ice);
  color: var(--royal);
  padding: 2px 7px; border-radius: 6px; font-size: .8rem;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 11, 26, .62);
  backdrop-filter: blur(6px);
  animation: fadeIn .2s var(--ease) both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 34px;
  width: 100%; max-width: 430px;
  box-shadow: var(--shadow-lg);
  animation: modalIn .35s var(--ease-out) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-icon {
  width: 62px; height: 62px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  background: rgba(226, 59, 78, .1);
  border-radius: 50%;
}
.modal-h {
  font-family: var(--font-display);
  font-size: 1.35rem; font-weight: 900; color: var(--navy-900);
  text-align: center; margin-bottom: 8px;
}
.modal-body { font-size: .88rem; color: var(--muted); text-align: center; margin-bottom: 24px; line-height: 1.65; }
.modal-art-title { font-weight: 700; color: var(--text); }
.modal-btns { display: flex; gap: 10px; }
.modal-cancel, .modal-confirm {
  flex: 1; padding: 12px; border-radius: 11px;
  font-size: .88rem; font-weight: 700;
  transition: all .2s var(--ease);
}
.modal-cancel { background: var(--off); border: 1px solid var(--border); color: var(--text); }
.modal-cancel:hover { background: var(--ice); }
.modal-confirm { background: var(--red); color: #fff; }
.modal-confirm:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(226, 59, 78, .35); }

/* ============================================================
   TOAST
   ============================================================ */
#admin-toast {
  position: fixed; bottom: 26px; right: 26px; z-index: 1200;
  background: var(--navy-900);
  color: #fff;
  padding: 13px 22px;
  border-radius: 12px;
  font-size: .86rem; font-weight: 600;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--gold);
  opacity: 0; transform: translateY(16px) scale(.97);
  pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
  max-width: min(380px, calc(100vw - 40px));
}
#admin-toast.show { opacity: 1; transform: translateY(0) scale(1); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row-2, .form-row-3, .drop-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-body { padding: 22px 16px; }
  .admin-top-bar { padding: 0 16px; }
  .atb-badge { display: none; }
}
@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .panel-head { flex-direction: column; align-items: flex-start; }
  .login-box { padding: 32px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================================
   ADDITIONS — cloud badge, analytics, categories, appearance, pages
   ============================================================ */
.cloud-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .68rem; font-weight: 700; letter-spacing: .3px;
  color: var(--muted);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  padding: 7px 12px; border-radius: var(--r-full);
  margin-bottom: 14px;
}
.cloud-badge.on { color: #7CF5B0; border-color: rgba(124, 245, 176, .35); }

.stats-grid { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }

.cat-bars { display: flex; flex-direction: column; gap: 12px; }
.cat-bar-row {
  display: grid; grid-template-columns: 150px 1fr 46px;
  align-items: center; gap: 12px;
}
.cat-bar-label {
  display: flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cat-swatch { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.cat-bar-track { height: 12px; background: var(--ice); border-radius: var(--r-full); overflow: hidden; }
.cat-bar-fill { height: 100%; border-radius: var(--r-full); transition: width .6s var(--ease-out); }
.cat-bar-num { font-size: .78rem; font-weight: 800; color: var(--royal); text-align: right; }

.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.theme-item { display: flex; flex-direction: column; gap: 8px; }
.color-pick {
  width: 100%; height: 46px; padding: 5px;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); cursor: pointer;
}

.section-toggles { display: flex; flex-direction: column; }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 2px; border-bottom: 1px solid var(--border);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-sub { font-size: .74rem; color: var(--muted); margin-top: 3px; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--ice-2); border-radius: var(--r-full);
  transition: .25s var(--ease);
}
.slider::before {
  content: ''; position: absolute; height: 20px; width: 20px;
  left: 3px; top: 3px; background: #fff; border-radius: 50%;
  box-shadow: 0 2px 5px rgba(8, 18, 38, .25);
  transition: .25s var(--ease);
}
.switch input:checked + .slider { background: var(--royal); }
.switch input:checked + .slider::before { transform: translateX(20px); }

.form-btns { display: flex; gap: 10px; margin-top: 6px; }
.ghost-btn {
  padding: 12px 22px; border-radius: var(--r-sm);
  background: transparent; border: 1.5px solid var(--border);
  color: var(--muted); font-weight: 700; font-size: .82rem;
  cursor: pointer; transition: all .2s var(--ease);
}
.ghost-btn:hover { color: var(--royal); border-color: var(--royal); }
.a-tab-icon i { font-size: .92rem; }
.form-card-title i { color: var(--royal); }

@media (max-width: 1100px) {
  .theme-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-bar-row { grid-template-columns: 120px 1fr 40px; }
}
@media (max-width: 700px) {
  .theme-grid { grid-template-columns: 1fr; }
  .cat-bar-row { grid-template-columns: 1fr 40px; }
}
