/* ============================================================
   ScholarPress - Master Stylesheet
   Desain: Modern Academic / Deep Navy + Gold Accent
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CSS Variables ────────────────────────────────────────── */
:root {
    --navy:      #0A1628;
    --navy-800:  #0F2041;
    --navy-700:  #162952;
    --navy-600:  #1E3A6E;
    --navy-500:  #234080;
    --gold:      #D4A843;
    --gold-light:#F0C96A;
    --gold-pale: #FDF3DC;
    --cyan:      #22D3EE;
    --teal:      #0EA5E9;
    --bg:        #F7F9FC;
    --bg-alt:    #EEF2F9;
    --surface:   #FFFFFF;
    --border:    #D1DCF0;
    --text:      #1A2847;
    --text-2:    #4A5C7A;
    --text-3:    #7A8FAD;
    --shadow-sm: 0 2px 8px rgba(10,22,40,.06);
    --shadow:    0 4px 24px rgba(10,22,40,.10);
    --shadow-lg: 0 12px 48px rgba(10,22,40,.16);
    --radius:    12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --font-head: 'Playfair Display', Georgia, serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: .25s cubic-bezier(.4,0,.2,1);
    --transition-slow: .5s cubic-bezier(.4,0,.2,1);
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--navy-600); }

/* ── Container ────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 24px;
}

/* ============================================================
   LOADER OVERLAY
   ============================================================ */
#sp-loader {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(10,22,40,.55);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity .3s;
}
#sp-loader.active { opacity: 1; pointer-events: all; }
.loader-box {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 32px 40px;
    display: flex; align-items: center; gap: 16px;
    box-shadow: var(--shadow-lg);
}
.loader-ring {
    width: 32px; height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--navy-600);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
.loader-msg { font-weight: 500; color: var(--text-2); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   TOAST
   ============================================================ */
#sp-toasts {
    position: fixed; bottom: 24px; right: 24px; z-index: 10000;
    display: flex; flex-direction: column; gap: 10px;
}
.sp-toast {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 18px; border-radius: var(--radius);
    background: var(--navy-800); color: #fff;
    font-size: .9rem; font-weight: 500;
    box-shadow: var(--shadow-lg);
    transform: translateX(120%); opacity: 0;
    transition: all .35s cubic-bezier(.34,1.56,.64,1);
    max-width: 360px;
}
.sp-toast.show { transform: translateX(0); opacity: 1; }
.sp-toast--success { background: #064e3b; border-left: 4px solid #10b981; }
.sp-toast--error   { background: #7f1d1d; border-left: 4px solid #ef4444; }
.sp-toast--warning { background: #78350f; border-left: 4px solid #f59e0b; }
.sp-toast--info    { background: var(--navy-700); border-left: 4px solid var(--gold); }
.toast-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ============================================================
   NAVBAR
   ============================================================ */
.sp-navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(10,22,40,.92);
    backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(255,255,255,.07);
    transition: var(--transition);
}
.sp-navbar.scrolled {
    background: rgba(10,22,40,.98);
    box-shadow: 0 4px 24px rgba(0,0,0,.25);
}
.navbar-inner {
    display: flex; align-items: center; height: 64px; gap: 32px;
}
.navbar-brand {
    display: flex; align-items: center; gap: 10px;
    color: #fff; font-weight: 700; font-size: 1.2rem;
    font-family: var(--font-head);
    flex-shrink: 0;
}
.brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--navy);
}
.navbar-nav {
    display: flex; align-items: center; gap: 4px;
    list-style: none; flex: 1;
}
.nav-link {
    padding: 8px 14px; border-radius: 8px;
    color: rgba(255,255,255,.7); font-size: .9rem; font-weight: 500;
    transition: var(--transition); cursor: pointer;
    display: flex; align-items: center; gap: 6px;
}
.nav-link:hover, .nav-link.active {
    background: rgba(255,255,255,.08);
    color: #fff;
}
.nav-link.active { color: var(--gold-light); }
.navbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.hamburger {
    display: none; color: #fff; padding: 8px;
    border-radius: 8px;
}

/* ============================================================
   PAGE TRANSITION
   ============================================================ */
