/* =========================================
   SPY/HACKER THEME - ADMIN DASHBOARD
   ========================================= */

:root {
    --spy-green: #00ff41;
    --spy-dark: #0d0208;
    --spy-darker: #050103;
    --spy-red: #ff003c;
    --spy-gold: #fdf500;
    --spy-blue: #00d0ff;

    --glass-bg: rgba(13, 2, 8, 0.85);
    --glass-border: rgba(0, 255, 65, 0.2);

    --term-font: 'Courier New', 'Courier', monospace;
}

body {
    background-color: var(--spy-dark);
    font-family: var(--term-font);
    color: var(--spy-green);
    overflow-x: hidden;
}

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

::-webkit-scrollbar-track {
    background: var(--spy-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--spy-green);
    border-radius: 4px;
}

/* Animations */
@keyframes glitch {
    0% {
        transform: translate(0)
    }

    20% {
        transform: translate(-2px, 2px)
    }

    40% {
        transform: translate(-2px, -2px)
    }

    60% {
        transform: translate(2px, 2px)
    }

    80% {
        transform: translate(2px, -2px)
    }

    100% {
        transform: translate(0)
    }
}

@keyframes scanline {
    0% {
        top: -10%
    }

    100% {
        top: 110%
    }
}

.scan-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(to bottom, transparent, rgba(0, 255, 65, 0.2), transparent);
    animation: scanline 6s linear infinite;
    pointer-events: none;
    z-index: 9999;
}

/* Login/Main Layout */
.dashboard-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* SIDEBAR COMMAND CENTER */
.sidebar {
    width: 260px;
    background: rgba(0, 10, 0, 0.95);
    border-right: 1px solid var(--spy-green);
    display: flex;
    flex-direction: column;
    z-index: 2500;
    /* Higher than mobile header but lower than overlay if any */
    box-shadow: 4px 0 15px rgba(0, 255, 65, 0.1);
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Sidebar Overlay Backdrop */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2400;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 255, 65, 0.05);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 0 5px var(--spy-green));
}

.brand-title {
    font-weight: bold;
    font-size: 1.1em;
    color: var(--spy-gold);
    text-shadow: 0 0 5px var(--spy-gold);
}

.brand-subtitle {
    font-size: 0.7em;
    letter-spacing: 2px;
    color: var(--spy-green);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 15px 0;
}

.nav-label {
    padding: 15px 20px 5px;
    font-size: 0.7em;
    color: rgba(0, 255, 65, 0.5);
    letter-spacing: 1px;
}

.tab,
.nav-link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-left: 3px solid transparent;
    color: var(--spy-green);
    text-align: left;
    font-family: var(--term-font);
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
    text-decoration: none;
}

.tab:hover,
.nav-link-item:hover {
    background: rgba(0, 255, 65, 0.1);
    padding-left: 25px;
}

.tab.active {
    border-left-color: var(--spy-gold);
    background: linear-gradient(90deg, rgba(253, 245, 0, 0.1), transparent);
    color: var(--spy-gold);
    text-shadow: 0 0 8px rgba(253, 245, 0, 0.5);
}

.nav-link-item.danger {
    color: var(--spy-red);
}

.nav-link-item.danger:hover {
    background: rgba(255, 0, 60, 0.1);
}

/* User Profile in Sidebar */
.user-profile-widget {
    padding: 15px 20px;
    border-bottom: 1px dashed var(--glass-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border: 2px solid var(--spy-gold);
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    flex-shrink: 0;
    /* Prevent squashing */
    box-shadow: 0 0 10px rgba(253, 245, 0, 0.3);
}

.user-info .user-name {
    font-size: 0.9em;
    font-weight: bold;
    color: #fff;
}

.user-info .user-role {
    font-size: 0.7em;
    color: var(--spy-gold);
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background:
        linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.9)),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 255, 65, 0.03) 2px, rgba(0, 255, 65, 0.03) 4px);
}

/* Stats Overview */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card-mini {
    background: rgba(0, 20, 0, 0.6);
    border: 1px solid var(--spy-green);
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.stat-card-mini::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--spy-green);
}

.stat-details {
    display: flex;
    flex-direction: column;
}

.stat-val {
    font-size: 1.5em;
    font-weight: bold;
    text-shadow: 0 0 10px var(--spy-green);
}

