@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* Registered CSS Properties for Cross-Browser Color Transitions (Firefox & Chrome) */
@property --theme-accent {
    syntax: '<color>';
    inherits: true;
    initial-value: #0ea5e9;
}
@property --blob-1 {
    syntax: '<color>';
    inherits: true;
    initial-value: #3b82f6;
}
@property --blob-2 {
    syntax: '<color>';
    inherits: true;
    initial-value: #06b6d4;
}
@property --blob-3 {
    syntax: '<color>';
    inherits: true;
    initial-value: #6366f1;
}

:root {
    /* Theme: Sapphire Ice (Default) */
    --theme-accent: #0ea5e9;
    --theme-accent-rgb: 14, 165, 233;
    --theme-glow: rgba(14, 165, 233, 0.2);
    --blob-1: #3b82f6;
    --blob-2: #06b6d4;
    --blob-3: #6366f1;

    --glass-bg: rgba(15, 23, 42, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.03);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

/* Dynamic Theme Palette Mappings */
.theme-amethyst {
    --theme-accent: #a855f7;
    --theme-accent-rgb: 168, 85, 247;
    --theme-glow: rgba(168, 85, 247, 0.2);
    --blob-1: #7c3aed;
    --blob-2: #ec4899;
    --blob-3: #4f46e5;
}

.theme-emerald {
    --theme-accent: #10b981;
    --theme-accent-rgb: 16, 185, 129;
    --theme-glow: rgba(16, 185, 129, 0.2);
    --blob-1: #059669;
    --blob-2: #0d9488;
    --blob-3: #3b82f6;
}

.theme-rose {
    --theme-accent: #f43f5e;
    --theme-accent-rgb: 244, 63, 94;
    --theme-glow: rgba(244, 63, 94, 0.25);
    --blob-1: #e11d48;
    --blob-2: #d946ef;
    --blob-3: #f97316;
}

.theme-amber {
    --theme-accent: #f59e0b;
    --theme-accent-rgb: 245, 158, 11;
    --theme-glow: rgba(245, 158, 11, 0.2);
    --blob-1: #ea580c;
    --blob-2: #eab308;
    --blob-3: #dc2626;
}

body {
    font-family: var(--font-body);
    background-color: #030712;
    color: #f3f4f6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-card {
    background: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
}

.glass-card.selected {
    border-color: var(--theme-accent);
    box-shadow: 0 0 25px rgba(var(--theme-accent-rgb), 0.25), 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    background: rgba(var(--theme-accent-rgb), 0.05);
}

/* Input Glassmorphism */
.glass-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.glass-input:focus {
    border-color: var(--theme-accent);
    box-shadow: 0 0 15px rgba(var(--theme-accent-rgb), 0.2);
    background: rgba(255, 255, 255, 0.06);
}

/* Interactive Liquid Blob Background */
@keyframes blobFloat {
    0% {
        transform: translate(0px, 0px) scale(1) rotate(0deg);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95) rotate(240deg);
    }

    100% {
        transform: translate(0px, 0px) scale(1) rotate(360deg);
    }
}

@keyframes blobFloatReverse {
    0% {
        transform: translate(0px, 0px) scale(1.1) rotate(360deg);
    }

    50% {
        transform: translate(-40px, 40px) scale(0.9) rotate(180deg);
    }

    100% {
        transform: translate(0px, 0px) scale(1.1) rotate(0deg);
    }
}

.liquid-blob-1 {
    background-color: var(--blob-1);
    animation: blobFloat 25s infinite alternate ease-in-out;
}

.liquid-blob-2 {
    background-color: var(--blob-2);
    animation: blobFloatReverse 30s infinite alternate ease-in-out;
}

.liquid-blob-3 {
    background-color: var(--blob-3);
    animation: blobFloat 28s infinite alternate-reverse ease-in-out;
}

/* Views management */
.app-view {
    display: none !important;
    animation: viewEnter 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.app-view.active {
    display: flex !important;
}

@keyframes viewEnter {
    from {
        opacity: 0;
        transform: scale(0.98) translateY(12px);
    }

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

/* Swiper & Slider styles */
.slider-wrapper {
    user-select: none;
    -webkit-user-drag: none;
    touch-action: pan-y;
}

.slider-img {
    pointer-events: none;
}

.photo-zoom-trigger {
    cursor: none !important;
}

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

::-webkit-scrollbar-track {
    background: rgba(3, 7, 18, 0.8);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    border: 2px solid rgba(3, 7, 18, 0.8);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--theme-accent);
}

/* Advanced Toast Notifications */
#toastContainer {
    perspective: 1000px;
}

