:root {
    --sw-primary: #02628f;
    --sw-primary-dark: #014a6c;
    --sw-primary-deep: #08364c;
    --sw-primary-soft: #eaf4fb;
    --sw-primary-light: #69add0;
    --sw-secondary: #f39128;
    --sw-secondary-hover: #dd7f19;
    --sw-secondary-soft: #fff1e2;
    --sw-background: #f5f7f9;
    --sw-surface: #ffffff;
    --sw-surface-secondary: #eef2f5;
    --sw-text-primary: #263238;
    --sw-text-secondary: #697780;
    --sw-text-muted: #8b98a1;
    --sw-border: #dde3e8;
    --sw-success: #1f9d68;
    --sw-success-soft: #e8f7f0;
    --sw-warning: #d99a20;
    --sw-warning-soft: #fff6de;
    --sw-danger: #d64545;
    --sw-danger-soft: #fdecec;
    --sw-info: #298bc8;
    --sw-info-soft: #eaf4fb;
    --sw-radius-sm: 6px;
    --sw-radius-md: 10px;
    --sw-radius-lg: 16px;
    --sw-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --sw-shadow-md: 0 8px 24px rgba(0, 74, 108, 0.08);
    --sw-shadow-lg: 0 18px 42px rgba(0, 74, 108, 0.14);
    --sw-sidebar-width: 264px;
    --sw-sidebar-collapsed-width: 78px;
    --sw-header-height: 68px;
}

* {
    letter-spacing: 0;
}

body {
    min-height: 100vh;
    background: var(--sw-background);
    color: var(--sw-text-primary);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
}

a {
    color: var(--sw-primary);
}

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

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

.sw-sidebar {
    background: linear-gradient(180deg, var(--sw-primary-dark), var(--sw-primary-deep));
    bottom: 0;
    color: #fff;
    display: flex;
    flex-direction: column;
    left: 0;
    position: fixed;
    top: 0;
    width: var(--sw-sidebar-width);
    z-index: 1040;
}

.sw-sidebar-brand {
    align-items: center;
    display: flex;
    gap: 12px;
    min-height: var(--sw-header-height);
    padding: 14px 18px;
}

.sw-sidebar-logo {
    align-items: center;
    background: #fff;
    border-radius: 12px;
    display: inline-flex;
    height: 42px;
    justify-content: center;
    min-width: 42px;
}

.sw-sidebar-logo img {
    max-height: 30px;
    max-width: 34px;
}

.sw-brand-text {
    line-height: 1.15;
}

