:root {
    --primary: #16a34a;
    --primary-dark: #14532d;
    --primary-light: #22c55e;
    --accent: #10B981;
    --accent-light: #34D399;
    --gold: #D4A853;
    --gold-light: #F3E5AB;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #0284c7;
    --dark: #0F172A;
    --slate: #475569;
    --light: #F8FAFC;
    --white: #FFFFFF;
    --border-color: #E2E8F0;
    --sidebar-width: 260px;
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

body {
    font-family: var(--font-sans);
    background-color: var(--light);
    color: var(--dark);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ── Typography & Links ── */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--dark);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* ── Sidebar & Layout ── */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--primary-dark, #064e3b);
    color: #E2E8F0;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
}

.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(2px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.5px;
}

.sidebar-brand span {
    color: var(--gold);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 14px;
}

.nav-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748B;
    font-weight: 700;
    padding: 12px 14px 6px;
}

.nav-item-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: #94A3B8;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.nav-item-link i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
}

.nav-item-link:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(4px);
}

.nav-item-link.active {
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Main Content Area ── */
.main-content {
    flex: 1 1 0%;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: calc(100% - var(--sidebar-width));
    max-width: calc(100% - var(--sidebar-width));
    min-width: 0;
    overflow-x: hidden;
}

.topbar {
    height: 70px;
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 999;
}

.topbar-toggle {
    display: none;
    font-size: 1.4rem;
    color: var(--dark);
    cursor: pointer;
}

.content-body {
    padding: 30px;
    flex: 1;
}

/* ── Custom Cards & Badges ── */
.vtu-card {
    background: var(--white);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 24px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
    margin-bottom: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.vtu-card:hover {
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

.vtu-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
}

.stat-widget {
    background: var(--white);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.badge-custom {
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success { background: rgba(16, 185, 129, 0.12); color: #059669; }
.badge-warning { background: rgba(245, 158, 11, 0.12); color: #D97706; }
.badge-danger  { background: rgba(239, 68, 68, 0.12); color: #DC2626; }
.badge-info    { background: rgba(59, 130, 246, 0.12); color: #2563EB; }

/* ── Compact Service Grid Icons ── */
.service-icon-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 6px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--dark);
    height: 100%;
    min-height: 105px;
}

.service-icon-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.12);
    border-color: var(--primary);
    color: var(--primary);
}

.service-icon-circle {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.service-icon-box h6 {
    font-size: 0.80rem;
    font-weight: 700;
    margin-bottom: 2px;
    line-height: 1.2;
}

.service-icon-box small {
    font-size: 0.67rem;
    line-height: 1.1;
    display: block;
    color: #64748B;
}

/* ── Forms ── */
.form-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--slate);
    margin-bottom: 6px;
}

.form-control, .form-select {
    padding: 12px 16px;
    font-size: 0.95rem;
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    transition: all 0.2s;
    background-color: #FFFFFF;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

/* ── Tables & Responsive Scrolling ── */
.table-responsive {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.table-responsive > .table {
    margin-bottom: 0;
    width: 100%;
}

.table-responsive thead th {
    white-space: nowrap;
}

/* Ensure wide tables retain legible column widths and scroll smoothly without collapsing */
.table-responsive table {
    min-width: 640px;
}

.table-responsive::-webkit-scrollbar {
    height: 7px;
    background-color: #F1F5F9;
}

.table-responsive::-webkit-scrollbar-thumb {
    background-color: #CBD5E1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary);
}

.table-scroll-vertical {
    overflow-y: auto;
    position: relative;
}

.table-scroll-vertical::-webkit-scrollbar {
    width: 6px;
    background-color: #F8FAFC;
}

.table-scroll-vertical::-webkit-scrollbar-thumb {
    background-color: #CBD5E1;
    border-radius: 4px;
}

.table-scroll-vertical::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary);
}

.sticky-top {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #F8FAFC !important;
}

/* ── Mobile Responsive System ── */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        max-width: 85vw;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.3);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    .topbar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        background: #F1F5F9;
    }
    .topbar-toggle:hover {
        background: #E2E8F0;
    }
    .content-body {
        padding: 20px 14px;
    }
    #plansTab, #pricingTab, .nav-tabs-mobile-scroll {
        display: flex;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        padding-bottom: 8px !important;
    }
    #plansTab .nav-item, #pricingTab .nav-item, .nav-tabs-mobile-scroll .nav-item {
        flex: 0 0 auto;
    }
}

@media (max-width: 767px) {
    .content-body {
        padding: 16px 10px;
    }
    .topbar {
        padding: 0 12px;
        height: 60px;
    }
    .topbar .badge {
        font-size: 0.68rem;
        padding: 4px 6px;
    }
    .vtu-card {
        padding: 16px 12px;
        border-radius: 12px;
        margin-bottom: 16px;
    }
    .card.p-4 {
        padding: 1rem !important;
    }
    .card.p-3 {
        padding: 0.85rem !important;
    }
    .stat-widget {
        padding: 14px;
    }
    .btn-group {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        gap: 6px;
    }
    .btn-group .btn {
        border-radius: 8px !important;
        flex: 1 1 auto;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .service-icon-box {
        padding: 10px 4px;
        min-height: 98px;
    }
    .service-icon-circle {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
    }
    .service-icon-box h6 {
        font-size: 0.74rem;
    }
    .service-icon-box small {
        font-size: 0.62rem;
    }
    .display-6 {
        font-size: 1.55rem !important;
    }
}


/* ── Mobile Bottom Navigation Bar (Elevated Center Home FAB) ── */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1040;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0 4px;
}

.mobile-nav-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94A3B8;
    text-decoration: none;
    font-size: 0.70rem;
    font-weight: 600;
    transition: all 0.2s ease;
    gap: 3px;
    padding: 4px 0;
}

.mobile-nav-link i {
    font-size: 1.15rem;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--primary) !important;
    font-weight: 700;
}

.mobile-nav-center-slot {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    top: -14px;
}

.mobile-nav-fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #FFFFFF;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.35);
    text-decoration: none;
    transition: transform 0.2s ease;
}

.mobile-nav-fab:hover,
.mobile-nav-fab:active {
    transform: translateY(-2px);
}

.mobile-nav-fab-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary, #16a34a) 0%, var(--primary-light, #22c55e) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1.25rem;
}

.mobile-nav-fab-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 2px;
}

@media (max-width: 991.98px) {
    .content-body {
        padding-bottom: 84px !important;
    }
    .floating-whatsapp-widget {
        bottom: 80px !important;
    }
}