/**
 * Global Custom Standards & Theme
 */

:root {
    /* Pure Premium Sapphire & Seal Gold */
    --primary-color: #0c1a32;
    --primary-light: #1a2f52;
    --primary-dark: #070f1d;
    --secondary-color: #d4af37;
    /* Metallic Seal Gold */
    --secondary-bright: #f1cf6d;
    --secondary-dim: #b8860b;

    --accent-color: #6366f1;
    /* Premium Indigo */
    --success-color: #10b981;
    --danger-color: #ef4444;
    --text-color: #0f172a;
    /* Slate 900 */
    --text-muted: #64748b;
    /* Slate 500 */
    --bg-light: #f8fafc;
    --white: #ffffff;

    /* Typography Tokens */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Glassmorphism 2.0 Tokens */
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-bg-dark: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.35);
    --glass-border-dark: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(12px);

    /* Layered Soft Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(15, 33, 71, 0.1), 0 4px 6px -2px rgba(15, 33, 71, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(15, 33, 71, 0.15), 0 10px 10px -5px rgba(15, 33, 71, 0.04);

    /* Premium Gradients */
    --gold-gradient: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    --navy-gradient: linear-gradient(135deg, #0c1a32 0%, #070f1d 100%);
    --glass-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.3) 100%);
}

.page-container {
    min-height: 100vh !important;
    overflow-x: hidden !important;
}

