/* Adolin Foto AI — styles */
       :root {
            --bg-dark: #012633;        
            --sidebar-hover: #334155;  
            --sidebar-border: #1E293B;   


            --bg-sidebar-start: #475569; 
            --bg-sidebar-mid: #1e293b;  
            --bg-sidebar-end: #0f172a;  


            --bg-light: #f9fafb;
            --surface: #ffffff;
            --border-color: #e5e7eb;
            --border-medium: #d1d5db;
            --text-dark: #1f2937;
            --text-medium: #6b7280;
            --text-light: #9ca3af;
            
  
            --accent: #2563eb;
            --accent-hover: #1d4ed8;
            --accent-light-bg: #eff6ff;
            --accent-light-border: #bfdbfe;
            --accent-text: #1d4ed8;
        }

        body {
            font-family: 'Inter', sans-serif;
            color: var(--text-dark);
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }
        .card {
            background-color: rgba(255, 255, 255, 0.6);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(229, 231, 235, 0.8);
            border-radius: 0.75rem;
            box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
            transition: box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out;
        }
        .card:hover {
            box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
            transform: translateY(-2px);
        }
        
        @keyframes breathing-glow {
            0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.3), inset 0 2px 4px rgba(0,0,0,0.02); }
            50% { box-shadow: 0 0 20px 3px rgba(37, 99, 235, 0.5), inset 0 2px 4px rgba(0,0,0,0.02); }
            100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.3), inset 0 2px 4px rgba(0,0,0,0.02); }
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(15px); }
            to { opacity: 1; transform: translateY(0); }
        }
        @keyframes fadeOut {
            from { opacity: 1; transform: translateY(0); }
            to { opacity: 0; transform: translateY(-15px); }
        }
        .tab-content-pane.is-active {
            animation: fadeIn 0.4s ease-out forwards;
        }
        .tab-content-pane.is-exiting {
            animation: fadeOut 0.3s ease-in forwards;
        }

        @keyframes pan-gradient {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }
        .animated-title {
            background-image: linear-gradient(to right, var(--accent-text), var(--accent), var(--accent-text));
            background-size: 200% auto;
            color: transparent;
            -webkit-background-clip: text;
            background-clip: text;
            animation: pan-gradient 5s linear infinite;
        }
        
        @keyframes sparkle {
          0%, 100% { transform: scale(1) rotate(-12deg); }
          50% { transform: scale(1.1) rotate(-10deg); }
        }
        .animated-wand-icon {
            animation: sparkle 3s ease-in-out infinite;
            transition: transform 0.3s ease;
        }
        .animated-wand-icon:hover {
            transform: scale(1.2) rotate(5deg) !important; 
        }
        
        .loader-icon {
            display: inline-block;
            width: 1rem;
            height: 1rem;
            box-sizing: border-box;
            border: 2px solid rgba(37, 99, 235, 0.25);
            border-left-color: var(--accent);
            border-radius: 50%;
            background: none;
            animation: spin 0.8s linear infinite;
        }

        /* Light variant for use on dark/colored backgrounds (e.g. buttons). */
        .loader-icon-light {
            border-color: rgba(255, 255, 255, 0.35);
            border-left-color: #ffffff;
        }
        
       @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        @keyframes modern-spin {
            0% { 
                transform: rotate(0deg) scale(1);
                opacity: 1;
            }
            50% { 
                transform: rotate(180deg) scale(0.9);
                opacity: 0.85;
            }
            100% { 
                transform: rotate(360deg) scale(1);
                opacity: 1;
            }
        }

        .file-input-label {
            cursor: pointer;
            border: 2px dashed var(--border-medium);
            padding: 1.5rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            transition: border-color 0.3s, background-color 0.3s;
            height: 100%;
            color: var(--text-medium);
            background-color: transparent; 
        }

        .file-input-label:hover {
            border-color: var(--accent);
            background-color: var(--accent-light-bg);
        }
        .modal-backdrop {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background-color: rgba(15, 23, 42, 0.8);
            backdrop-filter: blur(5px);
            display: flex; align-items: center; justify-content: center; z-index: 50;
            opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
        }
        .modal-backdrop.visible { opacity: 1; pointer-events: auto; }
        .modal-content {
            background-color: var(--bg-dark); border: 1px solid var(--sidebar-border);
            padding: 2rem; border-radius: 0.75rem; width: 90%; max-width: 500px;
            transform: scale(0.95); transition: transform 0.3s ease;
            max-height: 90vh; overflow-y: auto; color: #e2e8f0;
        }
        .modal-backdrop.visible .modal-content { transform: scale(1); }
        .sidebar-btn {
            display: flex;
            align-items: center;
            width: 100%;
            padding: 0.75rem 1.25rem;
            font-weight: 500;
            border-radius: 0.5rem;
            transition: color 0.2s ease-in-out, transform 0.2s ease-in-out; 
            position: relative;
            overflow: hidden;
            color: #94a3b8; 
            border-left: 3px solid transparent;
            cursor: pointer;
        }

        .sidebar-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: var(--sidebar-hover);
            transform: translateX(-100%);
            transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            z-index: 0; 
        }
        
        .sidebar-btn {
            display: flex;
            align-items: center;
            width: 100%;
            padding: 0.6rem 1.25rem; 
            font-weight: 500; 
            border-radius: 0.5rem;
            transition: all 0.2s ease-in-out;
            position: relative;
            color: #94a3b8; 
            border-left: 3px solid transparent; 
            cursor: pointer;
        }

        .sidebar-btn.active,
        .sidebar-btn:not(.active):hover {
            background-image: linear-gradient(to right, rgba(37, 99, 235, 0.15), transparent); 
            color: #f8fafc;
            font-weight: 600;
            border-left-color: var(--accent);
        }

        .sidebar-sub-btn {
            display: flex;
            align-items: center;
            width: 100%;
            padding: 0.5rem 1rem 0.5rem 3rem;
            font-size: 0.85rem;
            color: #94a3b8;
            transition: all 0.2s;
            cursor: pointer;
            border-left: 3px solid transparent;
        }
        .sidebar-sub-btn:hover, .sidebar-sub-btn.active {
            color: #f8fafc;
            background-color: rgba(255, 255, 255, 0.05);
        }
        .sidebar-sub-btn.active {
            color: #ffffff;
            font-weight: 600;
        }
        
        .upload-box { border: 2px dashed var(--border-medium); transition: all 0.3s ease; }
        .upload-box.dragging { border-color: var(--accent); background-color: var(--accent-light-bg); }
        .upload-box img { max-height: 100%; max-width: 100%; object-fit: contain; }
       
        textarea, input[type="text"], select {
            background-color: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(5px);
            border: 1px solid var(--border-medium);
            color: var(--text-dark);
        }
        textarea:focus, input[type="text"]:focus, select:focus {
            --tw-ring-color: var(--accent); border-color: var(--accent);
        }
        ::-webkit-scrollbar { width: 8px; }
        ::-webkit-scrollbar-track { background: #f1f5f9; }
        ::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }
        ::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
        #ef-draw-canvas {
            cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="white" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m9.06 11.9 8.07-8.06a2.85 2.85 0 1 1 4.03 4.03l-8.06 8.08"/><path d="M7.07 14.94c-1.66 0-3 1.35-3 3.02 0 1.33-2.5 1.52-2 2.02 1.08 1.1 2.49 2.02 4 2.02 2.2 0 4-1.8 4-4.04a3.01 3.01 0 0 0-3-3.02z"/></svg>') 12 12, crosshair;
            touch-action: none;
        }
        .option-btn, .checkbox-btn {
            padding: 0.5rem 1rem;
            border-radius: 0.5rem;
            border: 1px solid var(--border-medium);
            background-color: white;
            cursor: pointer;
            transition: all 0.2s ease-in-out;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            text-align: center;
        }
        .option-btn.selected, .checkbox-btn.selected {
            background-color: var(--accent-light-bg);
            border-color: var(--accent);
            color: var(--accent-text);
            font-weight: 600;
        }
        .validation-status {
            font-size: 0.75rem;
            margin-top: 0.5rem;
            height: 1rem;
        }
        .result-action-btn {
            background-color: rgba(255, 255, 255, 0.8);
            backdrop-filter: blur(5px);
            color: var(--text-dark);
            padding: 0.5rem;
            border-radius: 9999px;
            transition: background-color 0.2s;
        }
        .result-action-btn:hover {
            background-color: white;
        }
        .result-action-btn.download-btn {
             background-color: var(--accent);
             color: white;
        }
        .result-action-btn.download-btn:hover {
             background-color: var(--accent-hover);
        }

        .magic-tooltip {
            position: absolute;
            bottom: 100%;
            right: 2px;
            margin-bottom: 0.5rem;
            background-image: linear-gradient(to top right, #1e293b, #0f172a);
            border: 1px solid var(--sidebar-border);
            color: white;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
            padding: 0.75rem;
            width: 240px;
            font-weight: 500;
            font-size: 0.8rem;
            line-height: 1.4;
            border-radius: 0.5rem;
            transform: translateY(10px) scale(0.95);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease, transform 0.3s ease;
            z-index: 10;
        }
        .magic-tooltip.visible {
            opacity: 1;
            transform: translateY(0) scale(1);
            pointer-events: auto;
        }
        .magic-tooltip .arrow {
            position: absolute;
            bottom: -5px;
            right: 20px;
            width: 10px;
            height: 10px;
            background-color: #1e293b;
            border-bottom: 1px solid var(--sidebar-border);
            border-right: 1px solid var(--sidebar-border);
            transform: rotate(45deg);
        }
    
        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 28px;
        }
        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .4s;
            border-radius: 28px;
        }
        .slider:before {
            position: absolute;
            content: "";
            height: 20px;
            width: 20px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }
        input:checked + .slider {
            background-color: var(--accent);
        }
        input:checked + .slider:before {
            transform: translateX(22px);
        }
  
         .carousel-container {
            position: relative;
            overflow: hidden; 
            border-radius: 0.75rem;
        }
        .carousel-slides {
            display: flex;
            transition: transform 0.5s ease-in-out;
        }
        .carousel-slide {
            flex: 0 0 100%;
            width: 100%;
            position: relative;
        }
        .carousel-slide img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        .carousel-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background-color: rgba(0, 0, 0, 0.4);
            color: white;
            border: none;
            border-radius: 50%;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: background-color 0.2s;
            z-index: 10;
        }
        .carousel-nav:hover { background-color: rgba(0, 0, 0, 0.7); }
        .carousel-nav.prev { left: 8px; }
        .carousel-nav.next { right: 8px; }
        .carousel-dots {
            position: absolute;
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 6px;
        }
        .carousel-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background-color: rgba(255, 255, 255, 0.5);
            transition: background-color 0.3s;
        }
        .carousel-dot.active {
            background-color: white;
        }
        
        .crsl-tooltip {
            position: absolute;
            bottom: calc(100% + 8px);
            left: 50%;
            transform: translateX(-50%);
            background-color: var(--bg-dark);
            color: white;
            padding: 0.5rem 1rem;
            border-radius: 0.5rem;
            font-size: 0.8rem;
            font-weight: 500;
            white-space: nowrap;
            box-shadow: 0 4px 10px rgba(0,0,0,0.2);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease, transform 0.3s ease;
            transform-origin: bottom center;
            scale: 0.9;
        }
        .crsl-tooltip.visible {
            opacity: 1;
            pointer-events: auto;
            scale: 1;
        }
        .crsl-tooltip::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            margin-left: -5px;
            border-width: 5px;
            border-style: solid;
            border-color: var(--bg-dark) transparent transparent transparent;
        }

        aside nav::-webkit-scrollbar {
            width: 6px;
        }
        aside nav::-webkit-scrollbar-track {
            background: transparent;
        }
        aside nav::-webkit-scrollbar-thumb {
            background: var(--sidebar-border);
            border-radius: 10px;
        }
        aside nav::-webkit-scrollbar-thumb:hover {
            background: #475569; 
        }

        @media (min-width: 1024px) {
            .desktop-carousel-frame {
                max-width: 400px;
                margin: 1rem auto;
                padding: 0.75rem;
                background-color: white;
                border-radius: 1.5rem;
                border: 1px solid var(--border-medium);
                box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
                overflow: hidden;
            }
            .desktop-carousel-frame .carousel-container {
               
                border-radius: 1rem; 
            }
        }

      
         .vto-tab-btn, .mg-tab-btn, .sf-tab-btn, .ef-tab-btn, .dr-tab-btn {
            padding: 0.625rem 1rem; 
            border-radius: 0.75rem; 
            font-weight: 600;
            font-size: 0.875rem;
            color: #475569; 
            transition: all 0.25s ease-in-out;
            border: none;
            background-color: transparent;
            cursor: pointer;
        }

        .vto-tab-btn:hover:not(.active), 
        .mg-tab-btn:hover:not(.active),
        .sf-tab-btn:hover:not(.active),
        .ef-tab-btn:hover:not(.active),
        .dr-tab-btn:hover:not(.active) {
            background-color: #e2e8f0; 
        }

        .beranda-tab-btn {
            padding: 0.625rem 1rem; 
            border-radius: 0.75rem; 
            font-weight: 600;
            font-size: 0.875rem;
            color: #475569; 
            transition: all 0.25s ease-in-out;
            border: none;
            background-color: transparent;
            cursor: pointer;
        }

        .beranda-tab-btn:hover:not(.active) {
            background-color: #e2e8f0; 
        }

        .beranda-tab-btn.active {
            background-color: #ffffff;
            color: var(--accent-text); 
            box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
        }

        .vto-tab-btn.active,
        .mg-tab-btn.active,
        .sf-tab-btn.active,
        .ef-tab-btn.active,
        .dr-tab-btn.active {
            background-color: #ffffff;
            color: var(--accent-text); 
            box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
        }

        .dr-tab-btn.active {
            background-color: #ffffff;
            color: var(--accent-text); 
            box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
        }
        
        @keyframes equalize {
            0% { transform: scaleY(0.1); }
            25% { transform: scaleY(1.0); }
            50% { transform: scaleY(0.3); }
            75% { transform: scaleY(0.75); }
            100% { transform: scaleY(0.1); }
        }

        #equalizer-icon .eq-bar {
            transform-origin: bottom;
            transition: transform 0.2s ease-out;
            transform: scaleY(0.1); 
        }

        #equalizer-icon.playing .eq-bar {
            animation: equalize 1.2s infinite ease-in-out;
        }
        #equalizer-icon.playing .eq-bar:nth-child(2) {
            animation-delay: -0.2s;
        }
        #equalizer-icon.playing .eq-bar:nth-child(3) {
            animation-delay: -0.4s;
        }
        
        .custom-slider {
            -webkit-appearance: none;
            appearance: none;
            width: 100%;
            height: 8px;
            background-color: var(--border-color);
            border-radius: 8px;
            outline: none;
            cursor: pointer;
            position: relative;
        }

        .custom-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            background-color: var(--accent);
            border-radius: 50%;
            border: 2px solid white;
            box-shadow: 0 0 5px rgba(0,0,0,0.2);
            margin-top: -6px; 
        }

        .custom-slider::-moz-range-thumb {
            width: 20px;
            height: 20px;
            background-color: var(--accent);
            border-radius: 50%;
            border: 2px solid white;
            box-shadow: 0 0 5px rgba(0,0,0,0.2);
            cursor: pointer;
        }

        .custom-slider::-moz-range-track {
            background-color: var(--border-color);
            height: 8px;
            border-radius: 8px;
        }

        #sidebar-tooltip {
            opacity: 0;
            transform: translateY(-50%) translateX(-15px);
            transition: opacity 0.4s ease-out, transform 0.4s ease-out;
        }
        #sidebar-tooltip.visible {
            opacity: 1;
            transform: translateY(-50%) translateX(0);
        }
        #sidebar-tooltip .arrow {
            position: absolute;
            top: 50%;
            left: -5px;
            width: 10px;
            height: 10px;
            background-color: #0f172a;
            transform: translateY(-50%) rotate(45deg);
        }

       #ep-canvas-container {
            touch-action: none;
        }
        .ep-handle {
            position: absolute;
            width: 14px;
            height: 14px;
            background-color: white;
            border: 2px solid var(--accent);
            border-radius: 50%;
            z-index: 10;
            pointer-events: auto; 
        }
        #ep-resize-frame {
             pointer-events: auto; 
             cursor: move; 
        }
        #ep-handle-nw { top: -7px; left: -7px; cursor: nwse-resize; }
        #ep-handle-n { top: -7px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
        #ep-handle-ne { top: -7px; right: -7px; cursor: nesw-resize; }
        #ep-handle-w { top: 50%; left: -7px; transform: translateY(-50%); cursor: ew-resize; }
        #ep-handle-e { top: 50%; right: -7px; transform: translateY(-50%); cursor: ew-resize; }
        #ep-handle-sw { bottom: -7px; left: -7px; cursor: nesw-resize; }
        #ep-handle-s { bottom: -7px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
        #ep-handle-se { bottom: -7px; right: -7px; cursor: nwse-resize; }

        .ep-zoom-slider {
            -webkit-appearance: none;
            appearance: none;
            height: 8px;
            background-color: var(--border-color);
            border-radius: 8px;
            outline: none;
            cursor: pointer;
            background-image: linear-gradient(to right, var(--accent), var(--accent));
            background-size: 0% 100%;
            background-repeat: no-repeat;
        }
        .ep-zoom-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            background-color: var(--accent);
            border-radius: 50%;
            border: 3px solid white;
            box-shadow: 0 0 5px rgba(0,0,0,0.2);
            cursor: pointer;
        }
        .ep-zoom-slider::-moz-range-thumb {
            width: 20px;
            height: 20px;
            background-color: var(--accent);
            border-radius: 50%;
            border: 3px solid white;
            box-shadow: 0 0 5px rgba(0,0,0,0.2);
            cursor: pointer;
        }

        #ep-workspace {
            background-color: #f8fafc; 
            background-image: 
            linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%),
            linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%);
            background-size: 20px 20px;
            background-position: 0 0, 10px 10px;
        }

        .ba-slider-container {
            position: relative;
            width: 100%;
            height: 100%;
            overflow: hidden;
            user-select: none;
            cursor: ew-resize;
        }
        .ba-image-img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: contain; 
            pointer-events: none;
        }
        .ba-slider-handle {
            position: absolute;
            top: 0;
            bottom: 0;
            width: 4px;
            background: white;
            cursor: ew-resize;
            z-index: 10;
            box-shadow: 0 0 5px rgba(0,0,0,0.5);
        }
        .ba-slider-circle {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 32px;
            height: 32px;
            background: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 6px rgba(0,0,0,0.3);
        }

        @property --angle {
          syntax: '<angle>';
          initial-value: 0deg;
          inherits: false;
        }

       