#sp-main {
    min-height: calc(100vh - 64px);
    margin-top: 64px;
    transition: opacity .28s ease, transform .28s ease;
}
#sp-main.page-exit  { opacity: 0; transform: translateY(12px); }
#sp-main.page-enter { animation: pageEnter .5s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes pageEnter {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}
#sp-main.sp-main--full-width { margin-top: 0; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
.animate-fade-up {
    opacity: 0;
    transform: translateY(24px);
    animation: fadeUp .6s cubic-bezier(.4,0,.2,1) forwards;
    animation-delay: var(--delay, 0ms);
}
.animate-fade-right {
    opacity: 0; transform: translateX(-32px);
    animation: fadeRight .6s cubic-bezier(.4,0,.2,1) .1s forwards;
}
.animate-fade-left {
    opacity: 0; transform: translateX(32px);
    animation: fadeLeft .6s cubic-bezier(.4,0,.2,1) .1s forwards;
}
@keyframes fadeUp   { to { opacity:1; transform:translateY(0); } }
@keyframes fadeRight{ to { opacity:1; transform:translateX(0); } }
@keyframes fadeLeft { to { opacity:1; transform:translateX(0); } }

.animate-fade-up.in-view { opacity: 1; transform: translateY(0); }
.animate-slide-in { animation: slideIn .4s ease forwards; animation-delay: var(--delay,0ms); opacity:0; }
@keyframes slideIn { from { opacity:0; transform:translateX(-16px); } to { opacity:1; transform:none; } }

.float-anim {
    animation: floatY 3s ease-in-out infinite;
    animation-delay: var(--float-delay, 0s);
}
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}
.shake { animation: shake .4s ease; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
    position: relative;
    background: var(--navy);
    min-height: 100vh;
    display: flex; align-items: center;
    overflow: hidden;
    padding: 120px 0 80px;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .18;
}
.blob-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, #1E5FBF, transparent);
    top: -100px; right: -100px;
    animation: blobPulse 8s ease-in-out infinite;
}
.blob-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, var(--gold), transparent);
    bottom: -50px; left: 10%;
    animation: blobPulse 10s ease-in-out infinite reverse;
}
@keyframes blobPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50%       { transform: scale(1.2) rotate(15deg); }
}
.hero-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 60px 60px;
}
.hero-inner { position: relative; z-index: 1; }

.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(212,168,67,.15);
    border: 1px solid rgba(212,168,67,.3);
    border-radius: 99px;
    padding: 6px 16px; color: var(--gold-light);
    font-size: .85rem; font-weight: 600;
    margin-bottom: 24px;
}
.badge-dot {
    width: 8px; height: 8px;
    background: var(--gold); border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%,100%{ box-shadow: 0 0 0 0 rgba(212,168,67,.4); }
    50%    { box-shadow: 0 0 0 6px transparent; }
}

.hero-title {
    font-family: var(--font-head);
    font-size: clamp(2.4rem, 5vw, 4rem);
    line-height: 1.15;
    color: #fff;
    margin-bottom: 20px;
}
.title-gradient {
    background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 1.125rem; color: rgba(255,255,255,.65);
    max-width: 580px; margin-bottom: 36px; line-height: 1.7;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 56px; }

