/* --- G-Gram Web Forms Design System (Premium Teal & Indigo Theme) --- */

:root {
    --bg-color: #eef2f5; /* Cool light gray-teal */
    --card-bg: rgba(255, 255, 255, 0.75); /* translucent light */
    --card-hover-bg: rgba(255, 255, 255, 0.95);
    --card-border: rgba(15, 23, 42, 0.06); /* slate 900 at 6% */
    --primary-glow: #0d9488; /* Premium Teal */
    --secondary-glow: #6366f1; /* Premium Indigo */
    --success-glow: #10b981; /* Emerald green */
    --warning-glow: #f59e0b; /* Amber */
    --danger-glow: #ef4444; /* Coral Red */
    --text-main: #1e293b; /* Slate 800 */
    --text-muted: #64748b; /* Slate 500 */
    --sidebar-width: 260px;
    --header-height: 70px;
}

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(13, 148, 136, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(99, 102, 241, 0.08) 0px, transparent 50%);
    color: var(--text-main);
    font-family: 'Inter', 'Anek Gujarati', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, 0.2);
}

/* App Wrap */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

/* Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-right: 1px solid var(--card-border);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.sidebar-header {
    border-bottom: 1px solid var(--card-border);
    padding: 1.5rem 1rem 1.25rem 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-brand-wrapper {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    position: relative;
}

.sidebar-logo-glow {
    position: absolute;
    width: 32px;
    height: 32px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, transparent 70%);
    top: -2px;
    left: -2px;
    filter: blur(4px);
    z-index: 1;
    pointer-events: none;
}

.sidebar-logo-svg {
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 4px 6px rgba(15, 23, 42, 0.15));
    transition: transform 0.3s ease;
}

.sidebar-brand-wrapper:hover .sidebar-logo-svg {
    transform: rotate(10deg) scale(1.08);
}

.sidebar-brand {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    background: linear-gradient(135deg, var(--primary-glow), var(--secondary-glow));
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    letter-spacing: -0.5px !important;
    text-decoration: none !important;
    margin-bottom: 0 !important;
    line-height: 1 !important;
}

.sidebar-role-badge {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(139, 92, 246, 0.06)) !important;
    border: 1px solid rgba(99, 102, 241, 0.15) !important;
    color: var(--secondary-glow) !important;
    padding: 0.3rem 0.85rem !important;
    border-radius: 20px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.75px !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.05);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-item-custom {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.88rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-item-custom:hover {
    background: var(--card-hover-bg);
    color: var(--text-main);
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.03);
    text-decoration: none;
}
.nav-item-custom:hover svg {
    transform: scale(1.15);
}

.nav-item-custom.active {
    font-weight: 600;
}

/* Specific Active Page Themes */
#navDashboard.active {
    background: rgba(59, 130, 246, 0.07) !important;
    border: 1px solid rgba(59, 130, 246, 0.15) !important;
    color: #3b82f6 !important;
}
#navDistrict.active {
    background: rgba(99, 102, 241, 0.07) !important;
    border: 1px solid rgba(99, 102, 241, 0.15) !important;
    color: #6366f1 !important;
}
#navTaluka.active {
    background: rgba(139, 92, 246, 0.07) !important;
    border: 1px solid rgba(139, 92, 246, 0.15) !important;
    color: #8b5cf6 !important;
}
#navVillage.active {
    background: rgba(16, 185, 129, 0.07) !important;
    border: 1px solid rgba(16, 185, 129, 0.15) !important;
    color: #10b981 !important;
}
#navAkarni.active {
    background: rgba(13, 148, 136, 0.07) !important;
    border: 1px solid rgba(13, 148, 136, 0.15) !important;
    color: #0d9488 !important;
}
#navMasPatrak.active {
    background: rgba(249, 115, 22, 0.07) !important;
    border: 1px solid rgba(249, 115, 22, 0.15) !important;
    color: #f97316 !important;
}
#navUsers.active {
    background: rgba(245, 158, 11, 0.07) !important;
    border: 1px solid rgba(245, 158, 11, 0.15) !important;
    color: #f59e0b !important;
}
#navVyavsayMagnu.active {
    background: rgba(168, 85, 247, 0.07) !important;
    border: 1px solid rgba(168, 85, 247, 0.15) !important;
    color: #a855f7 !important;
}
#navDailyIncome.active {
    background: rgba(14, 165, 233, 0.07) !important;
    border: 1px solid rgba(14, 165, 233, 0.15) !important;
    color: #0ea5e9 !important;
}

