/* =====================================================
   GERBANGLINK - STYLE PREMIUM
   ===================================================== */

:root {
    --bg-base: #05070d;
    --bg-elevated: #0d1220;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text-primary: #f4f6fb;
    --text-secondary: #a3acc2;
    --text-muted: #6b7590;
    --accent-a: #7c5cff;
    --accent-b: #22d3ee;
    --accent-c: #ff5cad;
    --success: #34d399;
    --danger: #fb7185;
    --warning: #fbbf24;
    --gradient-primary: linear-gradient(135deg, #7c5cff 0%, #22d3ee 100%);
    --gradient-warm: linear-gradient(135deg, #ff5cad 0%, #7c5cff 100%);
    --shadow-glow: 0 8px 32px rgba(124, 92, 255, 0.25);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --font-main: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% 10%, rgba(124, 92, 255, 0.18), transparent 45%),
        radial-gradient(circle at 85% 20%, rgba(34, 211, 238, 0.14), transparent 45%),
        radial-gradient(circle at 50% 90%, rgba(255, 92, 173, 0.10), transparent 50%);
    z-index: -1;
    pointer-events: none;
}

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

::selection { background: var(--accent-a); color: #fff; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-a); }

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 14.5px;
    letter-spacing: 0.2px;
    transition: all 0.22s ease;
    white-space: nowrap;
}
.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: var(--shadow-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(124, 92, 255, 0.4); }
.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-subtle);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); border-color: var(--border-strong); }
.btn-danger { background: rgba(251, 113, 133, 0.14); color: var(--danger); border-color: rgba(251, 113, 133, 0.3); }
.btn-danger:hover { background: rgba(251, 113, 133, 0.22); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

/* =====================================================
   LANDING PAGE
   ===================================================== */

/* Animated background blobs */
.bg-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .28; animation: floatBlob 16s ease-in-out infinite; }
.blob-1 { width: 420px; height: 420px; background: var(--accent-a); top: -120px; left: -100px; animation-duration: 18s; }
.blob-2 { width: 380px; height: 380px; background: var(--accent-b); top: 20%; right: -140px; animation-duration: 22s; animation-delay: -4s; }
.blob-3 { width: 340px; height: 340px; background: var(--accent-c); bottom: -140px; left: 30%; animation-duration: 20s; animation-delay: -8s; }
@keyframes floatBlob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.08); }
    66% { transform: translate(-30px, 25px) scale(0.95); }
}
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } }

.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(5, 7, 13, 0.72);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-subtle);
}
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    max-width: 1180px;
    margin: 0 auto;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.3px;
}
.brand-mark {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--gradient-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
    box-shadow: 0 6px 18px rgba(124,92,255,.4);
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a.nav-link { color: var(--text-secondary); font-weight: 500; font-size: 14.5px; transition: color .2s; }
.nav-links a.nav-link:hover { color: var(--text-primary); }
.navbar .hamburger { display: none; }
.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 10px 20px 18px;
    border-top: 1px solid var(--border-subtle);
}
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 12px 10px; border-radius: 10px; font-weight: 600; font-size: 14.5px; color: var(--text-secondary); }
.mobile-nav a:hover, .mobile-nav a:active { background: rgba(255,255,255,.05); color: var(--text-primary); }

