:root {
    --color-primary: #0d5c63;
    --color-secondary: #456990;
    --color-success: #2f855a;
    --color-warning: #d69e2e;
    --color-danger: #c05621;
    --color-info: #2b6cb0;
    --neutral-50: #f7fafc;
    --neutral-100: #edf2f7;
    --neutral-200: #e2e8f0;
    --neutral-300: #cbd5e0;
    --neutral-500: #718096;
    --neutral-700: #2d3748;
    --neutral-800: #1f2937;
    --neutral-900: #111827;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 10px 30px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 24px 60px rgba(15, 23, 42, 0.1);
}

body {
    font-family: 'Manrope', sans-serif;
    background: linear-gradient(180deg, #f5f7fb 0%, #eef3f7 100%);
    color: var(--neutral-800);
}

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

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

.app-sidebar {
    background: linear-gradient(180deg, #102a43 0%, #0f172a 100%);
    color: #fff;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #38b2ac, #90cdf4);
    color: #102a43;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.sidebar-brand strong,
.sidebar-brand span,
.sidebar-label,
.sidebar-link,
.sidebar-link small {
    display: block;
}

.sidebar-brand span,
.sidebar-link small {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.82rem;
}

.sidebar-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 10px;
}

.sidebar-group {
    display: grid;
    gap: 10px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 16px;
    padding: 12px 14px;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    transition: transform 150ms ease, background-color 150ms ease;
}

.sidebar-link.active,
.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.09);
    transform: translateX(2px);
}

.sidebar-link.disabled {
    opacity: 0.7;
    cursor: default;
}

.app-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-navbar {
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(14px);
    padding: 18px 24px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.navbar-search {
    position: relative;
    align-items: center;
}

.navbar-search i {
    position: absolute;
    left: 14px;
    color: var(--neutral-500);
}

.navbar-search input {
    width: 320px;
    padding-left: 40px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.95);
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    padding: 8px 10px;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: linear-gradient(135deg, #63b3ed, #76e4f7);
    color: #102a43;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.app-content {
    padding: 28px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 18px;
}

.eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 10px;
    font-weight: 700;
}

.page-header h1 {
    margin: 0;
    font-weight: 800;
    color: var(--neutral-900);
}

.page-header p {
    margin: 8px 0 0;
    color: var(--neutral-500);
    max-width: 720px;
}

.app-breadcrumb {
    margin-bottom: 0;
}

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

.hero-panel,
.app-card,
.kpi-card,
.login-card,
.login-showcase {
    border: 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.hero-panel {
    background: radial-gradient(circle at top right, rgba(66, 153, 225, 0.24), transparent 36%), #0f172a;
    color: #fff;
    padding: 28px;
    display: grid;
    gap: 18px;
    min-height: 100%;
}

.hero-kicker {
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 700;
}

.hero-panel h2 {
    font-size: 2rem;
    line-height: 1.15;
    margin: 0;
    max-width: 640px;
}

.hero-panel p {
    color: rgba(255, 255, 255, 0.76);
    margin: 0;
}

.hero-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-chip-grid span {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 8px 14px;
    font-size: 0.88rem;
}

.app-card {
    background: rgba(255, 255, 255, 0.88);
}

.app-card .card-body {
    padding: 24px;
}

.section-title {
    font-weight: 800;
    font-size: 1rem;
    color: var(--neutral-900);
}

.quick-links {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--neutral-50);
    text-decoration: none;
    color: var(--neutral-800);
}

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

.kpi-card {
    background: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kpi-card span {
    display: block;
    color: var(--neutral-500);
    font-size: 0.88rem;
}

.kpi-card strong {
    display: block;
    font-size: 1.8rem;
    margin-top: 8px;
}

.kpi-card i {
    font-size: 1.8rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tone-primary i { background: rgba(13, 92, 99, 0.12); color: var(--color-primary); }
.tone-secondary i { background: rgba(69, 105, 144, 0.12); color: var(--color-secondary); }
.tone-success i { background: rgba(47, 133, 90, 0.12); color: var(--color-success); }
.tone-warning i { background: rgba(214, 158, 46, 0.14); color: var(--color-warning); }
.tone-danger i { background: rgba(192, 86, 33, 0.12); color: var(--color-danger); }
.tone-info i { background: rgba(43, 108, 176, 0.12); color: var(--color-info); }

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

.dt-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.btn-premium-export,
div.dt-buttons .btn-premium-export {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #0d5c63 0%, #2b6cb0 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(13, 92, 99, 0.22);
    transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.btn-premium-export:hover,
div.dt-buttons .btn-premium-export:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(13, 92, 99, 0.28);
    color: #fff;
}

.btn-premium-export:focus,
div.dt-buttons .btn-premium-export:focus {
    color: #fff;
    box-shadow: 0 0 0 0.25rem rgba(43, 108, 176, 0.22);
}

.btn-premium-export i {
    font-size: 1rem;
}

.alert-stack {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.alert-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, #fff7ed 0%, #fffbeb 100%);
}

.alert-card span {
    display: block;
    color: var(--neutral-500);
    font-size: 0.88rem;
}

.alert-card.alert-critical {
    background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
}

.alert-card.alert-warning {
    background: linear-gradient(180deg, #fff7ed 0%, #fffbeb 100%);
}

.alert-card a {
    display: inline-block;
    margin-top: 4px;
    text-decoration: none;
}

.alert-card a:hover {
    text-decoration: underline;
}

.empty-mini {
    padding: 16px;
    border-radius: 14px;
    background: var(--neutral-50);
    color: var(--neutral-500);
}

.modal-subtitle {
    color: var(--neutral-500);
    font-size: 0.92rem;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 28px 28px;
    color: var(--neutral-500);
    font-size: 0.9rem;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top left, rgba(13, 92, 99, 0.18), transparent 32%),
        radial-gradient(circle at bottom right, rgba(69, 105, 144, 0.18), transparent 28%),
        #f3f7fb;
}

.login-shell {
    width: min(1120px, calc(100vw - 32px));
    display: grid;
    grid-template-columns: 1.2fr 0.9fr;
    gap: 24px;
}

.login-showcase {
    background: linear-gradient(160deg, #102a43 0%, #0f172a 100%);
    color: #fff;
    padding: 40px;
}

.login-showcase h1 {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    line-height: 1;
    margin: 0 0 16px;
}

.login-showcase p {
    max-width: 560px;
    color: rgba(255, 255, 255, 0.74);
}

.login-metrics {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.login-metrics article {
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    padding: 16px;
}

.login-metrics strong,
.login-metrics span {
    display: block;
}

.login-metrics span {
    color: rgba(255, 255, 255, 0.65);
}

.login-card {
    background: rgba(255, 255, 255, 0.92);
    padding: 32px;
}

.login-card-header h2 {
    margin: 0;
    font-weight: 800;
}

.login-card-header p,
.login-hint {
    color: var(--neutral-500);
}

.login-form {
    margin-top: 24px;
}

.login-hint {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--neutral-200);
    font-size: 0.92rem;
}

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

    .app-sidebar {
        display: none;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .app-content {
        padding: 20px;
    }

    .page-header,
    .toolbar,
    .app-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar-search input {
        width: 220px;
    }
}