/* ============================================================================
   GLASSMORPHISM REDESIGN LAYER
   Appended overrides — no markup/JS changes required.
   Cascades over the base styles above (later rules + higher specificity win).
   ============================================================================ */

:root {
    /* Adolin accent system for glass theme (blue -> indigo -> violet) */
    --accent: #2563eb;     /* blue-600  */
    --accent-hover: #1d4ed8;/* blue-700  */
    --accent-2: #4f46e5;   /* indigo-600 */
    --accent-3: #7c3aed;   /* violet-600 */
    --accent-4: #6366f1;   /* indigo-500 */

    /* Glass surfaces */
    --glass-bg: rgba(255, 255, 255, 0.55);
    --glass-bg-strong: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(255, 255, 255, 0.65);
    --glass-shadow: 0 8px 32px rgba(15, 23, 42, 0.12);
    --glass-shadow-hover: 0 14px 44px rgba(79, 70, 229, 0.18);

    /* Dark glass (sidebar / modal) */
    --glass-dark: linear-gradient(160deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.70));
    --glass-dark-border: rgba(255, 255, 255, 0.10);
}

/* ---- Aurora animated background -------------------------------------------- */
html { min-height: 100%; }

body {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 34%, #f5f3ff 70%, #faf5ff 100%) !important;
    background-attachment: fixed;
    overflow-x: hidden;
}

