:root {
    --sw-primary: #5aa57f;
    --sw-secondary: #1e4950;
    --sw-accent: #0e305d;
    --sw-primary-light: #7bc99f;
    --sw-primary-dark: #3d8a66;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f0f4f8;
}

.sw-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, var(--sw-accent) 0%, var(--sw-secondary) 100%);
    z-index: 1050;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sw-sidebar .brand {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sw-sidebar .brand .brand-icon {
    width: 40px;
    height: 40px;
    background: var(--sw-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}

.sw-sidebar .brand .brand-text {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
}

.sw-sidebar .brand .brand-text span {
    color: var(--sw-primary-light);
}

.sw-sidebar .nav-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.3);
    padding: 16px 20px 6px;
    font-weight: 600;
}

.sw-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 10px 20px;
    font-weight: 500;
    font-size: 14px;
    border-radius: 0;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.sw-sidebar .nav-link:hover,
.sw-sidebar .nav-link.active {
    background: rgba(90, 165, 127, 0.2);
    color: #fff;
}

.sw-sidebar .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.sw-sidebar .nav-link .arrow {
    margin-left: auto;
    transition: transform 0.3s;
    font-size: 12px;
}

.sw-sidebar .nav-link[aria-expanded="true"] .arrow {
    transform: rotate(180deg);
}

.sw-sidebar .collapse .nav-link {
    padding-left: 52px;
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
}

.sw-sidebar .collapse .nav-link:hover,
.sw-sidebar .collapse .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.sw-sidebar .collapse .collapse .nav-link {
    padding-left: 72px;
    font-size: 12px;
}

.sw-sidebar .sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: auto;
}

.sw-sidebar .sidebar-footer .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--sw-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.sw-sidebar .sidebar-footer .user-name {
    color: #fff;
    font-weight: 500;
    font-size: 14px;
}

.sw-sidebar .sidebar-footer .user-role {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

.sw-main {
    margin-left: 260px;
    min-height: 100vh;
}

.sw-header {
    background: #fff;
    border-bottom: 1px solid #e8edf3;
    padding: 0 28px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.sw-header .page-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--sw-secondary);
}

.sw-header .page-title small {
    font-weight: 400;
    font-size: 13px;
    color: #8a9aa8;
    margin-left: 8px;
}

.sw-header .header-btn {
    background: none;
    border: none;
    color: #5a6f7e;
    font-size: 18px;
    padding: 6px;
    border-radius: 8px;
    position: relative;
}

.sw-header .header-btn:hover {
    background: #f0f4f8;
}

.sw-header .header-btn .dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: #e74c3c;
    border-radius: 50%;
    border: 2px solid #fff;
}

.sw-header .header-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--sw-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}

.sw-header .header-avatar:hover {
    opacity: 0.85;
}

.sw-content {
    padding: 28px;
}

.table-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eef3f8;
    overflow: hidden;
}

.table-card .table-header {
    padding: 18px 24px;
    border-bottom: 1px solid #eef3f8;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.table-card .table-footer {
    padding: 14px 24px;
    border-top: 1px solid #eef3f8;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fafcfd;
}

.badge-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-status.completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-status.pending {
    background: #fff3e0;
    color: #e65100;
}

.badge-status.shipped {
    background: #e3f2fd;
    color: #0d47a1;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--sw-secondary);
    padding: 4px;
}

.sw-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1040;
}

.sw-overlay.show {
    display: block;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 22px 24px;
    border: 1px solid #eef3f8;
    height: 100%;
    transition: box-shadow 0.3s;
}

.stat-card:hover {
    box-shadow: 0 8px 32px rgba(14, 48, 93, 0.1);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    margin-bottom: 14px;
}

.stat-card .stat-icon.green {
    background: var(--sw-primary);
}

.stat-card .stat-icon.orange {
    background: #e67e22;
}

.stat-card .stat-icon.teal {
    background: var(--sw-secondary);
}

.stat-card .stat-icon.blue {
    background: var(--sw-accent);
}

.stat-card .stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--sw-secondary);
}

.stat-card .stat-label {
    font-size: 14px;
    color: #8a9aa8;
    font-weight: 500;
}

.stat-card .stat-change {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 6px;
}

.stat-card .stat-change.up {
    background: #e8f5e9;
    color: #2e7d32;
}

.stat-card .stat-change.down {
    background: #fce4ec;
    color: #c62828;
}

.stat-card .stat-change.neutral {
    background: #e3f2fd;
    color: #0d47a1;
}

.chart-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #eef3f8;
    height: 100%;
}

.chart-card .chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 140px;
    margin-top: 12px;
}

.chart-card .chart-bars .bar {
    flex: 1;
    border-radius: 6px 6px 0 0;
    min-height: 20px;
    background: var(--sw-primary);
    opacity: 0.7;
    transition: height 0.4s;
}