/* Sidebar Menu Colorful Icons */
.nav-item-custom svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

#navDashboard svg {
    color: #3b82f6 !important; /* Blue */
}

#navDistrict svg {
    color: #6366f1 !important; /* Indigo */
}

#navTaluka svg {
    color: #8b5cf6 !important; /* Purple */
}

#navVillage svg {
    color: #10b981 !important; /* Emerald */
}

#navAkarni svg {
    color: #0d9488 !important; /* Teal */
}

#navMasPatrak svg {
    color: #f97316 !important; /* Orange/Coral */
}

#navUsers svg {
    color: #f59e0b !important; /* Amber */
}
#navVyavsayMagnu svg {
    color: #a855f7 !important; /* Purple/Violet */
}
#navDailyIncome svg {
    color: #0ea5e9 !important; /* Sky Blue */
}

#lnkLogout svg {
    color: #f43f5e !important; /* Rose */
}

/* Container */
.app-container {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Top Navbar */
.app-header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 90;
}

.user-badge {
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.15);
    color: var(--secondary-glow);
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.logged-in-highlight {
    background: rgba(59, 130, 246, 0.08) !important;
    border: 1px solid rgba(59, 130, 246, 0.18) !important;
    color: #2563eb !important;
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600 !important;
    text-transform: uppercase;
}

/* Page Body */
.page-body {
    padding: 2rem;
    flex-grow: 1;
    min-width: 0;
}

/* Stat Cards */
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 1.8rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(15, 23, 42, 0.15);
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--glow-color, var(--primary-glow));
    filter: blur(70px);
    opacity: 0.08;
    pointer-events: none;
}

.stat-title {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

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

/* Table Card / Grids */
.table-responsive-custom {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-bottom: 2rem;
}

.table-custom {
    width: 100%;
    margin-bottom: 0;
    color: var(--text-main);
    border-collapse: collapse;
}

.table-custom th {
    background: rgba(15, 23, 42, 0.02);
    border-bottom: 1px solid var(--card-border);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 1.2rem 1.5rem;
}

.table-custom td {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--card-border);
    vertical-align: middle;
}

.table-custom tr:last-child td {
    border-bottom: none;
}

.table-custom tbody tr {
    transition: background 0.3s ease;
}

.table-custom tbody tr:hover {
    background: rgba(15, 23, 42, 0.01);
}

/* GridView Standard Styles override */
.gridview-custom {
    width: 100% !important;
    border-collapse: collapse !important;
    border: none !important;
    background: transparent !important;
    color: var(--text-main) !important;
}

.gridview-custom th {
    background: rgba(15, 23, 42, 0.02) !important;
    border-bottom: 1px solid var(--card-border) !important;
    color: var(--text-muted) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.5px !important;
    padding: 0.75rem 1.2rem !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
}

.gridview-custom td {
    padding: 0.65rem 1.2rem !important;
    border-bottom: 1px solid var(--card-border) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    background: transparent !important;
    color: var(--text-main) !important;
    font-size: 0.92rem !important;
}

.gridview-custom tr:hover td {
    background: rgba(15, 23, 42, 0.01) !important;
}

/* Glass Cards */
.card-custom {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin-bottom: 2rem;
}

/* Form Controls */
.form-label-custom {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    display: block;
}

.form-control-custom, .form-select-custom {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid var(--card-border) !important;
    border-radius: 12px !important;
    color: var(--text-main) !important;
    padding: 0.85rem 1.2rem !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease !important;
    display: block;
    width: 100%;
}

.form-control-custom:focus, .form-select-custom:focus {
    background: #ffffff !important;
    border-color: var(--primary-glow) !important;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.15) !important;
    outline: none !important;
}

.form-select-custom option {
    background-color: #ffffff;
    color: var(--text-main);
}

/* Buttons */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-glow), var(--secondary-glow));
    border: none;
    color: white !important;
    font-weight: 600;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.15);
    display: inline-block;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.25);
    filter: brightness(1.05);
    color: white !important;
    text-decoration: none;
}

.btn-secondary-custom {
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-main) !important;
    font-weight: 600;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
}

.btn-secondary-custom:hover {
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-main) !important;
    transform: translateY(-2px);
    text-decoration: none;
}

/* Icon-Only Action Buttons */
.btn-action {
    width: 32px;
    height: 32px;
    border-radius: 50%; /* circular button */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-action svg {
    width: 14px;
    height: 14px;
}

.btn-action-edit {
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.15);
    color: var(--primary-glow) !important;
}

