/* ============================================================
   V6 FINAL UI POLISH
   Unified public website + admin/member dashboard
   ============================================================ */
:root{
  --font-ui:"Inter",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --ease-smooth:cubic-bezier(.22,1,.36,1);
  --ease-standard:cubic-bezier(.2,.7,.2,1);
  --nav-height:76px;
  --content-width:1180px;
  --radius-card:20px;
  --radius-control:13px;
  --shadow-card:0 12px 34px rgba(20,28,45,.07);
  --shadow-hover:0 22px 50px rgba(20,28,45,.12);
}

/* ---------- typography reset / consistency ---------- */
html{scroll-behavior:smooth}
body,button,input,textarea,select,.btn,.form-control,.data-table,.editor-area{
  font-family:var(--font-ui)!important;
}
body{font-size:16px;line-height:1.65;letter-spacing:-.006em;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
h1,h2,h3,h4,h5,h6,.hero-title,.article-title,.section-title,.article-card-title,.popular-title{
  font-family:var(--font-ui)!important;
  font-weight:800!important;
  letter-spacing:-.035em;
  text-wrap:balance;
}
p{letter-spacing:-.01em}
.container{width:min(100% - 40px,var(--content-width));max-width:none;padding:0;margin-inline:auto}

/* ---------- global surfaces & motion ---------- */
.card{border-radius:var(--radius-card)!important;border:1px solid color-mix(in srgb,var(--border) 90%,transparent)!important;box-shadow:var(--shadow-card)!important;background:var(--surface);overflow:hidden}
.btn,.icon-btn,.nav-link,.article-card,.category-card,.popular-item,.quick-actions>a,.admin-side a,.account-pill,.form-control,.tag-pill{
  transition:transform .22s var(--ease-smooth),box-shadow .22s ease,border-color .22s ease,background-color .22s ease,color .22s ease,opacity .22s ease!important;
}
.btn{min-height:42px;border-radius:12px!important;padding:9px 17px;font-size:.88rem;font-weight:750}
.btn-lg{min-height:48px;padding:11px 20px;font-size:.94rem}
.btn-sm{min-height:38px;padding:7px 13px;font-size:.82rem}
.btn:hover{transform:translateY(-2px)}
.btn:active,.icon-btn:active{transform:translateY(0) scale(.98)}
.btn-primary{box-shadow:0 10px 25px color-mix(in srgb,var(--accent) 18%,transparent)}
.icon-btn{width:40px;height:40px;border-radius:12px!important}

/* ---------- navbar ---------- */
.navbar{height:auto;position:sticky;top:0;z-index:100;background:color-mix(in srgb,var(--surface) 91%,transparent);backdrop-filter:blur(24px) saturate(160%);-webkit-backdrop-filter:blur(24px) saturate(160%);border-bottom:1px solid color-mix(in srgb,var(--border) 82%,transparent)}
.navbar-inner{height:var(--nav-height);display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:30px}
.brand{display:flex;align-items:center;gap:11px;min-width:max-content}
.brand-mark{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(145deg,var(--surface),var(--surface-2));border:1px solid var(--border);box-shadow:0 8px 22px rgba(20,28,45,.08);overflow:hidden}
.brand-logo{width:31px!important;height:31px!important;max-width:31px!important;max-height:31px!important;object-fit:cover;border-radius:9px}
.brand-copy{display:flex!important;flex-direction:column;line-height:1.05;min-width:0}
.brand-copy strong{font-size:.96rem;font-weight:800;letter-spacing:-.03em;color:var(--text)}
.brand-copy small{font-size:.59rem;margin-top:5px;color:var(--muted);font-weight:800;letter-spacing:.14em;text-transform:uppercase}
.nav-links{display:flex;align-items:center;justify-content:flex-start;gap:3px;min-width:0}
.nav-link{position:relative;padding:9px 12px;border-radius:11px;font-size:.86rem;font-weight:700;color:var(--text-soft);white-space:nowrap}
.nav-link:hover{background:var(--surface-2);color:var(--text)}
.nav-link.active{background:transparent!important;color:var(--accent)!important}
.nav-link.active::after{content:"";position:absolute;left:12px;right:12px;bottom:2px;height:2px;border-radius:99px;background:var(--accent);transform-origin:center;animation:navLine .28s var(--ease-smooth) both}
@keyframes navLine{from{transform:scaleX(.2);opacity:0}to{transform:scaleX(1);opacity:1}}
.nav-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;margin:0}
.nav-search{width:210px;height:42px;padding:0 3px 0 4px;border-radius:13px;background:var(--surface-2);border:1px solid var(--border);display:flex;align-items:center}
.nav-search:focus-within{border-color:color-mix(in srgb,var(--accent) 55%,var(--border));box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 9%,transparent)}
.nav-search-input{width:100%!important;min-width:0!important;height:100%;padding:0 6px 0 10px!important;border:0!important;background:transparent!important;font-size:.82rem;color:var(--text)}
.nav-search-input:focus{width:100%!important;box-shadow:none!important;outline:none!important}
.nav-search .icon-btn{width:34px;height:34px;border:0!important;background:transparent!important;flex:0 0 34px}
.account-pill{border-radius:13px;padding:6px 10px;background:var(--surface);box-shadow:none}
.mobile-menu-btn,.mobile-menu{display:none}