.toast-card {
    animation: toastIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transition: all 0.3s ease;
}

.toast-card.removing {
    animation: toastOut 0.3s ease forwards;
}

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

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

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.85);
        margin-top: -64px;
    }
}

/* Theme wave indicator */
.theme-wave {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--theme-accent);
    transform: scale(0);
    opacity: 0.8;
    pointer-events: none;
    transition: transform 0.6s cubic-bezier(0.1, 0.8, 0.3, 1), opacity 0.6s ease;
}

.theme-wave.expand {
    transform: scale(100);
    opacity: 0;
}

/* Confetti particles */
.confetti {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    animation: confettiFall 3s ease-out infinite;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(80vh) rotate(720deg);
        opacity: 0;
    }
}

/* Dashboard Navigation Tabs */
.dashboard-tab {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-tab.active {
    color: #fff !important;
    background-color: var(--theme-accent);
    box-shadow: 0 4px 14px rgba(var(--theme-accent-rgb), 0.3);
}

.text-white-force,
html.theme-light .text-white-force,
html.theme-light h1.text-white-force,
html.theme-light h2.text-white-force,
html.theme-light h3.text-white-force,
html.theme-light h4.text-white-force {
    color: #ffffff !important;
}

/* Glassmorphic Input Fields */
.glass-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    color: #fff;
    font-family: var(--font-body);
}

.glass-input:focus {
    border-color: var(--theme-accent);
    box-shadow: 0 0 0 3px rgba(var(--theme-accent-rgb), 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Dashboard Select Dropdown */
.glass-input option {
    background: #1e293b;
    color: #fff;
    padding: 0.5rem;
}

/* Upload Dropzone States */
#dashUploadDropzone {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#dashUploadDropzone:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(var(--theme-accent-rgb), 0.1);
}

/* Dashboard Panel Entrance Animation */
#dashPanel-overview,
#dashPanel-deleted,
#dashPanel-clients,
#dashPanel-upload,
#dashPanel-status {
    animation: dashPanelIn 0.35s ease-out;
}

@keyframes dashPanelIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Client Card Hover Effects */
#clientManagerList .glass-panel:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Selection Status Card Effects */
#selectionStatusGrid .glass-panel:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Scrollbar Styling for Dashboard Panels */
#dashPanel-deleted .scrollbar-thin::-webkit-scrollbar,
#dashPanel-clients .scrollbar-thin::-webkit-scrollbar,
#dashPanel-status .scrollbar-thin::-webkit-scrollbar {
    width: 4px;
}

#dashPanel-deleted .scrollbar-thin::-webkit-scrollbar-thumb,
#dashPanel-clients .scrollbar-thin::-webkit-scrollbar-thumb,
#dashPanel-status .scrollbar-thin::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
}

/* ==========================================
   REUSABLE MODERN CONFIRMATION MODAL
   ========================================== */

/* Overlay */
.obm-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.obm-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Backdrop */
.obm-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Container Card */
.obm-modal-container {
    position: relative;
    z-index: 1;
    max-width: 420px;
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.75rem;
    padding: 2.25rem 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    text-align: center;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(var(--theme-accent-rgb), 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transform: scale(0.88) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.obm-modal-overlay.active .obm-modal-container {
    transform: scale(1) translateY(0);
}

/* Closing state */
.obm-modal-overlay.closing .obm-modal-container {
    transform: scale(0.92) translateY(10px);
    transition: transform 0.2s ease-in;
}

.obm-modal-overlay.closing {
    opacity: 0;
    transition: opacity 0.25s ease-in;
}

/* Icon Ring */
.obm-modal-icon-ring {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
}

.obm-modal-icon-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(var(--theme-accent-rgb), 0.1);
    animation: modalGlowPulse 2s ease-in-out infinite;
}

@keyframes modalGlowPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.25); opacity: 0.15; }
}

.obm-modal-icon-circle {
    position: relative;
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--theme-accent);
}