.chart-card .chart-bars .bar:nth-child(2) {
    background: var(--sw-secondary);
}

.chart-card .chart-bars .bar:nth-child(3) {
    background: var(--sw-accent);
}

.chart-card .chart-bars .bar:nth-child(4) {
    background: #e67e22;
}

.chart-card .chart-bars .bar:nth-child(5) {
    background: var(--sw-primary-light);
}

.chart-card .chart-bars .bar:nth-child(6) {
    background: var(--sw-secondary-light);
}

.chart-card .chart-bars .bar:nth-child(7) {
    background: var(--sw-accent-light);
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot.green {
    background: #2e7d32;
}

.status-dot.orange {
    background: #e65100;
}

.status-dot.red {
    background: #c62828;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--sw-secondary);
    padding: 4px;
}

@media (max-width: 992px) {
    .sw-sidebar {
        transform: translateX(-100%);
    }
    .sw-sidebar.show {
        transform: translateX(0);
    }
    .sw-main {
        margin-left: 0;
    }
    .hamburger {
        display: block;
    }
    .sw-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1040;
    }
    .sw-overlay.show {
        display: block;
    }
}

@media (max-width: 576px) {
    .sw-header {
        padding: 0 16px;
    }
    .sw-content {
        padding: 16px;
    }
    .sw-header .page-title small {
        display: none;
    }
    .stat-card .stat-number {
        font-size: 22px;
    }
}


/* ===== TOAST ===== */

.sw-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--sw-secondary);
    color: #fff;
    padding: 14px 24px;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    font-weight: 500;
    font-size: 14px;
    z-index: 9999;
    transform: translateY(80px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid var(--sw-primary);
}

.sw-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.sw-toast i {
    font-size: 18px;
    color: var(--sw-primary-light);
}

.auth-card {
    background: #fff;
    border-radius: var(--sw-radius);
    box-shadow: var(--sw-shadow);
    border: 1px solid #eef3f8;
    padding: 40px 36px;
    max-width: 420px;
    width: 100%;
    transition: all var(--sw-transition);
}

.auth-card:hover {
    box-shadow: var(--sw-shadow-hover);
}

.auth-card .auth-brand {
    text-align: center;
    margin-bottom: 28px;
}

.auth-card .auth-brand .brand-icon-lg {
    width: 56px;
    height: 56px;
    background: var(--sw-primary);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    font-weight: 800;
    box-shadow: 0 4px 16px rgba(90, 165, 127, 0.3);
    margin-bottom: 10px;
}

.auth-card .auth-brand h4 {
    font-weight: 700;
    color: var(--sw-secondary);
    margin: 0;
    letter-spacing: -0.5px;
}

.auth-card .auth-brand h4 span {
    color: var(--sw-primary);
}

.auth-card .auth-brand p {
    color: #8a9aa8;
    font-size: 14px;
    margin: 4px 0 0;
}

.auth-card .form-label {
    font-weight: 500;
    font-size: 13px;
    color: var(--sw-secondary);
}

.auth-card .form-control {
    border: 1.5px solid #e0e7ed;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    transition: all var(--sw-transition);
    background: #fafcfd;
}

.auth-card .form-control:focus {
    border-color: var(--sw-primary);
    box-shadow: 0 0 0 4px rgba(90, 165, 127, 0.12);
    background: #fff;
}

.auth-card .form-control.is-invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.12);
}

.auth-card .form-control.is-valid {
    border-color: var(--sw-primary);
    box-shadow: 0 0 0 4px rgba(90, 165, 127, 0.12);
}

.auth-card .invalid-feedback {
    font-size: 12px;
    margin-top: 4px;
}

.auth-card .btn-auth {
    background: var(--sw-primary);
    border: none;
    color: #fff;
    padding: 11px 0;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    width: 100%;
    transition: all var(--sw-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-card .btn-auth:hover {
    background: var(--sw-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(90, 165, 127, 0.35);
}

.auth-card .btn-auth:active {
    transform: translateY(0);
}

.auth-card .auth-link {
    color: var(--sw-primary);
    font-weight: 500;
    cursor: pointer;
    transition: color var(--sw-transition);
    text-decoration: none;
}

.auth-card .auth-link:hover {
    color: var(--sw-primary-dark);
    text-decoration: underline;
}

.auth-card .auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #b0c0ce;
    font-size: 12px;
    margin: 18px 0;
}

.auth-card .auth-divider::before,
.auth-card .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e7ed;
}

.auth-card .password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #8a9aa8;
    cursor: pointer;
    padding: 4px;
    font-size: 15px;
}

.auth-card .password-toggle:hover {
    color: var(--sw-secondary);
}

.auth-card .input-group {
    position: relative;
}

.auth-card .input-group .form-control {
    padding-right: 44px;
}

@media (max-width: 576px) {
    .auth-card {
        padding: 28px 20px;
        margin: 0 8px;
    }
}