.hero-stats {
    display: flex; gap: 0; flex-wrap: wrap;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(12px);
    display: inline-flex;
}
.stat-card {
    display: flex; flex-direction: column; align-items: center;
    padding: 20px 32px; gap: 4px;
    border-right: 1px solid rgba(255,255,255,.06);
    min-width: 120px;
}
.stat-card:last-child { border-right: none; }
.stat-icon { color: var(--gold); opacity: .7; width: 18px; height: 18px; }
.stat-val  { font-size: 1.6rem; font-weight: 700; color: #fff; font-family: var(--font-mono); }
.stat-label{ font-size: .78rem; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .05em; }

.hero-scroll-hint {
    position: absolute; bottom: 32px; left: 50%;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    color: rgba(255,255,255,.4); font-size: .75rem;
    animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
    0%,100%{ transform: translateX(-50%) translateY(0); }
    50%    { transform: translateX(-50%) translateY(6px); }
}
.scroll-mouse {
    width: 22px; height: 36px;
    border: 2px solid rgba(255,255,255,.25);
    border-radius: 99px;
    display: flex; justify-content: center;
    padding-top: 6px;
}
.scroll-wheel {
    width: 3px; height: 8px;
    background: rgba(255,255,255,.4);
    border-radius: 99px;
    animation: scrollWheel 1.5s ease-in-out infinite;
}
@keyframes scrollWheel {
    0%  { transform: translateY(0); opacity:1; }
    100%{ transform: translateY(8px); opacity:0; }
}

/* ============================================================
   SEARCH SECTION
   ============================================================ */
.search-section {
    padding: 0; margin-top: -28px; position: relative; z-index: 10;
}
.search-box {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 8px 8px 8px 20px;
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
}
.search-icon { color: var(--text-3); flex-shrink:0; width:20px; height:20px; }
.search-box input {
    flex: 1; border: none; outline: none;
    font-family: var(--font-body); font-size: 1rem;
    color: var(--text); background: none;
}
.search-box input::placeholder { color: var(--text-3); }

/* ============================================================
   SECTIONS
   ============================================================ */
.section-padded { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }

.section-header {
    display: flex; align-items: flex-end; gap: 16px;
    margin-bottom: 40px; flex-wrap: wrap;
}
.section-label {
    font-size: .78rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .12em; color: var(--gold);
    padding: 4px 12px; background: var(--gold-pale);
    border-radius: 99px;
}
.section-title {
    font-family: var(--font-head);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--navy); flex: 1;
}
.section-header .btn { margin-left: auto; }

/* CATEGORY GRID */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.cat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px 20px 20px;
    position: relative; overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}
.cat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: transparent;
}
.cat-icon-wrap {
    width: 48px; height: 48px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
}
.cat-icon-wrap svg { width: 22px; height: 22px; }
.cat-name  { font-weight: 600; font-size: .95rem; margin-bottom: 4px; color: var(--text); }
.cat-count { font-size: .8rem; color: var(--text-3); }
.cat-bar {
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 3px; transform: scaleX(0);
    transition: transform .3s ease;
    transform-origin: left;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.cat-card:hover .cat-bar { transform: scaleX(1); }

/* ARTICLES GRID */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}
.article-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex; flex-direction: column; gap: 12px;
}
.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: transparent;
}
.article-meta   { display: flex; align-items: center; gap: 8px; }
.article-category {
    font-size: .75rem; font-weight: 600;
    padding: 3px 10px; border-radius: 99px;
}
.article-date { font-size: .78rem; color: var(--text-3); margin-left: auto; }
.article-title {
    font-family: var(--font-head);
    font-size: 1.05rem; line-height: 1.4;
    color: var(--navy); font-weight: 600;
    cursor: pointer;
}
.article-title:hover { color: var(--navy-600); }
.article-abstract { font-size: .875rem; color: var(--text-2); line-height: 1.6; flex: 1; }
.article-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 12px; border-top: 1px solid var(--border);
}
.article-author { display: flex; align-items: center; gap: 10px; }
.author-avatar {
    width: 32px; height: 32px;
    background: var(--navy-700);
    color: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .7rem; font-weight: 700; flex-shrink: 0;
}
.author-name { display: block; font-size: .85rem; font-weight: 600; color: var(--text); }
.author-aff  { display: block; font-size: .75rem; color: var(--text-3); }
.article-views {
    display: flex; align-items: center; gap: 4px;
    font-size: .8rem; color: var(--text-3);
}
.article-views svg { width: 14px; height: 14px; }

