@font-face {
    font-family: 'Outfit';
    src: local('Arial'), local('Helvetica'), local('sans-serif');
    unicode-range: U+20B1;
}

@font-face {
    font-family: 'Inter';
    src: local('Arial'), local('Helvetica'), local('sans-serif');
    unicode-range: U+20B1;
}

html {
    scroll-behavior: smooth;
    transition: font-size 0.3s ease;
}

html[data-text-scale="bigger"] {
    font-size: 115%;
}

:root {
    --primary-teal: #00afa9;
    --secondary-teal: #b2dfdb;
    --light-teal: #e0f2f1;
    --accent-teal: #009b96;
    --text-color: #263238;
    --bg-color: #f1f8f9;
    --white: #ffffff;
    --error-red: #ff5252;
    --success-green: #81c784;
    --card-bg: var(--white);
    --input-bg: var(--light-teal);
    --border-color: var(--secondary-teal);
    --sidebar-bg: var(--white);
    --sidebar-border: #E2E8F0;
    --sidebar-text: #333333;
    --sidebar-label: #888888;
    --sidebar-hover-bg: rgba(169, 255, 61, 0.08);
    --sidebar-active-bg: rgba(169, 255, 61, 0.15);
    --sidebar-active-text: var(--accent-teal);
    --sidebar-active-border: var(--accent-teal);
    --text-muted: #718096;
}

[data-theme="dark"] {
    --primary-teal: #00afa9;
    --secondary-teal: #b2dfdb;
    --light-teal: #121212;
    --accent-teal: #00afa9;
    --text-color: #FFFFFF;
    --bg-color: #000000;
    --white: #121212;
    --card-bg: #181818;
    --input-bg: #282828;
    --border-color: #282828;
    --sidebar-bg: #000000;
    --sidebar-border: #121212;
    --sidebar-text: #b3b3b3;
    --sidebar-label: #b3b3b3;
    --sidebar-hover-bg: rgba(255, 255, 255, 0.05);
    --sidebar-active-bg: rgba(0, 175, 169, 0.1);
    --sidebar-active-text: #00afa9;
    --sidebar-active-border: #00afa9;
    --text-muted: #b3b3b3;
    --card-shadow: none;
    --btn-active-bg: #FFFFFF;
    --btn-active-text: #000000;
}

/* Global Dark Mode Component Overrides */
[data-theme="dark"] .modular-card, 
[data-theme="dark"] .premium-card,
[data-theme="dark"] .profile-module {
    background: var(--card-bg) !important;
    border-color: var(--border-color) !important;
    color: var(--text-color) !important;
    box-shadow: none !important;
}

[data-theme="dark"] .module-title,
[data-theme="dark"] .header-title {
    color: var(--text-color) !important;
}

[data-theme="dark"] .premium-input,
[data-theme="dark"] .custom-toggle-group,
[data-theme="dark"] .segmented-control {
    background: var(--input-bg) !important;
    border-color: var(--border-color) !important;
    color: var(--text-color) !important;
}

[data-theme="dark"] .segment-btn.active,
[data-theme="dark"] .custom-toggle-btn.active {
    background: #FFFFFF !important;
    color: #000000 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
}

[data-theme="dark"] .user-table th,
[data-theme="dark"] .table-header {
    background: var(--card-bg) !important;
    color: var(--text-muted) !important;
    border-bottom-color: var(--border-color) !important;
}

[data-theme="dark"] .dashboard-section {
    background: var(--bg-color) !important;
}

[data-theme="dark"] .data-item-value,
[data-theme="dark"] .contact-value {
    color: var(--text-color) !important;
}

