:root {
  --bg: #0b0f14;
  --panel: #10151d;
  --panel-2: #141b25;
  --line: #223041;
  --line-soft: #1a2430;
  --text: #d7e1e8;
  --muted: #7c93a6;
  --amber: #ffb454;
  --cyan: #4fd1c5;
  --red: #ff5f56;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --sans: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(79, 209, 197, 0.08), transparent),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012) 0px, rgba(255, 255, 255, 0.012) 1px, transparent 1px, transparent 3px);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
::selection { background: var(--amber); color: #14181f; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; }

/* ---------- Top bar ---------- */
header.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 20, 0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  max-width: 1080px; margin: 0 auto;
}
.brand {
  font-family: var(--mono); font-weight: 700; letter-spacing: 0.02em;
  font-size: 15px; color: var(--text); display: flex; align-items: center; gap: 8px;
}
.brand-logo {
  height: 28px;
  width: auto;
  max-width: 28px;
  display: inline-block; flex-shrink: 0;
  vertical-align: middle;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(79, 209, 197, 0.45));
  transition: transform 0.2s ease, filter 0.2s ease;
}
.brand:hover .brand-logo {
  transform: scale(1.08);
  filter: drop-shadow(0 0 10px rgba(99, 255, 140, 0.75));
}
.brand .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan); animation: blink 2.4s infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

nav.toplinks {
  display: flex; align-items: center; gap: 24px; font-family: var(--mono); font-size: 13px; color: var(--muted);
}
nav.toplinks a { transition: color 0.15s; }
nav.toplinks a:hover, nav.toplinks a.active { color: var(--amber); }

.post-intel-btn {
  font-family: var(--mono); font-size: 11px; color: var(--cyan);
  border: 1px solid rgba(79, 209, 197, 0.35); background: rgba(79, 209, 197, 0.07);
  padding: 5px 10px; border-radius: 4px; transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 5px;
}
.post-intel-btn:hover {
  background: var(--cyan); color: #0b0f14; border-color: var(--cyan); font-weight: 600;
}

/* Mobile Menu Styles */
.menu-toggle {
  display: none;
  width: 42px; height: 38px;
  border: 1px solid var(--line); border-radius: 4px;
  background: transparent; color: var(--text);
  cursor: pointer; align-items: center; justify-content: center;
  flex-direction: column; gap: 5px; font-family: var(--mono);
}
.menu-toggle span {
  display: block; width: 18px; height: 1px;
  background: currentColor; transition: transform 0.2s, opacity 0.2s;
}
.mobile-menu {
  display: none;
  border-top: 1px solid var(--line-soft);
  background: rgba(11, 15, 20, 0.97);
}
.mobile-menu-inner {
  max-width: 1080px; margin: 0 auto; padding: 8px 28px 14px;
}
.mobile-menu a {
  display: block; padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted); font-family: var(--mono); font-size: 13px;
}
.mobile-menu a:last-child { border-bottom: 0; }
.mobile-menu a:hover, .mobile-menu a:focus { color: var(--cyan); }