/* Icon Color Presets */
.obm-modal-icon-ring.modal-warning .obm-modal-icon-glow {
    background: rgba(245, 158, 11, 0.12);
}
.obm-modal-icon-ring.modal-warning .obm-modal-icon-circle {
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.25);
}

.obm-modal-icon-ring.modal-danger .obm-modal-icon-glow {
    background: rgba(239, 68, 68, 0.12);
}
.obm-modal-icon-ring.modal-danger .obm-modal-icon-circle {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.25);
}

.obm-modal-icon-ring.modal-info .obm-modal-icon-glow {
    background: rgba(14, 165, 233, 0.12);
}
.obm-modal-icon-ring.modal-info .obm-modal-icon-circle {
    color: #0ea5e9;
    border-color: rgba(14, 165, 233, 0.25);
}

.obm-modal-icon-ring.modal-success .obm-modal-icon-glow {
    background: rgba(16, 185, 129, 0.12);
}
.obm-modal-icon-ring.modal-success .obm-modal-icon-circle {
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.25);
}

/* Content */
.obm-modal-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.obm-modal-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.01em;
}

.obm-modal-message {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    max-width: 340px;
    margin: 0 auto;
}

/* Action Buttons */
.obm-modal-actions {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    margin-top: 0.25rem;
}

.obm-modal-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1rem;
    border-radius: 0.875rem;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-body);
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.obm-modal-btn:active {
    transform: scale(0.95);
}

/* Cancel Button */
.obm-modal-btn-cancel {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.obm-modal-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Confirm Button */
.obm-modal-btn-confirm {
    background: var(--theme-accent);
    color: #000;
    box-shadow: 0 4px 14px rgba(var(--theme-accent-rgb), 0.3);
}

.obm-modal-btn-confirm:hover {
    opacity: 0.9;
    box-shadow: 0 6px 20px rgba(var(--theme-accent-rgb), 0.4);
    transform: translateY(-1px);
}

.obm-modal-btn-confirm:active {
    transform: scale(0.95) translateY(0);
}

/* Danger Confirm variant */
.obm-modal-btn-confirm.btn-danger {
    background: #ef4444;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.obm-modal-btn-confirm.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* Body lock when modal is open */
body.modal-open {
    overflow: hidden;
}

/* ========================================== */
/* DYNAMIC LIGHT THEME OVERRIDES FOR PORTAL   */
/* ========================================== */
html.theme-light body {
    background: radial-gradient(circle at 50% -20%, #e2e8f0 0%, #f1f5f9 50%, #f8fafc 100%) !important;
    color: #0f172a !important;
}

html.theme-light .glass-panel {
    background: rgba(255, 255, 255, 0.75) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

html.theme-light .glass-card {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03) !important;
}

html.theme-light .glass-card:hover {
    border-color: rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1) !important;
}

html.theme-light .glass-card.selected {
    border-color: var(--theme-accent) !important;
    background: rgba(var(--theme-accent-rgb), 0.06) !important;
    box-shadow: 0 0 25px rgba(var(--theme-accent-rgb), 0.2), 0 8px 32px 0 rgba(0, 0, 0, 0.05) !important;
}

html.theme-light .glass-input {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #0f172a !important;
}

html.theme-light .glass-input:focus {
    border-color: var(--theme-accent) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 0 15px rgba(var(--theme-accent-rgb), 0.1) !important;
}

html.theme-light .glass-input::placeholder {
    color: #94a3b8 !important;
}

html.theme-light h1,
html.theme-light h2,
html.theme-light h3,
html.theme-light h4,
html.theme-light h5,
html.theme-light h6 {
    color: #0f172a !important;
}

html.theme-light .text-white {
    color: #0f172a !important;
}

html.theme-light .bg-white\/5 {
    background: rgba(0, 0, 0, 0.03) !important;
}

html.theme-light .bg-black\/40 {
    background: rgba(0, 0, 0, 0.03) !important;
}

html.theme-light .bg-black\/50 {
    background: rgba(0, 0, 0, 0.04) !important;
}

html.theme-light .border-white\/10 {
    border-color: rgba(0, 0, 0, 0.08) !important;
}

html.theme-light .border-white\/5 {
    border-color: rgba(0, 0, 0, 0.05) !important;
}

html.theme-light .text-gray-500 {
    color: #64748b !important;
}

html.theme-light .text-gray-400 {
    color: #475569 !important;
}

html.theme-light .text-gray-300 {
    color: #334155 !important;
}

html.theme-light .text-gray-200 {
    color: #1e293b !important;
}

/* Handshake Loader and Loading Overlay overrides (Translucent frosted pearl glass) */
html.theme-light #portalLoadingScreen,
html.theme-light #loadingOverlay {
    background: rgba(248, 250, 252, 0.84) !important;
    backdrop-filter: blur(35px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(180%) !important;
}

html.theme-light #portalLoadingScreen .text-white {
    color: #0f172a !important;
}

html.theme-light #portalLoadingScreen .text-gray-400 {
    color: #475569 !important;
}