.expense-val {
    color: var(--spy-red);
    text-shadow: 0 0 10px var(--spy-red);
}



/* Panels */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--spy-green);
    padding-bottom: 10px;
}

.panel-header h2 {
    font-size: 1.5em;
    text-transform: uppercase;
    margin: 0;
}

.blink {
    animation: blink 1s infinite;
    color: #fff;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Login Section (Preserved) */
#loginSection {
    max-width: 400px;
    margin: 100px auto;
    border: 2px solid var(--spy-green);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
    /* Previously inline styles handled mostly */
}

.classified-badge {
    border: 1px solid var(--spy-red);
    color: var(--spy-red);
    padding: 10px;
    text-align: center;
    margin-bottom: 20px;
    background: rgba(255, 0, 60, 0.1);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.spy-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.spy-table th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid var(--spy-green);
    color: var(--spy-gold) !important;
    background-color: rgba(0, 20, 0, 0.9) !important;
    /* Force dark background */
}

.spy-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(0, 255, 65, 0.2);
    color: #ffffff !important;
    /* Force white text */
}

.spy-table tr:hover {
    background: rgba(0, 255, 65, 0.1) !important;
}

/* Form Controls (Spy Style) */
.form-control {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--spy-green);
    color: #ffffff !important;
    padding: 10px;
    font-family: var(--term-font);
    width: 100%;
    box-sizing: border-box;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

option {
    background-color: #000;
    color: #fff;
    padding: 10px;
}

.form-control:focus {
    outline: none;
    box-shadow: 0 0 10px var(--spy-green);
    border-color: var(--spy-gold);
}

/* Buttons */
.btn {
    border: 1px solid var(--spy-green);
    background: transparent;
    color: var(--spy-green);
    padding: 8px 16px;
    cursor: pointer;
    font-family: var(--term-font);
    text-transform: uppercase;
    transition: all 0.2s;
}

.btn:hover {
    background: var(--spy-green);
    color: #000;
    box-shadow: 0 0 15px var(--spy-green);
}

.btn-primary {
    border-color: var(--spy-gold);
    color: var(--spy-gold);
}

.btn-primary:hover {
    background: var(--spy-gold);
    color: #000;
    box-shadow: 0 0 15px var(--spy-gold);
}

.btn-secondary {
    border-color: var(--spy-blue);
    color: var(--spy-blue);
}

.btn-secondary:hover {
    background: var(--spy-blue);
    color: #000;
    box-shadow: 0 0 15px var(--spy-blue);
}

.btn-danger {
    border-color: var(--spy-red);
    color: var(--spy-red);
}

.btn-danger:hover {
    background: var(--spy-red);
    color: #000;
    box-shadow: 0 0 15px var(--spy-red);
}

/* MOBILE RESPONSIVE */
.mobile-header {
    display: none;
    background: #000;
    border-bottom: 1px solid var(--spy-green);
    padding: 10px 20px;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mini-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.brand-text {
    font-weight: bold;
    color: var(--spy-gold);
    letter-spacing: 1px;
}

.menu-toggle-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--spy-green);
}

.close-sidebar-btn {
    display: none;
    /* Only show on mobile */
    background: none;
    border: none;
    color: var(--spy-red);
    font-size: 2em;
    cursor: pointer;
}