/* Soft floating colour orbs sit behind all content */
body::before,
body::after {
    content: '';
    position: fixed;
    z-index: -2;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    pointer-events: none;
    will-change: transform;
}
body::before {
    width: 46vw; height: 46vw;
    top: -12vw; left: -8vw;
    background: radial-gradient(circle at 30% 30%, #60a5fa, #4f46e5);
    animation: aurora-float-1 20s ease-in-out infinite;
}
body::after {
    width: 42vw; height: 42vw;
    bottom: -14vw; right: -8vw;
    background: radial-gradient(circle at 70% 70%, #a78bfa, #6366f1);
    animation: aurora-float-2 26s ease-in-out infinite;
}
@keyframes aurora-float-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(6vw, 5vw) scale(1.12); }
}
@keyframes aurora-float-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-5vw, -4vw) scale(1.1); }
}

/* ---- Frosted glass cards --------------------------------------------------- */
.card {
    background: var(--glass-bg) !important;
    -webkit-backdrop-filter: blur(18px) saturate(155%);
    backdrop-filter: blur(18px) saturate(155%);
    border: 1px solid var(--glass-border) !important;
    border-radius: 1.1rem !important;
    box-shadow: var(--glass-shadow) !important;
}
.card:hover {
    box-shadow: var(--glass-shadow-hover) !important;
    transform: translateY(-3px);
}