/* EMPTY STATE */
.empty-state {
    grid-column: 1/-1;
    text-align: center; padding: 60px;
    color: var(--text-3);
}
.empty-state svg { width: 48px; height: 48px; margin: 0 auto 16px; opacity: .4; }
.empty-state p { margin-bottom: 20px; font-size: 1rem; }

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-700) 50%, #0d2157 100%);
    padding: 80px 0;
    position: relative; overflow: hidden;
}
.cta-section::before {
    content:''; position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.02) 1px,transparent 1px),
                      linear-gradient(90deg,rgba(255,255,255,.02) 1px,transparent 1px);
    background-size: 40px 40px;
}
.cta-inner {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 60px; flex-wrap: wrap;
}
.cta-content { flex: 1; min-width: 280px; }
.cta-content h2 {
    font-family: var(--font-head);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: #fff; margin-bottom: 16px;
}
.cta-content p { color: rgba(255,255,255,.65); margin-bottom: 32px; font-size: 1.05rem; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-visual {
    display: flex; flex-direction: column; gap: 16px;
    flex-shrink: 0;
}
.cta-card {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius);
    padding: 14px 20px;
    color: #fff; font-weight: 500;
    backdrop-filter: blur(8px);
    min-width: 240px;
}
.cta-card svg { color: var(--gold); width: 20px; height: 20px; flex-shrink: 0; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; border-radius: 10px;
    font-family: var(--font-body); font-weight: 600;
    font-size: .9rem; transition: var(--transition);
    cursor: pointer; border: none; outline: none;
    white-space: nowrap; position: relative; overflow: hidden;
}
.btn::after {
    content:''; position: absolute; inset: 0;
    background: rgba(255,255,255,0);
    transition: background .2s;
}
.btn:hover::after { background: rgba(255,255,255,.1); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
    background: linear-gradient(135deg, var(--navy-600), var(--navy-800));
    color: #fff;
    box-shadow: 0 4px 16px rgba(10,22,40,.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(10,22,40,.35); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
    background: rgba(255,255,255,.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,.2);
}
.btn-ghost:hover { background: rgba(255,255,255,.18); }

.btn-outline {
    background: transparent;
    color: var(--navy);
    border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--navy); background: var(--navy); color: #fff; }

.btn-white {
    background: #fff; color: var(--navy);
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.btn-white:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }

.btn-ghost-white {
    background: transparent; color: #fff;
    border: 1.5px solid rgba(255,255,255,.4);
}
.btn-ghost-white:hover { background: rgba(255,255,255,.12); }

.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: 12px; }
.btn-sm { padding: 7px 14px; font-size: .82rem; border-radius: 8px; }
.btn-block { width: 100%; justify-content: center; }
.link-btn { background:none; border:none; color:var(--navy-600); font-weight:600; cursor:pointer; }
.link-btn:hover { text-decoration: underline; }

/* Spinner inside button */
.btn-spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
.hidden { display: none !important; }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-wrapper {
    display: flex; min-height: calc(100vh - 64px);
}
.auth-visual {
    flex: 1; background: linear-gradient(145deg, var(--navy-800), var(--navy), #0d2157);
    padding: 60px 48px;
    position: relative; overflow: hidden;
    display: flex; align-items: center;
}
.auth-visual--reg { background: linear-gradient(145deg, #0d2157, var(--navy), var(--navy-700)); }
.auth-blob {
    position: absolute; border-radius: 50%;
    filter: blur(80px); opacity: .2;
}
.auth-blob-1 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, #1E5FBF, transparent);
    top: -100px; right: -100px;
    animation: blobPulse 8s ease-in-out infinite;
}
.auth-blob-2 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, var(--gold), transparent);
    bottom: -50px; left: -50px;
    animation: blobPulse 10s ease-in-out infinite reverse;
}
.auth-brand { position: relative; z-index: 1; color: #fff; max-width: 420px; }
.brand-logo-big {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    color: var(--navy); margin-bottom: 24px;
}
.brand-logo-big svg { width: 32px; height: 32px; }
.auth-brand h2 {
    font-family: var(--font-head); font-size: 2rem;
    margin-bottom: 12px;
}
.auth-brand p { color: rgba(255,255,255,.65); line-height: 1.7; margin-bottom: 32px; }
.auth-features { display: flex; flex-direction: column; gap: 12px; }
.auth-feature {
    display: flex; align-items: center; gap: 10px;
    color: rgba(255,255,255,.75); font-size: .9rem;
}
.auth-feature svg { width: 18px; height: 18px; color: var(--gold); flex-shrink: 0; }
.step-list { display: flex; flex-direction: column; gap: 12px; }
.step-item {
    display: flex; align-items: center; gap: 12px;
    color: rgba(255,255,255,.75); font-size: .9rem;
}
.step-num {
    width: 28px; height: 28px; flex-shrink: 0;
    background: rgba(212,168,67,.25);
    border: 1px solid rgba(212,168,67,.4);
    color: var(--gold-light); font-weight: 700;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem;
}

.auth-form-side {
    width: 480px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 40px 48px;
    background: var(--surface);
}
.auth-form-card { width: 100%; max-width: 400px; }
.auth-form-header { margin-bottom: 32px; }
.auth-form-header h2 {
    font-family: var(--font-head); font-size: 1.8rem;
    color: var(--navy); margin-bottom: 6px;
}
.auth-form-header p { color: var(--text-3); }

.auth-form { display: flex; flex-direction: column; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-label {
    font-size: .85rem; font-weight: 600; color: var(--text);
    display: flex; align-items: center; justify-content: space-between;
}
.form-link { color: var(--navy-600); font-weight: 600; font-size: .82rem; }
.input-wrap { position: relative; }
.input-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--text-3); width: 16px; height: 16px;
    pointer-events: none;
}
.form-input {
    width: 100%; padding: 11px 14px 11px 42px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: var(--font-body); font-size: .95rem;
    color: var(--text); background: var(--bg);
    transition: var(--transition);
    outline: none;
}
.form-input:focus {
    border-color: var(--navy-600);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(30,58,110,.1);
}
.input-toggle {
    position: absolute; right: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-3); padding: 4px;
    border-radius: 6px; transition: var(--transition);
}
.input-toggle:hover { color: var(--text); background: var(--bg-alt); }
.input-toggle svg { width: 16px; height: 16px; }