.sw-brand-name {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.sw-brand-subtitle {
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
}

.sw-sidebar-nav {
    overflow-y: auto;
    padding: 8px 12px 18px;
}

.sw-nav-section {
    margin-top: 16px;
}

.sw-nav-heading {
    color: rgba(255, 255, 255, 0.52);
    font-size: 11px;
    font-weight: 700;
    margin: 0 10px 8px;
    text-transform: uppercase;
}

.sw-nav-link {
    align-items: center;
    border-radius: var(--sw-radius-md);
    color: rgba(255, 255, 255, 0.82);
    display: flex;
    gap: 12px;
    min-height: 40px;
    padding: 9px 10px;
    text-decoration: none;
}

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

.sw-nav-link.active {
    box-shadow: inset 3px 0 0 var(--sw-secondary);
}

.sw-nav-link i {
    color: var(--sw-primary-light);
    font-size: 18px;
    min-width: 22px;
    text-align: center;
}

.sw-nav-link.active i {
    color: var(--sw-secondary);
}

.sw-main {
    margin-left: var(--sw-sidebar-width);
    min-height: 100vh;
}

.sw-topbar {
    align-items: center;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--sw-border);
    display: flex;
    gap: 18px;
    min-height: var(--sw-header-height);
    padding: 12px 28px;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.sw-content {
    padding: 24px 28px 34px;
}

.sw-icon-button {
    align-items: center;
    background: #fff;
    border: 1px solid var(--sw-border);
    border-radius: var(--sw-radius-md);
    color: var(--sw-text-primary);
    display: inline-flex;
    height: 42px;
    justify-content: center;
    min-width: 42px;
}

.sw-global-search {
    flex: 1 1 auto;
    max-width: 620px;
    position: relative;
}

.sw-global-search i {
    color: var(--sw-text-muted);
    left: 14px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.sw-global-search input {
    background: var(--sw-surface-secondary);
    border: 1px solid transparent;
    border-radius: 999px;
    min-height: 42px;
    padding-left: 42px;
}

.sw-global-search input:focus {
    background: #fff;
    border-color: var(--sw-primary-light);
    box-shadow: 0 0 0 0.2rem rgba(2, 98, 143, 0.12);
}

.sw-user-chip {
    align-items: center;
    display: flex;
    gap: 10px;
}

.sw-avatar {
    align-items: center;
    background: var(--sw-primary-soft);
    border: 1px solid var(--sw-border);
    border-radius: 50%;
    color: var(--sw-primary-dark);
    display: inline-flex;
    font-weight: 700;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.sw-page-hero {
    background:
        radial-gradient(circle at 92% 18%, rgba(243, 145, 40, 0.18), transparent 24%),
        linear-gradient(135deg, var(--sw-primary-dark), var(--sw-primary));
    border-radius: var(--sw-radius-lg);
    box-shadow: var(--sw-shadow-md);
    color: #fff;
    overflow: hidden;
    padding: 24px;
    position: relative;
}

.sw-page-hero::after {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    content: "";
    height: 150px;
    position: absolute;
    right: -52px;
    top: -72px;
    width: 240px;
}

.sw-page-title {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 750;
    margin: 0;
}

.sw-page-subtitle {
    color: rgba(255, 255, 255, 0.78);
    margin: 6px 0 0;
}

.sw-card,
.card,
.bg-white.border.rounded {
    background: var(--sw-surface) !important;
    border: 1px solid var(--sw-border) !important;
    border-radius: var(--sw-radius-lg) !important;
    box-shadow: var(--sw-shadow-sm);
}

.sw-card {
    padding: 20px;
}

.sw-kpi-card {
    border-left: 4px solid var(--sw-primary);
    min-height: 132px;
    padding: 18px;
}

.sw-kpi-card.warning {
    border-left-color: var(--sw-warning);
}

.sw-kpi-card.success {
    border-left-color: var(--sw-success);
}

.sw-kpi-card.danger {
    border-left-color: var(--sw-danger);
}

.sw-kpi-icon {
    align-items: center;
    background: var(--sw-primary-soft);
    border-radius: 12px;
    color: var(--sw-primary);
    display: inline-flex;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.sw-kpi-value {
    font-size: clamp(24px, 3vw, 31px);
    font-weight: 750;
    line-height: 1.1;
}

.sw-muted {
    color: var(--sw-text-secondary);
}

.btn {
    border-radius: var(--sw-radius-md);
    font-weight: 650;
    min-height: 38px;
}

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

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

.btn-warning,
.btn-accent {
    background: var(--sw-secondary);
    border-color: var(--sw-secondary);
    color: #fff;
}

.btn-warning:hover,
.btn-accent:hover {
    background: var(--sw-secondary-hover);
    border-color: var(--sw-secondary-hover);
    color: #fff;
}

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

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

.form-control,
.form-select {
    border-color: var(--sw-border);
    border-radius: var(--sw-radius-md);
    min-height: 42px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--sw-primary-light);
    box-shadow: 0 0 0 0.2rem rgba(2, 98, 143, 0.12);
}

.badge {
    border-radius: 999px;
    font-weight: 700;
    padding: 0.42em 0.68em;
}

.table {
    color: var(--sw-text-primary);
}

.table thead th {
    background: var(--sw-surface-secondary);
    border-bottom: 1px solid var(--sw-border);
    color: var(--sw-text-secondary);
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
}

.alert {
    border: 0;
    border-radius: var(--sw-radius-lg);
    box-shadow: var(--sw-shadow-sm);
}

.alert-success {
    background: var(--sw-success-soft);
    color: #12613f;
}

.alert-danger {
    background: var(--sw-danger-soft);
    color: #8c2626;
}

.sw-login-page {
    background:
        radial-gradient(circle at 12% 14%, rgba(105, 173, 208, 0.42), transparent 24%),
        linear-gradient(135deg, #f7fbfd 0%, #eef5f8 100%);
}

.sw-login-shell {
    min-height: 100vh;
}

.sw-login-brand {
    background:
        radial-gradient(circle at 82% 16%, rgba(243, 145, 40, 0.42), transparent 20%),
        linear-gradient(145deg, var(--sw-primary-dark), var(--sw-primary));
    color: #fff;
    min-height: 100vh;
    padding: 44px;
}

.sw-login-card {
    max-width: 460px;
    width: 100%;
}

.sw-login-logo {
    align-items: center;
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--sw-shadow-md);
    display: inline-flex;
    justify-content: center;
    padding: 14px 16px;
}

.sw-empty {
    background: var(--sw-surface-secondary);
    border: 1px dashed var(--sw-border);
    border-radius: var(--sw-radius-lg);
    color: var(--sw-text-secondary);
    padding: 22px;
    text-align: center;
}

body.sw-sidebar-collapsed .sw-sidebar {
    width: var(--sw-sidebar-collapsed-width);
}

body.sw-sidebar-collapsed .sw-main {
    margin-left: var(--sw-sidebar-collapsed-width);
}

body.sw-sidebar-collapsed .sw-brand-text,
body.sw-sidebar-collapsed .sw-nav-heading,
body.sw-sidebar-collapsed .sw-nav-text {
    display: none;
}

body.sw-sidebar-collapsed .sw-sidebar-brand {
    justify-content: center;
    padding-left: 10px;
    padding-right: 10px;
}

body.sw-sidebar-collapsed .sw-nav-link {
    justify-content: center;
}

body.sw-sidebar-collapsed .sw-nav-link.active {
    box-shadow: inset 0 -3px 0 var(--sw-secondary);
}

@media (max-width: 991.98px) {
    .sw-sidebar {
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    body.sw-sidebar-open .sw-sidebar {
        transform: translateX(0);
    }

    .sw-main,
    body.sw-sidebar-collapsed .sw-main {
        margin-left: 0;
    }

    .sw-topbar {
        padding: 12px 16px;
    }

    .sw-content {
        padding: 18px 16px 28px;
    }

    .sw-global-search {
        display: none;
    }

    .sw-user-chip .sw-user-name {
        display: none;
    }

    .sw-login-brand {
        min-height: auto;
        padding: 32px 24px;
    }

    .table-responsive {
        border: 0;
    }
}

@media (max-width: 575.98px) {
    .sw-page-hero {
        padding: 20px;
    }

    .btn {
        min-height: 44px;
    }

    .sw-kpi-card {
        min-height: auto;
    }
}
