:root {
    --bg-main: #f6f7fb;
    --bg-card: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --brand: #0f766e;
    --brand-dark: #115e59;
    --border-soft: #e5e7eb;
    --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(1000px 600px at 0% -20%, rgba(15, 118, 110, 0.18), transparent),
        radial-gradient(700px 400px at 90% 10%, rgba(6, 182, 212, 0.10), transparent),
        var(--bg-main);
    animation: pageFadeIn 420ms ease-out;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 270px 1fr;
}

.sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, #0f172a, #1e293b);
    color: #e5e7eb;
    position: sticky;
    top: 0;
}

.brand-logo {
    max-width: 160px;
    max-height: 56px;
    object-fit: contain;
}

.sidebar .nav-link {
    color: #cbd5e1;
    border-radius: 10px;
    padding: 9px 10px;
    font-size: 14px;
    transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateX(3px);
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.8), rgba(6, 182, 212, 0.8));
    color: #fff;
    font-weight: 600;
}

.content-wrap {
    min-height: 100vh;
}

.card-soft {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
    transition: transform 190ms ease, box-shadow 190ms ease;
    animation: cardIn 360ms ease both;
}

.card-soft:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.10);
}

.card-kpi h6 {
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 12px;
}

.table > :not(caption) > * > * {
    border-bottom-color: #eef2f7;
}

.table tbody tr {
    transition: background 160ms ease, transform 160ms ease;
}

.table tbody tr:hover {
    background: #f8fafc;
    transform: scale(1.002);
}

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    transition: transform 140ms ease, box-shadow 140ms ease;
}

.btn-primary:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(15, 118, 110, 0.25);
}

.badge.text-bg-secondary {
    background: #0f172a !important;
}

.form-control,
.form-select,
.btn {
    transition: all 160ms ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 0.18rem rgba(20, 184, 166, 0.18);
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .sidebar {
        min-height: auto;
        position: relative;
    }
}
