@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,300..600,0..1,-25..200&display=swap');

:root {
  --bg: #ffffff;
  --bg-elevated: #ffffff;
  --bg-sunken: #f5f6f9;
  --ink: #171522;
  --ink-soft: #625d70;
  --ink-faint: #948f9e;
  --line: #e7e7ee;
  --line-strong: #d7d7e2;
  --accent: #6d6ef2;
  --accent-dark: #5254d6;
  --accent-soft: #ebeaff;
  --accent-2: #9294f8;
  --accent-3: #c3c4fb;
  --accent-rgb: 109,110,242;
  --coral: #e2637a;
  --coral-soft: #fbe9ec;
  --teal: #2f9e83;
  --teal-soft: #e4f5ef;
  --amber: #c98a2e;
  --amber-soft: #faf0dd;
  --radius-lg: 20px;
  --radius-md: 13px;
  --radius-sm: 9px;
  --shadow-card: 0 1px 2px rgba(23, 21, 34, 0.05), 0 14px 32px -16px rgba(23, 21, 34, 0.18);
  --shadow-pop: 0 24px 60px -18px rgba(23, 21, 34, 0.32);
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --ease: cubic-bezier(.22,1,.36,1);
}

[data-theme="dark"] {
  --bg: #100f1a;
  --bg-elevated: #18172a;
  --bg-sunken: #131220;
  --ink: #f2f1fa;
  --ink-soft: #a7a3ba;
  --ink-faint: #706c85;
  --line: #29283c;
  --line-strong: #363450;
  --accent-soft: rgba(var(--accent-rgb), .16);
  --shadow-card: 0 1px 2px rgba(0,0,0,.35), 0 14px 32px -16px rgba(0,0,0,.55);
  --shadow-pop: 0 24px 60px -18px rgba(0,0,0,.65);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  transition: background .35s var(--ease), color .35s var(--ease);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font-family: inherit; }

::selection { background: var(--accent-soft); color: var(--accent-dark); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.icon {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 450, 'GRAD' 0, 'opsz' 20;
  vertical-align: middle;
}
.icon.fill { font-variation-settings: 'FILL' 1, 'wght' 450, 'GRAD' 0, 'opsz' 20; }
.icon-sm { font-size: 17px; }
.icon-lg { font-size: 26px; }
.shell { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

.topbar { display: none; } 
main.shell { padding-top: 108px; }

.navbar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 32px));
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  transition: background .35s var(--ease), border-color .35s var(--ease), box-shadow .3s var(--ease);
}
.navbar.scrolled { box-shadow: var(--shadow-pop); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 10px 16px; gap: 16px;
}

.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.brand .mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--bg-sunken);
  display: flex; align-items: center; justify-content: center; color: #fff;
  overflow: hidden; flex-shrink: 0;
}
.brand .mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand .mark .icon { font-size: 18px; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--ink-soft);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav-links a .icon { font-size: 18px; }
.nav-links a:hover { background: var(--bg-sunken); color: var(--ink); }
.nav-links a.active { background: var(--accent-soft); color: var(--accent-dark); }

.nav-actions { display: flex; align-items: center; gap: 6px; }
.nav-mobile-toggle { display: none; }

.lang-btn {
  display: flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px; border-radius: 10px;
  border: none; background: transparent; color: var(--ink-soft);
  font-weight: 600; font-size: 13.5px; cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.lang-btn:hover { color: var(--accent-dark); background: var(--bg-sunken); }
.lang-btn .icon { font-size: 18px; }

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  border: none; background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink-soft); position: relative;
  transition: color 0.15s ease, background 0.15s ease;
}
.icon-btn:hover { color: var(--accent-dark); background: var(--bg-sunken); }

