@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --ink: #0b1b28;
    --muted: #52606d;
    --accent: #f36b45;
    --accent-2: #1b9aaa;
    --accent-3: #f4c247;
    --paper: #f5f1e9;
    --panel: #ffffff;
    --shadow: 0 24px 55px rgba(11, 27, 40, 0.14);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    background: radial-gradient(circle at top left, rgba(27, 154, 170, 0.2), transparent 45%),
        radial-gradient(circle at 90% 10%, rgba(243, 107, 69, 0.15), transparent 50%),
        linear-gradient(180deg, #f7f4ee 0%, #efe9df 100%);
    color: var(--ink);
}

a {
    color: inherit;
    text-decoration: none;
}

.portal-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 24px 48px;
}

.sidebar {
    background: var(--ink);
    color: #f8f6f1;
    border-radius: var(--radius-lg);
    padding: 24px 18px;
    display: grid;
    gap: 22px;
    position: sticky;
    top: 24px;
    height: fit-content;
    box-shadow: 0 20px 40px rgba(11, 27, 40, 0.2);
}

.sidebar-brand {
    font-family: "Fraunces", serif;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand span {
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 8px;
    border-radius: 999px;
}

.nav-list {
    display: grid;
    gap: 10px;
}

.nav-list a {
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 500;
    color: #e8e5df;
    transition: background 0.2s ease;
}

.nav-list a.active,
.nav-list a:hover {
    background: rgba(255, 255, 255, 0.14);
}

.sidebar-panel {
    background: rgba(255, 255, 255, 0.08);
    padding: 14px;
    border-radius: 14px;
    font-size: 0.9rem;
    display: grid;
    gap: 10px;
}

.sidebar-panel .btn {
    background: #f8f6f1;
    color: var(--ink);
    border-radius: 12px;
    padding: 10px 12px;
    text-align: center;
    font-weight: 600;
}

.main {
    display: grid;
    gap: 24px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.topbar h1 {
    font-family: "Fraunces", serif;
    margin: 0;
}

.search {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--panel);
    border-radius: 999px;
    padding: 10px 16px;
    box-shadow: 0 18px 35px rgba(11, 27, 40, 0.1);
}

.search input {
    border: none;
    outline: none;
    background: transparent;
    min-width: 200px;
    font-size: 0.95rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

.btn.primary {
    background: var(--ink);
    color: #fff;
}

.btn.ghost {
    background: transparent;
    border: 1px solid rgba(11, 27, 40, 0.2);
}

.card {
    background: var(--panel);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.stat {
    display: grid;
    gap: 8px;
}

.stat h3 {
    margin: 0;
    font-size: 1.6rem;
}

.stat .trend {
    font-size: 0.85rem;
    color: var(--accent);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.table th,
.table td {
    text-align: left;
    padding: 12px 0;
    border-bottom: 1px solid rgba(11, 27, 40, 0.08);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge.green {
    background: rgba(27, 154, 170, 0.18);
    color: #0b6b75;
}

.badge.amber {
    background: rgba(244, 194, 71, 0.2);
    color: #8a6a16;
}

.badge.red {
    background: rgba(243, 107, 69, 0.18);
    color: #b0472f;
}

.pipeline {
    display: grid;
    gap: 12px;
}

.pipeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(11, 27, 40, 0.04);
    border-radius: 12px;
    padding: 12px;
}

.progress {
    height: 8px;
    background: rgba(11, 27, 40, 0.1);
    border-radius: 999px;
    overflow: hidden;
}

.progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    border-radius: inherit;
}

.notice {
    background: linear-gradient(135deg, rgba(27, 154, 170, 0.2), rgba(244, 194, 71, 0.18));
    padding: 16px;
    border-radius: 16px;
    font-size: 0.95rem;
}

.list {
    display: grid;
    gap: 12px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(11, 27, 40, 0.04);
}

.login-wrap {
    max-width: 520px;
    margin: 80px auto;
    padding: 24px;
    background: var(--panel);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.login-wrap h1 {
    font-family: "Fraunces", serif;
}

.form {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.form label {
    font-size: 0.9rem;
    color: var(--muted);
}

.form input {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(11, 27, 40, 0.12);
    font-size: 1rem;
}

.form .btn {
    margin-top: 8px;
}

.alert {
    background: rgba(243, 107, 69, 0.12);
    color: #8b3e2a;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.95rem;
}

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(11, 27, 40, 0.06);
    border-radius: 999px;
    font-weight: 600;
}

@media (max-width: 980px) {
    .portal-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 680px) {
    .search {
        width: 100%;
    }

    .search input {
        min-width: 0;
        width: 100%;
    }
}