/* ---------- public page rhythm ---------- */
.site-main{min-height:calc(100vh - var(--nav-height) - 160px)}
.section{padding:70px 0}
.section-alt{background:linear-gradient(180deg,color-mix(in srgb,var(--bg-alt) 78%,transparent),var(--bg-alt))}
.section-head{margin-bottom:26px;align-items:flex-end;gap:20px}
.section-title{font-size:clamp(1.55rem,2.2vw,2rem);padding-left:15px;line-height:1.12}
.section-title::before{top:3px;bottom:3px;width:4px}
.link-more{font-size:.84rem;font-weight:750}

/* ---------- hero ---------- */
.hero{overflow:hidden}
.hero-inner{padding-top:72px!important;padding-bottom:56px!important;gap:44px!important;align-items:center}
.hero-copy{max-width:640px}
.hero-eyebrow{font-size:.71rem;font-weight:800;letter-spacing:.07em;border-radius:999px}
.hero-title{font-size:clamp(2.45rem,5vw,4.35rem)!important;line-height:1.02!important;letter-spacing:-.06em!important;margin:18px 0 20px!important}
.hero-desc{font-size:1.02rem!important;line-height:1.75!important;max-width:600px!important;color:var(--text-soft);margin-bottom:28px!important}
.hero-actions{gap:10px}
.hero-featured{border-radius:24px!important;transform:translateZ(0)}
.hero-featured:hover{transform:translateY(-6px)!important;box-shadow:var(--shadow-hover)!important}
.hero-featured-img{aspect-ratio:16/9;overflow:hidden;background:var(--surface-2)}
.hero-featured-img img{width:100%!important;height:100%!important;object-fit:cover;transition:transform .65s var(--ease-smooth)}
.hero-featured:hover .hero-featured-img img{transform:scale(1.035)}
.hero-featured-body{padding:23px!important}
.hero-featured-title{font-size:1.35rem!important;line-height:1.25;margin:12px 0 9px!important}

/* ---------- cards ---------- */
.grid-3,.category-grid{gap:22px}
.article-card,.category-card{height:100%;color:inherit;text-decoration:none;will-change:transform}
.article-card:hover,.category-card:hover{transform:translateY(-6px)!important;box-shadow:var(--shadow-hover)!important;border-color:color-mix(in srgb,var(--accent) 24%,var(--border))!important}
.article-card-img,.category-img{aspect-ratio:16/9;overflow:hidden;background:linear-gradient(135deg,var(--surface-2),var(--bg-alt))}
.article-card-img img,.category-img img{width:100%;height:100%;object-fit:cover;transition:transform .65s var(--ease-smooth)!important}
.article-card:hover img,.category-card:hover img{transform:scale(1.04)!important}
.article-card-body,.category-body{padding:20px!important}
.article-card-title{font-size:1.08rem!important;line-height:1.38!important;margin:11px 0 8px!important;color:var(--text)}
.article-card-excerpt{font-size:.88rem;line-height:1.66!important;color:var(--text-soft)!important}
.article-card-meta{display:flex;align-items:center;flex-wrap:wrap;gap:3px;margin-top:auto;padding-top:16px!important;font-size:.72rem!important;line-height:1.5;color:var(--muted)}
.chip{font-family:var(--font-ui);font-size:.68rem!important;padding:4px 9px!important;background:var(--accent-soft);color:var(--accent);font-weight:800}
.category-body{min-height:168px!important}
.category-body h3{font-size:1.08rem!important;margin-bottom:7px!important}
.category-body p{font-size:.87rem!important;line-height:1.6!important;margin-bottom:12px!important}
.category-body span{font-size:.75rem!important;letter-spacing:.01em}