.content-body {
    min-height: 100vh !important;
    width: 100% !important;
    position: relative !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.admin-layout {
    flex-direction: row !important;
    /* Sidebar and content side-by-side */
}

.guest-layout {
    display: block !important;
}

body {
    background-color: var(--bg-light) !important;
    min-height: 100vh !important;
    font-family: var(--font-body) !important;
    font-size: 0.85rem !important;
    color: var(--text-color) !important;
    margin: 0 !important;
    padding: 0 !important;
    padding-top: 0.1px !important;
    overflow-x: hidden !important;
    scroll-behavior: smooth !important;
    opacity: 1 !important;
    visibility: visible !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6,
.card-title,
.logo-text {
    font-family: var(--font-heading) !important;
}

/* --- REVEAL ANIMATIONS --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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


@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

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

/* --- NEW VISIBILITY IMPROVEMENTS --- */
.task-help-text {
    background: rgba(255, 255, 255, 0.95);
    color: #334155;
    /* Slate 700 */
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border-left: 4px solid var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 0.8rem;
    line-height: 1.5;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: flex-start;
}

.task-help-text i {
    color: var(--secondary-color);
    margin-right: 12px;
    font-size: 1.1rem;
    margin-top: 2px;
}

/* --- MOBILE RESPONSIVENESS TWEAKS --- */
@media (max-width: 768px) {
    .task-help-text {
        padding: 10px 14px;
        font-size: 0.75rem;
    }

    .page-content-wrapper {
        padding-top: 60px;
        /* Space for mobile navbar */
    }

    .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* Improve table scrolling on mobile */
    .table-responsive {
        border-radius: 12px;
        box-shadow: var(--shadow-sm);
    }

    /* Adjust titles on mobile */
    h1.font-weight-bold {
        font-size: 1.2rem !important;
    }

    .badge {
        font-size: 0.65rem !important;
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

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

.reveal {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.stagger-1 {
    animation-delay: 100ms;
}

.stagger-2 {
    animation-delay: 200ms;
}

.stagger-3 {
    animation-delay: 300ms;
}

.stagger-4 {
    animation-delay: 400ms;
}

/* Ensure reveal doesn't hide stat cards */
.dashboard .row.reveal,
.dashboard .reveal {
    opacity: 0 !important;
    animation: fadeInUp 0.8s cubic-bezier(0.19, 1, 0.22, 1) forwards !important;
}

.reveal-top {
    opacity: 0;
    animation: fadeInDown 0.8s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.reveal-bottom {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.reveal-left {
    opacity: 0;
    animation: fadeInLeft 0.8s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

/* Standardize Sidebar Header Height */
.side-bar .header {
    min-height: 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.font-weight-black {
    font-weight: 900 !important;
}

.shadow-soft {
    box-shadow: var(--shadow-md) !important;
}

.shadow-deep {
    box-shadow: var(--shadow-xl) !important;
}

/* --- BOOTSTRAP OVERRIDES --- */
.bg-primary {
    background: var(--navy-gradient) !important;
    position: relative;
    overflow: hidden;
}

.bg-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 80%);
    pointer-events: none;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-warning {
    color: var(--secondary-color) !important;
}

.bg-warning {
    background: var(--gold-gradient) !important;
    color: var(--primary-color) !important;
}

@keyframes pulse-opacity {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.stat-count.syncing {
    animation: pulse-opacity 1s infinite ease-in-out;
}

.btn-primary {
    background: var(--navy-gradient);
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 20px rgba(15, 33, 71, 0.2);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(15, 33, 71, 0.3);
    filter: brightness(1.1);
}

.card {
    border: none;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    background: var(--white);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-title {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
}

.stat-card .h2,
.stat-count {
    font-size: 1.25rem !important;
    letter-spacing: -0.5px;
}

.card:hover {
    box-shadow: var(--shadow-deep);
    transform: translateY(-5px);
}

.glass-card {
    background: var(--glass-bg) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08) !important;
}

.glass-card-dark {
    background: var(--glass-bg-dark) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    border: 1px solid var(--glass-border-dark) !important;
    color: white !important;
}

/* --- INTERACTIVE UTILITIES --- */
.hover-scale {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.hover-scale:hover {
    transform: scale(1.03) translateY(-5px) !important;
}

.magnetic-btn {
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.magnetic-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(15, 33, 71, 0.2);
}

.premium-badge {
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
}

.pulse-live {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    animation: pulse-red 2s infinite ease-in-out;
}

@keyframes pulse-red {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        transform: scale(0.95);
        opacity: 0.7;
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.leaderboard-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: var(--shadow-sm);
}

.form-control {
    border-radius: 14px;
    border: 1.5px solid #edf2f7;
    padding: 14px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: #fdfdfd;
}

.form-control:focus {
    border-color: var(--secondary-color);
    background: var(--white);
    box-shadow: 0 0 0 6px rgba(214, 181, 95, 0.1);
}

/* --- PREMIUM ADMIN LAYOUT --- */
:root {
    --sidebar-width: 280px;
}

/* Page Content Wrapper - Main container for admin panel */
.page-content-wrapper {
    margin-left: var(--sidebar-width) !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    transition: margin-left 0.3s ease !important;
    width: calc(100% - var(--sidebar-width)) !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
}

/* Mobile - Adjust page content when sidebar is hidden */
@media (max-width: 992px) {
    .page-content-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* Sidebar Styles - Override admin.css conflicts */
.side-bar {
    width: var(--sidebar-width) !important;
    height: 100vh !important;
    background: var(--navy-gradient) !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1100 !important;
    transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    transform: translateX(0) !important;
    /* Override admin.css translateX(-200px) */
    opacity: 1 !important;
    visibility: visible !important;
}

/* Desktop - Ensure sidebar is always visible */
@media (min-width: 993px) {
    .side-bar {
        display: flex !important;
        transform: translateX(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: fixed !important;
        left: 0 !important;
    }
}

/* Mobile - Sidebar toggle (handled in Responsive Adjustments section below) */

/* Main Content Area */
.main-content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background-color: var(--bg-light) !important;
    background-image: var(--mesh-bg) !important;
}

/* Content Wrapper - Actual content area */
.content-wrapper {
    flex-grow: 1 !important;
    padding: 0 !important;
    background-color: transparent !important;
    overflow-y: auto !important;
}

/* Container Fluid for Admin Pages */
.content-wrapper .container-fluid {
    padding: 1rem 1.5rem !important;
    /* Reduced top/bottom padding */
    max-width: 100% !important;
}

/* Header Styles - Override admin.css conflicts */
.main-header {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 0.6rem 2rem !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1090 !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03) !important;
    border-left: 1px solid rgba(0, 0, 0, 0.02) !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) !important;
    width: 100% !important;
}

.main-header.scrolled {
    background: rgba(255, 255, 255, 0.9) !important;
    padding: 0.4rem 2rem !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08) !important;
}

/* Premium Profile Component */
.admin-profile-box {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    padding: 6px 16px !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.admin-profile-box:hover {
    transform: translateY(-2px);
    background: #fff !important;
    box-shadow: 0 10px 25px rgba(15, 33, 71, 0.08) !important;
    border-color: var(--primary-color) !important;
}

.admin-profile-box:active {
    transform: translateY(0);
}

.nav-status-badge {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

.nav-status-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    margin-right: 6px;
    animation: statusPulse 2s infinite ease-in-out;
}

@keyframes statusPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.4;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Notification Trigger */
/* Notification Trigger Enhanced */
.nav-icon-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    /* Circular for premium feel */
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary-color);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.nav-icon-btn:hover {
    background: var(--white);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(15, 33, 71, 0.1);
    color: var(--secondary-color);
}

.nav-icon-btn:hover i {
    animation: bellSwing 0.8s cubic-bezier(0.455, 0.03, 0.515, 0.955) both;
}

.nav-icon-btn .badge-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 10px;
    height: 10px;
    background: #ef4444;
    border: 2px solid #fff;
    border-radius: 50%;
    animation: pulse-red 2s infinite;
}

@keyframes bellSwing {

    0%,
    100% {
        transform: rotate(0);
    }

    20% {
        transform: rotate(15deg);
    }

    40% {
        transform: rotate(-10deg);
    }

    60% {
        transform: rotate(5deg);
    }

    80% {
        transform: rotate(-5deg);
    }
}

/* Dropdown Animation */
.dropdown-animate {
    animation: dropdownFadeIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: top right;
}

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

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

.border-left-gold {
    border-left: 3px solid var(--secondary-color) !important;
}

@media (max-width: 992px) {
    .border-left-gold {
        border-left: none !important;
    }
}

.breadcrumb-container .breadcrumb {
    margin-bottom: 0;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    display: inline-flex;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: "\f105";
    font-family: FontAwesome;
    color: var(--text-muted);
}

/* Mobile Header Nav */
.head-nav {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) !important;
    /* Override admin.css translateX(-200px) */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 1080 !important;
}

/* Footer Styles - Ensure visibility */
.admin-footer {
    background: var(--white) !important;
    border-top: 1px solid #e9ecef !important;
    padding: 1.5rem 2rem !important;
    text-align: center !important;
    font-size: 0.9rem !important;
    color: var(--text-color) !important;
    margin-top: auto !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03) !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 100% !important;
}

.admin-footer p {
    margin: 0;
}

/* Custom Scrollbar for Main Content */
.main-content::-webkit-scrollbar {
    width: 8px;
}

.main-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
}

.main-content::-webkit-scrollbar-thumb {
    background-color: var(--secondary-color);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background-color: var(--gold-dim);
}

/* Custom Scrollbar for Sidebar */
.side-bar::-webkit-scrollbar {
    width: 6px;
}

.side-bar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.side-bar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.side-bar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Sidebar Backdrop for Mobile */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1095;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
}

.side-bar.active~.sidebar-backdrop,
.sidebar-backdrop.active {
    display: block;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .page-content-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
        padding-top: 70px !important;
        /* Push content down below fixed header */
    }

    .main-header {
        top: 70px !important;
        /* Offset sticky header below head-nav */
        border-radius: 0 !important;
    }

    .admin-footer {
        padding: 1rem !important;
    }

    .content-wrapper {
        padding: 0 !important;
    }

    .content-wrapper .container-fluid {
        padding: 0 0.5rem !important;
    }

    .side-bar {
        transform: translateX(-100%) !important;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1) !important;
    }

    .side-bar.active,
    .side-bar.show,
    .side-bar.shows {
        transform: translateX(0) !important;
    }
}

@media (max-width: 768px) {
    .page-content-wrapper {
        padding-top: 68px !important;
        /* Adjusted for aesthetic gap */
    }

    /* Unified Mobile Header Polish */
    .main-header {
        padding: 0 0.2rem 0 1rem !important;
        /* Minimal vertical padding, keep horizontal */
        position: fixed !important;
        /* Fixed to stay at top */
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(15px) !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
        margin-top: 0 !important;
        z-index: 1040 !important;
        height: 60px !important;
        /* Fixed height for consistency */
    }



    .nav-status-badge {
        padding: 3px 10px !important;
        font-size: 0.55rem !important;
    }

    .admin-profile-box {
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    .admin-profile-box .avatar-wrapper img {
        width: 34px !important;
        /* Slightly smaller avatar */
        height: 34px !important;
        border: 2px solid white !important;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
    }

    .admin-footer {
        padding: 1rem;
        font-size: 0.75rem;
        text-align: center;
    }

    .card {
        border-radius: 16px;
        margin-bottom: 1rem;
    }

    .card-header {
        padding: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    /* Typography Reductions for Mobile */
    h1.font-weight-bold {
        font-size: 1.1rem !important;
        margin-bottom: 0.25rem !important;
    }

    h5.font-weight-black {
        font-size: 0.8rem !important;
    }

    /* Mobile Stats Grid Polish */
    .dashboard .col-6 {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }

    .dashboard .col-6 .stat-card {
        padding: 10px !important;
        border-radius: 12px !important;
        margin-bottom: 10px !important;
    }

    .dashboard .col-6 .icon-box {
        width: 35px !important;
        height: 35px !important;
        margin-right: 8px !important;
    }

    .dashboard .col-6 .icon-box i {
        font-size: 1.1rem !important;
    }

    .stat-count {
        font-size: 1.4rem !important;
    }

    /* Breadcrumb Compact */
    .breadcrumb-container {
        padding: 0 15px !important;
        margin-bottom: 5px !important;
        /* Slight gap for the shadow */
        margin-top: 5px !important;
    }

    .breadcrumb-container .breadcrumb {
        padding: 5px 15px !important;
        background: rgba(255, 255, 255, 0.85) !important;
        backdrop-filter: blur(10px) !important;
        border-radius: 30px !important;
        /* Pill shape */
        font-size: 0.75rem !important;
        margin-bottom: 0 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.6) !important;
        display: inline-flex !important;
    }

    /* Override Bootstrap Utility classes on mobile */
    .container-fluid.py-3 {
        padding-top: 0.2rem !important;
        padding-bottom: 0.5rem !important;
    }

    .btn {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.8rem !important;
        /* Compact Buttons */
    }

    .btn-lg {
        padding: 0.5rem 1rem !important;
        font-size: 0.9rem !important;
    }

    /* Adjust Help Text on Mobile */
    .task-help-text {
        padding: 8px 12px;
        font-size: 0.7rem;
        margin-bottom: 1rem;
    }

    .task-help-text i {
        font-size: 0.9rem;
        margin-right: 8px;
    }

    /* Compact Table Actions */
    .table-actions .btn {
        width: 32px;
        height: 32px;
    }
}

/* Sidebar Dropdown & Submenu */
.side-bar .sidebar-dropdown .sidebar-submenu {
    display: none;
    background-color: rgba(0, 0, 0, 0.15) !important;
    border-radius: 12px !important;
    margin-bottom: 10px !important;
    padding: 0.5rem !important;
}

.side-bar .sidebar-dropdown.active>.sidebar-submenu {
    display: block;
}

.sidebar-dropdown>a .fa-chevron-down {
    transition: transform 0.3s ease;
}

.sidebar-dropdown.active>a .fa-chevron-down {
    transform: rotate(180deg);
}

.side-bar-content .list-group-item {
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    border: none;
    padding: 10px 18px;
    font-weight: 500;
    font-size: 0.82rem;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 12px;
    margin-bottom: 4px;
}

.side-bar-content .list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--white);
    padding-left: 25px;
}