@media (max-width: 768px) {
    .dashboard-layout {
        flex-direction: column;
        padding-top: 60px;
        /* Space for mobile header */
    }

    .mobile-header {
        display: flex;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        width: 80%;
        max-width: 300px;
        box-shadow: 10px 0 50px rgba(0, 0, 0, 0.8);
        z-index: 2100;
        transition: transform 0.3s ease-in-out;
        /* Smooth slide animation */
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 0 0 50px rgba(0, 255, 65, 0.2);
    }

    .close-sidebar-btn {
        display: block;
        margin-left: auto;
    }

    .main-content {
        width: 100%;
    }

    .stats-overview {
        grid-template-columns: 1fr 1fr;
        /* 2 cols on mobile */
    }

    .panel-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
    }

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Global Selectors Bar Mobile Adjustment */
    .global-selectors-bar {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 10px !important;
        padding: 10px !important;
    }

    .global-selectors-bar>div:last-child {
        width: 100% !important;
        order: -1 !important;
        margin-left: 0 !important;
        text-align: center !important;
        padding: 8px !important;
        background: rgba(253, 245, 0, 0.05) !important;
        border: 1px dashed rgba(253, 245, 0, 0.3) !important;
        border-radius: 4px !important;
    }

    .selector-group {
        flex: 1 !important;
        min-width: 120px !important;
        text-align: center !important;
    }

    .selector-group select {
        width: 100% !important;
        min-width: 0 !important;
        /* Override inline min-width */
    }

    /* Hide top bars on mobile for specific management tabs to save space */
    .dashboard-layout:has(.tab[data-tab="blogs"].active) .global-selectors-bar,
    .dashboard-layout:has(.tab[data-tab="blogs"].active) .stats-overview,
    .dashboard-layout:has(.tab[data-tab="puja-types"].active) .global-selectors-bar,
    .dashboard-layout:has(.tab[data-tab="puja-types"].active) .stats-overview,
    .dashboard-layout:has(.tab[data-tab="access-control"].active) .global-selectors-bar,
    .dashboard-layout:has(.tab[data-tab="access-control"].active) .stats-overview,
    .dashboard-layout:has(.tab[data-tab="visibility"].active) .global-selectors-bar,
    .dashboard-layout:has(.tab[data-tab="visibility"].active) .stats-overview,
    .dashboard-layout:has(.tab[data-tab="staff"].active) .global-selectors-bar,
    .dashboard-layout:has(.tab[data-tab="staff"].active) .stats-overview,
    .dashboard-layout:has(.tab[data-tab="settings"].active) .global-selectors-bar,
    .dashboard-layout:has(.tab[data-tab="settings"].active) .stats-overview,
    .dashboard-layout:has(.tab[data-tab="backup"].active) .global-selectors-bar,
    .dashboard-layout:has(.tab[data-tab="backup"].active) .stats-overview {
        display: none !important;
    }
}

/* Modals (Overlay) */
.modal-overlay,
.modal-overlay.active {
    background: rgba(0, 0, 0, 0.9);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    display: none;
    /* Hidden by default - show via JS */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-overlay.active,
.modal-overlay[style*="display: flex"],
.modal-overlay[style*="display:flex"] {
    display: flex !important;
}



.modal-content {
    background: #000;
    border: 2px solid var(--spy-green);
    box-shadow: 0 0 30px var(--spy-green);
    width: 90%;
    max-width: 500px;
    padding: 20px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Transmission Editor (Premium Blog Editor) */
.transmission-editor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--spy-darker);
    z-index: 4000;
    display: none;
    /* Controlled by JS */
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(1.02);
    }

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