.hero {
    padding: 100px 24px 80px;
    text-align: center;
    max-width: 880px;
    margin: 0 auto;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 100px;
    background: rgba(124, 92, 255, 0.12);
    border: 1px solid rgba(124, 92, 255, 0.3);
    color: #c4b5ff;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 28px;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); }
.hero h1 {
    font-size: clamp(34px, 6vw, 62px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -1.5px;
    margin-bottom: 22px;
}
.hero h1 .grad {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p.lead {
    font-size: 17.5px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 620px;
    margin: 0 auto 40px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }

/* ---------- Shorten Box (fungsional) ---------- */
.shorten-box {
    max-width: 660px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
    text-align: left;
}
.shorten-form { display: flex; gap: 10px; flex-wrap: wrap; }
.shorten-input-wrap {
    flex: 1;
    min-width: 220px;
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(0,0,0,.3);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    transition: all .2s;
}
.shorten-input-wrap:focus-within { border-color: var(--accent-a); box-shadow: 0 0 0 3px rgba(124,92,255,.18); }
.shorten-icon { padding: 0 0 0 16px; font-size: 15px; color: var(--text-muted); }
.shorten-input-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px 14px;
    color: var(--text-primary);
    font-size: 14.5px;
}
.shorten-input-wrap input:focus { outline: none; }
.shorten-btn { padding: 15px 26px; flex-shrink: 0; }

.shorten-advanced { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.shorten-advanced .adv-label { font-size: 12.5px; color: var(--text-muted); font-family: 'Courier New', monospace; }
.shorten-advanced input {
    flex: 1;
    max-width: 220px;
    padding: 9px 12px;
    background: rgba(0,0,0,.22);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
}
.shorten-advanced input:focus { outline: none; border-color: var(--accent-a); }

.shorten-result {
    margin-top: 18px;
    padding: 16px 18px;
    background: rgba(52,211,153,.08);
    border: 1px solid rgba(52,211,153,.28);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    animation: resultPop .35s ease;
}
@keyframes resultPop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.shorten-result .result-icon { font-size: 22px; }
.shorten-result .result-info { flex: 1; min-width: 160px; }
.shorten-result .result-label { font-size: 12px; color: var(--success); font-weight: 700; margin-bottom: 3px; }
.shorten-result .result-url { font-family: 'Courier New', monospace; font-weight: 700; font-size: 15px; color: var(--text-primary); word-break: break-all; }
.shorten-result .result-actions { display: flex; gap: 8px; }

/* Stats strip */
.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto 90px;
}
.stats-strip .stat {
    background: var(--bg-elevated);
    padding: 26px 16px;
    text-align: center;
}
.stats-strip .stat .num { font-size: 28px; font-weight: 800; background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats-strip .stat .lbl { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* Steps ("Cara Kerja") */
.steps-grid {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.step-card {
    flex: 1;
    min-width: 220px;
    max-width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 30px 24px;
    text-align: center;
    position: relative;
    transition: all .25s ease;
}
.step-card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--bg-card-hover); }
.step-num {
    position: absolute;
    top: -14px; left: 50%;
    transform: translateX(-50%);
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 16px rgba(124,92,255,.4);
}
.step-icon { font-size: 30px; margin: 10px 0 14px; }
.step-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.step-card p { color: var(--text-secondary); font-size: 13.5px; line-height: 1.6; }
.step-connector { display: flex; align-items: center; color: var(--text-muted); font-size: 20px; padding: 0 4px; }

/* Features */
.section { padding: 70px 24px; max-width: 1180px; margin: 0 auto; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 52px; }
.section-head .eyebrow { color: var(--accent-b); font-weight: 700; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; }
.section-head h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: -0.8px; margin: 12px 0 14px; }
.section-head p { color: var(--text-secondary); font-size: 15.5px; line-height: 1.7; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    transition: all .25s ease;
}
.feature-card:hover { transform: translateY(-4px); background: var(--bg-card-hover); border-color: var(--border-strong); }
.feature-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    background: var(--gradient-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 21px;
    margin-bottom: 18px;
}
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--text-secondary); font-size: 14.5px; line-height: 1.65; }

/* CTA / Contact */
.cta-box {
    background: linear-gradient(135deg, rgba(124,92,255,.16), rgba(34,211,238,.10));
    border: 1px solid rgba(124,92,255,.28);
    border-radius: 28px;
    padding: 56px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-box h2 { font-size: clamp(24px, 4vw, 34px); font-weight: 800; margin-bottom: 14px; letter-spacing: -0.6px; }
.cta-box p { color: var(--text-secondary); font-size: 15.5px; margin-bottom: 30px; max-width: 480px; margin-left: auto; margin-right: auto; }
.telegram-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 100px;
    background: linear-gradient(135deg, #2AABEE, #229ED9);
    color: #fff;
    font-weight: 700;
    font-size: 15.5px;
    box-shadow: 0 12px 32px rgba(42, 171, 238, .35);
    transition: all .22s;
}
.telegram-btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 16px 40px rgba(42,171,238,.5); }

footer.site-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 34px 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13.5px;
}
footer.site-footer a { color: var(--accent-b); font-weight: 600; }

/* =====================================================
   AUTH (LOGIN)
   ===================================================== */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 40px 34px;
    backdrop-filter: blur(24px);
    box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.auth-card .brand { justify-content: center; margin-bottom: 6px; }