/* Dark mode: native select/dropdown elements */
[data-theme="dark"] select,
[data-theme="dark"] select.premium-input,
[data-theme="dark"] select.form-select-premium,
[data-theme="dark"] .range-selector select {
    background: var(--input-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}
[data-theme="dark"] select option {
    background: var(--input-bg) !important;
    color: var(--text-color) !important;
}

:root {
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    --btn-active-bg: white;
    --btn-active-text: var(--accent-teal);
}

@font-face {
    font-family: 'Circular Spotify Text';
    src: url('../fonts/CircularSpotifyText-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Circular Spotify Text';
    src: url('../fonts/CircularSpotifyText-Book.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Circular Spotify Text';
    src: url('../fonts/CircularSpotifyText-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Circular Spotify Text';
    src: url('../fonts/CircularSpotifyText-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Circular Spotify Text';
    src: url('../fonts/CircularSpotifyText-Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
}

/* GLOBAL SCROLLBAR STYLING */
::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
}

::-webkit-scrollbar-track {
    background: transparent !important;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-teal) !important;
    border-radius: 10px !important;
    border: 2px solid transparent !important;
    background-clip: content-box !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Circular Spotify Text', 'Outfit', sans-serif;
    font-weight: 500;
    scrollbar-width: thin !important;
    scrollbar-color: var(--accent-teal) transparent !important;
}

/* GLOBAL BUTTON STYLING */
.btn-primary {
    background: var(--accent-teal) !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 155, 150, 0.2);
}

.btn-outline {
    background: transparent !important;
    border: 1.5px solid var(--accent-teal) !important;
    color: var(--accent-teal) !important;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-outline:hover {
    background: var(--accent-teal) !important;
    color: white !important;
    box-shadow: 0 5px 15px rgba(0, 155, 150, 0.1);
}

h1, h2, h3, .header-title, label, .data-item-label, .modal-premium-label, .menu-item, .welcome-name-premium {
    font-weight: 900 !important;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100vw;
    margin: 0;
}

.input-group i,
.home-link i {
    color: var(--accent-teal) !important;
}

.container {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s, border-color 0.3s;
}

h1, h2, h3, .header-title {
    color: var(--accent-teal);
    margin-bottom: 25px;
    font-weight: 900;
    letter-spacing: -0.5px;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
select {
    width: 100%;
    padding: 12px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    background-color: var(--input-bg);
    color: var(--text-color);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px rgba(0, 121, 107, 0.1);
}

textarea {
    width: 100%;
    padding: 12px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    background-color: var(--input-bg);
    color: var(--text-color);
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
    resize: none;
}

.row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.col {
    flex: 1;
}

.btn-primary {
    background-color: var(--accent-teal);
    color: var(--white);
    border: none;
    padding: 12px 25px;
    width: fit-content;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.btn-block {
    width: 100% !important;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: 8px;
    margin-top: 0;
}

.btn-success {
    background-color: var(--success-green);
    color: white;
}

.btn-danger {
    background-color: var(--error-red);
    color: white;
}

.btn-outline {
    background-color: transparent;
    border: 1.5px solid var(--accent-teal);
    color: var(--accent-teal);
}

.btn-outline:hover {
    background-color: var(--accent-teal);
    color: white;
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-color);
}

.btn-primary:hover {
    background-color: var(--primary-teal);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.error-message {
    color: var(--error-red);
    font-size: 0.8rem;
    margin-top: 5px;
}

fieldset {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

legend {
    font-weight: 700;
    color: var(--accent-teal);
    padding: 0 10px;
    font-size: 0.95rem;
}

.upload-section {
    background-color: var(--input-bg);
    padding: 15px;
    border-radius: 10px;
    border: 1px dashed var(--accent-teal);
    text-align: center;
}

/* Dashboard Specific Styles */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.avatar,
.mini-avatar {
    background-color: var(--secondary-teal);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    border: 5px solid var(--accent-teal);
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.person-icon {
    width: 80%;
    height: 80%;
    fill: var(--accent-teal);
    opacity: 0.6;
}

.mini-avatar .person-icon {
    width: 70%;
    height: 70%;
}

/* Main Dashboard Layout */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: 310px;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    z-index: 2001;
    overflow-y: auto;
    overflow-x: hidden;
    color: var(--sidebar-text);
    border-right: 1px solid var(--sidebar-border);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.02);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), padding 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
}


.sidebar-header {
    margin-top: 5px;
    padding: 15px 20px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.compact-toggle-btn {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.compact-toggle-btn:hover {
    background: var(--accent-teal);
    color: white;
    border-color: var(--accent-teal);
    transform: scale(1.1);
}

body.compact-nav .compact-toggle-btn {
    transform: rotate(180deg);
    margin-top: 15px;
}

.sidebar-brand img {
    width: 85%;
    max-height: 90px;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sidebar-menu {
    flex: 1 0 auto;
    overflow-x: hidden;
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
}

.menu-label {
    padding: 25px 20px 10px;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--sidebar-label);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    white-space: nowrap;
}

.menu-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--sidebar-text);
    font-weight: 600;
    border-radius: 0 15px 15px 0;
    margin-bottom: 5px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
    border: none;
    border-left: 4px solid transparent;
    background: transparent;
    width: 95%;
    text-align: left;
    font-size: 1rem;
    white-space: normal;
    line-height: 1.4;
}

.menu-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 2px;
    min-width: 20px;
}

.menu-text {
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
    font-size: 0.95rem;
    min-width: 0;
}

/* Theme/Scale Toggle Buttons */
.btn-theme-toggle, .btn-scale-toggle {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-theme-toggle.active, .btn-scale-toggle.active {
    background: var(--btn-active-bg) !important;
    color: var(--btn-active-text) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

@media (hover: hover) and (pointer: fine) {
    .menu-item:hover {
        background: var(--sidebar-hover-bg);
        transform: translateX(5px);
    }
}

.menu-item.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    border-left: 4px solid var(--sidebar-active-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.menu-badge {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-badge.red {
    background: var(--error-red);
}

.dropdown-icon {
    margin-left: auto;
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.dropdown-active .dropdown-icon {
    transform: rotate(180deg);
}

.submenu {
    display: none;
    padding-left: 20px;
}

.dropdown-active .submenu {
    display: block;
}


.submenu-item {
    padding: 10px 15px;
    font-size: 0.9rem;
}

/* Header Styles */
.header {
    height: 70px;
    background-color: var(--card-bg);
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: fixed;
    top: 0;
    left: 310px;
    right: 0;
    z-index: 1000;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-collapsed .header {
    left: 0;
}


.header .icon-btn {
    color: var(--accent-teal) !important;
    opacity: 1 !important;
}

.header .icon-btn:hover {
    color: var(--primary-teal) !important;
    transform: scale(1.1);
}


.header-left {
    display: flex;
    align-items: center;
    gap: 0;
    /* Removed gap since hamburger is gone */
}



.hamburger {
    font-size: 1.5rem;
    color: var(--accent-teal);
    cursor: pointer;
}

.welcome-text {
    font-weight: 600;
    font-size: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 310px;
    padding: 30px;
    padding-top: 100px;
    /* Add padding to account for fixed header */
    background-color: var(--bg-color);
    width: calc(100% - 310px);
    overflow-x: hidden;
    transition: margin-left 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 100vh;
    box-sizing: border-box;
}

.global-footer {
    margin-top: auto !important;
    flex-shrink: 0;
}

/* Ensure sidebar footer is always visible and well spaced */
.sidebar-copyright {
    flex-shrink: 0;
    margin-top: auto;
}

.sidebar-collapsed .main-content {
    margin-left: 0;
    width: 100%;
}


/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-teal);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-color);
}

/* Chart Container */
.chart-container {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.chart-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
}




.avatar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Navigation Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background-color: var(--card-bg);
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--accent-teal);
    letter-spacing: -1px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 5px 15px;
    border-radius: 50px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.profile-trigger:hover {
    background-color: var(--input-bg);
    border-color: var(--border-color);
}

.mini-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-teal);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    overflow: hidden;
    border: 2px solid var(--accent-teal);
}

.mini-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-user-name {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Dropdown Menu */
.dropdown-container {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 200px;
    background-color: var(--card-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    padding: 8px 0;
    z-index: 1001;
    animation: slideDown 0.3s ease;
}

.dropdown-menu.active {
    display: flex !important;
}

.hamburger-btn:hover {
    background: rgba(0, 121, 107, 0.1) !important;
}

.user-profile-trigger:hover {
    background: rgba(0, 0, 0, 0.05) !important;
}

.dropdown-item {
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background-color: var(--input-bg);
    color: var(--accent-teal);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 8px 0;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-content {
    margin-top: 100px;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    position: relative;
}

.theme-toggle-container {
    position: absolute;
    right: 20px;
    top: 20px;
}



.profile-info {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.info-box {
    background-color: var(--input-bg);
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.info-box .label {
    font-size: 0.75rem;
    color: var(--primary-teal);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.info-box .value {
    font-size: 1rem;
    font-weight: 600;
}

.theme-toggle {
    background: var(--input-bg);
    border: 1.5px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-color);
}

.theme-toggle:hover {
    background-color: var(--card-bg);
    border-color: var(--accent-teal);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: var(--primary-teal);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 121, 107, 0.2);
}

/* Status Badges */
.badge {
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-approved {
    background: rgba(129, 199, 132, 0.2);
    color: #2e7d32;
}

.badge-denied {
    background: rgba(229, 115, 115, 0.2);
    color: #c62828;
}

.badge-pending {
    background: rgba(255, 183, 77, 0.2);
    color: #ef6c00;
}

.badge-pickup {
    background: rgba(77, 182, 172, 0.2);
    color: #00695c;
}

.badge-email {
    background: rgba(33, 150, 243, 0.2);
    color: #0d47a1;
}

.badge-uploaded {
    background: rgba(156, 39, 176, 0.2);
    color: #4a148c;
}



/* Toggle Switches */
.switch-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.switch-container:last-child {
    border-bottom: none;
}

.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--accent-teal);
}

input:checked+.slider:before {
    transform: translateX(22px);
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.04);
    padding: 8px;
    border-radius: 16px;
    width: fit-content;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.7;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    opacity: 1;
}

.tab-btn.active {
    background: var(--white);
    color: var(--accent-teal);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    opacity: 1;
}

.tab-btn i {
    font-size: 1.1rem;
}

.dashboard-section {
    display: none;
}

.dashboard-section.active {
    display: block;
}


.row {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.col-8 {
    flex: 8;
}

.col-4 {
    flex: 4;
}

.alert-list {
    display: flex;
    flex-direction: column;
}

.alert-item {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.alert-item:last-child {
    border-bottom: none;
}



.edit-btn {
    background-color: transparent;
    border: 2px solid var(--accent-teal);
    color: var(--accent-teal);
    margin-top: 10px;
}

.edit-btn:hover {
    background-color: var(--accent-teal);
    color: white;
}


.conditional-field {
    display: none;
    margin-top: 15px;
    padding-left: 20px;
    border-left: 3px solid var(--primary-teal);
}

.visible {
    display: block;
}

/* Status Select Dropdown */
.status-select {
    padding: 8px 12px;
    border-radius: 8px;
    background-color: var(--input-bg);
    border: 1.5px solid var(--border-color);
    color: var(--text-color);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    min-width: 140px;
}

.status-select:hover {
    border-color: var(--accent-teal);
    background-color: var(--card-bg);
}

.status-select:focus {
    outline: none;
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px rgba(0, 121, 107, 0.1);
}

.status-select option {
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 10px;
}

/* Clickable Cards */
.clickable-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 121, 107, 0.25);
    border-color: var(--accent-teal);
}

.clickable-card:active {
    transform: translateY(-2px);
}

/* Modals */
.modal {
    display: none;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.profile-info strong {
    color: var(--accent-teal);
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 2px;
}

/* CMS Layout System */
.cms-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.cms-card {
    background: var(--white);
    border-radius: 20px;
    border: 1.5px solid var(--border-color);
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    gap: 15px;
}

.cms-card:hover {
    box-shadow: 0 10px 40px rgba(0, 155, 150, 0.08);
}

.cms-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-teal);
}

.cms-header i {
    font-size: 1.4rem;
    color: var(--accent-teal);
    background: rgba(0, 155, 150, 0.1);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.cms-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-color);
    font-weight: 800;
}

.form-label-professional {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cms-footer {
    margin-top: auto;
    padding-top: 15px;
}

.cms-inline-active-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
    padding: 18px 20px;
    border: 1px solid rgba(0, 186, 181, 0.22);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(0, 186, 181, 0.12), rgba(16, 185, 129, 0.08)),
        var(--card-bg);
    box-shadow: 0 12px 28px rgba(0, 155, 150, 0.08);
}

.cms-inline-active-banner span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-teal);
    font-size: 0.84rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cms-inline-active-banner p {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.5;
}

.cms-grid-focused {
    grid-template-columns: 1fr !important;
}

.cms-help-faq-focused #cms-help-faq-card {
    border-color: rgba(0, 186, 181, 0.34) !important;
    box-shadow: 0 18px 42px rgba(0, 155, 150, 0.12) !important;
}

@media (max-width: 760px) {
    .cms-inline-active-banner {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Margin Utilities */
.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-15 {
    margin-top: 15px;
}

.mt-20 {
    margin-top: 20px;
}

@media (max-width: 1200px) {
    .cms-grid {
        grid-template-columns: 1fr;
    }
}

.profile-info p {
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}
.dashboard-section {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding-top: 20px !important;
    padding-bottom: 20px !important;
}

.dashboard-section.active {
    display: block;
    opacity: 1;
}

/* Clickable Service Cards UI */
.clickable-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px solid transparent;
    margin-bottom: 0;
}

.clickable-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(0, 155, 150, 0.05) 0%, rgba(0, 155, 150, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.clickable-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 155, 150, 0.12);
    border-color: var(--accent-teal);
}

.clickable-card:hover::before {
    opacity: 1;
}

.clickable-card .icon-wrapper {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #a5ef49;
}

.clickable-card:hover .icon-wrapper {
    color: var(--accent-teal);
    transform: scale(1.15) translateY(-5px);
}

.clickable-card h4 {
    transition: all 0.3s ease;
}

.clickable-card:hover h4 {
    color: var(--accent-teal);
}

/* Modal UI Refinements */
.modal-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.modal-input option {
    background-color: var(--card-bg);
    color: var(--text-color);
}

.modal-input:focus {
    outline: none;
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px rgba(0, 155, 150, 0.1);
}

.target-grid {
    display: grid;
    grid-template-rows: repeat(3, auto);
    grid-auto-flow: column;
    gap: 6px 15px;
    padding: 5px 0 0 0;
}

.review-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 6300;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
}

.review-modal-shell {
    width: min(92vw, 820px);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid rgba(0, 155, 150, 0.18);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.review-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 26px;
    color: #FFFFFF;
    background: linear-gradient(135deg, #078f8b, #0ca39d);
}

.review-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.review-modal-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1.1rem;
}

.review-modal-kicker {
    margin: 0 0 3px 0;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.78;
}

.review-modal-title {
    margin: 0;
    color: #FFFFFF;
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 1.2;
}

.review-modal-ref {
    display: block;
    margin-top: 3px;
    font-size: 0.8rem;
    font-weight: 700;
    opacity: 0.86;
}

.review-close-btn {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 0;
    border-radius: 50%;
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    font-size: 1rem;
}

.review-close-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

.review-modal-body {
    padding: 24px;
    overflow-y: auto;
}

.review-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 8px;
    background: rgba(0, 155, 150, 0.08);
    color: var(--text-color);
    font-size: 0.86rem;
    line-height: 1.45;
}

.review-note i {
    color: var(--accent-teal);
    margin-top: 2px;
}

.review-choice-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: stretch;
}

.review-choice-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.review-action-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
}

.review-action-card.approve {
    border-color: rgba(22, 163, 74, 0.35);
    background: rgba(22, 163, 74, 0.06);
}

.review-action-card.reject {
    border-color: rgba(220, 38, 38, 0.28);
    background: rgba(220, 38, 38, 0.05);
}

.review-card-head {
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.review-card-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 0.95rem;
}

.review-card-icon.approve {
    background: #16A34A;
}

.review-card-icon.reject {
    background: #DC2626;
}

.review-card-title {
    display: block;
    margin: 0;
    color: var(--text-color);
    font-size: 0.96rem;
    font-weight: 900;
    line-height: 1.2;
}

.review-card-copy {
    margin: 4px 0 0 0;
    color: #6B7280;
    font-size: 0.8rem;
    line-height: 1.35;
}

.review-field-group {
    display: grid;
    gap: 7px;
}