.editor-header {
    background: rgba(0, 255, 65, 0.05);
    border-bottom: 2px solid var(--spy-green);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-header h2 {
    margin: 0;
    font-size: 1.2em;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.editor-title-chip {
    background: var(--spy-green);
    color: #000;
    padding: 2px 8px;
    font-size: 0.7em;
    font-weight: bold;
}

.editor-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.editor-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 40px;
    overflow-y: auto;
    background: radial-gradient(circle at center, #0d0208 0%, #050103 100%);
}

.editor-sidebar {
    width: 350px;
    border-left: 1px solid var(--glass-border);
    background: rgba(0, 10, 0, 0.5);
    padding: 25px;
    overflow-y: auto;
}

.editor-input-title {
    background: transparent;
    border: none;
    border-bottom: 1px dashed rgba(0, 255, 65, 0.3);
    color: #fff;
    font-size: 2.5em;
    font-family: var(--term-font);
    width: 100%;
    padding: 10px 0;
    margin-bottom: 30px;
    outline: none;
    font-weight: bold;
}

.editor-input-title:focus {
    border-bottom-color: var(--spy-gold);
}

.editor-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
}

.tool-btn {
    background: none;
    border: 1px solid transparent;
    color: var(--spy-green);
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.8em;
}

.tool-btn:hover {
    border-color: var(--spy-green);
    background: rgba(0, 255, 65, 0.1);
}

.tool-btn-accent {
    color: var(--spy-gold);
    font-weight: bold;
}

.tool-btn-accent:hover {
    border-color: var(--spy-gold);
    background: rgba(253, 245, 0, 0.1);
}

.toolbar-divider {
    width: 1px;
    height: 20px;
    background: rgba(0, 255, 65, 0.3);
    margin: 0 5px;
}

/* WYSIWYG Editor */
.wysiwyg-editor {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1em;
    line-height: 1.8;
    font-family: 'Georgia', serif;
    padding: 25px;
    outline: none;
    min-height: 400px;
    overflow-y: auto;
}

.wysiwyg-editor:focus {
    border-color: var(--spy-green);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
}

.wysiwyg-editor:empty:before {
    content: attr(data-placeholder);
    color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

.wysiwyg-editor h2,
.wysiwyg-editor h3,
.wysiwyg-editor h4 {
    color: var(--spy-gold);
    margin: 1em 0 0.5em;
}

.wysiwyg-editor img {
    max-width: 100%;
    height: auto;
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 4px;
    transition: all 0.2s;
    margin: 15px 0;
    display: block;
}

.wysiwyg-editor img:hover {
    border-color: var(--spy-green);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}

.wysiwyg-editor img.cover-selected {
    border-color: var(--spy-gold);
    box-shadow: 0 0 20px rgba(253, 245, 0, 0.4);
}

.wysiwyg-editor a {
    color: var(--spy-green);
    text-decoration: underline;
}

/* Loading overlay for image upload */
.image-uploading {
    position: relative;
    opacity: 0.5;
}

.image-uploading::after {
    content: 'Uploading...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: var(--spy-green);
    padding: 10px 20px;
    border: 1px solid var(--spy-green);
}

.editor-sidebar h3 {
    font-size: 0.9em;
    color: var(--spy-gold);
    margin: 30px 0 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.editor-sidebar h3:first-child {
    margin-top: 0;
}

.img-preview-container {
    width: 100%;
    aspect-ratio: 16/9;
    border: 1px dashed var(--glass-border);
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
}

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

.editor-footer-hint {
    margin-top: auto;
    padding-top: 20px;
    font-size: 0.75rem;
    color: rgba(0, 255, 65, 0.4);
    border-top: 1px solid var(--glass-border);
}

/* Mobile adjustments for editor */
@media (max-width: 1024px) {
    .editor-layout {
        flex-direction: column;
        overflow-y: auto;
    }

    .editor-sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--glass-border);
    }

    .editor-main {
        padding: 20px;
    }

    .editor-input-title {
        font-size: 1.8em;
    }
}

/* Background Orbs Animation */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at center, #1b1b3a 0%, #0a0a1a 100%);
}

.floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: floatOrb 25s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.5) 0%, transparent 70%);
    top: -10%;
    left: -10%;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.4) 0%, transparent 70%);
    bottom: -5%;
    right: -5%;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, transparent 70%);
    top: 40%;
    right: 20%;
    animation-delay: -10s;
}

@keyframes floatOrb {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(100px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-50px, 100px) scale(0.9);
    }
}

/* Spy Particles */
.spy-particle {
    position: absolute;
    top: -10px;
    width: 2px;
    height: 10px;
    background: var(--spy-green);
    opacity: 0.5;
    animation: rain 2s linear infinite;
}

@keyframes rain {
    to {
        transform: translateY(100vh);
    }
}

/* Dark Modals for Admin Dashboard (Moved from main.css to be page-specific) */
.modal-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.1);
}

.modal-content label {
    color: var(--spy-gold) !important;
}

.modal-content .form-control {
    background: rgba(0, 0, 10, 0.6) !important;
    color: var(--spy-green) !important;
    border: 1px solid var(--glass-border) !important;
}

.modal-header {
    background: #000 !important;
    border-bottom: 2px solid var(--spy-green) !important;
    padding: 1.5rem !important;
}

.modal-header h2 {
    color: var(--spy-green) !important;
    font-family: var(--term-font) !important;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.modal-body {
    background: #000 !important;
    color: #fff !important;
    padding: 1.5rem !important;
}

.modal-footer {
    background: #000 !important;
    border-top: 1px solid var(--glass-border) !important;
    padding: 1rem 1.5rem !important;
}

.modal-close {
    background: transparent !important;
    border: 1px solid var(--spy-red) !important;
    color: var(--spy-red) !important;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 0, 60, 0.2) !important;
    box-shadow: 0 0 10px var(--spy-red);
}