/* ============================================================================
   SIDEBAR REDESIGN — glass panel, pill nav, glowing active indicator
   ============================================================================ */
aside {
    background:
        radial-gradient(130% 55% at 50% -8%, rgba(37, 99, 235, 0.18), transparent 60%),
        linear-gradient(165deg, rgba(15, 23, 42, 0.90), rgba(23, 20, 42, 0.80)) !important;
    -webkit-backdrop-filter: blur(24px) saturate(155%);
    backdrop-filter: blur(24px) saturate(155%);
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 8px 0 40px rgba(2, 6, 23, 0.45) !important;
}
/* faint top sheen */
aside::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 18%);
    z-index: 0;
}
aside nav { position: relative; z-index: 1; }

/* category labels: tiny gradient tick + spaced caps */
aside nav h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b !important;
    font-size: 0.65rem !important;
    letter-spacing: 0.14em;
}
aside nav h4::before {
    content: '';
    width: 14px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    flex-shrink: 0;
}

/* nav items become rounded pills */
aside .sidebar-btn {
    margin: 3px 0;
    padding: 0.6rem 0.85rem !important;
    border-left: none !important;
    border-radius: 0.8rem;
    color: #9aa7bd;
    transition: transform .28s cubic-bezier(.22, 1, .36, 1),
                background-color .25s ease, color .25s ease, box-shadow .25s ease;
}
aside .sidebar-btn svg {
    opacity: 0.9;
    transition: transform .28s cubic-bezier(.22, 1, .36, 1), color .25s ease;
}

