@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #f6f1e8;
    --bg-alt: #efe4d4;
    --surface: rgba(255, 251, 246, 0.92);
    --surface-strong: #fffaf3;
    --surface-soft: #f1e7da;
    --text: #2c241f;
    --muted: #6d5c50;
    --line: rgba(114, 89, 71, 0.16);
    --line-strong: rgba(114, 89, 71, 0.26);
    --primary: #2e6f5e;
    --primary-strong: #214f43;
    --accent: #c46b49;
    --accent-strong: #a45436;
    --gold: #c9a25f;
    --danger: #c95f4a;
    --success: #4f8a6a;
    --warning: #b6883f;
    --info: #5d7ea5;
    --shadow-lg: 0 24px 60px rgba(90, 67, 48, 0.12);
    --shadow-md: 0 14px 28px rgba(90, 67, 48, 0.08);
    --radius-xl: 30px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    font-family: 'Plus Jakarta Sans', Arial, sans-serif;
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(196, 107, 73, 0.14), transparent 24%),
        radial-gradient(circle at top right, rgba(46, 111, 94, 0.12), transparent 26%),
        linear-gradient(180deg, #f8f3eb 0%, #f4ece1 48%, #f7f2ea 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(10px);
}

body::before {
    top: 72px;
    right: -110px;
    width: 260px;
    height: 260px;
    background: rgba(201, 162, 95, 0.12);
}

body::after {
    left: -120px;
    bottom: 60px;
    width: 300px;
    height: 300px;
    background: rgba(46, 111, 94, 0.08);
}

body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 26px;
}

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

.app-shell,
.login-shell {
    width: min(1180px, calc(100% - 48px));
    margin: 26px auto 54px;
}

.login-shell {
    max-width: 1160px;
}

.site-sidebar {
    position: fixed;
    top: 18px;
    left: 18px;
    bottom: 18px;
    z-index: 1030;
    width: 296px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 28px;
    background: rgba(255, 250, 243, 0.92);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.42);
}

.sidebar-brand img,
.logo-login {
    width: 72px;
    height: 72px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.brand-title {
    display: block;
    font-size: 0.96rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--primary-strong);
    line-height: 1.1;
}

.brand-subtitle {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.35;
}

.sidebar-section {
    display: grid;
    gap: 12px;
}

.sidebar-caption {
    padding: 0 10px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.sidebar-nav {
    display: grid;
    gap: 8px;
}

.nav-chip,
.quick-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 18px;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.nav-chip:hover,
.quick-link:hover {
    background: rgba(46, 111, 94, 0.08);
    border-color: rgba(46, 111, 94, 0.12);
    color: var(--primary-strong);
}

.nav-chip-active {
    background: linear-gradient(135deg, rgba(46, 111, 94, 0.12), rgba(201, 162, 95, 0.1));
    border-color: rgba(46, 111, 94, 0.16);
    color: var(--primary-strong);
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(196, 107, 73, 0.16);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(196, 107, 73, 0.08), rgba(201, 162, 95, 0.12));
    color: var(--text);
    font-weight: 700;
}

.user-pill i {
    font-size: 1.3rem;
    color: var(--accent);
}

.user-pill small {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 12px;
}

.app-shell {
    width: auto;
    margin: 18px 22px 40px 336px;
}

.page-hero,
.dashboard-hero,
.login-panel,
.content-card,
.metric-card,
.action-card,
.insight-card,
.timeline-card,
.banner-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(255, 251, 246, 0.96), rgba(248, 241, 232, 0.92));
    box-shadow: var(--shadow-lg);
}

.page-hero::before,
.dashboard-hero::before,
.login-panel::before,
.content-card::before,
.metric-card::before,
.action-card::before,
.insight-card::before,
.timeline-card::before,
.banner-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at right top, rgba(196, 107, 73, 0.08), transparent 24%),
        radial-gradient(circle at left bottom, rgba(46, 111, 94, 0.08), transparent 26%);
    pointer-events: none;
}

.page-hero > *,
.dashboard-hero > *,
.login-panel > *,
.content-card > *,
.metric-card > *,
.action-card > *,
.insight-card > *,
.timeline-card > *,
.banner-panel > * {
    position: relative;
    z-index: 1;
}