.auth-card .auth-sub { text-align: center; color: var(--text-muted); font-size: 14px; margin-bottom: 32px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.input-wrap { position: relative; }
.input-wrap .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 15px; }
.field input {
    width: 100%;
    padding: 13px 14px 13px 40px;
    background: rgba(0,0,0,.28);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14.5px;
    transition: all .2s;
}
.field input:focus { outline: none; border-color: var(--accent-a); box-shadow: 0 0 0 3px rgba(124,92,255,.18); }
.toggle-pass { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-muted); font-size: 14px; }
.alert {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 9px;
}
.alert-error { background: rgba(251,113,133,.12); border: 1px solid rgba(251,113,133,.3); color: #ffb4c0; }
.alert-success { background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.3); color: #8ef0c9; }
.alert-warning { background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.3); color: #ffd98a; }
.auth-footer-link { text-align: center; margin-top: 24px; font-size: 13.5px; color: var(--text-muted); }

/* =====================================================
   DASHBOARD LAYOUT
   ===================================================== */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--bg-elevated);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    padding: 22px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
    transition: transform .3s ease;
}
.sidebar .brand { padding: 8px 10px 26px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14.5px;
    transition: all .18s;
}
.side-nav a:hover { background: rgba(255,255,255,.05); color: var(--text-primary); }
.side-nav a.active { background: var(--gradient-primary); color: #fff; box-shadow: var(--shadow-glow); }
.side-nav .nav-icon { width: 18px; text-align: center; }
.sidebar-footer { border-top: 1px solid var(--border-subtle); padding-top: 16px; margin-top: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.03); margin-bottom: 10px; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--gradient-warm); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.user-chip .u-name { font-size: 13.5px; font-weight: 700; }
.user-chip .u-role { font-size: 11.5px; color: var(--text-muted); }

.main-content { flex: 1; min-width: 0; }
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    background: rgba(5,7,13,.75);
    backdrop-filter: blur(16px);
    z-index: 30;
}
.topbar h1 { font-size: 20px; font-weight: 800; letter-spacing: -0.4px; }
.topbar .topbar-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.hamburger { display: none; background: none; border: 1px solid var(--border-subtle); width: 40px; height: 40px; border-radius: 10px; color: var(--text-primary); font-size: 17px; }

.page-body { padding: 28px; }

/* Stat cards */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px;
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: '';
    position: absolute;
    top: -30%; right: -20%;
    width: 120px; height: 120px;
    background: var(--gradient-primary);
    filter: blur(50px);
    opacity: .18;
}
.stat-card .stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stat-card .stat-icon { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.stat-card .stat-icon.i1 { background: rgba(124,92,255,.18); color: #b8a5ff; }
.stat-card .stat-icon.i2 { background: rgba(34,211,238,.18); color: #8be9f5; }
.stat-card .stat-icon.i3 { background: rgba(52,211,153,.18); color: #8ef0c9; }
.stat-card .stat-icon.i4 { background: rgba(255,92,173,.18); color: #ffb0d8; }
.stat-card .stat-trend { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 8px; background: rgba(52,211,153,.14); color: var(--success); }
.stat-card .stat-value { font-size: 30px; font-weight: 800; letter-spacing: -0.6px; }
.stat-card .stat-label { color: var(--text-muted); font-size: 13.5px; margin-top: 4px; }

/* Panel / card container */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border-subtle);
    flex-wrap: wrap;
}
.panel-head h2 { font-size: 16.5px; font-weight: 700; }
.panel-head .panel-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.panel-body { padding: 22px; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search-box { position: relative; }
.search-box input {
    padding: 10px 14px 10px 38px;
    background: rgba(0,0,0,.28);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 13.5px;
    width: 230px;
}
.search-box input:focus { outline: none; border-color: var(--accent-a); }
.search-box .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 13px; }

.select-filter {
    padding: 10px 14px;
    background: rgba(0,0,0,.28);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 13.5px;
}

/* Table */
.table-wrap { overflow-x: auto; }
table.link-table { width: 100%; border-collapse: collapse; min-width: 760px; }
table.link-table th {
    text-align: left;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--text-muted);
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
}
table.link-table td {
    padding: 14px;
    border-bottom: 1px solid rgba(255,255,255,.04);
    font-size: 14px;
    vertical-align: middle;
}
table.link-table tr:hover td { background: rgba(255,255,255,.02); }
.link-slug { display: flex; align-items: center; gap: 10px; }
.link-slug-icon { width: 34px; height: 34px; border-radius: 9px; background: var(--gradient-primary); display:flex; align-items:center; justify-content:center; font-size:14px; flex-shrink:0; }
.link-slug .slug-text { font-weight: 700; }
.link-slug .slug-url { font-size: 12px; color: var(--text-muted); }
.dest-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary); }
.click-badge { font-weight: 800; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 100px; font-size: 12px; font-weight: 700; }
.status-pill.active { background: rgba(52,211,153,.14); color: var(--success); }
.status-pill.disabled { background: rgba(251,113,133,.14); color: var(--danger); }
.status-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.row-actions { display: flex; gap: 6px; }
.row-actions button { background: rgba(255,255,255,.05); border: 1px solid var(--border-subtle); color: var(--text-secondary); width: 32px; height: 32px; border-radius: 8px; font-size: 13px; transition: all .18s; }
.row-actions button:hover { background: rgba(255,255,255,.1); color: var(--text-primary); }
.row-actions button.danger:hover { background: rgba(251,113,133,.18); color: var(--danger); border-color: rgba(251,113,133,.3); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .ico { font-size: 40px; margin-bottom: 14px; opacity: .5; }

/* Chart bars (CSS only, no external lib) */
.chart-bars { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding: 10px 4px 0; }
.chart-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.chart-bar { width: 100%; max-width: 34px; border-radius: 8px 8px 4px 4px; background: var(--gradient-primary); min-height: 4px; transition: height .6s cubic-bezier(.4,0,.2,1); box-shadow: 0 4px 14px rgba(124,92,255,.35); }
.chart-bar-label { font-size: 11px; color: var(--text-muted); }
.chart-bar-val { font-size: 11px; font-weight: 700; color: var(--text-secondary); }

/* Modal */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(2,3,8,.7);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    z-index: 100;
    padding: 20px;
    opacity: 0; pointer-events: none;
    transition: opacity .22s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
    width: 100%; max-width: 500px;
    background: #0c1120;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 40px 100px rgba(0,0,0,.6);
    transform: translateY(14px) scale(.98);
    transition: transform .22s ease;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-overlay.open .modal-box { transform: translateY(0) scale(1); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border-subtle); }