.btn-action-edit:hover {
    background: var(--primary-glow);
    color: white !important;
    transform: scale(1.1);
}

.btn-action-delete {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.15);
    color: var(--danger-glow) !important;
}

.btn-action-delete:hover {
    background: var(--danger-glow);
    color: white !important;
    transform: scale(1.1);
}

.btn-action-settings {
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.15);
    color: var(--secondary-glow) !important;
}

.btn-action-settings:hover {
    background: var(--secondary-glow);
    color: white !important;
    transform: scale(1.1);
}

.btn-action-users {
    background: rgba(5, 150, 105, 0.08);
    border: 1px solid rgba(5, 150, 105, 0.15);
    color: var(--success-glow) !important;
}

.btn-action-users:hover {
    background: var(--success-glow);
    color: white !important;
    transform: scale(1.1);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Global utility class overrides for light theme */
.text-light {
    color: var(--text-main) !important;
}
.text-muted {
    color: var(--text-muted) !important;
}

/* Custom Checkbox styles for privilege matrix */
.checkbox-list-custom {
    padding-left: 0;
    margin-bottom: 0;
}
.checkbox-list-custom span {
    display: block;
    margin-bottom: 0.4rem;
}
.checkbox-list-custom input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border: 1px solid var(--card-border);
    border-radius: 4px;
    background-color: rgba(15, 23, 42, 0.05);
    cursor: pointer;
    vertical-align: middle;
    margin-right: 0.4rem;
    accent-color: var(--primary-glow) !important;
}
.checkbox-list-custom label {
    font-size: 0.85rem;
    color: var(--text-main);
    cursor: pointer;
    vertical-align: middle;
    margin-bottom: 0;
}

/* Custom inline checkboxes alignment */
.form-check-input-custom {
    display: inline-flex !important;
    align-items: center !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
}
.form-check-input-custom input[type="checkbox"] {
    width: 15px !important;
    height: 15px !important;
    margin: 0 0.35rem 0 0 !important;
    padding: 0 !important;
    cursor: pointer !important;
    accent-color: var(--primary-glow) !important;
    vertical-align: middle !important;
}
.form-check-input-custom label {
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    color: var(--text-main) !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle !important;
    line-height: 1.2 !important;
}
.form-check-input-custom.small label {
    font-weight: 600 !important;
    font-size: 0.76rem !important;
    color: var(--text-muted) !important;
}

/* Global Checkbox theme coloring */
input[type="checkbox"] {
    accent-color: var(--primary-glow) !important;
}

/* Select2 Premium Theme Customization */
.select2-container {
    width: 100% !important;
}
.select2-container--default .select2-selection--single {
    background-color: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid var(--card-border) !important;
    border-radius: 12px !important;
    height: auto !important;
    padding: 0.5rem 0.85rem !important;
    transition: all 0.3s ease !important;
    display: flex;
    align-items: center;
}
.select2-container--default .select2-selection--single:focus,
.select2-container--default.select2-container--open .select2-selection--single {
    background-color: #ffffff !important;
    border-color: var(--primary-glow) !important;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.15) !important;
    outline: none !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-main) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    font-size: 0.95rem !important;
    line-height: normal !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    right: 12px !important;
    display: flex;
    align-items: center;
}
.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--text-muted) transparent transparent transparent !important;
}
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent var(--text-muted) transparent !important;
}
.select2-dropdown {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid var(--card-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    overflow: hidden !important;
    z-index: 9999 !important;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid var(--card-border) !important;
    border-radius: 8px !important;
    padding: 0.5rem 0.8rem !important;
    outline: none !important;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary-glow) !important;
    color: #ffffff !important;
}
.select2-container--default .select2-results__option {
    padding: 0.6rem 1rem !important;
    font-size: 0.95rem !important;
    color: var(--text-main) !important;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--text-muted) !important;
}

/* --- Soothing Light Dashboard Cards & Welcome Card (Design System Extensions) --- */
.welcome-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(124, 58, 237, 0.05));
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.card-light-theme {
    border-radius: 24px;
    padding: 1.6rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: 100%;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.02);
}
.card-light-theme:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}
.card-light-theme .card-title-muted {
    color: var(--text-muted) !important;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
    display: block;
}
.card-light-theme .card-value-colored {
    font-size: 1.65rem;
    font-weight: 800;
}
.card-light-theme .icon-wrap-light {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}
.card-light-theme:hover .icon-wrap-light {
    transform: scale(1.08);
}
.card-light-theme .icon-wrap-light svg {
    width: 22px;
    height: 22px;
}
.financial-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}