.palette-pop {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--bg-elevated); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px; box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; gap: 10px; width: 200px;
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.97);
  transition: all .22s var(--ease); z-index: 50;
}
.palette-pop.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.palette-pop .ptitle { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); font-weight: 700; padding: 0 2px; }
.swatch-row { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 30px; height: 30px; border-radius: 9px; cursor: pointer;
  border: 2px solid transparent; position: relative;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.swatch:hover { transform: scale(1.08); }
.swatch.active { border-color: var(--ink); }
.swatch.active::after {
  content: "check"; font-family: 'Material Symbols Outlined'; font-size: 15px; color: #fff;
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  text-shadow: 0 1px 3px rgba(0,0,0,.4);
}

.hamburger { width: 19px; height: 13px; position: relative; display: inline-block; flex-shrink: 0; }
.hamburger span {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px;
  background: currentColor;
  transition: transform .25s var(--ease), opacity .2s var(--ease), top .25s var(--ease);
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 5.5px; }
.hamburger span:nth-child(3) { top: 11px; }
.nav-mobile-toggle.open .hamburger span:nth-child(1) { top: 5.5px; transform: rotate(45deg); }
.nav-mobile-toggle.open .hamburger span:nth-child(2) { opacity: 0; }
.nav-mobile-toggle.open .hamburger span:nth-child(3) { top: 5.5px; transform: rotate(-45deg); }

.mobile-panel {
  position: fixed; top: 82px; left: 50%; transform: translateX(-50%) translateY(-12px);
  width: min(1180px, calc(100% - 32px));
  background: var(--bg-elevated); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-pop); padding: 14px; display: none; flex-direction: column; gap: 4px; z-index: 999;
  opacity: 0; transition: all .25s var(--ease);
}
.mobile-panel.open { display: flex; opacity: 1; transform: translateX(-50%) translateY(0); }
.mobile-panel a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; font-weight: 600; font-size: 15px; color: var(--ink-soft); }
.mobile-panel a:hover { background: var(--bg-sunken); color: var(--ink); }
.mobile-panel .btn { margin-top: 6px; width: 100%; justify-content: center; }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .lang-btn span:last-child { display: none; }
  .nav-mobile-toggle { display: flex; }
  main.shell { padding-top: 96px; }
  .navbar { top: 12px; }
  .mobile-panel { top: 74px; }
}
@media (max-width: 480px) {
  .brand { font-size: 15px; }
  .brand .mark { width: 30px; height: 30px; }
  .nav-inner { padding: 8px 10px 8px 12px; gap: 8px; }
  .icon-btn { width: 34px; height: 34px; }
  .palette-pop { right: -30px; }
}



.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 20px; border-radius: 999px; font-weight: 600; font-size: 13.5px;
  border: none; cursor: pointer; font-family: var(--font-body);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.btn .icon { font-size: 18px; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 22px -10px rgba(var(--accent-rgb), 0.7); }
.btn-primary:hover { background: var(--accent-dark); }

.btn-ghost { background: var(--bg-elevated); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-dark); }

.btn-danger { background: var(--coral-soft); color: #a83450; }
.btn-danger:hover { background: #f6d3d9; }

.btn-sm { padding: 7px 15px; font-size: 12.5px; border-radius: 999px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }


.hero { padding: 60px 0 26px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark);
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 18px;
}
.eyebrow .icon { font-size: 15px; }
.hero h1 { font-family: var(--font-display); font-size: 42px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 14px; }
.hero p { color: var(--ink-soft); font-size: 15.5px; line-height: 1.65; max-width: 640px; margin: 0 0 28px; }

.search-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.search-box {
  flex: 1; min-width: 240px; display: flex; align-items: center; gap: 10px;
  background: var(--bg-elevated); border: 1px solid var(--line); border-radius: 12px; padding: 11px 15px; color: var(--ink-faint);
}
.search-box .icon { font-size: 19px; }
.search-box input { border: none; outline: none; background: transparent; flex: 1; font-size: 14px; color: var(--ink); }

.filters-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.pill {
  padding: 7px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--line); background: var(--bg-elevated); color: var(--ink-soft);
  cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.pill:hover { border-color: var(--accent); }
.pill.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); }