.side-bar-content .list-group-item.active-nav {
    background: var(--gold-gradient);
    color: var(--primary-color) !important;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(201, 164, 65, 0.3);
    transform: scale(1.02);
}

.side-bar-content .list-group-item.active-nav i {
    color: var(--primary-color) !important;
}

.logout-link:hover {
    filter: brightness(1.1);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(225, 29, 72, 0.4) !important;
}

.hover-effect:hover {
    transform: scale(1.08) rotate(2deg);
}

.sidebar-submenu .list-group-item {
    padding: 8px 18px 8px 3.2rem !important;
    /* Standardized padding and indent */
    font-size: 0.85rem !important;
    /* Normalized font size */
    border-left: 3px solid transparent !important;
    transition: all 0.3s ease !important;
    background: transparent !important;
}

.sidebar-submenu .list-group-item i {
    width: 18px !important;
    font-size: 0.9rem !important;
    margin-right: 0.5rem !important;
}

.sidebar-submenu .list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-left-color: var(--gold-bright) !important;
    padding-left: 3.5rem !important;
}


/* --- DataTables Custom Styling --- */
/* --- PREMIUM DATATABLES AESTHETIC ('Boresha' Edition) --- */
.dataTables_wrapper {
    padding: 1.5rem 0;
    font-family: 'Poppins', sans-serif !important;
}