.form-options { display: flex; align-items: center; justify-content: space-between; }
.checkbox-label {
    display: flex; align-items: center; gap: 8px;
    cursor: pointer; font-size: .875rem; color: var(--text-2);
    user-select: none;
}
.checkmark {
    width: 18px; height: 18px;
    border: 1.5px solid var(--border);
    border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition); flex-shrink: 0;
}
.checkbox-label input { display: none; }
.checkbox-label input:checked + .checkmark {
    background: var(--navy-600);
    border-color: var(--navy-600);
}
.checkbox-label input:checked + .checkmark::after {
    content: '';
    width: 5px; height: 9px;
    border: 2px solid #fff;
    border-top: none; border-left: none;
    transform: rotate(45deg) translate(-1px, -1px);
    display: block;
}

.form-alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: .875rem; font-weight: 500;
}
.form-alert--error { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }

.auth-divider {
    text-align: center; position: relative; margin: 20px 0 16px;
    color: var(--text-3); font-size: .82rem;
}
.auth-divider::before {
    content:''; position: absolute;
    top: 50%; left: 0; right: 0; height: 1px;
    background: var(--border);
}
.auth-divider span {
    position: relative;
    background: var(--surface); padding: 0 12px;
}
.auth-switch { text-align: center; font-size: .875rem; color: var(--text-2); }

.demo-hint {
    margin-top: 16px;
    background: var(--gold-pale);
    border: 1px solid rgba(212,168,67,.3);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: .82rem; color: var(--text-2);
    display: flex; align-items: center; gap: 8px;
}
.demo-hint svg { width: 14px; height: 14px; color: var(--gold); flex-shrink: 0; }

/* ============================================================
   DASHBOARD
   ============================================================ */
.sp-main--full-width .sp-main,
.dashboard-layout {
    display: flex; min-height: 100vh; background: var(--bg);
}