/* =========================================
   OVERRIDE TOAST NOTIFICATIONS (ADMIN)
   ========================================= */
.toast {
    position: fixed !important;
    top: 50% !important;
    /* Center screen */
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    bottom: auto !important;

    width: auto !important;
    min-width: 300px;
    max-width: 80% !important;

    padding: 30px !important;
    border-radius: 4px !important;
    font-family: var(--term-font) !important;
    font-size: 1.2rem !important;
    font-weight: bold !important;
    text-align: center !important;
    z-index: 1000000 !important;
    /* Highest z-index */

    opacity: 0;
    transition: opacity 0.2s ease;

    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9) !important;
    backdrop-filter: blur(10px);
}

.toast.show {
    opacity: 1 !important;
}

/* Success Toast - Spy Green */
.toast-success {
    background-color: rgba(0, 20, 0, 0.95) !important;
    border: 3px solid var(--spy-green) !important;
    color: var(--spy-green) !important;
    box-shadow: 0 0 40px rgba(0, 255, 65, 0.3) !important;
}

/* Error Toast - Spy Red (CRITICAL ALERT STYLE) */
.toast-error {
    background-color: rgba(40, 0, 0, 0.95) !important;
    border: 3px solid var(--spy-red) !important;
    color: var(--spy-red) !important;
    box-shadow: 0 0 60px rgba(255, 0, 60, 0.5) !important;
    text-transform: uppercase;
    font-size: 1.5rem !important;
    letter-spacing: 1px;
}

/* ===== LIGHT THEME FOR EDITOR ===== */
.transmission-editor-overlay.editor-light {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.editor-light .editor-header {
    background: #ffffff;
    border-bottom: 1px solid #ddd;
}

.editor-light .editor-header h2 {
    color: #333;
}

.editor-light .editor-title-chip {
    background: #4a90d9;
    color: #fff !important;
}

.editor-light .editor-input-title {
    background: #4a90d9;
}

.editor-light .editor-main {
    background: #ffffff;
}

.editor-light .editor-toolbar {
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.editor-light .tool-btn {
    background: #e9ecef;
    color: #333;
    border: 1px solid #ced4da;
}

.editor-light .tool-btn:hover {
    background: #dee2e6;
    border-color: #4a90d9;
}

.editor-light .tool-btn-accent {
    background: #4a90d9;
    color: white;
}

.editor-light .wysiwyg-editor {
    background: #ffffff;
    color: #333;
    border: 1px solid #ddd;
}

.editor-light .wysiwyg-editor:focus {
    border-color: #4a90d9;
    box-shadow: 0 0 10px rgba(74, 144, 217, 0.2);
}

.editor-light .wysiwyg-editor::before {
    color: #999;
}

.editor-light .wysiwyg-editor img:hover {
    border-color: #4a90d9;
}

.editor-light .wysiwyg-editor img.cover-selected {
    border-color: #f59e0b;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.editor-light .editor-sidebar {
    background: #f8f9fa;
    border-left: 1px solid #ddd;
}

.editor-light .editor-sidebar h3 {
    color: #4a90d9 !important;
}

.editor-light .editor-sidebar label,
.editor-light .editor-sidebar label[for="blogPublished"] {
    color: #444 !important;
}

.editor-light .editor-sidebar small {
    color: #666 !important;
}

.editor-light .editor-sidebar span[style*="color"] {
    color: #999 !important;
}

.editor-light .form-control {
    background: #ffffff;
    border: 1px solid #ced4da;
    color: #333;
}

.editor-light .security-notice {
    opacity: 1 !important;
}

.editor-light .security-notice p {
    color: #888 !important;
}

.editor-light .btn-secondary {
    background: #e9ecef;
    color: #333;
    border: 1px solid #ced4da;
}

.editor-light .btn-primary {
    background: #4a90d9;
}

.editor-light .editor-footer-hint {
    background: rgba(74, 144, 217, 0.1);
    color: #666;
}

/* Media Library Item Hover */
.media-item:hover {
    border-color: var(--spy-green) !important;
    transform: scale(1.02);
}

.preview-placeholder {
    color: rgba(0, 255, 65, 0.3);
    font-size: 0.8em;
}

/* =========================================
   MULTI-PUJA MANAGEMENT STYLES
   ========================================= */

/* Puja Types Grid */
.puja-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.puja-type-card {
    background: rgba(0, 20, 0, 0.6);
    border: 1px solid var(--spy-green);
    padding: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.puja-type-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 255, 65, 0.2);
}

.puja-type-card .puja-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
    display: block;
}