.label-badge { display: inline-flex; padding: 4px 11px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--accent-soft); color: var(--accent-dark); letter-spacing: 0.01em; }
.label-badge.coral { background: var(--coral-soft); color: #b13c56; }
.label-badge.teal { background: var(--teal-soft); color: #1f7a63; }
.label-badge.amber { background: var(--amber-soft); color: #9c6c1f; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 20px; padding: 6px 0 80px; }

.card {
  background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-pop); border-color: var(--line-strong); }

.card-banner {
  height: 142px; width: 100%; position: relative; overflow: hidden;
  background: linear-gradient(145deg, var(--accent) 0%, var(--accent-2) 55%, var(--accent-3) 100%);
}
.card-banner::before {
  content: ""; position: absolute; inset: 0; opacity: 0.5;
  background-image: radial-gradient(rgba(255,255,255,0.35) 1.4px, transparent 1.4px);
  background-size: 15px 15px;
}
.card-banner img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }

.pal-0 { background: linear-gradient(145deg, var(--accent) 0%, var(--accent-2) 55%, var(--accent-3) 100%); }
.pal-1 { background: linear-gradient(145deg, #e2637a 0%, #ef95a5 55%, #f6c4cd 100%); }
.pal-2 { background: linear-gradient(145deg, #2f9e83 0%, #5cc3a6 55%, #a6e2cd 100%); }
.pal-3 { background: linear-gradient(145deg, #3f6fb0 0%, #6f97cf 55%, #a9c2e3 100%); }
.pal-4 { background: linear-gradient(145deg, #c98a2e 0%, #dba75e 55%, #ecc890 100%); }
.pal-5 { background: linear-gradient(145deg, #8a5aa5 0%, #ab82c1 55%, #cdb3dc 100%); }
.pal-6 { background: linear-gradient(145deg, #2f8a9e 0%, #5eabbb 55%, #9bcdd6 100%); }
.pal-7 { background: linear-gradient(145deg, #4f7d4f 0%, #7ea87e 55%, #b3cdb0 100%); }

.card-body { padding: 17px 19px 19px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card-title { font-family: var(--font-display); font-weight: 700; font-size: 17.5px; letter-spacing: -0.01em; line-height: 1.3; }
.card-desc { color: var(--ink-soft); font-size: 13.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.card-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 6px; }
.authors-stack { display: flex; align-items: center; }
.authors-stack img { width: 25px; height: 25px; border-radius: 50%; border: 2px solid var(--bg-elevated); margin-left: -8px; object-fit: cover; background: var(--accent-soft); }
.authors-stack img:first-child { margin-left: 0; }
.author-name { font-size: 12px; color: var(--ink-soft); font-weight: 600; margin-left: 8px; }
.card-date { font-size: 11.5px; color: var(--ink-faint); font-weight: 500; }

.empty-state { text-align: center; padding: 90px 20px; color: var(--ink-soft); }
.empty-state .icon { font-size: 40px; margin-bottom: 14px; color: var(--ink-faint); }
.empty-state h3 { font-family: var(--font-display); color: var(--ink); font-size: 19px; margin: 0 0 6px; }

.site-footer { border-top: 1px solid var(--line); padding: 36px 0; margin-top: 36px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-text { color: var(--ink-soft); font-size: 13px; }

.detail-wrap { padding: 32px 0 90px; max-width: 760px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 13.5px; font-weight: 600; margin-bottom: 20px; }
.back-link .icon { font-size: 18px; }
.back-link:hover { color: var(--accent-dark); }

.detail-banner {
  width: 100%; height: 260px; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 26px; position: relative;
}
.detail-banner::before { content: ""; position: absolute; inset: 0; opacity: 0.5; background-image: radial-gradient(rgba(255,255,255,0.35) 1.4px, transparent 1.4px); background-size: 16px 16px; }
.detail-banner img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }

.detail-title { font-family: var(--font-display); font-size: 32px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 16px; }
.detail-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; flex-wrap: wrap; }
.meta-author { display: flex; align-items: center; gap: 8px; }
.meta-author img { width: 29px; height: 29px; border-radius: 50%; object-fit: cover; }
.meta-author span { font-weight: 600; font-size: 13.5px; }
.meta-dot { color: var(--line-strong); }
.meta-date { color: var(--ink-soft); font-size: 13.5px; }

.markdown-body { font-size: 15.5px; line-height: 1.75; }
.markdown-body .md-heading { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.01em; margin: 26px 0 12px; }
.markdown-body h3.md-heading { font-size: 23px; }
.markdown-body h4.md-heading { font-size: 19px; }
.markdown-body h5.md-heading { font-size: 16.5px; }
.markdown-body .md-p { margin: 0 0 14px; }
.markdown-body .md-quote { margin: 14px 0; padding: 4px 16px; border-left: 3px solid var(--accent); color: var(--ink-soft); background: var(--accent-soft); border-radius: 0 10px 10px 0; }
.markdown-body .md-ul, .markdown-body .md-ol { margin: 4px 0 16px; padding-left: 22px; }
.markdown-body .md-li { margin-bottom: 6px; }
.markdown-body .md-codeblock { background: #191726; color: #e9e7f5; padding: 16px 18px; border-radius: 12px; overflow-x: auto; font-family: var(--font-mono); font-size: 13px; margin: 14px 0; }
.markdown-body .md-inline-code { background: var(--accent-soft); color: var(--accent-dark); padding: 2px 6px; border-radius: 6px; font-family: var(--font-mono); font-size: 0.9em; }
.markdown-body .md-link { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.markdown-body .md-spoiler { background: #26243a; color: transparent; border-radius: 5px; cursor: pointer; padding: 0 2px; transition: color 0.1s ease; }
.markdown-body .md-spoiler.revealed { color: var(--ink); background: var(--accent-soft); }
.markdown-body .discord-emoji { width: 1.35em; height: 1.35em; vertical-align: -0.28em; display: inline-block; }

.center-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 38px 32px; box-shadow: var(--shadow-card); text-align: center; }
.auth-card .mark { width: 52px; height: 52px; border-radius: 15px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: flex; align-items: center; justify-content: center; color: #fff; margin: 0 auto 20px; box-shadow: 0 10px 20px -8px rgba(var(--accent-rgb),.6); }
.auth-card .mark .icon { font-size: 24px; }
.auth-card h1 { font-family: var(--font-display); font-size: 21px; margin: 0 0 8px; }
.auth-card p { color: var(--ink-soft); font-size: 13.5px; line-height: 1.6; margin: 0 0 26px; }
.discord-btn { display: flex; align-items: center; justify-content: center; gap: 10px; background: #5865f2; color: #fff; padding: 12px 20px; border-radius: 12px; font-weight: 700; font-size: 14px; border: none; cursor: pointer; width: 100%; transition: background 0.15s ease; }
.discord-btn:hover { background: #4752c4; }
.auth-error { margin-top: 18px; padding: 10px 14px; border-radius: 10px; background: var(--coral-soft); color: #a83450; font-size: 13px; text-align: left; display: flex; align-items: center; gap: 8px; }
.auth-error .icon { font-size: 18px; flex-shrink: 0; }

.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 232px; flex-shrink: 0; background: var(--bg-elevated); border-right: 1px solid var(--line); padding: 22px 16px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.admin-nav { display: flex; flex-direction: column; gap: 3px; margin-top: 24px; }
.admin-nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer; border: none; background: none; text-align: left; width: 100%; }
.admin-nav-item .icon { font-size: 19px; }
.admin-nav-item:hover { background: var(--bg-sunken); color: var(--ink); }
.admin-nav-item.active { background: var(--accent-soft); color: var(--accent-dark); }
.admin-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.admin-user img { width: 33px; height: 33px; border-radius: 50%; }
.admin-user .name { font-weight: 700; font-size: 12.5px; }
.admin-user .role { font-size: 10.5px; color: var(--ink-soft); }
.admin-main { flex: 1; padding: 34px 38px; max-width: 1000px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; gap: 16px; flex-wrap: wrap; }
.admin-header h1 { font-family: var(--font-display); font-size: 25px; margin: 0; }
.admin-header p { color: var(--ink-soft); font-size: 13.5px; margin: 6px 0 0; }

.admin-list { display: flex; flex-direction: column; gap: 11px; }
.admin-row { display: flex; align-items: center; gap: 14px; background: var(--bg-elevated); border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; transition: border-color 0.15s ease; }
.admin-row:hover { border-color: var(--line-strong); }
.admin-row .thumb { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; background: var(--accent-soft); flex-shrink: 0; }
.admin-row .info { flex: 1; min-width: 0; }
.admin-row .info h3 { margin: 0 0 3px; font-size: 14.5px; font-family: var(--font-display); }
.admin-row .info p { margin: 0; font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-row .row-actions { display: flex; gap: 7px; flex-shrink: 0; }
.admin-row .row-actions .icon-btn { width: 33px; height: 33px; }

.profile-chip { display: flex; align-items: center; gap: 10px; background: var(--bg-elevated); border: 1px solid var(--line); border-radius: 12px; padding: 10px 11px; }
.profile-chip img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.profile-chip .info { flex: 1; min-width: 0; }
.profile-chip .info b { display: block; font-size: 13.5px; }
.profile-chip .info span { font-size: 11px; color: var(--ink-soft); }
.profile-chip .row-actions { display: flex; gap: 4px; }
.profile-chip .row-actions .icon-btn { width: 29px; height: 29px; }
.profile-chip .row-actions .icon { font-size: 16px; }

.profiles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 12px; }

.form-card { background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-card); }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 8px; }
.field .hint { font-size: 11.5px; color: var(--ink-faint); font-weight: 500; margin-top: 6px; }
.field input[type="text"], .field input[type="url"], .field select, .field textarea {
  width: 100%; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--bg); font-size: 14px; outline: none; transition: border-color 0.15s ease;
  color: var(--ink); font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 90px; }

.uploader { border: 1.5px dashed var(--line-strong); border-radius: 14px; padding: 20px; text-align: center; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; position: relative; background: var(--bg); }
.uploader:hover { border-color: var(--accent); background: var(--accent-soft); }
.uploader input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.uploader-preview { max-height: 140px; border-radius: 10px; margin: 0 auto 10px; overflow: hidden; }
.uploader-preview img { width: 100%; height: 140px; object-fit: cover; }
.uploader-label { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.uploader-label .icon { font-size: 18px; }

.editor-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.editor-tab { padding: 7px 14px; border-radius: 9px 9px 0 0; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--ink-soft); border: 1px solid transparent; }
.editor-tab.active { color: var(--accent-dark); background: var(--bg-elevated); border-color: var(--line); border-bottom-color: var(--bg-elevated); }
.editor-toolbar { display: flex; gap: 2px; flex-wrap: wrap; padding: 7px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px 10px 0 0; border-bottom: none; }
.editor-toolbar button { width: 30px; height: 30px; border-radius: 7px; border: none; background: transparent; cursor: pointer; color: var(--ink-soft); display: flex; align-items: center; justify-content: center; }
.editor-toolbar button .icon { font-size: 18px; }
.editor-toolbar button:hover { background: var(--accent-soft); color: var(--accent-dark); }
.editor-textarea { width: 100%; min-height: 260px; border: 1px solid var(--line); border-top: none; border-radius: 0 0 11px 11px; padding: 14px; font-family: var(--font-mono); font-size: 13.5px; outline: none; resize: vertical; background: var(--bg-elevated); color: var(--ink); }
.editor-preview-box { border: 1px solid var(--line); border-radius: 11px; padding: 16px; min-height: 260px; background: var(--bg-elevated); }

.modal-overlay { position: fixed; inset: 0; background: rgba(23,21,34,0.45); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-box { background: var(--bg-elevated); border-radius: var(--radius-lg); padding: 26px; width: 100%; max-width: 420px; box-shadow: var(--shadow-pop); }
.modal-box h2 { font-family: var(--font-display); font-size: 18.5px; margin: 0 0 18px; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; }

.toast { position: fixed; bottom: 24px; right: 24px; display: flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; padding: 12px 17px; border-radius: 12px; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-pop); z-index: 200; opacity: 0; transform: translateY(10px); transition: all 0.25s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #a83450; }
.toast .icon { font-size: 18px; }

.spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.access-denied { text-align: center; padding: 100px 20px; }
.access-denied .icon { font-size: 42px; margin-bottom: 16px; color: var(--coral); }

@media (max-width: 760px) {
  .hero h1 { font-size: 30px; }
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; overflow-x: auto; }
  .admin-nav { flex-direction: row; margin-top: 0; margin-left: 16px; }
  .admin-user { display: none; }
  .admin-main { padding: 22px 18px; }
}