/* Sidebar */
.dashboard-sidebar {
    width: 260px; flex-shrink: 0;
    background: var(--navy);
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
    overflow-y: auto; transition: transform .3s ease;
}
.sidebar-profile {
    padding: 28px 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    display: flex; align-items: center; gap: 12px;
}
.profile-avatar-wrap { position: relative; }
.profile-avatar {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--navy); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .8rem;
}
.profile-avatar--lg { width: 44px; height: 44px; font-size: .9rem; }
.profile-status-dot {
    position: absolute; bottom: 1px; right: 1px;
    width: 10px; height: 10px; background: #10b981;
    border: 2px solid var(--navy); border-radius: 50%;
}
.profile-info h3 { color: #fff; font-size: .9rem; font-weight: 600; }
.role-badge {
    display: inline-block;
    padding: 2px 8px; border-radius: 99px;
    font-size: .68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; margin-top: 2px;
}
.role-badge--admin  { background: rgba(212,168,67,.2); color: var(--gold-light); }
.role-badge--editor { background: rgba(34,211,238,.15); color: var(--cyan); }
.role-badge--author { background: rgba(139,92,246,.2); color: #a78bfa; }

.sidebar-nav { padding: 16px 12px; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.nav-section-label {
    font-size: .68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .1em; color: rgba(255,255,255,.3);
    padding: 12px 8px 6px;
}
.sidebar-link {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 8px;
    color: rgba(255,255,255,.6); font-size: .875rem; font-weight: 500;
    transition: var(--transition); cursor: pointer;
}
.sidebar-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar-link.active { background: rgba(255,255,255,.1); color: #fff; }
.sidebar-link.active svg { color: var(--gold); }
.sidebar-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-link--danger { color: rgba(239,68,68,.7) !important; margin-top: auto; }
.sidebar-link--danger:hover { background: rgba(239,68,68,.1) !important; color: #f87171 !important; }

/* Dashboard content */
.dashboard-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.dash-topbar {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 28px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    box-shadow: var(--shadow-sm);
}
.sidebar-toggle {
    display: none; color: var(--text); padding: 8px;
    border-radius: 8px; transition: var(--transition);
}
.sidebar-toggle:hover { background: var(--bg); }
.sidebar-toggle svg { width: 20px; height: 20px; }
.dash-topbar-title h2 { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.dash-topbar-title span { font-size: .82rem; color: var(--text-3); }
.dash-topbar-actions {
    display: flex; align-items: center; gap: 12px; margin-left: auto;
}
.notif-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px; background: var(--bg);
    cursor: pointer; position: relative; transition: var(--transition);
}
.notif-btn:hover { background: var(--bg-alt); }
.notif-btn svg { width: 18px; height: 18px; }
.notif-dot {
    position: absolute; top: 6px; right: 6px;
    width: 8px; height: 8px;
    background: #ef4444; border-radius: 50%;
    border: 1.5px solid #fff;
}

/* Stats cards */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 24px 28px;
}
.dash-stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex; align-items: center; gap: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: relative; overflow: hidden;
    animation: fadeUp .5s ease forwards;
    animation-delay: var(--delay, 0ms); opacity: 0;
    transition: var(--transition);
}
.dash-stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.dash-stat-icon {
    width: 48px; height: 48px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.dash-stat-icon svg { width: 22px; height: 22px; }
.dash-stat-card--blue  .dash-stat-icon { background:#EFF6FF; color:#2563EB; }
.dash-stat-card--green .dash-stat-icon { background:#ECFDF5; color:#059669; }
.dash-stat-card--orange.dash-stat-icon { background:#FFF7ED; color:#D97706; }
.dash-stat-card--orange .dash-stat-icon{ background:#FFF7ED; color:#D97706; }
.dash-stat-card--purple .dash-stat-icon{ background:#F5F3FF; color:#7C3AED; }
.dash-stat-body { flex: 1; }
.dash-stat-val   { display: block; font-size: 1.7rem; font-weight: 700; font-family:var(--font-mono); color:var(--navy); }
.dash-stat-label { font-size: .78rem; color: var(--text-3); }
.dash-stat-chart { flex-shrink: 0; color: var(--text-3); }

/* Dashboard panel */
.dash-panel {
    margin: 0 28px 24px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    animation: fadeUp .5s ease forwards;
    animation-delay: var(--delay,0ms); opacity:0;
}
.panel-header {
    display: flex; align-items: center; gap: 12px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}
.panel-header h3 {
    display: flex; align-items: center; gap: 8px;
    font-size: 1rem; font-weight: 700; color: var(--text); flex: 1;
}
.panel-header svg { width: 18px; height: 18px; }
.table-responsive { overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; }
.dash-table th {
    padding: 10px 20px;
    font-size: .75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em; color: var(--text-3);
    background: var(--bg); text-align: left;
    border-bottom: 1px solid var(--border);
}
.dash-table td {
    padding: 12px 20px;
    font-size: .875rem; color: var(--text);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tr:hover td { background: var(--bg); }
.td-title { max-width: 300px; font-weight: 500; }
.td-date  { color: var(--text-3); white-space: nowrap; }
.td-empty { text-align: center; padding: 48px 20px; color: var(--text-3); }
.td-empty svg { width: 40px; height: 40px; margin: 0 auto 12px; opacity: .3; }
.td-empty p { font-size: .9rem; }
.cat-tag {
    background: var(--bg-alt); color: var(--text-2);
    padding: 3px 10px; border-radius: 99px;
    font-size: .75rem; font-weight: 600; white-space: nowrap;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 3px 10px; border-radius: 99px;
    font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; white-space: nowrap;
}
.status-badge--blue   { background:#EFF6FF; color:#2563EB; }
.status-badge--green  { background:#ECFDF5; color:#059669; }
.status-badge--orange { background:#FFF7ED; color:#D97706; }
.status-badge--yellow { background:#FEFCE8; color:#CA8A04; }
.status-badge--red    { background:#FEF2F2; color:#DC2626; }
.status-badge--teal   { background:#F0FDFA; color:#0D9488; }
.status-badge--gray   { background:#F3F4F6; color:#6B7280; }

/* Icon buttons */
.btn-icon {
    width: 30px; height: 30px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 7px; background: var(--bg);
    color: var(--text-2); border: 1px solid var(--border);
    transition: var(--transition); cursor: pointer; margin-right: 4px;
}
.btn-icon:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-icon svg { width: 13px; height: 13px; }

/* Quick cards */
.dash-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px; margin: 0 28px 28px;
    animation: fadeUp .5s ease forwards;
    animation-delay: var(--delay,0ms); opacity:0;
}
.quick-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 18px;
    display: flex; align-items: center; gap: 12px;
    border: 1px solid var(--border);
    cursor: pointer; transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.quick-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.quick-icon {
    width: 40px; height: 40px; flex-shrink: 0;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}
.quick-icon svg { width: 18px; height: 18px; }
.quick-card--blue   .quick-icon { background:#EFF6FF; color:#2563EB; }
.quick-card--green  .quick-icon { background:#ECFDF5; color:#059669; }
.quick-card--orange .quick-icon { background:#FFF7ED; color:#D97706; }
.quick-card--purple .quick-icon { background:#F5F3FF; color:#7C3AED; }
.quick-card h4 { font-size: .85rem; font-weight: 600; color: var(--text); }
.quick-card p  { font-size: .75rem; color: var(--text-3); }
.quick-arrow { margin-left: auto; color: var(--text-3); width: 16px; height: 16px; flex-shrink: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.sp-footer {
    background: var(--navy);
    color: rgba(255,255,255,.6);
    padding: 60px 0 28px;
}
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px; margin-bottom: 48px;
}
.footer-brand p { font-size: .875rem; line-height: 1.7; margin-top: 12px; max-width: 280px; }
.footer-col h4 { color: #fff; font-weight: 600; margin-bottom: 16px; font-size: .9rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: .875rem; transition: var(--transition); }
.footer-links a:hover { color: var(--gold-light); }
.footer-bottom {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08);
    font-size: .8rem; flex-wrap: wrap; gap: 12px;
}
.footer-bottom a { color: var(--gold-light); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
    .dash-quick-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .navbar-nav { display: none; }
    .hamburger  { display: flex; }

    .hero-section { padding: 100px 0 60px; }
    .hero-stats { flex-wrap: wrap; }
    .stat-card  { min-width: 80px; padding: 14px 16px; }

    .auth-wrapper { flex-direction: column; }
    .auth-visual  { display: none; }
    .auth-form-side { width: 100%; padding: 32px 24px; }

    .dashboard-sidebar { position: fixed; z-index: 200; transform: translateX(-100%); }
    .dashboard-sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
    .sidebar-toggle { display: flex; }
    .dash-stats { grid-template-columns: repeat(2, 1fr); padding: 16px; }
    .dash-panel { margin: 0 16px 16px; }
    .dash-quick-grid { grid-template-columns: 1fr 1fr; margin: 0 16px 16px; }
    .dash-topbar { padding: 12px 16px; }

    .articles-grid { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .cta-inner { flex-direction: column; }
    .hero-stats .stat-card:nth-child(n+3) { display: none; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 480px) {
    .dash-stats       { grid-template-columns: 1fr; }
    .dash-quick-grid  { grid-template-columns: 1fr; }
    .hero-title       { font-size: 2rem; }
    .hero-actions     { flex-direction: column; }
    .hero-actions .btn{ width: 100%; justify-content: center; }
}