.puja-type-card .puja-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
}

.puja-type-card .puja-desc {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 15px;
}

.puja-type-card .puja-status {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.7em;
    border: 1px solid;
    text-transform: uppercase;
}

.puja-type-card .puja-status.active {
    border-color: var(--spy-green);
    color: var(--spy-green);
}

.puja-type-card .puja-status.inactive {
    border-color: var(--spy-red);
    color: var(--spy-red);
}

.puja-type-card .puja-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 8px;
}

.puja-type-card .puja-actions button {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.75em;
    transition: all 0.2s;
}

.puja-type-card .puja-actions button:hover {
    border-color: var(--spy-gold);
    color: var(--spy-gold);
}

/* Access Control Matrix */
.access-matrix-container {
    margin-top: 20px;
}

.access-info-banner {
    background: rgba(0, 208, 255, 0.1);
    border: 1px solid var(--spy-blue);
    padding: 15px;
    margin-bottom: 20px;
}

.access-info-banner p {
    margin: 5px 0;
    font-size: 0.9em;
}

.access-matrix-table th,
.access-matrix-table td {
    text-align: center;
    vertical-align: middle;
}

.access-matrix-table .staff-col {
    text-align: left !important;
    min-width: 180px;
}

.access-matrix-table .puja-col {
    min-width: 120px;
}

.permission-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.permission-toggle {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    justify-content: center;
}

.permission-toggle .perm-btn {
    width: 24px;
    height: 24px;
    font-size: 0.6em;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.2s;
}

.permission-toggle .perm-btn.active {
    border-color: var(--spy-green);
    color: var(--spy-green);
    background: rgba(0, 255, 65, 0.1);
}

.permission-toggle .perm-btn:hover {
    border-color: var(--spy-gold);
    color: var(--spy-gold);
}

/* Permission icons */
.perm-btn[data-perm="view"]::before {
    content: "V";
}

.perm-btn[data-perm="add"]::before {
    content: "A";
}

.perm-btn[data-perm="edit"]::before {
    content: "E";
}

.perm-btn[data-perm="delete"]::before {
    content: "D";
}

.perm-btn[data-perm="expense"]::before {
    content: "$";
}

.perm-btn[data-perm="print"]::before {
    content: "P";
}

/* Visibility Settings */
.visibility-settings-container {
    margin-top: 20px;
}

.visibility-info-banner {
    background: rgba(253, 245, 0, 0.1);
    border: 1px solid var(--spy-gold);
    padding: 15px;
    margin-bottom: 20px;
}

.visibility-info-banner p {
    margin: 5px 0;
    font-size: 0.9em;
}

.visibility-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.visibility-card {
    background: rgba(0, 20, 0, 0.6);
    border: 1px solid var(--spy-green);
    padding: 20px;
}

.visibility-card .card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--glass-border);
}

.visibility-card .puja-icon {
    font-size: 1.8em;
}

.visibility-card .puja-name {
    font-weight: bold;
    color: #fff;
}

.visibility-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.visibility-option:last-child {
    border-bottom: none;
}

.visibility-option label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
    cursor: pointer;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked+.toggle-slider {
    background-color: var(--spy-green);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(24px);
}

/* Status Input */
.status-select {
    padding: 10px 15px;
    margin-top: 10px;
}

.status-select label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.7);
}

.status-select select {
    width: 100%;
}

/* Form Row for Modals */
.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed var(--glass-border);
}

/* Header Filters */
.header-filters {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-filters .form-control.compact {
    width: auto;
    min-width: 100px;
}

/* Puja Year Status Badge */
.year-status-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.7em;
    border-radius: 3px;
    text-transform: uppercase;
    margin-left: 10px;
}

.year-status-badge.active {
    background: rgba(0, 255, 65, 0.2);
    color: var(--spy-green);
}

.year-status-badge.closed {
    background: rgba(255, 0, 60, 0.2);
    color: var(--spy-red);
}

.year-status-badge.upcoming {
    background: rgba(0, 208, 255, 0.2);
    color: var(--spy-blue);
}