:root {
    --bg: #f5f1e8;
    --surface: #ffffff;
    --surface-soft: #fbf8f1;
    --primary: #0f5d5e;
    --primary-dark: #0b4445;
    --accent: #d98b30;
    --text: #1e2a2f;
    --muted: #66737a;
    --border: rgba(15, 93, 94, 0.12);
    --shadow: 0 18px 40px rgba(16, 37, 43, 0.08);
    --radius: 1.2rem;
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(217, 139, 48, 0.18), transparent 30%),
        radial-gradient(circle at bottom left, rgba(15, 93, 94, 0.16), transparent 28%),
        var(--bg);
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
}

.eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.auth-page {
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
}

.auth-shell {
    width: 100%;
    max-width: 460px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    padding: 2rem;
}

.auth-brand h1 {
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.auth-brand p {
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.portal-page {
    margin: 0;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #0f5d5e 0%, #0a3235 100%);
    color: #fff;
    padding: 2rem 1.25rem;
    position: sticky;
    top: 0;
    min-height: 100vh;
}

.sidebar-brand {
    margin-bottom: 2rem;
}

.sidebar-kicker {
    display: block;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.74rem;
    margin-bottom: 0.5rem;
}

.sidebar-brand h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0;
}

.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.78);
    border-radius: 0.9rem;
    padding: 0.85rem 1rem;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

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

.content-area {
    flex: 1;
    padding: 1.25rem;
}

.topbar {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--border);
    border-radius: 1.1rem;
    box-shadow: var(--shadow);
}

.page-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
}

.page-subtitle {
    color: var(--muted);
}

.page-body {
    padding-left: 0;
    padding-right: 0;
}

.sidebar-toggle {
    display: none;
}

.detail-card,
.stat-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.stat-card span {
    color: var(--muted);
    display: block;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.stat-card p,
.detail-card p {
    color: var(--muted);
}

.detail-card h2,
.detail-card h3 {
    font-weight: 800;
}

.section-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.onboarding-tabs {
    gap: 0.75rem;
    flex-wrap: wrap;
}

.onboarding-tabs .nav-link {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 700;
}

.onboarding-tabs .nav-link.active {
    background: var(--primary);
    color: #fff;
}

.card {
    border-radius: var(--radius);
    overflow: hidden;
}

.card-header,
.card-footer {
    padding: 1.35rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

.form-control,
.form-select {
    border-radius: 0.9rem;
    border: 1px solid rgba(23, 53, 56, 0.14);
    min-height: 48px;
}

textarea.form-control {
    min-height: auto;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(15, 93, 94, 0.42);
    box-shadow: 0 0 0 0.2rem rgba(15, 93, 94, 0.13);
}

.btn {
    border-radius: 0.9rem;
    font-weight: 700;
    min-height: 46px;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.progress {
    height: 1rem;
    border-radius: 999px;
    background: rgba(15, 93, 94, 0.08);
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    font-weight: 700;
}

.table {
    --bs-table-bg: transparent;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.file-meta {
    font-size: 0.88rem;
}

.list-group-item {
    background: transparent;
    border-color: var(--border);
}

.alert {
    border-radius: 1rem;
}

@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        left: -100%;
        width: min(300px, 86vw);
        z-index: 1050;
        transition: left 0.25s ease;
    }

    .app-shell.sidebar-open .sidebar {
        left: 0;
    }

    .content-area {
        width: 100%;
    }

    .sidebar-toggle {
        display: inline-flex;
    }
}

@media (max-width: 767.98px) {
    .auth-card,
    .detail-card,
    .stat-card {
        padding: 1.2rem;
    }

    .topbar {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .page-title {
        font-size: 1.3rem;
    }
}