html.theme-light #portalLoadingScreen .bg-white\/5 {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

html.theme-light #portalLoadingScreen span {
    color: #334155 !important;
}

html.theme-light #portalLoadingScreen .text-emerald-500 + span,
html.theme-light #portalLoadingScreen .text-emerald-400 + span {
    color: #059669 !important;
    font-weight: 600;
}

html.theme-light #portalLoadingEmail {
    color: var(--theme-accent) !important;
}

html.theme-light #portalProgressText {
    color: #0f172a !important;
}

/* Category Filter Bar */
html.theme-light .cat-pill {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #475569 !important;
}

html.theme-light .cat-pill:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    color: #0f172a !important;
}

html.theme-light .cat-pill.active {
    background: var(--theme-accent) !important;
    color: #ffffff !important;
    border-color: var(--theme-accent) !important;
}

/* Action toolbars and indicators */
html.theme-light .action-btn-secondary {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #475569 !important;
}

html.theme-light .action-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    color: #0f172a !important;
}

/* Confirmation Dialog Modal overrides */
html.theme-light .obm-modal-container {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.15) !important;
}

html.theme-light .obm-modal-title {
    color: #0f172a !important;
}

html.theme-light .obm-modal-message {
    color: #475569 !important;
}

html.theme-light .obm-modal-btn-cancel {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #475569 !important;
}

html.theme-light .obm-modal-btn-cancel:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    color: #0f172a !important;
}

/* Client submitted final thank-you screen overrides */
html.theme-light #clientSubmittedScreen .bg-white\/5 {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.04) !important;
}

html.theme-light #clientSubmittedScreen h2 {
    color: #0f172a !important;
}

html.theme-light #clientSubmittedScreen p {
    color: #475569 !important;
}

html.theme-light #clientSubmittedScreen .border-white\/10 {
    border-color: rgba(0, 0, 0, 0.08) !important;
}

/* Force bright white text color on top of dark image overlays (Carousel & Grid cards) in Light/White theme */
html.theme-light .slider-wrapper *,
html.theme-light #carouselTrack *,
html.theme-light #imageGrid .group .absolute * {
    color: #ffffff !important;
}

/* Maintain active tag badge dark contrast color */
html.theme-light .slider-wrapper span.text-black,
html.theme-light #carouselTrack span.text-black {
    color: #000000 !important;
}

/* Loading Screen Console/Log Container overrides for Light Theme */
html.theme-light #portalLoadingScreen div.bg-black\/30 {
    background-color: rgba(15, 23, 42, 0.04) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    color: #334155 !important;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.02) !important;
}

/* Loading Screen progress status item checks overrides */
html.theme-light #portalLoadingScreen .text-emerald-400 {
    color: #047857 !important;
    font-weight: 600 !important;
}

html.theme-light #portalLoadingScreen .text-emerald-500 {
    color: #10b981 !important;
}

html.theme-light #portalLoadingScreen .text-white {
    color: #0f172a !important;
    font-weight: 600 !important;
}

html.theme-light #portalLoadingScreen .text-gray-400 {
    color: #475569 !important;
}

html.theme-light #portalLoadingScreen .opacity-50 {
    opacity: 0.65 !important;
}

/* Light Theme Lightbox Modal overrides (Frosted white-pearl backdrop + high-contrast light elements) */
html.theme-light #lightboxModal {
    background: rgba(248, 250, 252, 0.85) !important;
    backdrop-filter: blur(40px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(180%) !important;
}

/* Lightbox Top Info Badge */
html.theme-light #lightboxModal .absolute.top-6 .bg-black\/50 {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

html.theme-light #lightboxFilename {
    color: #0f172a !important;
}