/* repurpose ::before as a glowing left accent bar */
aside .sidebar-btn::before {
    content: '';
    position: absolute;
    left: 0.15rem;
    top: 50%;
    width: 3px;
    height: 0;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.85);
    transform: translateY(-50%);
    transition: height .28s cubic-bezier(.22, 1, .36, 1);
    z-index: 2;
}

/* hover (non-active) */
aside .sidebar-btn:not(.active):hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #f1f5f9;
    transform: translateX(4px);
}
aside .sidebar-btn:not(.active):hover svg {
    color: var(--accent);
    opacity: 1;
    transform: scale(1.08);
}

/* active pill */
aside .sidebar-btn.active {
    background: linear-gradient(100deg, rgba(37, 99, 235, 0.30), rgba(139, 92, 246, 0.16) 55%, transparent) !important;
    color: #ffffff;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 6px 20px rgba(37, 99, 235, 0.18);
}
aside .sidebar-btn.active::before { height: 58%; }
aside .sidebar-btn.active svg { color: #93c5fd; opacity: 1; }

/* nested submenu: vertical guide line + tidy indent */
aside nav [id^="submenu-"] {
    margin-left: 1.35rem;
    padding-left: 0.35rem;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}
aside nav [id^="submenu-"] .sidebar-btn {
    padding-left: 1rem !important;
    border-radius: 0.6rem;
}

/* "New" badges -> premium gradient glow pills */
aside .sidebar-btn span[class*="bg-red-500"] {
    background: linear-gradient(90deg, #2563eb, #7c3aed) !important;
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.5);
    letter-spacing: 0.02em;
}

/* ---- Glass modal ----------------------------------------------------------- */
.modal-backdrop { background-color: rgba(2, 6, 23, 0.55); }
.modal-content {
    background: var(--glass-dark) !important;
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--glass-dark-border) !important;
    border-radius: 1.1rem !important;
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.5) !important;
}