.review-field-label {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.review-field {
    width: 100%;
    box-sizing: border-box;
    min-height: 46px;
    padding: 11px 12px;
    border-radius: 8px;
    border: 1.5px solid #D1D5DB;
    background: #FFFFFF;
    color: #111827;
    font: inherit;
    font-weight: 700;
}

.review-select {
    cursor: pointer;
}

.review-time-range {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.review-time-field {
    display: grid;
    gap: 6px;
}

.review-time-field span {
    color: #6B7280;
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

textarea.review-field {
    min-height: 126px;
    resize: vertical;
    font-weight: 600;
}

.review-action-card.approve .review-field:focus {
    outline: none;
    border-color: #16A34A;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.review-action-card.reject .review-field:focus {
    outline: none;
    border-color: #DC2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.review-action-btn {
    width: 100%;
    margin-top: auto;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    color: #FFFFFF;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
}

.review-action-btn.approve {
    background: #16A34A;
}

.review-action-btn.reject {
    background: #DC2626;
}

.review-action-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

@media (max-width: 760px) {
    .review-choice-grid {
        grid-template-columns: 1fr;
    }

    .review-modal-header,
    .review-modal-body {
        padding: 18px;
    }
}

/* --- Resident Profile Redesign Styles --- */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 100%;
    margin: 0 auto;
}

@media (min-width: 992px) {
    .profile-grid {
        grid-template-columns: 320px 1fr;
    }
}

.profile-module {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 155, 150, 0.1);
    position: relative;
    overflow: hidden;
    animation: slideUpFadeIn 0.5s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

/* Staggered animation */
.profile-module:nth-child(1) { animation-delay: 0.1s; }
.profile-module:nth-child(2) { animation-delay: 0.2s; }
.profile-module:nth-child(3) { animation-delay: 0.3s; }

@keyframes slideUpFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-avatar-container {
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-teal), #a5ef49);
    padding: 4px;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-avatar-container:hover {
    transform: scale(1.05);
}

.profile-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--accent-teal);
    border: 4px solid #FFFFFF;
    position: relative;
    overflow: hidden;
}

.profile-avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 128, 128, 0.85);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
}

.profile-avatar-container:hover .profile-avatar-overlay {
    opacity: 1;
}

.profile-avatar-overlay button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.profile-avatar-overlay button:hover {
    transform: scale(1.1);
}

/* Text Size Customization */
body.text-size-large {
    font-size: 110%;
}

body.text-size-large .profile-data-value {
    font-size: 1.25rem;
}

body.text-size-large h2 {
    font-size: 2rem;
}

.custom-toggle-group {
    display: flex;
    background: var(--input-bg);
    padding: 5px;
    border-radius: 12px;
    gap: 5px;
}