html.theme-light #lightboxIndex {
    color: var(--theme-accent) !important;
    font-weight: 700 !important;
}

/* Lightbox Navigation Side Buttons (chevron-left / chevron-right) */
html.theme-light #lightboxModal button[onclick^="navigateLightbox"] {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

html.theme-light #lightboxModal button[onclick^="navigateLightbox"]:hover {
    border-color: #0f172a !important;
    background: #ffffff !important;
}

html.theme-light #lightboxModal button[onclick^="navigateLightbox"] svg {
    stroke: #334155 !important;
}

/* Lightbox Bottom Thumbnails Bar */
html.theme-light #lightboxThumbs {
    background: rgba(255, 255, 255, 0.7) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

html.theme-light #lightboxThumbs button {
    border-color: transparent !important;
}

html.theme-light #lightboxThumbs button.scale-105 {
    border-color: var(--theme-accent) !important;
    transform: scale(1.08) !important;
    box-shadow: 0 4px 12px rgba(var(--theme-accent-rgb), 0.25) !important;
}

/* Lightbox Bottom Controls Capsule */
html.theme-light #lightboxModal .absolute.bottom-6.left-1\/2 {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.06), 0 0 1px rgba(15, 23, 42, 0.1) !important;
}

/* Heart Select Button inside capsule */
html.theme-light #lightboxSelectBtn {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #0f172a !important;
}

html.theme-light #lightboxSelectBtn:hover {
    background: rgba(0, 0, 0, 0.08) !important;
}

html.theme-light #lightboxSelectBtn svg {
    stroke: #0f172a !important;
}

html.theme-light #lightboxSelectBtn svg.fill-white {
    fill: #0f172a !important;
    stroke: #0f172a !important;
}

/* Close & Next Buttons inside capsule */
html.theme-light #lightboxModal .absolute.bottom-6.left-1\/2 button:not(#lightboxSelectBtn):not([onclick^="lightboxDeleteCurrent"]):not([onclick^="submitSelections"]) {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

html.theme-light #lightboxModal .absolute.bottom-6.left-1\/2 button:not(#lightboxSelectBtn):not([onclick^="lightboxDeleteCurrent"]):not([onclick^="submitSelections"]):hover {
    background: rgba(0, 0, 0, 0.08) !important;
}

html.theme-light #lightboxModal .absolute.bottom-6.left-1\/2 button:not(#lightboxSelectBtn):not([onclick^="lightboxDeleteCurrent"]):not([onclick^="submitSelections"]) svg {
    stroke: #475569 !important;
}

/* Delete Button inside capsule */
html.theme-light #lightboxModal button[onclick^="lightboxDeleteCurrent"] {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
    color: #ef4444 !important;
}

html.theme-light #lightboxModal button[onclick^="lightboxDeleteCurrent"]:hover {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}

html.theme-light #lightboxModal button[onclick^="lightboxDeleteCurrent"]:hover svg {
    stroke: #ffffff !important;
}

html.theme-light #lightboxModal button[onclick^="lightboxDeleteCurrent"] svg {
    stroke: #ef4444 !important;
}

/* Vertical divider inside capsule */
html.theme-light #lightboxModal .absolute.bottom-6.left-1\/2 span.bg-white\/10 {
    background-color: rgba(15, 23, 42, 0.08) !important;
}


/* Premium Blurred Glass Overlay Backdrops (Lightbox and Loading Screens) */
#lightboxModal,
#portalLoadingScreen,
#loadingOverlay {
    background: rgba(10, 10, 15, 0.82) !important;
    backdrop-filter: blur(35px) saturate(170%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(170%) !important;
    transition: background 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Premium Filter Pills and Upload dropzone Light Theme styling */
html.theme-light #filtersSection {
    background: rgba(255, 255, 255, 0.45) !important;
    border-color: rgba(15, 23, 42, 0.06) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03), 0 1px 3px rgba(15, 23, 42, 0.02) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-radius: 1rem !important; /* Restored previous rounded-2xl */
}

html.theme-light #categoryContainer button {
    background: rgba(255, 255, 255, 0.6) !important;
    border-color: rgba(15, 23, 42, 0.05) !important;
    color: #475569 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-radius: 0.75rem !important; /* Restored previous rounded-xl */
    padding: 8px 18px !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html.theme-light #categoryContainer button:hover {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.15) !important;
    color: #0f172a !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.03) !important;
}