/* Search Header Styling */
.dataTables_wrapper .dataTables_filter {
    float: right;
    margin-bottom: 2rem;
}

.dataTables_wrapper .dataTables_filter label {
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dataTables_wrapper .dataTables_filter input {
    border-radius: 50px !important;
    padding: 12px 25px !important;
    border: 1.5px solid #edf2f7 !important;
    background: #ffffff !important;
    box-shadow: var(--shadow-sm) !important;
    min-width: 300px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    font-size: 0.9rem !important;
    height: 48px !important;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--secondary-color) !important;
    box-shadow: 0 0 0 8px rgba(214, 181, 95, 0.1) !important;
    width: 350px;
    outline: none !important;
}

/* Length Menu Styling */
.dataTables_wrapper .dataTables_length {
    float: left;
    margin-bottom: 2rem;
}

.dataTables_wrapper .dataTables_length select {
    border-radius: 12px !important;
    padding: 8px 15px !important;
    border: 1.5px solid #edf2f7 !important;
    background: #ffffff !important;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
}

/* Table Header Refinement */
table.dataTable thead th {
    background: var(--navy-gradient) !important;
    color: var(--white) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 0.75rem !important;
    letter-spacing: 1.5px !important;
    padding: 1.25rem 1.5rem !important;
    border: none !important;
    vertical-align: middle !important;
}