/* Soft Tint Themes */

/* Blue Theme */
.theme-blue {
    background-color: rgba(59, 130, 246, 0.04);
    border: 1px solid rgba(59, 130, 246, 0.12);
}
.theme-blue:hover {
    background-color: rgba(59, 130, 246, 0.07);
    border-color: rgba(59, 130, 246, 0.22);
}
.theme-blue .card-value-colored {
    color: #1d4ed8 !important;
}
.theme-blue .icon-wrap-light {
    background-color: rgba(59, 130, 246, 0.08);
    color: #1d4ed8;
}

/* Emerald Theme */
.theme-emerald {
    background-color: rgba(16, 185, 129, 0.04);
    border: 1px solid rgba(16, 185, 129, 0.12);
}
.theme-emerald:hover {
    background-color: rgba(16, 185, 129, 0.07);
    border-color: rgba(16, 185, 129, 0.22);
}
.theme-emerald .card-value-colored {
    color: #047857 !important;
}
.theme-emerald .icon-wrap-light {
    background-color: rgba(16, 185, 129, 0.08);
    color: #047857;
}

/* Purple Theme */
.theme-purple {
    background-color: rgba(139, 92, 246, 0.04);
    border: 1px solid rgba(139, 92, 246, 0.12);
}
.theme-purple:hover {
    background-color: rgba(139, 92, 246, 0.07);
    border-color: rgba(139, 92, 246, 0.22);
}
.theme-purple .card-value-colored {
    color: #6d28d9 !important;
}
.theme-purple .icon-wrap-light {
    background-color: rgba(139, 92, 246, 0.08);
    color: #6d28d9;
}

/* Amber Theme */
.theme-amber {
    background-color: rgba(245, 158, 11, 0.04);
    border: 1px solid rgba(245, 158, 11, 0.12);
}
.theme-amber:hover {
    background-color: rgba(245, 158, 11, 0.07);
    border-color: rgba(245, 158, 11, 0.22);
}
.theme-amber .card-value-colored {
    color: #b45309 !important;
}
.theme-amber .icon-wrap-light {
    background-color: rgba(245, 158, 11, 0.08);
    color: #b45309;
}

/* Indigo Theme */
.theme-indigo {
    background-color: rgba(99, 102, 241, 0.04);
    border: 1px solid rgba(99, 102, 241, 0.12);
}
.theme-indigo:hover {
    background-color: rgba(99, 102, 241, 0.07);
    border-color: rgba(99, 102, 241, 0.22);
}
.theme-indigo .card-value-colored {
    color: #4338ca !important;
}
.theme-indigo .icon-wrap-light {
    background-color: rgba(99, 102, 241, 0.08);
    color: #4338ca;
}

/* Pink Theme */
.theme-pink {
    background-color: rgba(236, 72, 153, 0.04);
    border: 1px solid rgba(236, 72, 153, 0.12);
}
.theme-pink:hover {
    background-color: rgba(236, 72, 153, 0.07);
    border-color: rgba(236, 72, 153, 0.22);
}
.theme-pink .card-value-colored {
    color: #be185d !important;
}
.theme-pink .icon-wrap-light {
    background-color: rgba(236, 72, 153, 0.08);
    color: #be185d;
}

/* Teal Theme */
.theme-teal {
    background-color: rgba(20, 184, 166, 0.04);
    border: 1px solid rgba(20, 184, 166, 0.12);
}
.theme-teal:hover {
    background-color: rgba(20, 184, 166, 0.07);
    border-color: rgba(20, 184, 166, 0.22);
}
.theme-teal .card-value-colored {
    color: #0f766e !important;
}
.theme-teal .icon-wrap-light {
    background-color: rgba(20, 184, 166, 0.08);
    color: #0f766e;
}

/* Rose Theme */
.theme-rose {
    background-color: rgba(244, 63, 94, 0.04);
    border: 1px solid rgba(244, 63, 94, 0.12);
}
.theme-rose:hover {
    background-color: rgba(244, 63, 94, 0.07);
    border-color: rgba(244, 63, 94, 0.22);
}
.theme-rose .card-value-colored {
    color: #be123c !important;
}
.theme-rose .icon-wrap-light {
    background-color: rgba(244, 63, 94, 0.08);
    color: #be123c;
}