@media (max-width: 640px) {
  nav.toplinks { display: none; }
  .menu-toggle { display: flex; }
  .topbar-inner { padding: 12px 18px; }
  .brand { font-size: 13px; gap: 8px; }
  .brand .dot { width: 7px; height: 7px; }
  .brand span:last-child { font-size: 11px; }
  .mobile-menu.open { display: block; }
  .menu-toggle.open span:first-child { transform: translateY(6px) rotate(45deg); }
  .menu-toggle.open span:nth-child(2) { opacity: 0; }
  .menu-toggle.open span:last-child { transform: translateY(-6px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero { padding: 78px 0 60px; border-bottom: 1px solid var(--line-soft); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

.eyebrow {
  font-family: var(--mono); font-size: 12px; color: var(--amber);
  letter-spacing: 0.14em; text-transform: uppercase;
  display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--amber); }

h1.title {
  font-family: var(--sans); font-weight: 800; font-size: clamp(34px, 5vw, 52px);
  line-height: 1.08; letter-spacing: -0.02em; color: #f2f6f8;
}
h1.title span { color: var(--cyan); }
.subtitle { margin-top: 18px; color: var(--muted); font-size: 16px; max-width: 58ch; }

.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.btn {
  font-family: var(--mono); font-size: 13px; padding: 12px 20px;
  border: 1px solid var(--line); border-radius: 3px; transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn.primary { background: var(--cyan); color: #0b0f14; border-color: var(--cyan); font-weight: 600; }
.btn.primary:hover { background: #6fe0d4; }
.btn.ghost { color: var(--text); }
.btn.ghost:hover { border-color: var(--amber); color: var(--amber); }

/* Terminal window */
.terminal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}
.term-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line);
}
.term-bar .tdot { width: 10px; height: 10px; border-radius: 50%; }
.term-bar .tdot:nth-child(1) { background: #ff5f56; }
.term-bar .tdot:nth-child(2) { background: #ffbd2e; }
.term-bar .tdot:nth-child(3) { background: #27c93f; }
.term-title { margin-left: auto; margin-right: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.term-body { padding: 20px 18px 24px; font-family: var(--mono); font-size: 13.5px; min-height: 210px; }
.term-line { color: var(--muted); margin-bottom: 6px; }
.term-line .prompt { color: var(--cyan); }
.term-line .path { color: var(--amber); }
#typedOut { color: var(--text); white-space: pre-wrap; }
.cursor { display: inline-block; width: 8px; height: 15px; background: var(--cyan); vertical-align: -2px; animation: blink 1s steps(2) infinite; }

/* ---------- Search Bar ---------- */
.search-wrap {
  margin-top: 28px; position: relative; max-width: 720px;
}
.search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-family: var(--mono); font-size: 15px; pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 15px 48px 15px 44px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input::placeholder { color: #5e7384; }
.search-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(79, 209, 197, 0.07); }
.clear-search {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border: 0; background: transparent; color: var(--muted);
  border-radius: 4px; display: none; font-size: 18px; cursor: pointer;
}
.clear-search:hover { background: var(--panel-2); color: var(--text); }

/* ---------- Section shell ---------- */
section.block { padding: 48px 0 64px; border-bottom: 1px solid var(--line-soft); }
.block-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 20px; margin-bottom: 24px; flex-wrap: wrap;
}
.block-head h2 {
  font-family: var(--sans); font-weight: 800; font-size: 25px; color: #f2f6f8;
  display: flex; align-items: center; gap: 12px;
}
.tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  padding: 4px 9px; border-radius: 3px; border: 1px solid var(--line);
  color: var(--muted); text-transform: uppercase;
}
.block-desc { color: var(--muted); font-size: 13px; text-align: right; }
@media (max-width: 640px) { .block-desc { text-align: left; } }

/* ---------- Category Grid (Books) ---------- */
.category-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.category {
  appearance: none; width: 100%; text-align: left;
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 20px; color: var(--text);
  transition: border-color 0.18s, transform 0.18s, background 0.18s;
  position: relative; overflow: hidden; cursor: pointer;
}
.category::after {
  content: ''; position: absolute; right: -25px; bottom: -35px;
  width: 100px; height: 100px; border-radius: 50%;
  border: 1px solid rgba(79, 209, 197, 0.07);
}
.category:hover {
  border-color: var(--cyan); transform: translateY(-3px); background: var(--panel-2);
}
.category.active {
  border-color: var(--cyan); box-shadow: 0 0 0 1px rgba(79, 209, 197, 0.12);
}
.cat-icon { font-size: 22px; margin-bottom: 12px; }
.cat-name { font-size: 15px; font-weight: 700; color: #eef3f6; }
.cat-count {
  margin-top: 5px; font-family: var(--mono); font-size: 10.5px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em;
}
.cat-arrow {
  position: absolute; right: 16px; top: 18px; color: var(--cyan); font-family: var(--mono);
}
@media (max-width: 860px) { .category-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .category-grid { grid-template-columns: 1fr; } }

.books-section { display: none; }
.books-section.visible { display: block; }

.back-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 15px; margin-bottom: 24px; flex-wrap: wrap;
}
.back-btn {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  padding: 9px 13px; border-radius: 4px; font-family: var(--mono); font-size: 11px;
  transition: all 0.15s; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.back-btn:hover { border-color: var(--amber); color: var(--amber); }
.results-info { font-family: var(--mono); font-size: 11px; color: var(--muted); }

.level-filters {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 24px;
}
.level-btn {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  padding: 8px 13px; border-radius: 4px; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.04em; text-transform: uppercase; transition: all 0.15s; cursor: pointer;
}
.level-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.level-btn.active {
  border-color: var(--cyan); color: var(--cyan); background: rgba(79, 209, 197, 0.07);
}
.level-btn[data-level="beginner"].active { border-color: #4fd1a1; color: #4fd1a1; background: rgba(79, 209, 161, 0.07); }
.level-btn[data-level="intermediate"].active { border-color: var(--amber); color: var(--amber); background: rgba(255, 180, 84, 0.07); }
.level-btn[data-level="advanced"].active { border-color: var(--red); color: var(--red); background: rgba(255, 95, 86, 0.07); }

.level-badge {
  display: inline-flex; width: max-content; align-items: center;
  padding: 3px 7px; border: 1px solid var(--line); border-radius: 3px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em;
  text-transform: uppercase; margin-top: 2px;
}
.level-badge.beginner { color: #4fd1a1; border-color: rgba(79, 209, 161, 0.35); }
.level-badge.intermediate { color: var(--amber); border-color: rgba(255, 180, 84, 0.35); }
.level-badge.advanced { color: var(--red); border-color: rgba(255, 95, 86, 0.35); }

/* ---------- Generic Cards & Grids ---------- */
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.videos { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid.videos, .grid.two, .grid.three { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid.videos, .grid.two, .grid.three { grid-template-columns: 1fr; } }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 18px; transition: border-color 0.18s, transform 0.18s;
  position: relative; display: flex; flex-direction: column; gap: 10px;
}
.card:hover { border-color: var(--cyan); transform: translateY(-3px); }

.card-kicker {
  font-family: var(--mono); font-size: 10.5px; color: var(--amber);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.card h3 { font-size: 15.5px; font-weight: 600; color: #eef3f6; line-height: 1.35; }
.card p { font-size: 13px; color: var(--muted); flex-grow: 1; }
.card .meta {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line-soft);
}
.card .meta .go { color: var(--cyan); }
.card .meta .go::after { content: ' →'; }

/* Video Cards */
.video-thumb {
  aspect-ratio: 16 / 9; border-radius: 4px; border: 1px solid var(--line);
  background: linear-gradient(135deg, #16202b, #0e141b);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.video-thumb .youtube-thumb {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  display: block; z-index: 0; transition: transform 0.4s ease, filter 0.4s ease;
}
.card:hover .video-thumb .youtube-thumb {
  transform: scale(1.045); filter: brightness(1.05);
}
.video-thumb .play {
  width: 44px; height: 44px; border-radius: 50%; background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  transition: background 0.15s; z-index: 2;
}
.card:hover .play { background: var(--cyan); }
.card:hover .play svg { fill: #0b0f14; }
.video-thumb .play svg { fill: var(--text); width: 16px; height: 16px; margin-left: 2px; }
.video-thumb .scan {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.025) 3px 4px);
}

/* Book Cards */
.book-card { flex-direction: row; align-items: flex-start; }
.book-cover {
  width: 78px; height: 104px; flex-shrink: 0; border-radius: 4px;
  border: 1px solid var(--line); background: linear-gradient(160deg, var(--panel-2), #0d1219);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.book-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.book-cover-fallback { font-family: var(--mono); font-size: 10px; color: var(--muted); text-align: center; padding: 10px; }
.book-body { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.book-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.book-action {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 4px;
  font-family: var(--mono); font-size: 10px; color: var(--muted); transition: all 0.15s;
}
.book-action:hover { border-color: var(--cyan); color: var(--cyan); }
.book-action.pdf { border-color: rgba(255, 180, 84, 0.35); color: var(--amber); }
.book-action.pdf:hover { border-color: var(--amber); }

/* Project Cards */
.proj-status { display: flex; gap: 6px; align-items: center; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.proj-status .led { width: 7px; height: 7px; border-radius: 50%; }
.led.active { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.led.archived { background: var(--muted); }
.stack { display: flex; gap: 6px; flex-wrap: wrap; }
.stack span { font-family: var(--mono); font-size: 10px; padding: 2px 7px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); }

/* Blog Cards */
.blog-card { padding: 22px; cursor: pointer; }
.blog-card .date { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 6px; }

/* Blog Reader View */
#blogReaderSection { display: none; }
#blogReaderSection.visible { display: block; }
.reader-container {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 36px; max-width: 800px; margin: 0 auto;
}
@media (max-width: 640px) { .reader-container { padding: 20px; } }
.reader-meta {
  font-family: var(--mono); font-size: 12px; color: var(--amber);
  margin-bottom: 12px; display: flex; gap: 16px; flex-wrap: wrap;
}
.reader-title {
  font-size: clamp(24px, 3.5vw, 36px); font-weight: 800; color: #f2f6f8; line-height: 1.2; margin-bottom: 24px;
}
.reader-content {
  color: var(--text); font-size: 15px; line-height: 1.8; display: flex; flex-direction: column; gap: 18px;
}
.reader-content h3 { color: var(--cyan); font-size: 19px; margin-top: 10px; }
.reader-content h4 { color: var(--text); font-size: 16px; margin-top: 6px; }
.reader-content code {
  font-family: var(--mono); background: var(--panel-2); padding: 2px 6px;
  border-radius: 4px; font-size: 13px; color: var(--amber);
}
.reader-content pre {
  background: var(--panel-2); padding: 16px; border-radius: 6px;
  border: 1px solid var(--line); overflow-x: auto; font-family: var(--mono); font-size: 13px;
}
.reader-content img {
  max-width: 100%; height: auto; border-radius: 6px;
  border: 1px solid var(--line); margin: 12px 0; display: block;
}
.reader-content figure {
  margin: 12px 0;
}
.reader-content figcaption {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  text-align: center; margin-top: 6px;
}

/* Editorial Portfolio Sections (Home) */
.editorial { padding: 78px 0; border-bottom: 1px solid var(--line-soft); }
.editorial-head { display: grid; grid-template-columns: 180px 1fr; gap: 44px; align-items: start; }
.editorial-num { font-family: var(--mono); font-size: 12px; color: var(--amber); letter-spacing: 0.12em; padding-top: 8px; }
.editorial-title { font-size: clamp(28px, 4vw, 46px); line-height: 1.08; color: #f2f6f8; font-weight: 800; letter-spacing: -0.025em; }
.editorial-copy { max-width: 720px; margin-top: 22px; color: var(--muted); font-size: 15px; line-height: 1.85; }
.about-signature { margin-top: 32px; font-family: var(--mono); font-size: 12px; color: var(--cyan); }

.skill-list { margin-top: 42px; border-top: 1px solid var(--line); }
.skill-row { display: grid; grid-template-columns: 55px 1fr auto; gap: 24px; align-items: center; padding: 19px 0; border-bottom: 1px solid var(--line-soft); }
.skill-index { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.skill-name { font-size: 16px; color: #eef3f6; font-weight: 600; }
.skill-detail { font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: right; }

.timeline { margin-top: 42px; border-left: 1px solid var(--line); }
.timeline-item { position: relative; padding: 0 0 42px 34px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ''; position: absolute; left: -4px; top: 5px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px rgba(79, 209, 197, 0.35);
}
.timeline-date { font-family: var(--mono); font-size: 11px; color: var(--amber); letter-spacing: 0.08em; margin-bottom: 8px; }
.timeline-role { font-size: 20px; font-weight: 700; color: #f2f6f8; }
.timeline-place { font-family: var(--mono); font-size: 11px; color: var(--muted); margin: 5px 0 10px; }
.timeline-copy { font-size: 13px; color: var(--muted); max-width: 680px; }

.credentials { margin-top: 38px; border-top: 1px solid var(--line); }
.credential { display: grid; grid-template-columns: 55px 1fr auto; gap: 24px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line-soft); }
.credential-index, .credential-meta { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.credential-name { font-size: 15px; font-weight: 600; color: #eef3f6; }

.contact-panel { padding: 78px 0 88px; }
.contact-inner { display: flex; justify-content: space-between; align-items: end; gap: 40px; }
.contact-title { font-size: clamp(34px, 5vw, 62px); line-height: 1; color: #f2f6f8; font-weight: 800; letter-spacing: -0.03em; }
.contact-title span { color: var(--cyan); }
.contact-copy { max-width: 440px; color: var(--muted); font-size: 14px; margin-top: 18px; }

@media (max-width: 760px) {
  .editorial-head { grid-template-columns: 1fr; gap: 8px; }
  .skill-row { grid-template-columns: 40px 1fr; }
  .skill-detail { grid-column: 2; text-align: left; margin-top: -12px; }
  .credential { grid-template-columns: 40px 1fr; }
  .credential-meta { grid-column: 2; margin-top: -12px; }
  .contact-inner { display: block; }
}

/* ---------- Footer ---------- */
footer { padding: 44px 0 60px; }
.footer-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-links { display: flex; gap: 20px; font-family: var(--mono); font-size: 13px; }
.footer-links a { color: var(--muted); transition: color 0.15s; }
.footer-links a:hover { color: var(--amber); }
.footer-note { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 22px; opacity: 0.7; }

/* No Results fallback */
.no-results {
  display: none; text-align: center; padding: 45px 20px;
  border: 1px dashed var(--line); border-radius: 6px; color: var(--muted);
}
.no-results strong { display: block; color: var(--text); margin-bottom: 6px; }

/* ---------- Admin GUI Modal (Ctrl+Shift+A or +Post) ---------- */
#adminModal {
  display: none; position: fixed; inset: 0;
  background: rgba(11, 15, 20, 0.96); z-index: 999;
  align-items: center; justify-content: center; padding: 20px;
}
#adminModal.visible { display: flex; }
.admin-box {
  background: var(--panel); border: 1px solid var(--amber);
  border-radius: 8px; padding: 28px; width: 100%; max-width: 640px;
  max-height: 90vh; overflow-y: auto;
}
.admin-box h2 { font-family: var(--mono); color: var(--amber); margin-bottom: 6px; font-size: 20px; }
.admin-box p { color: var(--muted); font-size: 13px; margin-bottom: 18px; }

.admin-tabs { display: flex; gap: 8px; margin-bottom: 20px; border-bottom: 1px solid var(--line); padding-bottom: 12px; overflow-x: auto; }
.admin-tab {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  padding: 6px 12px; border-radius: 4px; font-family: var(--mono); font-size: 12px;
}
.admin-tab:hover, .admin-tab.active {
  border-color: var(--amber); color: var(--amber); background: rgba(255, 180, 84, 0.08);
}

.admin-form { display: flex; flex-direction: column; gap: 14px; }
.admin-form input, .admin-form select, .admin-form textarea {
  width: 100%; padding: 12px; background: var(--panel-2);
  border: 1px solid var(--line); color: var(--text);
  border-radius: 4px; font-family: var(--sans); font-size: 14px;
}
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus {
  border-color: var(--amber); outline: none;
}
.admin-form textarea { resize: vertical; min-height: 80px; }
.admin-form button.submit-btn {
  background: var(--amber); color: #0b0f14; padding: 12px;
  font-weight: 700; border: none; border-radius: 4px; flex: 1; transition: 0.15s; cursor: pointer;
  font-family: var(--mono); font-size: 13px;
}
.admin-form button.submit-btn:hover { background: #ffc477; }
.admin-form .close-btn {
  background: transparent; color: var(--text); border: 1px solid var(--line);
  padding: 12px 18px; border-radius: 4px; cursor: pointer; font-family: var(--mono); font-size: 13px;
}
.admin-form .close-btn:hover { border-color: var(--text); }

.admin-backup-panel {
  display: flex; gap: 10px; margin-top: 15px; border-top: 1px solid var(--line-soft); padding-top: 15px;
}
.admin-backup-btn {
  background: transparent; border: 1px solid var(--line); color: var(--cyan);
  padding: 8px 12px; border-radius: 4px; font-family: var(--mono); font-size: 11px; cursor: pointer;
}
.admin-backup-btn:hover { border-color: var(--cyan); background: rgba(79, 209, 197, 0.07); }