table.dataTable thead .sorting::before,
table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::before,
table.dataTable thead .sorting_asc::after {
    bottom: 1.1em !important;
    opacity: 0.6 !important;
}

/* Table Body Styling */
table.dataTable tbody td {
    padding: 1.25rem 1.5rem !important;
    vertical-align: middle !important;
    border-bottom: 1px solid rgba(15, 33, 71, 0.05) !important;
    font-size: 0.88rem !important;
    color: var(--text-color);
    background: transparent !important;
}

table.dataTable tbody tr {
    transition: all 0.3s ease !important;
    background: transparent !important;
}

table.dataTable tbody tr:hover {
    background-color: rgba(15, 33, 71, 0.02) !important;
    transform: scale(1.002);
}

/* Status Badges */
.badge-status {
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.65rem;
    letter-spacing: 0.5px;
}

/* Action Buttons in Table */
.table-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.table-actions .btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.table-actions .btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-md);
}

/* Info and Pagination */
.dataTables_wrapper .dataTables_info {
    padding-top: 1.5rem !important;
    color: var(--text-muted) !important;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.dataTables_wrapper .dataTables_paginate {
    padding-top: 1.5rem !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 10px !important;
    padding: 8px 16px !important;
    margin: 0 4px !important;
    border: 1px solid #edf2f7 !important;
    background: #ffffff !important;
    color: var(--primary-color) !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    transition: all 0.3s ease !important;
    cursor: pointer;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--primary-light) !important;
    color: white !important;
    border-color: var(--primary-light) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--gold-gradient) !important;
    color: var(--primary-color) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(201, 164, 65, 0.3) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
}

/* Empty State */
.dataTables_empty {
    padding: 4rem !important;
    background: rgba(15, 33, 71, 0.01) !important;
    border-radius: 20px;
}

