:root {
    --sidebar-width: 258px;
}

body {
    min-height: 100vh;
    background: #f5f7fb;
}

.app-sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    position: fixed;
    inset: 0 auto 0 0;
    background: #111827;
    color: #e5e7eb;
    z-index: 1030;
}

.app-sidebar .brand {
    color: #fff;
    text-decoration: none;
    font-weight: 750;
    letter-spacing: -.02em;
}

.app-sidebar .nav-link {
    color: #cbd5e1;
    border-radius: .7rem;
    padding: .72rem .85rem;
    margin-bottom: .2rem;
}

.app-sidebar .nav-link:hover,
.app-sidebar .nav-link.active {
    background: rgba(255,255,255,.1);
    color: #fff;
}

.app-main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.app-topbar {
    min-height: 68px;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e5e7eb;
}

.card {
    border-color: #e6eaf0;
    border-radius: 1rem;
}

.metric-card .metric-value {
    font-size: 1.9rem;
    line-height: 1;
    font-weight: 750;
    letter-spacing: -.03em;
}

.rank-pill {
    min-width: 48px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .36rem .58rem;
    border-radius: .65rem;
    font-weight: 750;
    background: #eef2ff;
    color: #3730a3;
}

.rank-pill.rank-top3 { background:#dcfce7; color:#166534; }
.rank-pill.rank-top10 { background:#e0f2fe; color:#075985; }
.rank-pill.rank-top20 { background:#fef3c7; color:#92400e; }
.rank-pill.rank-low { background:#fee2e2; color:#991b1b; }
.rank-pill.rank-none { background:#f1f5f9; color:#64748b; }

.table > :not(caption) > * > * {
    padding-top: .85rem;
    padding-bottom: .85rem;
    vertical-align: middle;
}

.domain-text {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .89rem;
}

.page-header h1 {
    letter-spacing: -.035em;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background:
        radial-gradient(circle at 20% 20%, rgba(79,70,229,.16), transparent 30%),
        radial-gradient(circle at 80% 80%, rgba(14,165,233,.13), transparent 28%),
        #f8fafc;
}

.login-card { max-width: 440px; width: 100%; }

@media (max-width: 991.98px) {
    .app-sidebar {
        position: static;
        width: 100%;
        min-height: auto;
    }
    .app-main { margin-left: 0; }
    .app-sidebar .nav { flex-direction: row; overflow-x: auto; flex-wrap: nowrap; }
    .app-sidebar .nav-link { white-space: nowrap; }
}