/* ---------- popular ---------- */
.popular-grid{display:grid;gap:12px}
.popular-item{padding:15px 16px!important;border-radius:16px!important;display:grid;grid-template-columns:44px minmax(0,1fr) 92px;gap:14px;align-items:center;color:inherit;text-decoration:none}
.popular-item:hover{transform:translateY(-3px);box-shadow:var(--shadow-card)!important}
.popular-rank{font-size:1.25rem;font-weight:850;color:color-mix(in srgb,var(--accent) 70%,var(--muted));font-variant-numeric:tabular-nums}
.popular-title{font-size:.96rem!important;line-height:1.4;margin:0 0 4px!important}
.popular-thumb{width:92px!important;height:62px!important;border-radius:12px!important;object-fit:cover}

/* ---------- newsletter: screenshot fix ---------- */
.newsletter{
  position:relative;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(360px,500px)!important;
  align-items:center!important;
  gap:36px!important;
  padding:30px 34px!important;
  min-height:154px!important;
  border-radius:22px!important;
  background:linear-gradient(120deg,#b90020 0%,#d51c25 52%,#df351d 100%)!important;
  border:0!important;
  box-shadow:0 20px 50px rgba(183,0,31,.16)!important;
  overflow:hidden;
}
.newsletter::before{content:"";position:absolute;width:280px;height:280px;border-radius:50%;right:-115px;top:-170px;background:rgba(255,255,255,.09);pointer-events:none}
.newsletter::after{content:"";position:absolute;width:160px;height:160px;border-radius:50%;left:42%;bottom:-125px;background:rgba(255,255,255,.06);pointer-events:none}
.newsletter>div,.newsletter-form{position:relative;z-index:1}
.newsletter>div h2{margin:0 0 7px!important;color:#fff!important;font-size:clamp(1.25rem,2vw,1.7rem)!important;line-height:1.2!important;letter-spacing:-.04em!important}
.newsletter>div p{margin:0!important;color:rgba(255,255,255,.8)!important;font-size:.88rem!important;line-height:1.55!important}
.newsletter-form{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:9px!important;width:100%;max-width:none!important;margin:0!important;align-items:center}
.newsletter-form input{width:100%;min-width:0;height:48px;border:1px solid rgba(255,255,255,.22);border-radius:12px!important;background:#fff!important;color:#1d1d1f!important;padding:0 15px!important;font-size:.88rem!important;box-shadow:0 7px 20px rgba(68,0,9,.08);outline:none}
.newsletter-form input:focus{border-color:#fff;box-shadow:0 0 0 4px rgba(255,255,255,.17),0 7px 20px rgba(68,0,9,.08)}
.newsletter-form .btn{height:48px!important;min-width:130px!important;border-radius:12px!important;background:#0c274a!important;border-color:#0c274a!important;color:#fff!important;box-shadow:0 10px 24px rgba(4,20,43,.2)!important}
.newsletter-form .btn:hover{background:#12345f!important;transform:translateY(-2px)!important}

/* ---------- article detail ---------- */
.article-page{padding-top:42px!important;padding-bottom:72px!important}
.breadcrumb{font-size:.76rem!important;color:var(--muted);margin-bottom:25px!important}
.article-head{max-width:920px;margin:0 auto 26px}
.article-title{font-size:clamp(2.05rem,5vw,3.75rem)!important;line-height:1.07!important;letter-spacing:-.055em!important}
.article-meta{margin-top:22px!important;gap:11px!important}
.article-featured{max-width:1080px;margin:0 auto 34px!important;border-radius:24px!important;overflow:hidden;box-shadow:var(--shadow-card)}
.article-layout{gap:38px!important;align-items:start}
.article-body{min-width:0}
.article-content{font-family:var(--font-ui)!important;font-size:1.02rem!important;line-height:1.82!important;color:var(--text-soft)}
.article-content h1,.article-content h2,.article-content h3{font-family:var(--font-ui)!important;color:var(--text);line-height:1.25;letter-spacing:-.035em}
.article-content img{border-radius:16px;margin:24px auto;box-shadow:var(--shadow-card)}
.article-actions,.author-box,.side-card{border-radius:18px!important}

/* ---------- forms / auth ---------- */
.form-control{min-height:46px!important;border-radius:12px!important;padding:10px 13px!important;background:var(--surface)!important;border:1px solid var(--border)!important;font-size:.85rem!important;color:var(--text)!important}
.form-control:focus{outline:0!important;border-color:color-mix(in srgb,var(--accent) 60%,var(--border))!important;box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 9%,transparent)!important}
.form-label{display:block;font-size:.72rem!important;line-height:1.4;font-weight:780!important;color:var(--text-soft)!important;margin-bottom:7px!important}
.form-grid{gap:17px!important}
.form-actions{gap:9px!important}
.auth-wrap{min-height:calc(100vh - var(--nav-height));padding:56px 18px!important;background:radial-gradient(circle at 50% -10%,color-mix(in srgb,var(--accent) 10%,transparent),transparent 42%),var(--bg-alt)!important}
.auth-card{width:min(470px,100%)!important;padding:32px!important;border-radius:24px!important;box-shadow:0 26px 70px rgba(20,28,45,.12)!important}
.auth-card h1{font-size:1.8rem!important;margin-bottom:8px!important}

/* ---------- footer ---------- */
.site-footer{margin-top:0!important;padding:0!important;background:#0a1d38!important;border-top:0!important}
.site-footer .container{padding-top:26px;padding-bottom:26px}
.footer-bottom{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:0!important;border:0!important;font-size:.76rem!important;color:rgba(255,255,255,.65)!important}
.footer-bottom span:last-child{text-align:right;max-width:620px}

/* ============================================================
   DASHBOARD / MEMBER — complete visual polish
   ============================================================ */
.admin-shell{grid-template-columns:270px minmax(0,1fr)!important;min-height:calc(100vh - var(--nav-height))!important;background:linear-gradient(180deg,var(--bg-alt),color-mix(in srgb,var(--bg-alt) 80%,var(--surface)))!important}
.admin-side{top:var(--nav-height)!important;height:calc(100vh - var(--nav-height))!important;padding:18px 13px!important;background:color-mix(in srgb,var(--surface) 95%,transparent)!important;border-right:1px solid var(--border)!important;backdrop-filter:blur(20px);overflow-y:auto!important;overscroll-behavior:contain}
.side-profile{padding:10px 9px 17px!important;margin-bottom:7px!important}
.side-avatar{width:43px!important;height:43px!important;border-radius:14px!important;font-size:.83rem!important}
.side-profile strong{font-size:.83rem!important}.side-profile small{font-size:.58rem!important}
.side-label{font-size:.57rem!important;padding:15px 11px 6px!important;letter-spacing:.16em!important}
.admin-side a{min-height:43px!important;padding:9px 11px!important;border-radius:11px!important;margin:2px 0!important;font-size:.79rem!important;font-weight:720!important;color:var(--text-soft)!important;gap:10px!important}
.admin-side a:hover{background:var(--surface-2)!important;color:var(--text)!important;transform:translateX(3px)!important}
.admin-side a.active{color:var(--accent)!important;background:linear-gradient(90deg,var(--accent-soft),color-mix(in srgb,var(--accent-soft) 42%,transparent))!important}
.admin-main{width:100%!important;max-width:1500px!important;padding:34px clamp(20px,3vw,44px) 52px!important;min-width:0!important}
.dash-hero{margin-bottom:25px!important;gap:24px!important}
.dash-hero h1,.admin-main>h1{font-size:clamp(1.7rem,2.8vw,2.35rem)!important;line-height:1.08!important;margin:5px 0 8px!important}
.dash-hero p{font-size:.87rem!important;line-height:1.65!important;color:var(--text-soft)!important}
.eyebrow{font-size:.6rem!important;letter-spacing:.16em!important;font-weight:850!important}
.dash-actions{gap:8px!important}
.kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;margin-bottom:24px!important}
.kpi{min-height:142px!important;padding:18px!important;border-radius:18px!important;box-shadow:0 10px 28px rgba(20,28,45,.055)!important;background:linear-gradient(145deg,var(--surface),color-mix(in srgb,var(--surface-2) 32%,var(--surface)))!important}
.kpi:hover{transform:translateY(-4px)!important;box-shadow:0 18px 38px rgba(20,28,45,.09)!important}
.kpi>span:not(.kpi-icon){font-size:.7rem!important;font-weight:770!important}
.kpi strong{font-size:2rem!important;line-height:1!important;margin:8px 0 3px!important}
.kpi small{font-size:.64rem!important;line-height:1.5!important}
.kpi-icon{width:40px!important;height:40px!important;border-radius:12px!important;font-size:.96rem!important}
.dashboard-grid{grid-template-columns:minmax(0,1.7fr) minmax(280px,.68fr)!important;gap:18px!important}
.panel-head{margin-bottom:12px!important}.panel-head h2{font-size:1rem!important}.panel-head>a{font-size:.72rem!important}
.quick-panel{padding:17px!important;border-radius:18px!important;box-shadow:var(--shadow-card)!important}
.quick-actions{gap:6px!important}.quick-actions>a{padding:10px!important;border-radius:11px!important}.quick-actions>a:hover{transform:translateX(3px)!important}
.quick-actions b{width:34px!important;height:34px!important;border-radius:10px!important}.quick-actions strong{font-size:.77rem!important}.quick-actions small{font-size:.64rem!important}
.system-card{border-radius:11px!important}.system-card span{font-size:.72rem!important}.system-card small{font-size:.62rem!important}

/* dashboard tables */
.table-wrap{border-radius:18px!important;box-shadow:var(--shadow-card)!important;background:var(--surface);scrollbar-width:thin;scrollbar-color:var(--border-strong) transparent}
.data-table{width:100%;min-width:720px!important;border-collapse:separate!important;border-spacing:0!important;background:transparent!important}
.data-table th{position:sticky;top:0;z-index:2;padding:12px 14px!important;background:color-mix(in srgb,var(--surface) 96%,var(--surface-2))!important;border-bottom:1px solid var(--border)!important;font-size:.61rem!important;letter-spacing:.11em!important;font-weight:850!important;color:var(--muted)!important}
.data-table td{padding:13px 14px!important;font-size:.78rem!important;line-height:1.45!important;border-bottom:1px solid var(--border)!important}
.data-table tbody tr:last-child td{border-bottom:0!important}
.data-table tbody tr{transition:background-color .18s ease}.data-table tbody tr:hover{background:color-mix(in srgb,var(--accent-soft) 30%,var(--surface))!important}
.data-table strong{font-size:.8rem!important}
.badge{font-family:var(--font-ui)!important;font-size:.63rem!important;padding:4px 8px!important;font-weight:760!important}
.muted-sm{font-size:.66rem!important;color:var(--muted)!important;margin-top:3px}

/* editor */
.editor-toolbar{display:flex!important;gap:6px!important;flex-wrap:wrap!important;padding:8px!important;border-radius:12px!important;background:var(--surface-2)!important}
.editor-area{min-height:440px!important;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace!important;font-size:.82rem!important;line-height:1.7!important}

/* ---------- subtle entrance animation ---------- */
#app>.page-wrap,#app>.admin-shell,#app>.auth-wrap{animation:pageIn .46s var(--ease-smooth) both}
.article-card,.category-card,.popular-item,.kpi,.quick-panel,.auth-card,.newsletter{animation:riseIn .5s var(--ease-smooth) both}
.grid-3>*:nth-child(2),.category-grid>*:nth-child(2),.kpi-grid>*:nth-child(2){animation-delay:.045s}
.grid-3>*:nth-child(3),.category-grid>*:nth-child(3),.kpi-grid>*:nth-child(3){animation-delay:.09s}
.kpi-grid>*:nth-child(4){animation-delay:.135s}
@keyframes pageIn{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}
@keyframes riseIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}

/* ---------- responsive ---------- */
@media(max-width:1180px){
  .navbar-inner{gap:18px}.nav-search{width:175px}.brand-copy{display:flex!important}
  .admin-shell{grid-template-columns:238px minmax(0,1fr)!important}.dashboard-grid{grid-template-columns:1fr!important}
}
@media(max-width:980px){
  :root{--nav-height:68px}
  .container{width:min(100% - 32px,var(--content-width))}
  .navbar-inner{height:var(--nav-height);grid-template-columns:auto 1fr auto;gap:12px}
  .nav-links,.desktop-only,.nav-search{display:none!important}
  .mobile-menu-btn{display:grid!important}
  .mobile-menu{width:100%;max-width:none;margin:0;position:absolute;left:0;right:0;top:100%;padding:8px 16px 14px;background:color-mix(in srgb,var(--surface) 97%,transparent);border-bottom:1px solid var(--border);box-shadow:0 20px 40px rgba(20,28,45,.1);backdrop-filter:blur(20px)}
  .mobile-menu.open{display:grid!important;animation:menuOpen .28s var(--ease-smooth) both}
  @keyframes menuOpen{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
  .mobile-menu a,.mobile-menu-action{display:flex;align-items:center;min-height:44px;padding:9px 10px;border:0;border-bottom:1px solid var(--border);background:transparent;text-align:left;color:var(--text);font:700 .84rem/1.2 var(--font-ui);text-decoration:none}
  .mobile-menu>*:last-child{border-bottom:0}
  .account-pill{display:flex}.account-pill>span:nth-child(2),.account-pill small{display:none}.account-dot{grid-row:auto}
  .hero-inner{padding-top:52px!important;padding-bottom:44px!important}
  .newsletter{grid-template-columns:1fr!important;gap:20px!important;padding:27px!important}
  .newsletter-form{max-width:620px!important}
  .admin-shell{display:block!important;min-height:calc(100vh - var(--nav-height))!important}
  .admin-side{position:sticky!important;top:var(--nav-height)!important;height:auto!important;display:flex!important;gap:5px!important;overflow-x:auto!important;overflow-y:hidden!important;padding:8px 12px!important;border-right:0!important;border-bottom:1px solid var(--border)!important;scrollbar-width:none;z-index:40}
  .admin-side::-webkit-scrollbar{display:none}.side-profile,.side-label,.side-footer{display:none!important}
  .admin-side a{flex:0 0 auto!important;white-space:nowrap!important;margin:0!important;min-height:38px!important;padding:8px 11px!important;font-size:.73rem!important}
  .admin-side a:hover{transform:none!important}.admin-side a.active::after{display:none!important}
  .admin-main{padding:24px 18px 40px!important}
  .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:700px){
  .container{width:min(100% - 28px,var(--content-width))}
  .section{padding:45px 0}
  .section-head{margin-bottom:20px;align-items:center}
  .brand-mark{width:38px;height:38px;border-radius:12px}.brand-logo{width:28px!important;height:28px!important}.brand-copy strong{font-size:.88rem}.brand-copy small{font-size:.53rem}
  .nav-actions{gap:6px}.account-pill{display:none!important}.icon-btn{width:38px;height:38px}
  .hero-inner{padding-top:42px!important;padding-bottom:36px!important;gap:28px!important}.hero-title{font-size:clamp(2.12rem,11vw,3.2rem)!important}.hero-desc{font-size:.93rem!important}.hero-actions{display:grid}.hero-actions .btn{width:100%}
  .grid-3,.category-grid{grid-template-columns:1fr!important;gap:15px!important}.article-card-body,.category-body{padding:17px!important}
  .popular-item{grid-template-columns:34px minmax(0,1fr) 74px!important;padding:12px!important;gap:10px!important}.popular-thumb{width:74px!important;height:52px!important}
  .newsletter{padding:24px 20px!important;border-radius:18px!important}.newsletter-form{grid-template-columns:1fr!important;gap:8px!important}.newsletter-form .btn{width:100%;min-width:0!important}
  .article-page{padding-top:30px!important}.article-title{font-size:clamp(1.85rem,9vw,2.8rem)!important}.article-layout{grid-template-columns:1fr!important}.article-side{display:grid!important;grid-template-columns:1fr!important}
  .admin-main{padding:20px 12px 34px!important}.dash-hero{display:block!important}.dash-actions{margin-top:15px!important;justify-content:flex-start!important}.dash-actions .btn{flex:1 1 150px}
  .kpi{min-height:124px!important;padding:15px!important}.kpi strong{font-size:1.7rem!important}.kpi-icon{width:36px!important;height:36px!important}
  .form-grid{grid-template-columns:1fr!important}.form-grid .full{grid-column:auto!important}.form-actions{display:grid!important;grid-template-columns:1fr!important}.form-actions .btn{width:100%}
  .footer-bottom{flex-direction:column;align-items:flex-start!important;gap:5px!important}.footer-bottom span:last-child{text-align:left!important}
}
@media(max-width:430px){
  .container{width:min(100% - 22px,var(--content-width))}
  .brand-copy small{display:none}.brand-copy strong{font-size:.84rem}.brand{gap:8px}
  .section{padding:38px 0}.section-title{font-size:1.42rem}
  .hero-title{font-size:2.05rem!important}.hero-eyebrow{font-size:.62rem}.hero-featured-body{padding:17px!important}
  .kpi-grid{grid-template-columns:1fr!important}.kpi{min-height:112px!important}
  .dash-actions{display:grid!important;grid-template-columns:1fr!important}.dash-actions .btn{width:100%}
  .admin-side a span{display:none!important}.admin-side a{font-size:.69rem!important}
  .auth-card{padding:24px 18px!important}
  .toast{left:12px!important;right:12px!important;bottom:12px!important}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto!important}
  *,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}
}

/* ---------- V7 developer panel + dynamic branding ---------- */
.dev-hero{padding:22px 24px!important;border:1px solid var(--border);border-radius:22px;background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 8%,var(--surface)),var(--surface));box-shadow:var(--shadow-sm)}
.dev-panel{padding:20px!important}
.role-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.role-card{padding:16px;border:1px solid var(--border);border-radius:16px;background:var(--surface-2)}
.role-card h3{margin:12px 0 6px;font-size:1rem}.role-card p{margin:0 0 12px;color:var(--text-soft);font-size:.79rem;line-height:1.5}.role-card ul{list-style:none;padding:0;margin:0;display:grid;gap:7px}.role-card li{font-size:.74rem;color:var(--text-soft)}
.log-list{display:grid;gap:8px}.log-row{display:grid;gap:3px;padding:11px 12px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2)}.log-row strong{font-size:.78rem}.log-row span{font-size:.72rem;color:var(--text-soft)}.log-row small{font-size:.66rem;color:var(--muted)}
.system-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:15px}.system-grid>div{padding:15px;border:1px solid var(--border);border-radius:14px;background:var(--surface-2);display:flex;flex-direction:column;gap:8px}.system-grid span{text-transform:capitalize;color:var(--muted);font-size:.72rem}.system-grid strong{font-size:1.4rem}
.maintenance-page{min-height:calc(100vh - var(--nav-height) - 150px);display:grid;place-items:center;padding:48px 20px;background:radial-gradient(circle at 50% 10%,color-mix(in srgb,var(--accent) 10%,transparent),transparent 45%)}.maintenance-card{width:min(620px,100%);padding:42px;text-align:center}.maintenance-icon{width:66px;height:66px;border-radius:20px;margin:0 auto 18px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);font-size:1.8rem}.maintenance-card h1{font-size:clamp(2rem,5vw,3rem);margin:8px 0}.maintenance-card p{max-width:500px;margin:0 auto 22px;color:var(--text-soft);line-height:1.7}
.admin-main input[type="color"].form-control{padding:5px;min-height:46px}
@media(max-width:1100px){.role-grid{grid-template-columns:1fr}.system-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.system-grid{grid-template-columns:1fr}.dev-panel{padding:15px!important}.maintenance-card{padding:28px 20px}}