/* --- Enhanced Table Styling --- */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: #f8fafc !important;
    transform: scale(1.002);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.img-hover-zoom {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.img-hover-zoom:hover {
    transform: scale(2.5);
    z-index: 1001;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.85rem;
    border-bottom: 3px solid var(--primary-color);
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: #f8fafc;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* --- Shadow Utilities --- */
.shadow-deep {
    box-shadow: var(--shadow-deep) !important;
}

/* --- Enhanced Modal Styling --- */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: var(--shadow-deep);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 2px solid #e9ecef;
}

.modal-title {
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.modal-body {
    background: #ffffff;
}

.modal-footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* --- Enhanced Button Styling --- */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border: none;
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    border: none;
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    color: white;
}

/* --- Card Enhancements --- */
.card-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

/* --- Badge Styling --- */
.badge {
    padding: 0.5rem 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
}

.badge-primary {
    background: var(--navy-gradient);
    color: white;
}

/* --- Select2 Styling --- */
.select2-container--default .select2-selection--single {
    border-radius: 14px;
    border: 1.5px solid #edf2f7;
    height: 45px;
    padding: 5px;
}

.select2-container--default .select2-selection--single:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 6px rgba(214, 181, 95, 0.1);
}

/* --- Dashboard Stat Cards --- */
.dashboard .stat-card,
.stat-card {
    background: var(--white) !important;
    border-radius: 20px !important;
    padding: 1.5rem !important;
    box-shadow: var(--shadow-soft) !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    border: none !important;
    position: relative !important;
    overflow: hidden !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 100% !important;
    height: auto !important;
    min-height: 120px !important;
}

.dashboard .stat-card::before,
.stat-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 4px !important;
    background: var(--navy-gradient) !important;
    transform: scaleX(0) !important;
    transform-origin: left !important;
    transition: transform 0.4s ease !important;
    z-index: 1 !important;
}

.dashboard .stat-card:hover,
.stat-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: var(--shadow-deep) !important;
}

.dashboard .stat-card:hover::before,
.stat-card:hover::before {
    transform: scaleX(1) !important;
}

.dashboard .stat-card-body,
.stat-card-body {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    position: relative !important;
    z-index: 2 !important;
}

.dashboard .stat-card .icon-box,
.stat-card .icon-box {
    width: 70px !important;
    height: 70px !important;
    min-width: 70px !important;
    min-height: 70px !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 1.5rem !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
}

.dashboard .stat-card:hover .icon-box,
.stat-card:hover .icon-box {
    transform: scale(1.1) rotate(5deg) !important;
}

.dashboard .stat-card .stat-info,
.stat-card .stat-info {
    flex: 1 !important;
    min-width: 0 !important;
}

.dashboard .stat-card .stat-title,
.stat-card .stat-title {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #64748b !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
}

.dashboard .stat-card .stat-count,
.stat-card .stat-count {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    margin: 0 !important;
    color: var(--primary-color) !important;
    font-family: 'Poppins', sans-serif !important;
    display: block !important;
}

/* Card Voted - Green Theme */
.dashboard .card-voted .icon-box,
.card-voted .icon-box {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3) !important;
}

.dashboard .card-voted .stat-count,
.card-voted .stat-count {
    color: #10b981 !important;
}

.dashboard .card-voted::before,
.card-voted::before {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

/* Card Pending - Orange Theme */
.dashboard .card-pending .icon-box,
.card-pending .icon-box {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: white !important;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3) !important;
}

.dashboard .card-pending .stat-count,
.card-pending .stat-count {
    color: #f59e0b !important;
}

.dashboard .card-pending::before,
.card-pending::before {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

/* Card Total - Blue Theme */
.dashboard .card-total .icon-box,
.card-total .icon-box {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: white !important;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3) !important;
}

.dashboard .card-total .stat-count,
.card-total .stat-count {
    color: #3b82f6 !important;
}

.dashboard .card-total::before,
.card-total::before {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

/* Dashboard Card Enhancements */
.dashboard .card {
    border-radius: 20px;
    border: none;
    box-shadow: var(--shadow-deep);
    overflow: hidden;
}

.dashboard .card-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 2px solid #e9ecef;
    padding: 1.5rem;
}

.dashboard .card-body {
    padding: 1.5rem;
}

/* Input Group Styling for Dashboard */
.input-group-text {
    background: var(--white);
    border: 1.5px solid #edf2f7;
    color: var(--primary-color);
    font-weight: 600;
}