html.theme-light #categoryContainer button.bg-\[var\(--theme-accent\)\] {
    background: var(--theme-accent) !important;
    border-color: var(--theme-accent) !important;
    color: #ffffff !important; /* Changed active text to white */
    font-weight: 800 !important;
    box-shadow: 0 4px 12px rgba(var(--theme-accent-rgb), 0.25) !important;
}

html.theme-light #gallerySearchInput {
    background: rgba(255, 255, 255, 0.6) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    color: #0f172a !important;
}

html.theme-light #gallerySearchInput:focus {
    border-color: var(--theme-accent) !important;
    background: #ffffff !important;
    box-shadow: 0 4px 12px rgba(var(--theme-accent-rgb), 0.1) !important;
}

html.theme-light #gallerySearchInput::placeholder {
    color: #94a3b8 !important;
}

html.theme-light #filtersSection .absolute svg,
html.theme-light #filtersSection .absolute i {
    stroke: #64748b !important;
}

/* Custom Cursor Light Theme overrides */
html.theme-light #customCursor {
    background-color: rgba(255, 255, 255, 0.75) !important;
    border-color: rgba(15, 23, 42, 0.15) !important;
    color: var(--theme-accent) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08) !important;
}

html.theme-light #customCursor svg {
    stroke: var(--theme-accent) !important;
}

/* Force white text/icon inside Finalize buttons in Light/White theme */
html.theme-light button[onclick^="submitSelections"] {
    color: #ffffff !important;
}

html.theme-light button[onclick^="submitSelections"] svg,
html.theme-light button[onclick^="submitSelections"] i {
    stroke: #ffffff !important;
}

/* Submit Modal & Success Overlay Light Theme Overrides */
html.theme-light #submitModal,
html.theme-light #successOverlay {
    background: rgba(248, 250, 252, 0.85) !important;
    backdrop-filter: blur(40px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(180%) !important;
}

html.theme-light #submitSelectedList {
    background-color: rgba(15, 23, 42, 0.04) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    color: #334155 !important;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.02) !important;
}

html.theme-light #submitSelectedList .bg-white\/5 {
    background-color: rgba(15, 23, 42, 0.05) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

html.theme-light #submitSelectedList .text-gray-400 {
    color: #475569 !important;
}

html.theme-light #submitSelectedList .border-white\/5 {
    border-color: rgba(15, 23, 42, 0.06) !important;
}

html.theme-light #submitSelectedList img.border-white\/10 {
    border-color: rgba(15, 23, 42, 0.1) !important;
}

/* Action button overrides inside submitModal */
html.theme-light #submitModal button.bg-\[var\(--theme-accent\)\] {
    color: #ffffff !important;
}

html.theme-light #submitModal button.bg-white\/5 {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #475569 !important;
}

html.theme-light #submitModal button.bg-white\/5:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    color: #0f172a !important;
}

/* Primary buttons override in successOverlay */
html.theme-light #successOverlay button {
    background: var(--theme-accent) !important;
    border-color: var(--theme-accent) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(var(--theme-accent-rgb), 0.25) !important;
}

html.theme-light #successOverlay button svg,
html.theme-light #successOverlay button i {
    stroke: #ffffff !important;
}

/* Action Toolbar (Bulk Selection) Light Theme Overrides */
html.theme-light #actionToolbar {
    background: rgba(255, 255, 255, 0.45) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03), 0 1px 3px rgba(15, 23, 42, 0.02) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
}

html.theme-light #actionToolbar p.text-gray-300 {
    color: #334155 !important;
}

html.theme-light #actionToolbar span#toolbarSelectedCount {
    color: #0f172a !important;
}

html.theme-light #actionToolbar button:not([onclick^="bulkDelete"]) {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #475569 !important;
}

html.theme-light #actionToolbar button:not([onclick^="bulkDelete"]):hover {
    background: rgba(0, 0, 0, 0.08) !important;
    color: #0f172a !important;
}

html.theme-light #actionToolbar button[onclick^="bulkDelete"] {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
    color: #ef4444 !important;
}

html.theme-light #actionToolbar button[onclick^="bulkDelete"]:hover {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}

/* Hide main website header navbar when workspace is active */
html.portal-active .floating-nav-container {
    display: none !important;
}