.page-hero,
.dashboard-hero {
    padding: 38px;
    margin-bottom: 24px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 14px;
    border: 1px solid rgba(196, 107, 73, 0.14);
    border-radius: 999px;
    background: rgba(196, 107, 73, 0.08);
    color: var(--accent-strong);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.dashboard-title,
.page-title {
    margin: 0;
    font-size: clamp(2.2rem, 4vw, 4.2rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.05em;
    color: var(--primary-strong);
}

.page-title-sm {
    font-size: 2.05rem;
}

.dashboard-subtitle,
.page-subtitle {
    margin: 14px 0 0;
    max-width: 760px;
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.hero-highlight {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    padding: 13px 17px;
    border: 1px solid rgba(46, 111, 94, 0.12);
    border-radius: var(--radius-md);
    background: rgba(46, 111, 94, 0.08);
    color: var(--primary-strong);
    font-weight: 700;
}

.btn {
    border-radius: 16px;
    font-weight: 800;
    padding: 0.78rem 1.18rem;
    letter-spacing: -0.01em;
}

.btn-primary,
.btn-success {
    border: none;
    background: linear-gradient(135deg, var(--primary), #3d8a75);
    color: #fffaf4;
    box-shadow: 0 12px 24px rgba(46, 111, 94, 0.18);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-success:hover,
.btn-success:focus {
    background: linear-gradient(135deg, var(--primary-strong), #2b6757);
    color: #fffaf4;
}

.btn-outline-primary,
.btn-secondary,
.btn-light {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.5);
    color: var(--text);
}

.btn-outline-primary:hover,
.btn-secondary:hover,
.btn-light:hover {
    border-color: rgba(46, 111, 94, 0.18);
    background: rgba(46, 111, 94, 0.08);
    color: var(--primary-strong);
}

.btn-warning {
    border: none;
    background: linear-gradient(135deg, #f3d082, #d9a859);
    color: #4c3621;
}

.btn-info {
    border: none;
    background: linear-gradient(135deg, #8fb1d6, #6b8db6);
    color: #fff;
}

.btn-danger {
    border: none;
    background: linear-gradient(135deg, #d77d66, #c45f49);
    color: #fff;
}

.login-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 420px);
    gap: 24px;
    align-items: stretch;
}

.login-showcase {
    position: relative;
    overflow: hidden;
    padding: 42px;
    border: 1px solid rgba(46, 111, 94, 0.1);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at top right, rgba(196, 107, 73, 0.18), transparent 22%),
        linear-gradient(145deg, #f8f2e9, #ece1d1);
    box-shadow: var(--shadow-lg);
}

.login-showcase::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -90px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(46, 111, 94, 0.08);
}

.login-showcase h1 {
    margin: 18px 0 14px;
    font-size: clamp(2.25rem, 4vw, 4rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.05em;
    color: var(--primary-strong);
}

.login-showcase p {
    max-width: 540px;
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--muted);
}

.feature-list {
    display: grid;
    gap: 14px;
    margin-top: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.45);
}

.feature-item i {
    color: var(--accent);
    font-size: 1.2rem;
}

.login-panel {
    padding: 34px 28px;
}

.login-panel .form-label,
.content-card .form-label,
.modal-body label {
    font-weight: 700;
    color: var(--text);
}

.form-control,
.form-select,
textarea,
select {
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0.88rem 1rem;
    background: rgba(255, 255, 255, 0.72);
    color: var(--text);
}

textarea.form-control {
    min-height: 120px;
}

.form-control::placeholder,
textarea::placeholder {
    color: #8c7d72;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus,
textarea:focus,
select:focus {
    border-color: rgba(46, 111, 94, 0.28);
    box-shadow: 0 0 0 0.25rem rgba(46, 111, 94, 0.12);
    background: #fffdf9;
    color: var(--text);
}

select option {
    background: #fffaf3;
    color: var(--text);
}

.form-check-input {
    border-color: rgba(114, 89, 71, 0.24);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.content-card,
.metric-card,
.action-card,
.insight-card,
.timeline-card,
.banner-panel {
    padding: 26px;
    margin-bottom: 22px;
}

.section-title {
    margin: 0 0 8px;
    font-size: 1.16rem;
    font-weight: 800;
    color: var(--primary-strong);
}

.section-subtitle {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.section-header,
.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.toolbar-search {
    max-width: 320px;
    width: 100%;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(109, 92, 80, 0.03);
    --bs-table-hover-bg: rgba(46, 111, 94, 0.06);
    margin-bottom: 0;
    color: var(--text);
}

.table thead th {
    border-bottom: 1px solid var(--line-strong);
    border-top: none;
    background: rgba(241, 231, 218, 0.65) !important;
    color: var(--accent-strong);
    font-size: 0.77rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.table tbody td {
    border-color: var(--line);
    vertical-align: middle;
}

.toast-container {
    position: fixed;
    top: 96px;
    right: 22px;
    z-index: 1200;
}

.toast {
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 18px;
    background: rgba(255, 250, 243, 0.96) !important;
    color: var(--text);
}

.metrics-grid,
.highlight-banner,
.insights-grid,
.actions-grid {
    display: grid;
    gap: 18px;
}

.metrics-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.highlight-banner,
.insights-grid {
    grid-template-columns: 1.15fr 0.85fr;
}

.actions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card {
    min-height: 215px;
}

.metric-icon {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    font-size: 1.35rem;
    margin-bottom: 18px;
    color: #fffaf5;
}

.metric-icon-blue {
    background: linear-gradient(135deg, #5d7ea5, #7f9bc0);
}

.metric-icon-green {
    background: linear-gradient(135deg, #2e6f5e, #4f8a6a);
}

.metric-icon-red {
    background: linear-gradient(135deg, #c46b49, #d98a60);
}

.metric-icon-yellow {
    background: linear-gradient(135deg, #c9a25f, #ddb97e);
}

.metric-icon-dark {
    background: linear-gradient(135deg, #6d5c50, #8a7868);
}

.metric-label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.9rem;
}

.metric-value {
    margin: 0;
    font-size: 2.35rem;
    font-weight: 800;
    line-height: 1;
    color: var(--primary-strong);
}

.metric-note {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.banner-panel {
    background: linear-gradient(140deg, #fff8ef, #f1e4d3);
}

.status-list {
    display: grid;
    gap: 16px;
}

.status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.progress-soft {
    height: 10px;
    margin-top: 10px;
    border-radius: 999px;
    background: rgba(109, 92, 80, 0.08);
    overflow: hidden;
}

.progress-soft > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #6ca190);
}

.progress-soft > span.progress-warning {
    background: linear-gradient(90deg, var(--gold), var(--accent));
}

.list-clean {
    margin: 0;
    padding: 0;
    list-style: none;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-title {
    margin: 0 0 6px;
    font-weight: 800;
}

.activity-meta {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.status-badge-soft,
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: none;
    font-size: 0.8rem;
    font-weight: 800;
}

.status-danger,
.bg-danger {
    background: rgba(201, 95, 74, 0.12) !important;
    color: #a34a37 !important;
}

.status-warning,
.bg-warning {
    background: rgba(182, 136, 63, 0.14) !important;
    color: #8e682a !important;
}

.status-success,
.bg-success {
    background: rgba(79, 138, 106, 0.12) !important;
    color: #38684e !important;
}

.status-info,
.bg-info,
.bg-primary {
    background: rgba(93, 126, 165, 0.12) !important;
    color: #486588 !important;
}

.bg-secondary {
    background: rgba(109, 92, 80, 0.1) !important;
    color: #5d4d42 !important;
}

.quick-link {
    width: 100%;
    justify-content: space-between;
    padding: 18px 20px;
    border: 1px solid rgba(114, 89, 71, 0.1);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.48);
}

.quick-link strong {
    color: var(--primary-strong);
}

.modal-content {
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 24px;
    background: linear-gradient(180deg, #fffaf3, #f5ede2);
    box-shadow: var(--shadow-lg);
    color: var(--text);
}

.modal-header,
.modal-footer {
    border-color: var(--line);
}

.alert {
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.56);
    color: var(--text);
}

.text-muted-soft {
    color: var(--muted) !important;
}

.navbar-toggler {
    border-color: rgba(114, 89, 71, 0.14);
}

.navbar-toggler:focus {
    box-shadow: none;
}

@media (max-width: 1200px) {
    .metrics-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .site-sidebar {
        position: relative;
        top: auto;
        left: auto;
        bottom: auto;
        width: min(100% - 18px, 100%);
        margin: 18px auto 12px;
    }

    .sidebar-brand img {
        width: 56px;
        height: 56px;
    }

    .app-shell {
        width: min(100% - 18px, 100%);
        margin: 12px auto 40px;
    }

    .login-grid,
    .highlight-banner,
    .insights-grid {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 767px) {
    .site-sidebar,
    .app-shell,
    .login-shell {
        width: min(100% - 18px, 100%);
    }

    .site-sidebar {
        padding: 14px;
        border-radius: 24px;
    }

    .page-hero,
    .dashboard-hero,
    .login-showcase,
    .login-panel,
    .content-card,
    .metric-card,
    .action-card,
    .insight-card,
    .timeline-card,
    .banner-panel {
        padding: 22px;
        border-radius: 24px;
    }

    .metrics-grid,
    .actions-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-brand {
        align-items: flex-start;
    }

    .brand-subtitle {
        display: none;
    }

    .table-toolbar,
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-search {
        max-width: none;
    }
}
