:root {
    --bg: #f8fafc;
    --bg-soft: #f1f5f9;
    --surface: #ffffff;
    --surface-2: #ffffff;
    --border: #e5e7eb;
    --border-soft: #e5e7eb;
    --text: #111827;
    --muted: #6b7280;
    --muted-2: #94a3b8;
    --accent: #111827;
    --shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
    --shadow-hover: 0 8px 24px rgba(15, 23, 42, 0.1);
}


* {
    box-sizing: border-box;
}

body {
    font-feature-settings: "ss01", "ss02", "cv01", "cv02";
    margin: 0;
}

.admin-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: var(--bg);
}

.admin-sidebar {
    background: #ffffff;
    border-right: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
}

.logo-chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .65rem;
    border-radius: .65rem;
    background: #f8fafc;
    border: 1px solid var(--border-soft);
    color: #475569;
    font-size: .72rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-weight: 600;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .68rem .8rem .68rem .9rem;
    border-radius: .65rem;
    border: 1px solid transparent;
    color: #334155;
    font-weight: 500;
    transition: all 250ms ease;
}
.nav-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 999px;
    background: transparent;
}
.nav-item:hover {
    background: #f8fafc;
    border-color: #e5e7eb;
}
.nav-item.active {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #111827;
}
.nav-item.active::before {
    background: #111827;
}

.dot {
    width: .4rem;
    height: .4rem;
    border-radius: 999px;
    background: #94a3b8;
}
.nav-item.active .dot {
    background: #111827;
}

.page-wrap {
    min-width: 0;
}

.page-title {
    font-size: 1.8rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-weight: 700;
    color: #111827;
}

.page-subtitle {
    color: #6b7280;
    font-size: .9rem;
    margin-top: .25rem;
}

.card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: .9rem;
    box-shadow: var(--shadow);
}

.card-soft {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: .9rem;
}

.hover-lift {
    transition: transform 250ms ease, box-shadow 250ms ease, border-color 250ms ease;
}
.hover-lift:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: var(--shadow-hover);
}

.input {
    width: 100%;
    border-radius: .75rem;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #111827;
    padding: .72rem .9rem;
    transition: all 250ms ease;
}
.input::placeholder {
    color: #94a3b8;
}
.input:focus {
    outline: none;
    border-color: #bfdbfe;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.label {
    display: block;
    font-size: .78rem;
    color: #6b7280;
    margin-bottom: .45rem;
}

.btn {
    border-radius: .72rem;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #111827;
    padding: .62rem .95rem;
    font-weight: 500;
    transition: all 250ms ease;
}
.btn:hover {
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
}
.btn-primary {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
}
.btn-primary:hover {
    background: #0b1220;
    transform: translateY(-1px) scale(1.02);
}
.btn-danger {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #b91c1c;
}
.btn-danger:hover {
    background: #ffe4e6;
}

.table-wrap {
    border: 1px solid #e5e7eb;
    border-radius: .9rem;
    overflow: hidden;
    background: #ffffff;
}
.table {
    width: 100%;
    border-collapse: collapse;
}
.table th,
.table td {
    padding: .86rem .95rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-size: .88rem;
}
.table th {
    color: #6b7280;
    font-weight: 600;
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 1;
}
.table tbody tr {
    transition: background-color 250ms ease;
}
.table tbody tr:hover {
    background: #f8fafc;
}
.table tbody tr:last-child td {
    border-bottom: none;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .18rem .58rem;
    font-size: .72rem;
    border: 1px solid transparent;
    font-weight: 500;
}
.status-active,
.status-valid {
    background: #ecfdf3;
    color: #166534;
    border-color: #bbf7d0;
}
.status-expired {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.flash {
    border-radius: .8rem;
    border: 1px solid var(--border-soft);
    padding: .75rem .95rem;
    font-size: .86rem;
}
.flash-success {
    background: #ecfdf3;
    color: #166534;
    border-color: #bbf7d0;
}
.flash-error {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.fade-in {
    animation: fadeIn 350ms ease-out both;
}

/* SP dashboard supreme sidebar */
.sp-shell {
    align-items: start;
}

.sp-sidebar {
    background:
        radial-gradient(700px 200px at 20% -10%, rgba(6, 182, 212, 0.16), transparent 55%),
        linear-gradient(180deg, #1f2d45 0%, #14213a 100%);
}

.sp-side-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .72rem .8rem;
    border-radius: .72rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #dbeafe;
    font-weight: 500;
    text-decoration: none;
    transition: all 220ms ease;
}
.sp-side-item:hover {
    color: #ffffff;
    border-color: rgba(103, 232, 249, 0.65);
    background: rgba(15, 23, 42, 0.4);
    transform: translateY(-1px);
}

.sp-side-dot {
    width: .45rem;
    height: .45rem;
    border-radius: 999px;
    background: #22d3ee;
    box-shadow: 0 0 0 6px rgba(34, 211, 238, 0.15);
}

.sp-side-stat {
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.45);
    border-radius: .8rem;
    padding: .72rem .85rem;
}
.sp-side-stat-label {
    color: #93c5fd;
    font-size: .73rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 0;
}
.sp-side-stat-value {
    color: #ffffff;
    font-size: .9rem;
    margin: .3rem 0 0;
    font-weight: 600;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
    .admin-shell {
        padding: .75rem;
    }
    .sp-sidebar {
        position: static !important;
    }
}

/* Landing page (clean premium light) */
.landing-page {
    position: relative;
    overflow: hidden;
    background: #ffffff;
}

.landing-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(980px 420px at 50% -5%, rgba(59, 130, 246, 0.08), transparent 72%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.landing-spotlight {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(560px 260px at 50% 34%, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0) 72%);
}

.landing-grain {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.015;
    background-image:
        radial-gradient(circle at 22% 30%, rgba(17, 24, 39, 0.35) 0.45px, transparent 0.7px),
        radial-gradient(circle at 74% 46%, rgba(17, 24, 39, 0.26) 0.45px, transparent 0.7px),
        radial-gradient(circle at 54% 74%, rgba(17, 24, 39, 0.22) 0.45px, transparent 0.7px);
    background-size: 4px 4px, 5px 5px, 6px 6px;
    animation: grainShift 18s linear infinite;
}

@keyframes grainShift {
    0% { transform: translate(0, 0); }
    50% { transform: translate(0.5%, -0.5%); }
    100% { transform: translate(0, 0); }
}

.landing-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.2rem 1.25rem 1.25rem;
}