.input-group .form-control {
    border-left: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.input-group .form-control:focus {
    border-color: #edf2f7;
    box-shadow: 0 0 0 6px rgba(214, 181, 95, 0.1);
}

.input-group .form-control:focus+.input-group-append .input-group-text,
.input-group-prepend .input-group-text+.form-control:focus {
    border-color: var(--secondary-color);
}

.input-group select.form-control {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #0F2147 !important;
}

/* Button Group Responsive */
.btn-group-responsive {
    gap: 0.5rem;
}

.btn-group-responsive .btn {
    white-space: nowrap;
    border-radius: 12px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-group-responsive .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-outline-success {
    border: 2px solid #10b981;
    color: #10b981;
}

.btn-outline-success:hover {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.btn-outline-warning {
    border: 2px solid #f59e0b;
    color: #f59e0b;
}

.btn-outline-warning:hover {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

/* Custom Premium Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

.dark-mode::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

.dark-mode::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Micro-interactions */
.btn-primary,
.btn-secondary,
.btn-info,
.btn-danger,
.btn-success {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.btn:hover {
    transform: translateY(-2px);
}

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

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

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-deep) !important;
}

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

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

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

.btn-outline-info {
    border: 2px solid #3b82f6;
    color: #3b82f6;
}

.btn-outline-info:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

/* Dashboard Row with Stat Cards */
.dashboard .row.reveal,
.dashboard .row.px-2.reveal,
.row.px-2.reveal {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-left: -15px !important;
    margin-right: -15px !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 100% !important;
    position: relative !important;
}

.dashboard .row.reveal>[class*="col-"],
.dashboard .row.px-2.reveal>[class*="col-"],
.row.px-2.reveal>[class*="col-"] {
    padding-left: 15px !important;
    padding-right: 15px !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Responsive Stat Cards */
@media (max-width: 768px) {

    .dashboard .stat-card,
    .stat-card {
        padding: 1rem !important;
        min-height: 100px !important;
    }

    .dashboard .stat-card .icon-box,
    .stat-card .icon-box {
        width: 60px !important;
        height: 60px !important;
        min-width: 60px !important;
        min-height: 60px !important;
        margin-right: 1rem !important;
    }

    .dashboard .stat-card .stat-count,
    .stat-card .stat-count {
        font-size: 2rem !important;
    }

    .dashboard .stat-card-body,
    .stat-card-body {
        flex-direction: row !important;
    }

    .btn-group-responsive {
        flex-direction: column !important;
        width: 100% !important;
    }

    .btn-group-responsive .btn {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
    }
}

/* Animation for Stat Count Numbers */
.dashboard .stat-count,
.stat-count {
    transition: all 0.3s ease !important;
}

.dashboard .stat-card:hover .stat-count,
.stat-card:hover .stat-count {
    transform: scale(1.05) !important;
}

/* Dashboard Wrapper */
#wrapper {
    min-height: 200px !important;
    padding: 1rem 0 !important;
}

/* Dashboard Container Enhancements */
.dashboard .container-fluid,
.container-fluid.py-4 {
    padding: 2rem;
}

@media (max-width: 768px) {

    .dashboard .container-fluid,
    .container-fluid.py-4 {
        padding: 1rem;
    }
}


/* Ensure cards are visible */
.card {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Fix for stat cards visibility - Enhanced */
.dashboard .stat-card,
.stat-card {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    position: relative !important;
    background: var(--white) !important;
}

/* Ensure row container displays properly */
.dashboard .container-fluid .row,
.dashboard .row,
.container-fluid.py-4.dashboard .row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-left: -15px !important;
    margin-right: -15px !important;
    width: 100% !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Loading State for Stat Cards */
.stat-count:empty::before {
    content: '0';
    opacity: 0.5;
}

/* Print Button Enhancements */
.btn-outline-success,
.btn-outline-warning,
.btn-outline-info,
.btn-outline-primary {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.btn-outline-success:active,
.btn-outline-warning:active,
.btn-outline-info:active,
.btn-outline-primary:active {
    transform: translateY(0);
}

/* Form Control Enhancements for Dashboard */
.dashboard .form-control {
    border-radius: 14px;
    border: 1.5px solid #edf2f7;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.dashboard .form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 6px rgba(214, 181, 95, 0.1);
    outline: none;
}

.dashboard select.form-control {
    cursor: pointer;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #0F2147 !important;
}

/* Input Group Enhancements */
.input-group-prepend .input-group-text,
.input-group-append .input-group-text {
    background: var(--white);
    border: 1.5px solid #edf2f7;
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.input-group:focus-within .input-group-text {
    border-color: var(--secondary-color);
    background: #fefefe;
}

/* --- Toast Notification Styles --- */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none;
}

.custom-toast {
    background: var(--white);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-deep);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    border-left: 4px solid transparent;
}

.custom-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.custom-toast.success {
    border-left-color: #10b981;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.custom-toast.error {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
}

.custom-toast.info {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

.custom-toast .toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.custom-toast.success .toast-icon {
    color: #10b981;
}

.custom-toast.error .toast-icon {
    color: #ef4444;
}

.custom-toast.info .toast-icon {
    color: #3b82f6;
}

.custom-toast .toast-content {
    flex: 1;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.5;
}

.custom-toast .toast-close {
    cursor: pointer;
    color: #94a3b8;
    font-size: 1.1rem;
    padding: 0.25rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.custom-toast .toast-close:hover {
    color: var(--text-color);
    transform: scale(1.1);
}

.custom-toast .toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.custom-toast .toast-progress-bar {
    height: 100%;
    width: 100%;
    background: var(--navy-gradient);
    transition: width 5000ms linear;
}

.custom-toast.success .toast-progress-bar {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.custom-toast.error .toast-progress-bar {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.custom-toast.info .toast-progress-bar {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* Responsive Toast */
@media (max-width: 768px) {
    #toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .custom-toast {
        min-width: auto;
        width: 100%;
    }
}

/* ============================================
   STANDARDIZED DROPDOWN/SELECT STYLES
   ============================================ */

/* Base select/dropdown styling - applies to all selects */
select.form-control,
select.form-control-sm,
select.form-control-lg {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: #1e293b !important;
    padding: 10px 12px !important;
    line-height: 1.5 !important;
}

/* Filter dropdowns in card headers */
select.form-control-sm.d-inline-block {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #0F2147 !important;
    padding: 8px 12px !important;
}

/* Modal form dropdowns */
.modal select.form-control,
.modal-dialog select.form-control {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: #1e293b !important;
    padding: 10px 12px !important;
    border-radius: 10px !important;
}

/* Reports page dropdowns (larger) */
select.form-control-lg {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #0F2147 !important;
    padding: 12px 16px !important;
}

/* Dashboard election date selector */
.dashboard select.form-control {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #0F2147 !important;
}

/* Select option styling */
select.form-control option,
select.form-control-sm option,
select.form-control-lg option {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    padding: 8px 12px !important;
    color: #1e293b !important;
}

/* Select focus state */
select.form-control:focus,
select.form-control-sm:focus,
select.form-control-lg:focus {
    border-color: var(--secondary-color) !important;
    box-shadow: 0 0 0 4px rgba(214, 181, 95, 0.1) !important;
    outline: none !important;
    color: #0F2147 !important;
}

/* ============================================
   CUSTOM CONFIRMATION MODAL
   ============================================ */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.confirm-overlay.show {
    opacity: 1;
}

.confirm-overlay.show .confirm-modal {
    transform: scale(1);
    opacity: 1;
}

.confirm-modal {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    text-align: center;
}

.confirm-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}

.confirm-icon i {
    font-size: 2rem;
    color: white;
}

.confirm-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.confirm-message {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.confirm-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.confirm-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 130px;
}

.confirm-cancel {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.confirm-cancel:hover {
    background: #e2e8f0;
    color: #475569;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.confirm-ok {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.confirm-ok:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    filter: brightness(1.05);
}

@media (max-width: 576px) {
    .confirm-modal {
        padding: 1.5rem;
    }

    .confirm-title {
        font-size: 1.25rem;
    }

    .confirm-message {
        font-size: 0.9rem;
    }

    .confirm-buttons {
        flex-direction: column;
    }

    .confirm-btn {
        width: 100%;
    }
}