/* ---- Upload / drop zones --------------------------------------------------- */
.file-input-label {
    border: 2px dashed rgba(37, 99, 235, 0.45) !important;
    background: rgba(255, 255, 255, 0.35) !important;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-radius: 1rem;
}
.file-input-label:hover {
    border-color: var(--accent) !important;
    background: rgba(240, 253, 250, 0.55) !important;
}

/* ---- Form controls glassify (text inputs, textareas, selects) -------------- */
main input[type="text"],
main input[type="number"],
main input[type="search"],
main input[type="email"],
main textarea,
main select {
    background-color: rgba(255, 255, 255, 0.6) !important;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
}
main input[type="text"]:focus,
main input[type="number"]:focus,
main input[type="search"]:focus,
main input[type="email"]:focus,
main textarea:focus,
main select:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18) !important;
    outline: none;
}

/* ---- Primary action buttons become animated Adolin blue→indigo→violet glass - */
button[class*="from-teal-500"] {
    background-image: linear-gradient(120deg, #2563eb, #4f46e5, #7c3aed) !important;
    background-size: 200% auto;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.32);
    transition: background-position .5s ease, box-shadow .35s ease, transform .2s ease;
}
button[class*="from-teal-500"]:hover:not(:disabled) {
    background-position: right center;
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.42);
    transform: translateY(-2px);
}
button[class*="from-teal-500"]:disabled {
    background-image: none !important;
    box-shadow: none !important;
}

/* ---- Multi-colour animated title ------------------------------------------ */
.animated-title {
    background-image: linear-gradient(to right, var(--accent-text), var(--accent-2), var(--accent-4), var(--accent-text)) !important;
    background-size: 250% auto;
}

/* ---- Custom scrollbars ----------------------------------------------------- */
* { scrollbar-width: thin; scrollbar-color: rgba(37, 99, 235, 0.5) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.6), rgba(124, 58, 237, 0.6));
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.9), rgba(124, 58, 237, 0.9));
    background-clip: content-box;
}

/* ---- Respect reduced-motion preferences ----------------------------------- */
@media (prefers-reduced-motion: reduce) {
    body::before, body::after { animation: none; }
}