.custom-toggle-btn {
    flex: 1;
    border: none;
    background: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.custom-toggle-btn.active {
    background: #FFFFFF;
    color: var(--accent-teal);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

[data-theme="dark"] .custom-toggle-btn.active {
    background: #2c3e50;
    color: #a5ef49;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.pill-teal {
    background: rgba(0, 155, 150, 0.1);
    color: var(--accent-teal);
}

.pill-green {
    background: rgba(165, 239, 73, 0.2);
    color: #5b991a;
}

.pill-orange {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.profile-data-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.profile-data-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.contact-link {
    color: var(--primary-teal);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: #a5ef49;
}

.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* Compact Navigation Sidebar Mode */
body.compact-nav .sidebar {
    width: 70px;
    padding: 20px 8px;
}

body.compact-nav .sidebar .sidebar-brand img {
    height: 35px;
}

body.compact-nav .sidebar .menu-label {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

body.compact-nav .sidebar .sidebar-menu {
    padding: 10px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

body.compact-nav .sidebar .menu-item {
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    margin: 6px 0 !important;
    border-radius: 10px;
    border-left: none;
    position: relative;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body.compact-nav .sidebar .menu-item.active {
    border-left: none;
    background: var(--sidebar-active-bg);
}

body.compact-nav .sidebar .menu-item:hover {
    transform: none;
    background: rgba(0, 186, 181, 0.14);
    color: var(--accent-teal);
    box-shadow: inset 0 0 0 1px rgba(0, 186, 181, 0.2), 0 10px 24px rgba(0, 155, 150, 0.12);
}


body.compact-nav .sidebar .menu-icon {
    margin: 0;
    font-size: 1.15rem;
}

body.compact-nav .main-content {
    margin-left: 70px;
    width: calc(100% - 70px);
}

.header-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-teal), #a5ef49);
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.header-avatar:hover {
    transform: scale(1.05);
}

.header-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--accent-teal);
    font-size: 1rem;
    overflow: hidden;
}

body.compact-nav .header {
    left: 70px;
}

/* Sidebar Logos */
.compact-logo {
    display: none;
}

body.compact-nav .sidebar .full-logo {
    display: none;
}

body.compact-nav .sidebar .sidebar-header {
    padding: 12px 0 16px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

body.compact-nav .sidebar .sidebar-brand {
    padding: 0 !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
}

body.compact-nav .sidebar .compact-logo {
    display: block;
    max-width: 45px;
    height: auto;
    margin: 0 auto;
}

body.compact-nav .sidebar .menu-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    min-width: 10px;
    height: 10px;
    padding: 0;
    margin: 0;
    font-size: 0;
    border-radius: 50%;
}

body.compact-nav .sidebar .sidebar-copyright,
body.compact-nav .sidebar .dropdown-icon,
body.compact-nav .sidebar .menu-item span:not(.menu-icon),
body.compact-nav .sidebar .submenu {
    display: none !important;
}

.menu-icon i.fa-angles-left {
    transition: transform 0.3s ease;
}

body.compact-nav .sidebar .menu-icon i.fa-angles-left {
    transform: rotate(180deg);
}

body.compact-nav .sidebar .sidebar-divider {
    width: 35px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-top: 10px !important;
}


body.compact-nav .sidebar .logout-btn-premium i {
    font-size: 1.15rem !important;
}

/* Custom scrollbar for sidebar removed to hide scrollbars */

/* Dashboard Overhaul Sophisticated Styles */
.stat-card-premium {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    border-top: 4px solid var(--accent-teal);
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card-premium:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
}

.stat-bg-icon {
    position: absolute;
    bottom: -10px;
    right: -10px;
    font-size: 5rem;
    color: var(--accent-teal);
    opacity: 0.04;
    transform: rotate(-15deg);
    pointer-events: none;
}

.trend-indicator {
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend-up { color: #10b981; }
.trend-down { color: #ef4444; }

.dashboard-card-layered {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 15px 45px -10px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
}

.activity-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background 0.2s ease;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-teal);
    flex-shrink: 0;
}

.activity-content {
    flex-grow: 1;
}

.activity-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}

.status-badge-sm {
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.empty-state-illustration {
    text-align: center;
    padding: 40px 20px;
    opacity: 0.6;
}

.empty-state-illustration i {
    font-size: 3rem;
    color: var(--border-color);
    margin-bottom: 15px;
}

/* ========================================================
   RESPONSIVE OPTIMIZATION (MOBILE & TABLET)
======================================================== */
@media (min-width: 1024px) {
    .hamburger-btn {
        display: none !important;
    }
}

@media (max-width: 1366px) {
    /* Compact the tables on large tablets (iPad Pros) to prevent squishing and horizontal scroll */
    table th, table td { 
        padding: 12px 8px !important; 
    }

    table th:first-child, table td:first-child {
        padding-left: 20px !important;
    }

    table th:last-child, table td:last-child {
        padding-right: 20px !important;
    }
    
    table td span, table th {
        font-size: 0.72rem !important;
    }
    
    table td .badge {
        font-size: 0.62rem !important;
        padding: 4px 8px !important;
    }
    
    table td button, 
    table td .btn-primary,
    table td form button {
        padding: 6px 10px !important;
        font-size: 0.7rem !important;
    }
    
    .payment-action-stack {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 4px !important;
    }
    
    .payment-action-stack > span {
        justify-content: center !important;
    }
    
    .payment-action-stack form {
        display: flex !important;
        width: 100% !important;
    }
    
    .payment-action-stack form button {
        width: 100% !important;
        justify-content: center !important;
    }
}

@media (max-width: 1024px) {
    /* Compact tables specifically for tablets */
    table th, table td { 
        padding: 12px 15px !important; 
    }
    
    table td span {
        font-size: 0.75rem;
    }
    
    table td button, 
    table td .btn-primary,
    table td form button {
        padding: 6px 10px !important;
        font-size: 0.7rem !important;
    }
    
    .payment-action-stack {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-end !important;
        gap: 4px !important;
    }
    html { font-size: 95%; }
    
    .container { padding: 20px; }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        box-shadow: 10px 0 30px rgba(0,0,0,0.1);
        transition: transform 0.4s ease;
    }
    
    /* Overlay for mobile sidebar */
    .mobile-sidebar-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 2000;
        backdrop-filter: blur(2px);
    }
    .dashboard-wrapper.mobile-sidebar-active .mobile-sidebar-overlay {
        display: block;
    }
    .dashboard-wrapper.mobile-sidebar-active .sidebar {
        transform: translateX(0);
    }

    .header {
        left: 0;
        padding: 10px 15px !important;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 15px;
        padding-top: 90px;
    }

    .sidebar-collapsed .main-content { margin-left: 0; width: 100%; }
    .sidebar-collapsed .header { left: 0; }

    .hamburger-btn {
        display: block !important;
        background: transparent;
        border: none;
        color: var(--accent-teal);
        font-size: 1.5rem;
        cursor: pointer;
        padding: 5px;
        margin-right: 15px;
    }

    .header-left, .header-right { gap: 10px; }

    .modal-content {
        width: 95% !important;
        padding: 25px !important;
        margin: 10px !important;
    }

    .stats-grid { grid-template-columns: 1fr 1fr; gap: 15px; }
    .services-grid { grid-template-columns: 1fr; gap: 15px; }

    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
        border-radius: 12px;
        box-shadow: inset 0 0 10px rgba(0,0,0,0.02);
        display: block;
    }

    table { 
        min-width: 700px;
        width: 100%;
        border-collapse: collapse;
    }
    th, td { 
        padding: 10px 12px !important; 
        font-size: 0.9rem; 
        white-space: nowrap; 
    }

    /* Override hardcoded inline grids for tablet view */
    div[style*="grid-template-columns: 1fr 1fr;"] {
        grid-template-columns: 1fr !important;
    }
    div[style*="grid-template-columns: 1fr 1fr 1fr;"],
    div[style*="grid-template-columns: repeat(3, 1fr);"] {
        grid-template-columns: 1fr 1fr !important;
    }
    div[style*="grid-template-columns: repeat(4, 1fr);"],
    div[style*="grid-template-columns: repeat(5, 1fr);"] {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Disable all sidebar menu item hover background shifts and translations on touch/tablet screen sizes */
    .menu-item:hover,
    .submenu-item:hover {
        background: transparent !important;
        transform: none !important;
        color: var(--sidebar-text) !important;
    }
    .menu-item.active:hover {
        background: var(--sidebar-active-bg) !important;
        color: var(--sidebar-active-text) !important;
    }
    .menu-item span {
        transition: none !important;
    }
}

@media (max-width: 767px) {
    /* Global Typography & Spacing */
    html { font-size: 90% !important; }

    .container { padding: 10px !important; }

    .main-content {
        padding: 20px 18px !important;
        padding-top: 80px !important;
        width: 100% !important;
        margin-left: 0 !important;
    }
    
    .header {
        padding: 10px 18px !important;
        height: auto !important;
        min-height: 60px !important;
    }

    h1 { font-size: 1.5rem !important; }
    h2 { font-size: 1.3rem !important; }
    h3 { font-size: 1.1rem !important; }

    /* Layout Grids Stacking */
    .row {
        flex-direction: column !important;
        gap: 12px !important;
    }

    .stats-grid,
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    div[style*="grid-template-columns: repeat(5, 1fr);"],
    div[style*="grid-template-columns: repeat(4, 1fr);"] {
        grid-template-columns: 1fr 1fr !important;
    }
    
    .sidebar-brand img {
        max-height: 80px;
        width: 85%;
    }

    .sidebar-divider {
        display: none !important;
    }

    /* Cards & Dashboard Wrappers */
    .chart-container,
    .dashboard-card-layered,
    .stat-card-premium { 
        padding: 15px !important; 
        border-radius: 12px !important;
    }
    
    /* Modals & Forms */
    .modal-content,
    .review-modal-shell {
        width: 100% !important;
        max-width: 100% !important;
        margin: 5px !important;
        padding: 15px !important;
        border-radius: 12px !important;
    }
    
    .review-choice-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .form-group, .review-field-group { margin-bottom: 12px !important; }
    
    .form-control, .review-field, input, select, textarea {
        font-size: 1rem !important; /* Prevent iOS zoom */
        padding: 10px !important;
    }

    /* Buttons */
    .btn-primary, .btn-secondary, .btn-outline, button[type="submit"] {
        padding: 10px 15px !important;
        font-size: 0.85rem !important;
        width: 100%;
        justify-content: center;
        text-align: center;
        margin-top: 5px;
    }
    
    .header-auth-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        justify-content: flex-end;
    }

    .header-auth-buttons a.btn-primary, 
    .header-auth-buttons a.btn-outline {
        padding: 6px 10px !important;
        font-size: 0.75rem !important;
        width: auto !important;
        margin-top: 0;
    }

    /* Table Responsiveness */
    .table-responsive,
    div[style*="overflow-x:auto"],
    div[style*="overflow-x: auto"] {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin-bottom: 15px !important;
        border: none !important;
        padding-bottom: 5px;
    }
    
    table { min-width: 600px !important; }

    table th, 
    table td {
        padding: 10px 8px !important;
        font-size: 0.8rem !important;
    }

    table td span, 
    table td .badge {
        font-size: 0.7rem !important;
        padding: 4px 6px !important;
        border-radius: 6px !important;
        white-space: nowrap !important;
    }
    
    table td button, 
    table td .btn-primary,
    table td form button {
        width: auto !important;
        padding: 6px 10px !important;
        font-size: 0.75rem !important;
        margin: 2px !important;
    }
    
    .payment-action-stack {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 4px !important;
    }

    /* Sidebar Fixes */
    .hamburger-btn {
        margin-right: 10px !important;
        font-size: 1.3rem !important;
    }
    
    .header-right { gap: 8px !important; }
    
    .header-avatar {
        width: 36px !important;
        height: 36px !important;
    }
    
    .header-avatar-inner { font-size: 0.8rem !important; }
    
    .footer-content {
        flex-direction: column !important;
        text-align: center !important;
        gap: 15px !important;
    }
}

/* Hide scrollbars on the sidebar but allow scrolling */
.sidebar, .sidebar-menu, aside {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.sidebar::-webkit-scrollbar, .sidebar-menu::-webkit-scrollbar, aside::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

/* Modern Table Styles - Premium Floating Rows (Extracted from User Management) */
.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
}

.modern-table th {
    text-align: left;
    padding: 0 20px 10px 20px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: transparent;
}

.modern-row {
    background: var(--card-bg);
    transition: all 0.3s ease;
    cursor: pointer;
}

.modern-row td {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    vertical-align: middle;
}

.modern-row td:first-child {
    border-left: 1px solid var(--border-color);
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
}

.modern-row td:last-child {
    border-right: 1px solid var(--border-color);
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

.modern-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    background: var(--bg-color);
    position: relative;
    z-index: 50;
}

.modern-profile-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.modern-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

.pill-admin { background: rgba(0, 175, 169, 0.1); color: var(--accent-teal); border: 1px solid rgba(0, 175, 169, 0.2); }
.pill-active { background: rgba(22, 163, 74, 0.1); color: #16a34a; border: 1px solid rgba(22, 163, 74, 0.2); }
.pill-inactive { background: rgba(220, 38, 38, 0.1); color: #dc2626; border: 1px solid rgba(220, 38, 38, 0.2); }
.pill-resident { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.pill-pending { background: rgba(234, 88, 12, 0.1); color: #ea580c; border: 1px solid rgba(234, 88, 12, 0.2); }
.pill-approved { background: rgba(22, 163, 74, 0.1); color: #16a34a; border: 1px solid rgba(22, 163, 74, 0.2); }
.pill-rejected { background: rgba(220, 38, 38, 0.1); color: #dc2626; border: 1px solid rgba(220, 38, 38, 0.2); }

/* Icon Action Buttons */
.icon-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.icon-action-btn:hover {
    background: var(--accent-teal);
    color: white;
    border-color: var(--accent-teal);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 175, 169, 0.3);
}

.icon-action-btn.btn-danger:hover {
    color: #ef4444 !important;
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
}

/* Tooltip style */
.icon-action-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: #1e293b;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 100;
}

.icon-action-btn:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* ============================================================
   GLOBAL SELECT / DROPDOWN THEME NORMALIZATION
   Fixes white-text-on-white (light mode) and white-on-white
   (dark mode) issues across all admin and MRF pages.
   ============================================================ */
select {
    background-color: #ffffff;
    color: #1e293b;
}
select option {
    background-color: #ffffff;
    color: #1e293b;
}
select:focus {
    background-color: #ffffff;
    color: #1e293b;
}

[data-theme="dark"] select {
    background-color: #1a1a2e !important;
    color: #e2e8f0 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}
[data-theme="dark"] select option {
    background-color: #1a1a2e !important;
    color: #e2e8f0 !important;
}
[data-theme="dark"] select:focus {
    background-color: #16213e !important;
    color: #f1f5f9 !important;
    outline: none !important;
}

/* ============================================================
   STATUS PILL CLASSES
   ============================================================ */
.pill-approved {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #059669 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}
.pill-ready {
    background: rgba(34, 197, 94, 0.12) !important;
    color: #16a34a !important;
    border: 1px solid rgba(34, 197, 94, 0.3) !important;
}

/* ============================================================
   HOME PAGE — COMMUNITY CONTRIBUTIONS & E-SERVICES SECTIONS
   v1.2 — moved here from Blade template for guaranteed load
   ============================================================ */

/* Section wrappers */
#sec-mrf-earnings {
    background: linear-gradient(135deg, #0a1f0a 0%, #0d2b1a 40%, #0a1a2e 100%) !important;
    color: #fff !important;
    padding: 90px 60px !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 28px !important;
}
#sec-eservices {
    background: #0d1117 !important;
    color: #fff !important;
    padding: 90px 60px !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 28px !important;
}

/* ── COMMUNITY CONTRIBUTIONS — cb-* classes ─────────────────────────────── */
.cb-inner { max-width: 1100px !important; margin: 0 auto !important; }
.cb-header { text-align: center !important; margin-bottom: 52px !important; }
.cb-badge {
    display: inline-block !important;
    font-size: 0.68rem !important; font-weight: 800 !important;
    text-transform: uppercase !important; letter-spacing: 2px !important;
    color: #a5ef49 !important;
    background: rgba(165,239,73,0.12) !important;
    border: 1px solid rgba(165,239,73,0.28) !important;
    padding: 6px 20px !important; border-radius: 50px !important;
    margin-bottom: 16px !important;
}
.cb-title {
    font-size: 2.3rem !important; font-weight: 900 !important;
    color: #fff !important; margin: 0 0 14px !important;
    line-height: 1.2 !important; letter-spacing: -0.5px !important;
}
.cb-title span { color: #a5ef49 !important; }
.cb-desc { color: rgba(255,255,255,0.55) !important; font-size: 1rem !important; max-width: 560px !important; margin: 0 auto !important; line-height: 1.8 !important; }

/* Stat card row */
.cb-stat-row { display: -webkit-flex !important; display: flex !important; gap: 20px !important; margin-bottom: 24px !important; }
.cb-stat-card { -webkit-flex: 1 !important; flex: 1 !important; border-radius: 22px !important; overflow: hidden !important; }
.cb-stat-topbar { height: 4px !important; border-radius: 22px 22px 0 0 !important; }
.cb-stat-body { padding: 28px 26px !important; }
.cb-stat-icon {
    width: 54px !important; height: 54px !important;
    border-radius: 16px !important; text-align: center !important;
    line-height: 54px !important; font-size: 1.3rem !important;
    margin-bottom: 18px !important;
}
.cb-stat-val { font-size: 1.75rem !important; font-weight: 900 !important; color: #fff !important; line-height: 1 !important; margin-bottom: 8px !important; letter-spacing: -0.5px !important; }
.cb-stat-val span { font-size: 1rem !important; font-weight: 700 !important; color: rgba(255,255,255,0.55) !important; }
.cb-stat-lbl { font-size: 0.7rem !important; font-weight: 800 !important; text-transform: uppercase !important; letter-spacing: 1.5px !important; margin-bottom: 6px !important; }
.cb-stat-sub { font-size: 0.74rem !important; color: rgba(255,255,255,0.32) !important; }

/* Card colour variants */
.cb-teal { background: #111a1a !important; border: 1px solid rgba(0,186,181,0.25) !important; }
.cb-teal .cb-stat-topbar { background: linear-gradient(90deg,#00bab5,#006b67) !important; }
.cb-teal .cb-stat-icon { background: rgba(0,186,181,0.15) !important; border: 1px solid rgba(0,186,181,0.3) !important; color: #00bab5 !important; }
.cb-teal .cb-stat-lbl { color: #00bab5 !important; }
.cb-green { background: #111a13 !important; border: 1px solid rgba(165,239,73,0.22) !important; }
.cb-green .cb-stat-topbar { background: linear-gradient(90deg,#a5ef49,#5a9a00) !important; }
.cb-green .cb-stat-icon { background: rgba(165,239,73,0.12) !important; border: 1px solid rgba(165,239,73,0.28) !important; color: #a5ef49 !important; }
.cb-green .cb-stat-lbl { color: #a5ef49 !important; }
.cb-purple { background: #130f1e !important; border: 1px solid rgba(139,92,246,0.25) !important; }
.cb-purple .cb-stat-topbar { background: linear-gradient(90deg,#8b5cf6,#5b21b6) !important; }
.cb-purple .cb-stat-icon { background: rgba(139,92,246,0.15) !important; border: 1px solid rgba(139,92,246,0.3) !important; color: #a78bfa !important; }
.cb-purple .cb-stat-lbl { color: #a78bfa !important; }

/* Breakdown table */
.cb-tbl-wrap { background: #0e1218 !important; border: 1px solid rgba(255,255,255,0.09) !important; border-radius: 22px !important; overflow: hidden !important; margin-bottom: 32px !important; }
.cb-tbl-hd { background: #131b22 !important; padding: 16px 24px !important; border-bottom: 1px solid rgba(255,255,255,0.08) !important; }
.cb-tbl-hd-title { font-size: 0.88rem !important; font-weight: 800 !important; color: #fff !important; }
.cb-tbl-hd-title i { color: #a5ef49 !important; margin-right: 8px !important; }
.cb-tbl-live { float: right !important; font-size: 0.65rem !important; font-weight: 800 !important; color: #a5ef49 !important; background: rgba(165,239,73,0.1) !important; border: 1px solid rgba(165,239,73,0.22) !important; padding: 4px 12px !important; border-radius: 50px !important; }
.cb-tbl { width: 100% !important; border-collapse: collapse !important; table-layout: fixed !important; }
.cb-tbl th { padding: 11px 14px !important; text-align: right !important; font-size: 0.62rem !important; font-weight: 800 !important; color: rgba(255,255,255,0.35) !important; text-transform: uppercase !important; letter-spacing: 1.2px !important; border-bottom: 1px solid rgba(255,255,255,0.06) !important; background: rgba(255,255,255,0.02) !important; }
.cb-tbl th:first-child { text-align: left !important; padding-left: 22px !important; width: 44% !important; }
.cb-tbl th:last-child { padding-right: 22px !important; width: 14% !important; }
.cb-tbl td { padding: 15px 14px !important; vertical-align: middle !important; font-size: 0.9rem !important; border-bottom: 1px solid rgba(255,255,255,0.05) !important; }
.cb-tbl td:first-child { padding-left: 22px !important; }
.cb-tbl td:last-child { padding-right: 22px !important; text-align: right !important; }
.cb-tbl .td-num { text-align: right !important; color: rgba(255,255,255,0.7) !important; font-weight: 700 !important; }
.cb-tbl .td-rev { text-align: right !important; color: #fff !important; font-weight: 800 !important; white-space: nowrap !important; }
.cb-row-icon { display: inline-block !important; width: 36px !important; height: 36px !important; border-radius: 10px !important; text-align: center !important; line-height: 36px !important; font-size: 0.85rem !important; margin-right: 12px !important; vertical-align: middle !important; }
.cb-row-name { color: #fff !important; font-weight: 700 !important; vertical-align: middle !important; }
.cb-row-sub { color: rgba(255,255,255,0.32) !important; font-size: 0.71rem !important; margin-top: 3px !important; padding-left: 48px !important; }
.cb-pct-pill { display: inline-block !important; background: rgba(255,255,255,0.07) !important; border-radius: 50px !important; padding: 3px 10px !important; font-size: 0.8rem !important; font-weight: 800 !important; }
.cb-total-row { background: rgba(165,239,73,0.05) !important; border-top: 1px solid rgba(165,239,73,0.15) !important; }
.cb-total-row td { font-weight: 900 !important; border-bottom: none !important; }
.cb-total-label { color: #a5ef49 !important; }
.cb-total-rev { color: #a5ef49 !important; white-space: nowrap !important; }
.cb-total-pct { background: rgba(165,239,73,0.15) !important; color: #a5ef49 !important; }
.crow-0 .cb-row-icon { background: rgba(0,186,181,0.15) !important; border: 1px solid rgba(0,186,181,0.3) !important; color: #00bab5 !important; }
.crow-0 .cb-pct-pill { color: #00bab5 !important; }
.crow-1 .cb-row-icon { background: rgba(165,239,73,0.12) !important; border: 1px solid rgba(165,239,73,0.28) !important; color: #a5ef49 !important; }
.crow-1 .cb-pct-pill { color: #a5ef49 !important; }
.crow-2 .cb-row-icon { background: rgba(139,92,246,0.15) !important; border: 1px solid rgba(139,92,246,0.3) !important; color: #a78bfa !important; }
.crow-2 .cb-pct-pill { color: #a78bfa !important; }
.cb-mrf-btn {
    display: inline-block !important;
    background: linear-gradient(135deg,#a5ef49,#6bbf00) !important;
    color: #0a2e00 !important; font-weight: 900 !important;
    padding: 15px 38px !important; border-radius: 50px !important;
    text-decoration: none !important; font-size: 0.92rem !important;
    letter-spacing: 0.3px !important; cursor: pointer !important;
}
.cb-mrf-btn:hover { background: linear-gradient(135deg,#b8ff55,#7bd100) !important; }

/* ── E-SERVICES — es-* classes ───────────────────────────────────────────── */
.es-inner { max-width: 1100px !important; margin: 0 auto !important; }
.es-header { text-align: center !important; margin-bottom: 52px !important; }
.es-badge {
    display: inline-block !important;
    font-size: 0.68rem !important; font-weight: 800 !important;
    text-transform: uppercase !important; letter-spacing: 2px !important;
    color: #00bab5 !important;
    background: rgba(0,186,181,0.1) !important;
    border: 1px solid rgba(0,186,181,0.25) !important;
    padding: 6px 20px !important; border-radius: 50px !important;
    margin-bottom: 16px !important;
}
.es-title { font-size: 2.3rem !important; font-weight: 900 !important; color: #fff !important; margin: 0 0 14px !important; letter-spacing: -0.5px !important; }
.es-title span { color: #00bab5 !important; }
.es-desc { color: rgba(255,255,255,0.55) !important; font-size: 1rem !important; max-width: 580px !important; margin: 0 auto !important; line-height: 1.8 !important; }
.es-row { display: -webkit-flex !important; display: flex !important; gap: 18px !important; margin-bottom: 18px !important; }
.es-row:last-of-type { margin-bottom: 36px !important; }
.es-card { -webkit-flex: 1 !important; flex: 1 !important; border-radius: 22px !important; overflow: hidden !important; transition: transform 0.2s ease, box-shadow 0.2s ease !important; }
.es-card:hover { transform: translateY(-6px) !important; box-shadow: 0 16px 40px rgba(0,0,0,0.4) !important; }
.es-card-bar { height: 3px !important; width: 100% !important; opacity: 0.8 !important; }
.es-card-body { padding: 36px 22px 28px !important; text-align: center !important; }
.es-icon { width: 72px !important; height: 72px !important; border-radius: 20px !important; text-align: center !important; line-height: 72px !important; font-size: 1.7rem !important; margin: 0 auto 20px !important; }
.es-card-name { font-size: 0.82rem !important; font-weight: 900 !important; color: #fff !important; text-transform: uppercase !important; letter-spacing: 0.8px !important; line-height: 1.4 !important; margin-bottom: 18px !important; }
.es-badge-price { display: inline-block !important; font-size: 0.82rem !important; font-weight: 800 !important; padding: 6px 20px !important; border-radius: 9px !important; }
.es-badge-free { display: inline-block !important; font-size: 0.78rem !important; font-weight: 800 !important; padding: 6px 20px !important; border-radius: 9px !important; background: rgba(165,239,73,0.12) !important; color: #a5ef49 !important; border: 1px solid rgba(165,239,73,0.25) !important; }
.es-empty { -webkit-flex: 1 !important; flex: 1 !important; background: rgba(255,255,255,0.02) !important; border: 1px dashed rgba(255,255,255,0.06) !important; border-radius: 22px !important; min-height: 200px !important; }

/* Card colour slots */
.es-c0 { background: rgba(224,82,82,0.07) !important; border: 1px solid rgba(224,82,82,0.25) !important; }
.es-c0 .es-card-bar { background: #e05252 !important; }
.es-c0 .es-icon { background: rgba(224,82,82,0.18) !important; border: 1px solid rgba(224,82,82,0.3) !important; color: #e05252 !important; }
.es-c0 .es-badge-price { background: rgba(224,82,82,0.15) !important; color: #e05252 !important; border: 1px solid rgba(224,82,82,0.3) !important; }
.es-c1 { background: rgba(0,186,181,0.07) !important; border: 1px solid rgba(0,186,181,0.25) !important; }
.es-c1 .es-card-bar { background: #00bab5 !important; }
.es-c1 .es-icon { background: rgba(0,186,181,0.18) !important; border: 1px solid rgba(0,186,181,0.3) !important; color: #00bab5 !important; }
.es-c1 .es-badge-price { background: rgba(0,186,181,0.15) !important; color: #00bab5 !important; border: 1px solid rgba(0,186,181,0.3) !important; }
.es-c2 { background: rgba(75,158,245,0.07) !important; border: 1px solid rgba(75,158,245,0.25) !important; }
.es-c2 .es-card-bar { background: #4b9ef5 !important; }
.es-c2 .es-icon { background: rgba(75,158,245,0.18) !important; border: 1px solid rgba(75,158,245,0.3) !important; color: #4b9ef5 !important; }
.es-c2 .es-badge-price { background: rgba(75,158,245,0.15) !important; color: #4b9ef5 !important; border: 1px solid rgba(75,158,245,0.3) !important; }
.es-c3 { background: rgba(34,199,140,0.07) !important; border: 1px solid rgba(34,199,140,0.25) !important; }
.es-c3 .es-card-bar { background: #22c78c !important; }
.es-c3 .es-icon { background: rgba(34,199,140,0.18) !important; border: 1px solid rgba(34,199,140,0.3) !important; color: #22c78c !important; }
.es-c3 .es-badge-price { background: rgba(34,199,140,0.15) !important; color: #22c78c !important; border: 1px solid rgba(34,199,140,0.3) !important; }
.es-c4 { background: rgba(167,139,250,0.07) !important; border: 1px solid rgba(167,139,250,0.25) !important; }
.es-c4 .es-card-bar { background: #a78bfa !important; }
.es-c4 .es-icon { background: rgba(167,139,250,0.18) !important; border: 1px solid rgba(167,139,250,0.3) !important; color: #a78bfa !important; }
.es-c4 .es-badge-price { background: rgba(167,139,250,0.15) !important; color: #a78bfa !important; border: 1px solid rgba(167,139,250,0.3) !important; }
.es-c5 { background: rgba(245,158,66,0.07) !important; border: 1px solid rgba(245,158,66,0.25) !important; }
.es-c5 .es-card-bar { background: #f59e42 !important; }
.es-c5 .es-icon { background: rgba(245,158,66,0.18) !important; border: 1px solid rgba(245,158,66,0.3) !important; color: #f59e42 !important; }
.es-c5 .es-badge-price { background: rgba(245,158,66,0.15) !important; color: #f59e42 !important; border: 1px solid rgba(245,158,66,0.3) !important; }

/* CTA banner */
.es-cta { background: linear-gradient(135deg,#0d2233,#0a1e2c,#0c1825) !important; border: 1px solid rgba(0,186,181,0.2) !important; border-radius: 22px !important; padding: 44px 52px !important; overflow: hidden !important; }
.es-cta-eyebrow { font-size: 0.65rem !important; font-weight: 800 !important; text-transform: uppercase !important; letter-spacing: 2px !important; color: #00bab5 !important; margin-bottom: 10px !important; }
.es-cta-title { font-size: 1.5rem !important; font-weight: 900 !important; color: #fff !important; margin-bottom: 8px !important; line-height: 1.2 !important; }
.es-cta-sub { color: rgba(255,255,255,0.55) !important; font-size: 0.92rem !important; line-height: 1.6 !important; }
.es-cta-btn { display: inline-block !important; background: linear-gradient(135deg,#00bab5,#006b67) !important; color: #fff !important; font-weight: 900 !important; padding: 15px 32px !important; border-radius: 50px !important; text-decoration: none !important; font-size: 0.9rem !important; letter-spacing: 0.3px !important; white-space: nowrap !important; }
.es-cta-btn:hover { background: linear-gradient(135deg,#00d4ce,#008a84) !important; }

/* Responsive */
@media (max-width: 900px) {
    #sec-mrf-earnings, #sec-eservices { padding: 60px 24px !important; }
    .cb-stat-row { -webkit-flex-wrap: wrap !important; flex-wrap: wrap !important; }
    .cb-stat-card { -webkit-flex: 0 0 calc(50% - 10px) !important; flex: 0 0 calc(50% - 10px) !important; }
    .es-row { -webkit-flex-wrap: wrap !important; flex-wrap: wrap !important; }
    .es-card, .es-empty { -webkit-flex: 0 0 calc(50% - 9px) !important; flex: 0 0 calc(50% - 9px) !important; }
    .es-cta { padding: 32px 24px !important; }
}
@media (max-width: 580px) {
    .cb-stat-card { -webkit-flex: 0 0 100% !important; flex: 0 0 100% !important; }
    .es-card, .es-empty { -webkit-flex: 0 0 100% !important; flex: 0 0 100% !important; }
    .es-empty { display: none !important; }
    .es-cta { padding: 28px 18px !important; }
}

/* ============================================================
   SHARED GOVERNMENT MODAL, DASHBOARD, AND REPORT THEME POLISH
   ============================================================ */
.modal {
    background: rgba(15, 23, 42, 0.72) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

.modal-content,
.modal-content.chart-container,
.review-modal-shell,
#_accountsInfoModal > div,
#credentialModal > div,
#globalConfirmContent {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.94), rgba(248,253,252,0.94)),
        var(--card-bg) !important;
    border: 1.5px solid rgba(0, 155, 150, 0.22) !important;
    border-radius: 24px !important;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.2) !important;
    color: var(--text-color) !important;
}

[data-theme="dark"] .modal-content,
[data-theme="dark"] .modal-content.chart-container,
[data-theme="dark"] .review-modal-shell,
[data-theme="dark"] #_accountsInfoModal > div,
[data-theme="dark"] #credentialModal > div,
[data-theme="dark"] #globalConfirmContent {
    background:
        radial-gradient(circle at top right, rgba(0, 175, 169, 0.16), transparent 34%),
        linear-gradient(180deg, rgba(24,24,24,0.98), rgba(12,18,18,0.98)) !important;
    border-color: rgba(45, 212, 191, 0.24) !important;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.58) !important;
}

.review-modal-header,
#admin-announcementAdminModal .modal-content > div:first-child,
#admin-announcementArchiveModal .modal-content > div:first-child,
.modal[id^="svc-detail-"] .modal-content > div:first-child,
.modal[id^="svc-status-"] .modal-content > div:first-child,
#_accountsInfoModal > div > div:first-child {
    background:
        radial-gradient(circle at 88% 12%, rgba(165,239,73,0.22), transparent 34%),
        linear-gradient(135deg, #073b3a, #009b96 55%, #10b981) !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255,255,255,0.16) !important;
}

.review-close-btn,
#admin-announcementAdminModal .modal-content > div:first-child button,
#admin-announcementArchiveModal .modal-content > div:first-child button,
#_accountsInfoModal > div > div:first-child button {
    background: rgba(255,255,255,0.16) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.24) !important;
    border-radius: 999px !important;
}

.review-close-btn:hover,
#admin-announcementAdminModal .modal-content > div:first-child button:hover,
#admin-announcementArchiveModal .modal-content > div:first-child button:hover,
#_accountsInfoModal > div > div:first-child button:hover {
    background: rgba(255,255,255,0.28) !important;
    transform: translateY(-1px);
}

/* E-services transaction modal system */
.tx-modal-overlay,
.review-modal-overlay {
    background: rgba(15, 23, 42, 0.72) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    padding: 20px !important;
}

.tx-modal-shell,
.review-modal-shell {
    width: min(96vw, 1050px) !important;
    max-height: 92vh !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 28px !important;
    border: 1.5px solid rgba(20, 184, 166, 0.28) !important;
    box-shadow: 0 32px 90px rgba(15, 23, 42, 0.30) !important;
}

.tx-modal-shell-sm {
    width: min(94vw, 520px) !important;
}

.tx-modal-header,
.review-modal-header {
    position: relative;
    overflow: hidden;
    min-height: 110px;
    padding: 28px 34px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: #ffffff !important;
    background:
        radial-gradient(circle at 88% 10%, rgba(165, 239, 73, 0.24), transparent 34%),
        linear-gradient(135deg, #0f172a 0%, #0f3b38 50%, #009b7a 100%) !important;
}

.tx-modal-header::after,
.review-modal-header::after {
    content: "";
    position: absolute;
    top: -72px;
    right: -42px;
    width: 230px;
    height: 230px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(94, 234, 212, 0.24), transparent 66%);
    pointer-events: none;
}

.tx-modal-title-wrap,
.review-modal-title-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.tx-modal-icon,
.review-modal-icon {
    width: 54px !important;
    height: 54px !important;
    flex: 0 0 54px !important;
    border-radius: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #7dd3fc !important;
    background: rgba(0, 186, 181, 0.18) !important;
    border: 1px solid rgba(94, 234, 212, 0.32) !important;
    font-size: 1.2rem !important;
}

.tx-modal-kicker,
.review-modal-kicker {
    margin: 0 0 6px 0 !important;
    color: rgba(255, 255, 255, 0.56) !important;
    font-size: 0.68rem !important;
    font-weight: 900 !important;
    letter-spacing: 1.6px !important;
    text-transform: uppercase !important;
}

.tx-modal-title,
.review-modal-title {
    margin: 0 !important;
    color: #ffffff !important;
    font-size: clamp(1.05rem, 2vw, 1.35rem) !important;
    font-weight: 950 !important;
    line-height: 1.18 !important;
}

.tx-modal-ref,
.review-modal-ref {
    display: block;
    margin-top: 8px !important;
    color: rgba(255, 255, 255, 0.66) !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.02em;
}

.tx-modal-close,
.review-close-btn {
    position: relative;
    z-index: 1;
    width: 46px !important;
    height: 46px !important;
    flex: 0 0 46px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 255, 255, 0.24) !important;
    background: rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.tx-modal-close:hover,
.review-close-btn:hover {
    background: rgba(255, 255, 255, 0.28) !important;
    transform: translateY(-1px);
}

.tx-modal-body,
.review-modal-body {
    padding: 28px !important;
    overflow-y: auto !important;
    background:
        radial-gradient(circle at top left, rgba(0, 186, 181, 0.08), transparent 34%),
        var(--card-bg) !important;
}

.tx-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.tx-info-card,
.review-note,
.review-action-card {
    background: rgba(220, 247, 246, 0.74) !important;
    border: 1.5px solid rgba(20, 184, 166, 0.22) !important;
    border-radius: 20px !important;
    box-shadow: 0 16px 36px rgba(15, 118, 110, 0.08) !important;
}

.tx-info-card {
    padding: 22px;
}

.tx-info-card.full {
    grid-column: 1 / -1;
}

.tx-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(20, 184, 166, 0.20);
}

.tx-card-head i {
    color: var(--accent-teal);
    font-size: 1rem;
}

.tx-card-head h4 {
    margin: 0;
    color: var(--text-color);
    font-size: 0.78rem;
    font-weight: 950;
    letter-spacing: 1.1px;
    text-transform: uppercase;
}

.tx-card-rows {
    display: grid;
    gap: 12px;
}

.tx-field-row {
    display: grid;
    grid-template-columns: minmax(90px, 0.36fr) 1fr;
    gap: 14px;
    align-items: start;
}

.tx-field-label {
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 850;
}

.tx-field-value {
    color: var(--text-color);
    font-size: 0.96rem;
    font-weight: 850;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.tx-field-value.accent {
    color: var(--accent-teal);
    font-size: 1.05rem;
    font-weight: 950;
}

.tx-form-details {
    display: grid;
    gap: 12px;
}

.tx-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 12px;
}

.tx-file-tile {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-direction: column;
    overflow: hidden;
    padding: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    background: var(--card-bg);
    border: 1.5px solid rgba(20, 184, 166, 0.18);
    border-radius: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tx-file-tile:hover {
    transform: translateY(-2px);
    border-color: var(--accent-teal);
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.12);
}

.tx-file-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tx-file-tile i {
    color: var(--accent-teal);
    font-size: 1.75rem;
}

.tx-file-tile span {
    position: relative;
    z-index: 1;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.tx-proof-frame {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1.5px solid rgba(20, 184, 166, 0.16);
}

.tx-proof-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tx-proof-empty {
    height: 100%;
    min-height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.tx-modal-footer {
    padding: 20px 28px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: rgba(220, 247, 246, 0.64);
    border-top: 1.5px solid rgba(20, 184, 166, 0.18);
}

.tx-form-control,
.review-field {
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    border-radius: 12px !important;
    border: 1.5px solid rgba(20, 184, 166, 0.24) !important;
    background: var(--card-bg) !important;
    color: var(--text-color) !important;
    font: inherit !important;
    font-weight: 800 !important;
    padding: 11px 13px !important;
}

.tx-form-control:focus,
.review-field:focus {
    outline: none !important;
    border-color: var(--accent-teal) !important;
    box-shadow: 0 0 0 3px rgba(0, 186, 181, 0.12) !important;
}

.review-choice-grid,
.review-choice-grid-2col {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
}

.review-action-card {
    padding: 20px !important;
}

.review-card-copy,
.review-time-field span {
    color: var(--text-muted) !important;
}

.review-card-icon.approve,
.review-action-btn.approve {
    background: linear-gradient(135deg, #009b96, #10b981) !important;
}

.review-card-icon.reject,
.review-action-btn.reject {
    background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
}

[data-theme="dark"] .tx-info-card,
[data-theme="dark"] .review-note,
[data-theme="dark"] .review-action-card {
    background: rgba(20, 42, 41, 0.86) !important;
    border-color: rgba(45, 212, 191, 0.22) !important;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.36) !important;
}

[data-theme="dark"] .tx-modal-footer {
    background: rgba(14, 30, 30, 0.92);
    border-top-color: rgba(45, 212, 191, 0.18);
}

@media (max-width: 760px) {
    .tx-modal-overlay,
    .review-modal-overlay {
        padding: 10px !important;
    }

    .tx-modal-shell,
    .review-modal-shell {
        width: 100% !important;
        max-height: 94vh !important;
        border-radius: 22px !important;
    }

    .tx-modal-header,
    .review-modal-header {
        min-height: 92px;
        padding: 22px 18px !important;
    }

    .tx-modal-icon,
    .review-modal-icon {
        width: 44px !important;
        height: 44px !important;
        flex-basis: 44px !important;
    }

    .tx-modal-close,
    .review-close-btn {
        width: 40px !important;
        height: 40px !important;
        flex-basis: 40px !important;
    }

    .tx-modal-body,
    .review-modal-body {
        padding: 18px !important;
    }

    .tx-info-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .tx-field-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .tx-modal-footer {
        flex-direction: column-reverse;
        padding: 16px 18px;
    }

    .tx-modal-footer .btn-outline,
    .tx-modal-footer .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

.modal-input,
.premium-input,
.search-input,
.form-select-premium,
input[type="text"],
input[type="email"],
input[type="date"],
input[type="number"],
input[type="password"],
textarea,
select {
    color: var(--text-color) !important;
}

.dashboard-card-layered,
.stat-card-premium,
.rd-card,
.chart-frame-container,
.cms-card,
.modular-card {
    border: 1.5px solid rgba(0, 155, 150, 0.16) !important;
    box-shadow: 0 18px 48px rgba(15, 118, 110, 0.08) !important;
}

[data-theme="dark"] .dashboard-card-layered,
[data-theme="dark"] .stat-card-premium,
[data-theme="dark"] .rd-card,
[data-theme="dark"] .chart-frame-container,
[data-theme="dark"] .cms-card,
[data-theme="dark"] .modular-card {
    border-color: rgba(45, 212, 191, 0.16) !important;
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.42) !important;
}

#analytics-insights .chart-container,
#forecast-reports .revenue-chart,
#forecast-reports [id^="res_chart_"] {
    color: var(--text-color) !important;
}

#analytics-insights .legend text,
#analytics-insights .xtick text,
#analytics-insights .ytick text,
#analytics-insights .gtitle,
#analytics-insights .annotation-text,
#forecast-reports .legend text,
#forecast-reports .xtick text,
#forecast-reports .ytick text,
#forecast-reports .gtitle,
#forecast-reports .annotation-text {
    fill: #0f172a !important;
    color: #0f172a !important;
    paint-order: stroke !important;
    stroke: rgba(255,255,255,0.92) !important;
    stroke-width: 2.25px !important;
}

[data-theme="dark"] #analytics-insights .legend text,
[data-theme="dark"] #analytics-insights .xtick text,
[data-theme="dark"] #analytics-insights .ytick text,
[data-theme="dark"] #analytics-insights .gtitle,
[data-theme="dark"] #analytics-insights .annotation-text,
[data-theme="dark"] #forecast-reports .legend text,
[data-theme="dark"] #forecast-reports .xtick text,
[data-theme="dark"] #forecast-reports .ytick text,
[data-theme="dark"] #forecast-reports .gtitle,
[data-theme="dark"] #forecast-reports .annotation-text {
    fill: #e2e8f0 !important;
    color: #e2e8f0 !important;
    stroke: rgba(15,23,42,0.92) !important;
}

/* Unified teal civic theme for admin dashboards, MRF, transactions, verification, and forecasting */
#overview,
#transactions,
#verifications,
#accounts,
#audit-logs,
#website-maintenance,
#cms,
#analytics-insights,
#forecast-reports,
#mrf,
#prophet-analytics,
.prophet-page,
.mrf-dashboard {
    --admin-surface-glow: rgba(0, 186, 181, 0.08);
}

#overview .premium-card,
#overview .dashboard-card,
#overview .stat-card,
#transactions .premium-card,
#transactions .modular-card,
#verifications .premium-card,
#verifications .modular-card,
#accounts .premium-card,
#audit-logs .premium-card,
#website-maintenance .premium-card,
#cms .cms-card,
#analytics-insights .chart-container,
#forecast-reports .chart-container,
#forecast-reports .revenue-chart,
#mrf .premium-card,
#mrf .modular-card,
.mrf-dashboard .premium-card,
.prophet-page .premium-card,
.prophet-page .chart-card,
.prophet-page .prophet-card {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0.45)),
        var(--card-bg) !important;
    border: 1.5px solid rgba(0, 155, 150, 0.16) !important;
    box-shadow: 0 18px 48px rgba(15, 118, 110, 0.08) !important;
}

[data-theme="dark"] #overview .premium-card,
[data-theme="dark"] #overview .dashboard-card,
[data-theme="dark"] #overview .stat-card,
[data-theme="dark"] #transactions .premium-card,
[data-theme="dark"] #transactions .modular-card,
[data-theme="dark"] #verifications .premium-card,
[data-theme="dark"] #verifications .modular-card,
[data-theme="dark"] #accounts .premium-card,
[data-theme="dark"] #audit-logs .premium-card,
[data-theme="dark"] #website-maintenance .premium-card,
[data-theme="dark"] #cms .cms-card,
[data-theme="dark"] #analytics-insights .chart-container,
[data-theme="dark"] #forecast-reports .chart-container,
[data-theme="dark"] #forecast-reports .revenue-chart,
[data-theme="dark"] #mrf .premium-card,
[data-theme="dark"] #mrf .modular-card,
[data-theme="dark"] .mrf-dashboard .premium-card,
[data-theme="dark"] .prophet-page .premium-card,
[data-theme="dark"] .prophet-page .chart-card,
[data-theme="dark"] .prophet-page .prophet-card {
    background:
        linear-gradient(180deg, rgba(20, 184, 166, 0.08), rgba(15, 23, 42, 0.12)),
        var(--card-bg) !important;
    border-color: rgba(45, 212, 191, 0.17) !important;
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.42) !important;
}

#transactions .search-container,
#transactions select,
#verifications .search-container,
#verifications select,
#accounts .search-container,
#accounts select,
#audit-logs .search-container,
#audit-logs select,
#cms input,
#cms textarea,
#cms select,
#website-maintenance input,
#website-maintenance textarea,
#website-maintenance select,
.prophet-page select,
.prophet-page input,
.mrf-dashboard input,
.mrf-dashboard select,
.mrf-dashboard textarea {
    border-color: rgba(0, 155, 150, 0.18) !important;
    background: var(--input-bg) !important;
    color: var(--text-color) !important;
}

#transactions .modern-table,
#verifications .modern-table,
#accounts .modern-table,
#audit-logs .modern-table,
[id^="service-"] .modern-table {
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
}

#transactions .modern-table tbody tr,
#verifications .modern-table tbody tr,
#accounts .modern-table tbody tr,
#audit-logs .modern-table tbody tr,
[id^="service-"] .modern-table tbody tr {
    background: var(--card-bg) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 26px rgba(15, 118, 110, 0.06) !important;
}

#transactions .modern-table th,
#verifications .modern-table th,
#accounts .modern-table th,
#audit-logs .modern-table th,
[id^="service-"] .modern-table th {
    color: var(--accent-teal) !important;
    letter-spacing: 0.04em;
}

#analytics-insights select,
#forecast-reports select {
    min-height: 44px;
    border-radius: 12px !important;
}

#cms-help-faq-card {
    position: relative;
    overflow: hidden;
}

#cms-help-faq-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: linear-gradient(180deg, var(--accent-teal), #a5ef49);
}

@media (max-width: 768px) {
    #transactions .premium-card,
    #verifications .premium-card,
    #accounts .premium-card,
    #audit-logs .premium-card,
    #website-maintenance .premium-card,
    #cms .cms-card,
    [id^="service-"] .modular-card {
        padding: 18px !important;
        border-radius: 18px !important;
    }
}

/* Final resident UI and modal polish */
body.compact-nav .sidebar:not(:hover) .menu-item:hover,
.sidebar.collapsed .menu-item:hover {
    transform: none !important;
    background: rgba(0, 186, 181, 0.14) !important;
    color: var(--accent-teal) !important;
    border-left-color: var(--accent-teal) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 186, 181, 0.18) !important;
}

body.compact-nav .sidebar:not(:hover) .menu-item:hover .menu-icon,
.sidebar.collapsed .menu-item:hover .menu-icon {
    color: var(--accent-teal) !important;
}

#profile-tab-personal .profile-grid {
    display: grid !important;
    grid-template-columns: minmax(360px, 0.9fr) minmax(560px, 1.25fr) !important;
    gap: 22px !important;
    align-items: stretch !important;
}

#profile-tab-personal .profile-module {
    min-height: 0 !important;
}

#profile-tab-personal .profile-avatar-container {
    width: 104px !important;
    height: 104px !important;
}

#profile-tab-personal .bottom-right-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.82fr) !important;
}

#profile-tab-personal .profile-data-value,
#profile-tab-personal .contact-link {
    overflow-wrap: anywhere !important;
}

#resident-transactions,
#e-services {
    background:
        radial-gradient(circle at 8% 6%, rgba(0, 186, 181, 0.10), transparent 28%),
        radial-gradient(circle at 92% 8%, rgba(165, 239, 73, 0.12), transparent 30%),
        var(--bg-color) !important;
}

#resident-transactions .premium-card,
#e-services .premium-card,
#e-services .chart-container,
#resident-transactions .chart-container {
    border: 1.5px solid rgba(20, 184, 166, 0.18) !important;
    box-shadow: 0 18px 42px rgba(15, 118, 110, 0.08) !important;
}

#trxDetailModal > div,
#claimStubModal > div {
    border: 1.5px solid rgba(20, 184, 166, 0.28) !important;
    box-shadow: 0 32px 90px rgba(15, 23, 42, 0.32) !important;
}

#trxDetailModal > div > div:first-child,
#claimStubModal > div > div:first-child {
    min-height: 96px;
    color: #ffffff !important;
    border-bottom: none !important;
    background:
        radial-gradient(circle at 88% 10%, rgba(165, 239, 73, 0.24), transparent 34%),
        linear-gradient(135deg, #0f172a 0%, #0f3b38 50%, #009b7a 100%) !important;
}

#trxDetailModal > div > div:first-child h3,
#claimStubModal > div > div:first-child h3,
#trxDetailModal > div > div:first-child p,
#claimStubModal > div > div:first-child p {
    color: #ffffff !important;
}

#claimStubModal #claimStubPrintArea {
    background:
        radial-gradient(circle at top left, rgba(0, 186, 181, 0.08), transparent 34%),
        var(--card-bg) !important;
}

#claimStubModal #stubScheduleDisplay,
.blotter-tracker-wrap > div:first-of-type {
    border: 1.5px solid rgba(20, 184, 166, 0.22) !important;
    background: rgba(220, 247, 246, 0.74) !important;
    box-shadow: 0 16px 36px rgba(15, 118, 110, 0.08) !important;
}

[data-theme="dark"] #claimStubModal #stubScheduleDisplay,
[data-theme="dark"] .blotter-tracker-wrap > div:first-of-type {
    background: rgba(20, 42, 41, 0.86) !important;
    border-color: rgba(45, 212, 191, 0.22) !important;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.36) !important;
}

tr[id^="tracker-row-"] > td > div {
    border: 1.5px solid rgba(20, 184, 166, 0.18) !important;
    background:
        radial-gradient(circle at top left, rgba(0, 186, 181, 0.08), transparent 34%),
        var(--card-bg) !important;
}

#cms .cms-footer .btn-primary,
#cms .cms-footer .btn-outline,
.cms-card .btn-primary,
.cms-card .btn-outline {
    min-height: 44px !important;
    border-radius: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-weight: 900 !important;
}

.cms-edit-page-btn {
    min-height: 42px !important;
    padding: 10px 22px !important;
    border-radius: 12px !important;
    border: 1.5px solid rgba(20, 184, 166, 0.28) !important;
    background: linear-gradient(135deg, var(--accent-teal), #10b981) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 22px rgba(0, 186, 181, 0.18) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

.cms-edit-page-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 14px 28px rgba(0, 186, 181, 0.24) !important;
}

@media (max-width: 1100px) {
    .home-announcements-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    .home-announcements-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 1100px) {
    #profile-tab-personal .profile-grid,
    #profile-tab-personal .bottom-right-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 640px) {
    #resident-transactions,
    #e-services,
    #profile {
        padding: 18px !important;
        border-radius: 20px !important;
    }

    #profile-tab-personal .profile-module[style*="display: flex"] {
        gap: 18px !important;
    }

    #resident-transactions .premium-card {
        padding: 18px !important;
    }
}

/* Barangay information and teal theme refinements */
.community-stat-card {
    background:
        linear-gradient(135deg, rgba(0, 186, 181, 0.08), rgba(16, 185, 129, 0.05)),
        var(--input-bg) !important;
    border-radius: 16px !important;
    padding: 18px 20px !important;
    border: 1px solid rgba(0, 186, 181, 0.16) !important;
    box-shadow: 0 10px 24px rgba(0, 155, 150, 0.07);
}

.community-stat-icon {
    color: var(--accent-teal);
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.community-stat-value {
    font-size: 1.55rem;
    font-weight: 950;
    color: var(--text-color);
    line-height: 1.1;
}

.community-stat-label {
    font-size: 0.78rem;
    font-weight: 850;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

.community-stat-detail {
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1.4;
    margin-top: 8px;
}

.community-demographic-panel {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.community-demographic-card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 186, 181, 0.16);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 22px rgba(0, 155, 150, 0.05);
}

.community-demographic-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--text-color);
    font-weight: 900;
    margin-bottom: 12px;
}

.community-demographic-title strong {
    color: var(--accent-teal);
    font-size: 0.8rem;
    white-space: nowrap;
}

.community-demographic-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.community-demographic-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: var(--input-bg);
    border-radius: 10px;
    padding: 8px 10px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.community-demographic-list strong {
    color: var(--text-color);
    font-weight: 900;
}

.home-announcements-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    max-width: 920px;
    margin: 0 auto;
}

.faq-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.faq-data-card,
.faq-table-card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 186, 181, 0.18);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 10px 26px rgba(0, 155, 150, 0.06);
}

.faq-data-card span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.faq-data-card strong {
    display: block;
    color: var(--text-color);
    font-size: 1.45rem;
    font-weight: 950;
    margin-top: 8px;
}

.faq-data-card small {
    display: block;
    color: var(--text-muted);
    font-weight: 650;
    margin-top: 6px;
    line-height: 1.45;
}

.faq-table-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.faq-table-card-header h4 {
    margin: 0;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 900;
}

.faq-table-card-header span {
    color: var(--accent-teal);
    background: rgba(0, 186, 181, 0.08);
    border: 1px solid rgba(0, 186, 181, 0.18);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.74rem;
    font-weight: 850;
}

.faq-mini-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.faq-mini-table th,
.faq-mini-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    text-align: left;
}

.faq-mini-table th {
    background: rgba(0, 186, 181, 0.08);
    color: var(--accent-teal);
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.faq-mini-table tr:last-child td {
    border-bottom: 0;
}

.faq-table-chip {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(0, 186, 181, 0.1);
    color: var(--accent-teal);
    font-size: 0.75rem;
    font-weight: 900;
}

.faq-boundary-grid,
.faq-evacuation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.faq-boundary-grid div,
.faq-evacuation-card {
    background: var(--input-bg);
    border: 1px solid rgba(0, 186, 181, 0.14);
    border-radius: 14px;
    padding: 14px;
}

.faq-boundary-grid span,
.faq-evacuation-card h5 {
    display: block;
    color: var(--accent-teal);
    font-size: 0.75rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 8px;
}

.faq-boundary-grid strong,
.faq-evacuation-card span {
    display: block;
    color: var(--text-color);
    font-weight: 750;
    line-height: 1.45;
}

.faq-evacuation-card span + span {
    margin-top: 6px;
}

.dashboard-section:not(#home) {
    background:
        radial-gradient(circle at top left, rgba(0, 186, 181, 0.08), transparent 34%),
        radial-gradient(circle at bottom right, rgba(165, 239, 73, 0.08), transparent 30%),
        var(--body-bg, transparent);
}

.dashboard-section .premium-card,
.dashboard-section .stat-card-premium,
.dashboard-section .profile-module,
.dashboard-section .cms-card,
.dashboard-section .table-container,
.dashboard-section .chart-container,
.dashboard-section .modern-card,
.dashboard-section .content-card {
    border-color: rgba(0, 186, 181, 0.18) !important;
    box-shadow: 0 12px 32px rgba(0, 155, 150, 0.07) !important;
}

[data-theme="dark"] .dashboard-section .premium-card,
[data-theme="dark"] .dashboard-section .stat-card-premium,
[data-theme="dark"] .dashboard-section .profile-module,
[data-theme="dark"] .dashboard-section .cms-card,
[data-theme="dark"] .dashboard-section .table-container,
[data-theme="dark"] .dashboard-section .chart-container,
[data-theme="dark"] .dashboard-section .modern-card,
[data-theme="dark"] .dashboard-section .content-card {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25) !important;
}

#profile-tab-personal .profile-grid {
    grid-template-columns: minmax(340px, 0.8fr) minmax(680px, 1.6fr) !important;
    gap: 18px !important;
    align-items: start !important;
}

#profile-tab-personal .bottom-right-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr) !important;
    gap: 18px !important;
}

#profile-tab-personal .profile-module {
    padding: 20px !important;
}

#profile-tab-personal .profile-avatar-container {
    width: 108px !important;
    height: 108px !important;
    margin-bottom: 0 !important;
}

@media (max-width: 1180px) {
    #profile-tab-personal .profile-grid,
    #profile-tab-personal .bottom-right-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 760px) {
    .community-demographic-list,
    .home-announcements-grid {
        grid-template-columns: 1fr !important;
    }

    .faq-table-card-header {
        flex-direction: column;
    }
}