/* =========================================================
   V8 — MOBILE NAVBAR HARD FIX
   ========================================================= */
@media (max-width: 980px){
  .navbar{
    overflow:visible!important;
    isolation:isolate;
  }
  .navbar-inner{
    width:min(calc(100% - 24px),var(--content-width))!important;
    margin-inline:auto!important;
    padding-inline:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:10px!important;
  }
  .brand{
    min-width:0!important;
    flex:1 1 auto!important;
    display:flex!important;
    align-items:center!important;
  }
  .brand-copy{
    min-width:0!important;
  }
  .brand-copy strong{
    display:block!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }
  .nav-actions{
    flex:0 0 auto!important;
    margin-left:auto!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:7px!important;
  }
  #theme-toggle,#menu-toggle{
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    border-radius:12px!important;
    display:grid!important;
    place-items:center!important;
    line-height:1!important;
    padding:0!important;
  }
  #menu-toggle{
    font-size:0!important;
  }
  #menu-toggle::before{
    content:"";
    width:17px;
    height:12px;
    display:block;
    background:
      linear-gradient(currentColor,currentColor) 0 0/17px 1.5px no-repeat,
      linear-gradient(currentColor,currentColor) 0 5.2px/17px 1.5px no-repeat,
      linear-gradient(currentColor,currentColor) 0 10.4px/17px 1.5px no-repeat;
    transition:transform .25s var(--ease-smooth),opacity .2s ease;
  }
  #menu-toggle[aria-expanded="true"]::before{
    background:
      linear-gradient(currentColor,currentColor) 50% 50%/18px 1.5px no-repeat,
      linear-gradient(currentColor,currentColor) 50% 50%/18px 1.5px no-repeat;
    transform:rotate(45deg);
  }
  #menu-toggle[aria-expanded="true"]::after{
    content:"";
    position:absolute;
    width:18px;
    height:1.5px;
    border-radius:99px;
    background:currentColor;
    transform:rotate(-45deg);
  }
  .mobile-menu{
    box-sizing:border-box!important;
    position:fixed!important;
    top:calc(var(--nav-height) + 8px)!important;
    left:12px!important;
    right:12px!important;
    width:auto!important;
    max-width:none!important;
    margin:0!important;
    padding:8px!important;
    z-index:9999!important;
    border:1px solid var(--border)!important;
    border-radius:18px!important;
    background:var(--surface)!important;
    box-shadow:0 20px 55px rgba(15,23,42,.16),0 3px 12px rgba(15,23,42,.08)!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    overflow:hidden!important;
    transform-origin:top center!important;
  }
  .mobile-menu.open{
    display:grid!important;
    animation:mobileNavV8 .24s cubic-bezier(.2,.8,.2,1) both!important;
  }
  .mobile-menu a,.mobile-menu-action{
    box-sizing:border-box!important;
    width:100%!important;
    min-height:46px!important;
    margin:0!important;
    padding:0 13px!important;
    border:0!important;
    border-radius:11px!important;
    display:flex!important;
    align-items:center!important;
    color:var(--text)!important;
    background:transparent!important;
    font-family:var(--font-ui)!important;
    font-size:.9rem!important;
    font-weight:700!important;
    line-height:1.2!important;
    text-align:left!important;
    text-decoration:none!important;
    transition:background .18s ease,color .18s ease,transform .18s ease!important;
  }
  .mobile-menu a + a,
  .mobile-menu a + .mobile-menu-action,
  .mobile-menu-action + a{
    margin-top:2px!important;
  }
  .mobile-menu a:hover,.mobile-menu-action:hover,
  .mobile-menu a:active,.mobile-menu-action:active{
    background:var(--surface-2)!important;
    color:var(--accent)!important;
    transform:translateX(2px)!important;
  }
  @keyframes mobileNavV8{
    from{opacity:0;transform:translateY(-7px) scale(.985)}
    to{opacity:1;transform:translateY(0) scale(1)}
  }
}

@media (max-width: 430px){
  :root{--nav-height:64px!important}
  .navbar-inner{
    width:calc(100% - 20px)!important;
    min-height:64px!important;
  }
  .brand-mark{
    width:36px!important;
    height:36px!important;
    min-width:36px!important;
    border-radius:11px!important;
  }
  .brand-logo{width:27px!important;height:27px!important}
  .brand-copy strong{font-size:.84rem!important}
  #theme-toggle,#menu-toggle{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    border-radius:11px!important;
  }
  .mobile-menu{
    top:calc(var(--nav-height) + 7px)!important;
    left:10px!important;
    right:10px!important;
    border-radius:16px!important;
    padding:7px!important;
  }
  .mobile-menu a,.mobile-menu-action{
    min-height:45px!important;
    padding-inline:12px!important;
    font-size:.86rem!important;
  }
}