/* Logout Badge */
.logout-badge {
    background: rgba(239, 68, 68, 0.08); /* light red tint */
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: var(--danger-glow);
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}

.logout-badge:hover,
.logout-badge:focus {
    background: var(--danger-glow);
    border-color: var(--danger-glow);
    color: white !important;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.logout-badge svg {
    transition: transform 0.2s ease;
}

.logout-badge:hover svg {
    transform: translateX(-2px);
}

/* Grid Header Column Filters */
.grid-filter-container {
    margin-top: 0.5rem;
}

.grid-filter-input {
    font-size: 0.72rem !important;
    padding: 0.25rem 0.5rem !important;
    background: rgba(255, 255, 255, 0.55) !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    border-radius: 8px !important;
    color: var(--text-main) !important;
    font-weight: 500 !important;
    width: 100% !important;
    transition: all 0.2s ease !important;
}

.grid-filter-input:focus {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: var(--primary-glow) !important;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15) !important;
    outline: none !important;
}

.gridview-custom th {
    vertical-align: middle !important;
}

/* Compact Dashboard Custom Styles */
.bg-emerald {
    background-color: rgba(16, 185, 129, 0.05) !important;
}
.border-emerald {
    border-color: rgba(16, 185, 129, 0.15) !important;
}
.bg-rose {
    background-color: rgba(244, 63, 94, 0.05) !important;
}
.border-rose {
    border-color: rgba(244, 63, 94, 0.15) !important;
}
.bg-blue {
    background-color: rgba(59, 130, 246, 0.05) !important;
}
.border-blue {
    border-color: rgba(59, 130, 246, 0.15) !important;
}
.text-light-50 {
    color: rgba(30, 41, 59, 0.7) !important; /* Slate 800 at 70% opacity */
}
.text-main-theme {
    color: var(--text-main) !important;
}
.fs-8 {
    font-size: 0.75rem !important;
}

/* Theme Percentage Badges */
.theme-blue .badge-theme {
    background-color: rgba(59, 130, 246, 0.1) !important;
    border: 1px solid rgba(59, 130, 246, 0.15) !important;
    color: #1d4ed8 !important;
}
.theme-emerald .badge-theme {
    background-color: rgba(16, 185, 129, 0.1) !important;
    border: 1px solid rgba(16, 185, 129, 0.15) !important;
    color: #047857 !important;
}
.theme-teal .badge-theme {
    background-color: rgba(20, 184, 166, 0.1) !important;
    border: 1px solid rgba(20, 184, 166, 0.15) !important;
    color: #0f766e !important;
}
.theme-purple .badge-theme {
    background-color: rgba(139, 92, 246, 0.1) !important;
    border: 1px solid rgba(139, 92, 246, 0.15) !important;
    color: #6d28d9 !important;
}
.theme-indigo .badge-theme {
    background-color: rgba(99, 102, 241, 0.1) !important;
    border: 1px solid rgba(99, 102, 241, 0.15) !important;
    color: #4f46e5 !important;
}
.theme-pink .badge-theme {
    background-color: rgba(236, 72, 153, 0.1) !important;
    border: 1px solid rgba(236, 72, 153, 0.15) !important;
    color: #be185d !important;
}

/* Mobile Responsive Layout and PWA Overrides */
@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1050;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    }
    .app-sidebar.show {
        transform: translateX(0);
    }
    .app-container {
        margin-left: 0 !important;
    }
    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(15, 23, 42, 0.4);
        backdrop-filter: blur(4px);
        z-index: 1040;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    .sidebar-backdrop.show {
        display: block;
        opacity: 1;
    }
    .btn-sidebar-toggle {
        background: transparent;
        border: none;
        color: var(--text-main);
        padding: 0.5rem;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
    .btn-sidebar-toggle:hover {
        background: rgba(15, 23, 42, 0.05);
    }
    .app-header {
        padding: 0 1rem !important;
    }
    .app-header .fs-5 {
        font-size: 1.1rem !important;
    }
}

/* Sidebar Footer & Logout Styling */
.sidebar-footer {
    border-top: 1px solid var(--card-border);
    padding-top: 1.25rem;
    margin-top: auto;
}

.sidebar-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(239, 68, 68, 0.05) !important;
    border: 1px solid rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.sidebar-logout-btn:hover {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
    transform: translateY(-1px);
}

.sidebar-logout-btn svg {
    transition: transform 0.2s ease;
}

.sidebar-logout-btn:hover svg {
    transform: translateX(-2px);
}