.hero-wrap {
    width: 100%;
    max-width: 980px;
    text-align: center;
    padding: 0.5rem 0.5rem;
}

.brand-line {
    margin: 0;
    font-size: .78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #6b7280;
    font-weight: 600;
}

.hero-title {
    margin: 1.1rem 0 0;
    font-size: clamp(2.15rem, 4.7vw, 4.1rem);
    letter-spacing: -0.03em;
    line-height: 1.03;
    font-weight: 700;
    color: #111827;
}

.hero-subtitle {
    margin: 1rem auto 0;
    max-width: 700px;
    color: #6b7280;
    font-size: clamp(.98rem, 1.7vw, 1.15rem);
    line-height: 1.55;
    letter-spacing: .005em;
}

.search-shell {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 860px;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .48rem;
    border-radius: 9999px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transition: border-color 250ms ease, box-shadow 250ms ease, transform 250ms ease;
}
.search-shell:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.11);
}
.search-shell:focus-within {
    border-color: #bfdbfe;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14), 0 12px 28px rgba(15, 23, 42, 0.1);
}

.search-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    border-radius: 9999px;
    background: transparent;
    color: #111827;
    padding: .86rem 1.15rem;
    font-size: .98rem;
    letter-spacing: .005em;
}
.search-input::placeholder {
    color: #9ca3af;
    transition: transform 250ms ease, opacity 250ms ease;
}
.search-input:focus::placeholder {
    transform: translateX(2px);
    opacity: .8;
}

.search-btn {
    border: none;
    outline: none;
    border-radius: 9999px;
    padding: .84rem 1.35rem;
    min-width: 136px;
    font-weight: 600;
    font-size: .94rem;
    letter-spacing: .01em;
    color: #ffffff;
    background: #111827;
    border: 1px solid #111827;
    transition: transform 250ms ease, filter 250ms ease, box-shadow 250ms ease, background-color 250ms ease;
    cursor: pointer;
}
.search-btn:hover {
    transform: translateY(-1px) scale(1.02);
    filter: brightness(1.05);
    box-shadow: 0 10px 20px rgba(17, 24, 39, 0.2);
    background: #0b1220;
}
.search-btn:active {
    transform: scale(0.99);
}

.social-proof {
    margin: 1.15rem 0 0;
    color: #6b7280;
    font-size: .9rem;
    letter-spacing: .02em;
}

.stats-inline {
    margin: 1.35rem auto 0;
    width: 100%;
    max-width: 760px;
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 1rem;
}

.stat-inline {
    flex: 1;
    min-width: 0;
    transition: transform 250ms ease, color 250ms ease;
}
.stat-inline:hover {
    transform: translateY(-1px);
}
.stat-inline-num {
    margin: 0;
    color: #111827;
    font-size: clamp(1.3rem, 2.4vw, 1.9rem);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.stat-inline-label {
    margin: .34rem 0 0;
    color: #6b7280;
    font-size: .83rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.stat-inline-divider {
    width: 1px;
    background: linear-gradient(to bottom, rgba(229,231,235,0), rgba(229,231,235,1), rgba(229,231,235,0));
}

.landing-footer-min {
    margin-top: auto;
    text-align: center;
    color: #9ca3af;
    font-size: .74rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .95rem 1rem 1.1rem;
    border-top: 1px solid #e5e7eb;
    transition: color 250ms ease, filter 250ms ease;
}
.landing-footer-min:hover {
    color: #6b7280;
    filter: brightness(1.01);
}

.fade-in-up {
    animation: fadeInUp 520ms ease-out both;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.loader {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(17, 24, 39, 0.15);
    border-left-color: #111827;
    border-radius: 9999px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
    .landing-main {
        padding-top: 1.8rem;
    }
    .hero-subtitle {
        max-width: 620px;
    }
    .search-shell {
        max-width: 760px;
    }
}

@media (max-width: 720px) {
    .hero-title {
        margin-top: .9rem;
    }
    .hero-subtitle {
        margin-top: .85rem;
    }
    .search-shell {
        border-radius: 1rem;
        padding: .5rem;
        display: grid;
        grid-template-columns: 1fr;
        gap: .45rem;
        max-width: 540px;
    }
    .search-input,
    .search-btn {
        border-radius: .78rem;
        width: 100%;
    }
    .search-btn {
        min-width: 0;
    }

    .stats-inline {
        gap: .7rem;
    }
    .stat-inline-label {
        font-size: .76rem;
    }
}

@media (max-width: 520px) {
    .brand-line {
        font-size: .7rem;
        letter-spacing: .14em;
    }
    .hero-subtitle {
        font-size: .94rem;
    }
    .social-proof {
        font-size: .82rem;
    }
    .stats-inline {
        margin-top: 1.1rem;
        gap: .55rem;
    }
    .stat-inline-divider {
        opacity: .45;
    }
}