.modal-head h3 { font-size: 17px; font-weight: 700; }
.modal-close { background: rgba(255,255,255,.06); border: none; width: 32px; height: 32px; border-radius: 9px; color: var(--text-secondary); font-size: 15px; }
.modal-body { padding: 22px 24px; }
.modal-foot { padding: 18px 24px; border-top: 1px solid var(--border-subtle); display: flex; justify-content: flex-end; gap: 10px; }

.form-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 7px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 11px 13px;
    background: rgba(0,0,0,.28);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--accent-a); box-shadow: 0 0 0 3px rgba(124,92,255,.16); }
.form-group textarea { resize: vertical; min-height: 70px; }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix .prefix { padding: 11px 12px; background: rgba(255,255,255,.04); border: 1px solid var(--border-subtle); border-right: none; border-radius: 10px 0 0 10px; font-size: 12.5px; color: var(--text-muted); display: flex; align-items: center; white-space: nowrap; }
.input-prefix input { border-radius: 0 10px 10px 0; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* Toast */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
    min-width: 280px;
    max-width: 340px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #0f1424;
    border: 1px solid var(--border-strong);
    box-shadow: 0 16px 40px rgba(0,0,0,.4);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: slideIn .28s ease;
    font-size: 13.5px;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--accent-b); }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Overlay for sidebar on mobile */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 39; }
.sidebar-overlay.open { display: block; }

/* Spinner */
.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; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Copy feedback */
.copy-flash { color: var(--success) !important; }

/* =====================================================
   404 / redirect pages
   ===================================================== */
.status-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}
.status-page .code { font-size: 96px; font-weight: 800; background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.status-page h2 { font-size: 22px; margin: 18px 0 10px; }
.status-page p { color: var(--text-secondary); margin-bottom: 26px; max-width: 380px; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 992px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
    .sidebar {
        position: fixed;
        left: 0; top: 0;
        transform: translateX(-100%);
        box-shadow: 20px 0 60px rgba(0,0,0,.5);
    }
    .sidebar.open { transform: translateX(0); }
    .hamburger { display: flex; align-items: center; justify-content: center; }
    .nav-links { display: none; }
    .navbar .hamburger { display: flex; align-items: center; justify-content: center; }
    .step-connector { display: none; }
    .step-card { max-width: 100%; width: 100%; }
}

@media (max-width: 720px) {
    .features-grid { grid-template-columns: 1fr; }
    .stats-strip { grid-template-columns: repeat(2, 1fr); }
    .hero { padding: 70px 20px 56px; }
    .shorten-form { flex-direction: column; }
    .shorten-btn { width: 100%; }
    .steps-grid { flex-direction: column; align-items: stretch; }
}

@media (max-width: 600px) {
    .stat-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-card { padding: 16px; }
    .stat-card .stat-value { font-size: 24px; }
    .page-body { padding: 16px; }
    .panel-head { padding: 16px; }
    .panel-body { padding: 16px; }
    .form-grid.two { grid-template-columns: 1fr; }
    .search-box input { width: 100%; }
    .toolbar { width: 100%; }
    .topbar { padding: 14px 16px; }
    .cta-box { padding: 40px 22px; }
    #toast-container { left: 12px; right: 12px; top: 12px; }
    .toast { max-width: 100%; }
    .blob { filter: blur(50px); opacity: .2; }
    .blob-1, .blob-2, .blob-3 { width: 240px; height: 240px; }
    .shorten-result { flex-direction: column; align-items: flex-start; }
    .shorten-result .result-actions { width: 100%; }
    .shorten-result .result-actions .btn { flex: 1; }
    .shorten-advanced { flex-wrap: wrap; }
    .shorten-advanced input { max-width: none; width: 100%; }
}
