@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

/* Dotted background pattern for Django Admin */
body {
    background-color: #fcfcfc;
    background-image: radial-gradient(rgba(0, 0, 0, 0.05) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
}

/* ── Dark Mode Overrides for Unfold Admin ──────────────────── */
html.dark, body.dark, .dark {
    background-color: #111113 !important;
    background-image: radial-gradient(rgba(255, 255, 255, 0.035) 1.5px, transparent 1.5px) !important;
    background-size: 24px 24px !important;
    color: #f4f4f5 !important;

    /* Remove slate/blue shadow variables */
    --tw-shadow-color: rgba(0, 0, 0, 0.65) !important;
    --tw-ring-color: rgba(244, 63, 94, 0.3) !important;
    --tw-ring-offset-color: #111113 !important;
}

/* Page body & main content container */
.dark body,
.dark main,
.dark #main,
.dark .bg-gray-900,
.dark .bg-zinc-900,
.dark .bg-slate-900,
.dark .bg-slate-950,
.dark .bg-gray-950 {
    background-color: #111113 !important;
}

/* Sidebar navigation, top header bar, and drawer panels */
.dark aside,
.dark nav,
.dark header,
.dark .bg-gray-800,
.dark .bg-zinc-800,
.dark .bg-slate-800,
.dark .bg-slate-900\/50,
.dark .bg-zinc-900\/50 {
    background-color: #1b1b1f !important;
    border-color: #222226 !important;
}

/* Sidebar search box & inputs */
.dark aside input,
.dark aside input[type="search"],
.dark aside input[type="text"],
.dark aside form input,
.dark aside button,
.dark input[type="search"] {
    background-color: #222226 !important;
    border-color: #2d2d34 !important;
    color: #f4f4f5 !important;
    box-shadow: none !important;
}

.dark aside input:focus,
.dark aside input[type="search"]:focus,
.dark input[type="search"]:focus {
    background-color: #1b1b1f !important;
    border-color: #f43f5e !important;
    color: #ffffff !important;
}

/* Cards, Tables, Admin Fieldsets & Forms */
.dark .bg-white\/70,
.dark .bg-white,
.dark .bg-gray-900\/60,
.dark .bg-zinc-900\/60,
.dark .shadow,
.dark .card,
.dark .unfold-card,
.dark table,
.dark tr,
.dark th,
.dark td,
.dark fieldset {
    background-color: #1b1b1f !important;
    border-color: #222226 !important;
}

/* Inputs, Textareas, Selects, Hover States, Table Row Hovers */
.dark input[type="text"],
.dark input[type="number"],
.dark input[type="email"],
.dark input[type="password"],
.dark input[type="date"],
.dark select,
.dark textarea,
.dark .hover\:bg-gray-800:hover,
.dark .hover\:bg-zinc-800:hover,
.dark .hover\:bg-slate-800:hover,
.dark tr:hover {
    background-color: #222226 !important;
    border-color: #2d2d34 !important;
    color: #f4f4f5 !important;
}

/* Non-editable, Readonly, and Disabled Inputs */
.dark input:disabled,
.dark input[readonly],
.dark textarea:disabled,
.dark textarea[readonly],
.dark select:disabled,
.dark select[readonly],
.dark .readonly,
.dark div.readonly,
.dark p.readonly,
.dark span.readonly,
.dark [disabled],
.dark [readonly] {
    background-color: #1b1b1f !important;
    border-color: #222226 !important;
    color: #a1a1aa !important;
    opacity: 0.85 !important;
    box-shadow: none !important;
}

/* General Dark Shadow Overrides (Replaces slate/blue drop shadows) */
.dark .shadow,
.dark .shadow-sm,
.dark .shadow-md,
.dark .shadow-lg,
.dark .shadow-xl,
.dark .shadow-2xl {
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.65) !important;
}

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}
.dark ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}
.dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ── Login Page Premium Enhancements ───────────────────────── */
body.login {
    position: relative;
    background-color: #f8fafc !important; /* Soft slate-tinted background for light mode */
    background-image: radial-gradient(rgba(0, 0, 0, 0.03) 1.5px, transparent 1.5px) !important;
    background-size: 24px 24px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.dark body.login {
    background-color: #0b0b0c !important; /* Deeper background for dark mode */
    background-image: radial-gradient(rgba(255, 255, 255, 0.02) 1.5px, transparent 1.5px) !important;
}

/* Background glowing blob */
body.login::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(223, 255, 0, 0.07) 0%, rgba(223, 255, 0, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

.dark body.login::before {
    background: radial-gradient(circle, rgba(223, 255, 0, 0.045) 0%, rgba(223, 255, 0, 0) 70%);
}

/* Style the login page container elements to handle stacking context */
body.login #page {
    background: transparent !important;
    z-index: 10;
    width: 100%;
}

/* Smooth, rounded input styling on login card */
body.login input[type="text"],
body.login input[type="password"] {
    border-radius: 8px !important;
    padding-top: 0.625rem !important;
    padding-bottom: 0.625rem !important;
    padding-left: 0.875rem !important;
    padding-right: 0.875rem !important;
    background-color: #ffffff !important;
    border: 1px solid #e4e4e7 !important; /* zinc-200 */
    font-size: 0.875rem !important;
    color: #18181b !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.dark body.login input[type="text"],
.dark body.login input[type="password"] {
    background-color: #17171c !important; /* darker base for input */
    border: 1px solid #27272a !important; /* zinc-800 */
    color: #f4f4f5 !important;
}

body.login input[type="text"]:focus,
body.login input[type="password"]:focus {
    box-shadow: 0 0 0 3px rgba(223, 255, 0, 0.15) !important;
    border-color: rgba(223, 255, 0, 0.8) !important;
    background-color: #ffffff !important;
}

.dark body.login input[type="text"]:focus,
.dark body.login input[type="password"]:focus {
    box-shadow: 0 0 0 3px rgba(223, 255, 0, 0.1) !important;
    border-color: rgba(223, 255, 0, 0.6) !important;
    background-color: #111113 !important; /* match card background on focus */
}

/* Force rounded corners on the login card container */
body.login #page > div > div {
    border-radius: 16px !important;
    overflow: hidden;
}

/* Clean, uppercase premium labels on login fields */
body.login label {
    font-size: 0.70rem !important; /* text-xs */
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important; /* tracking-wider */
    font-weight: 700 !important;
    color: #71717a !important; /* zinc-500 */
}

.dark body.login label {
    color: #a1a1aa !important; /* zinc-400 */
}

/* Modern premium submit button */
body.login button[type="submit"] {
    background-color: rgb(17, 17, 19) !important; /* Charcoal dark button for light mode */
    color: #ffffff !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 8px !important;
}

body.login button[type="submit"]:hover {
    background-color: rgb(45, 45, 52) !important;
    transform: translateY(-1px);
}

.dark body.login button[type="submit"] {
    background-color: #dfff00 !important; /* Vibrant neon yellow button for dark mode */
    color: #111113 !important;
    font-weight: 600 !important;
}

.dark body.login button[type="submit"]:hover {
    background-color: #c8e600 !important;
    transform: translateY(-1px);
}

/* Forgotten password link styling */
body.login a.password-reset-link,
body.login .password-reset-link a {
    color: #71717a !important;
    font-size: 0.75rem !important;
    text-align: center !important;
    transition: color 0.15s ease !important;
}

body.login a.password-reset-link:hover,
body.login .password-reset-link a:hover {
    color: #111113 !important;
}

.dark body.login a.password-reset-link:hover,
.dark body.login .password-reset-link a:hover {
    color: #ffffff !important;
}

/* ── Topbar Notification Dropdown System ──────────────────────── */
@keyframes xt-bell-ring {
    0% { transform: rotate(0); }
    15% { transform: rotate(14deg); }
    30% { transform: rotate(-12deg); }
    45% { transform: rotate(8deg); }
    60% { transform: rotate(-6deg); }
    75% { transform: rotate(3deg); }
    100% { transform: rotate(0); }
}

.xt-notif-container {
    position: relative !important;
    display: inline-block !important;
}

.xt-notif-trigger {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 12px !important;
    color: #64748b !important;
    background-color: transparent !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.xt-notif-trigger:hover {
    background-color: rgba(99, 102, 241, 0.08) !important;
    color: #4f46e5 !important;
}

.xt-notif-trigger:hover .xt-bell-icon {
    animation: xt-bell-ring 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both !important;
}

.dark .xt-notif-trigger {
    color: #94a3b8 !important;
}

.dark .xt-notif-trigger:hover {
    background-color: rgba(129, 140, 248, 0.15) !important;
    color: #818cf8 !important;
}

.xt-notif-badge {
    position: absolute !important;
    top: -2px !important;
    right: -2px !important;
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%) !important;
    color: #ffffff !important;
    border-radius: 9999px !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    height: 18px !important;
    min-width: 18px !important;
    padding: 0 5px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.4) !important;
}

.dark .xt-notif-badge {
    border-color: #1b1b1f !important;
}

/* Dropdown Panel */
.xt-notif-dropdown {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    margin-top: 10px !important;
    width: 360px !important;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.05) !important;
    z-index: 999999 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-12px) scale(0.94) !important;
    transform-origin: top right !important;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s !important;
}

.dark .xt-notif-dropdown {
    background-color: #18181c !important;
    border-color: #27272a !important;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8) !important;
}

.xt-notif-dropdown.is-open {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
}

/* Dropdown Header */
.xt-notif-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 14px 18px !important;
    background-color: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.dark .xt-notif-header {
    background-color: #121215 !important;
    border-bottom-color: #222226 !important;
}

.xt-notif-title {
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    color: #475569 !important;
}

.dark .xt-notif-title {
    color: #94a3b8 !important;
}

.xt-notif-count-pill {
    padding: 2px 9px !important;
    border-radius: 9999px !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    background-color: rgba(244, 63, 94, 0.1) !important;
    color: #e11d48 !important;
}

.dark .xt-notif-count-pill {
    background-color: rgba(244, 63, 94, 0.2) !important;
    color: #fb7185 !important;
}

.xt-notif-mark-btn {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #6366f1 !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.xt-notif-mark-btn:hover {
    color: #4f46e5 !important;
    transform: scale(1.03) !important;
}

.dark .xt-notif-mark-btn {
    color: #818cf8 !important;
}

.dark .xt-notif-mark-btn:hover {
    color: #a5b4fc !important;
}

/* List & Row Styling */
.xt-notif-list {
    max-height: 330px !important;
    overflow-y: auto !important;
}

.xt-notif-row {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 12px 18px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    text-decoration: none !important;
    color: inherit !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.dark .xt-notif-row {
    border-bottom-color: #222226 !important;
}

.xt-notif-row::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 6px !important;
    bottom: 6px !important;
    width: 3px !important;
    border-radius: 0 4px 4px 0 !important;
    background: #6366f1 !important;
    transform: scaleY(0) !important;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.xt-notif-row:hover {
    background-color: rgba(99, 102, 241, 0.04) !important;
    transform: translateX(4px) !important;
}

.dark .xt-notif-row:hover {
    background-color: rgba(129, 140, 248, 0.06) !important;
}

.xt-notif-row:hover::before {
    transform: scaleY(1) !important;
}

.xt-notif-icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.xt-notif-row:hover .xt-notif-icon {
    transform: scale(1.1) rotate(4deg) !important;
}

.xt-notif-icon-order {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(79, 70, 229, 0.08) 100%) !important;
    color: #4f46e5 !important;
    border: 1px solid rgba(99, 102, 241, 0.2) !important;
}

.dark .xt-notif-icon-order {
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.25) 0%, rgba(99, 102, 241, 0.15) 100%) !important;
    color: #818cf8 !important;
    border-color: rgba(129, 140, 248, 0.3) !important;
}

.xt-notif-icon-payment {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.08) 100%) !important;
    color: #059669 !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

.dark .xt-notif-icon-payment {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.25) 0%, rgba(16, 185, 129, 0.15) 100%) !important;
    color: #34d399 !important;
    border-color: rgba(52, 211, 153, 0.3) !important;
}

.xt-notif-content {
    flex: 1 !important;
    min-width: 0 !important;
}

.xt-notif-row-title {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    transition: color 0.15s ease !important;
}

.dark .xt-notif-row-title {
    color: #f8fafc !important;
}

.xt-notif-row:hover .xt-notif-row-title {
    color: #4f46e5 !important;
}

.dark .xt-notif-row:hover .xt-notif-row-title {
    color: #818cf8 !important;
}

.xt-notif-row-sub {
    font-size: 11px !important;
    color: #64748b !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-top: 2px !important;
}

.dark .xt-notif-row-sub {
    color: #94a3b8 !important;
}

.xt-notif-meta {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 2px !important;
    flex-shrink: 0 !important;
}

.xt-notif-amount {
    font-size: 11px !important;
    font-weight: 800 !important;
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    padding: 2px 7px !important;
    border-radius: 6px !important;
}

.dark .xt-notif-amount {
    background-color: #222226 !important;
    color: #f8fafc !important;
}

.xt-notif-time {
    font-size: 10px !important;
    color: #94a3b8 !important;
}

/* Empty state */
.xt-notif-empty {
    padding: 36px 18px !important;
    text-align: center !important;
}

.xt-notif-empty-icon {
    width: 48px !important;
    height: 48px !important;
    margin: 0 auto 10px auto !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.08) 100%) !important;
    color: #059669 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

.dark .xt-notif-empty-icon {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.25) 0%, rgba(16, 185, 129, 0.15) 100%) !important;
    color: #34d399 !important;
    border-color: rgba(52, 211, 153, 0.3) !important;
}

.xt-notif-empty-title {
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}

.dark .xt-notif-empty-title {
    color: #f8fafc !important;
}

.xt-notif-empty-desc {
    font-size: 11px !important;
    color: #64748b !important;
    margin-top: 3px !important;
}

.dark .xt-notif-empty-desc {
    color: #94a3b8 !important;
}

/* Dropdown Footer */
.xt-notif-footer {
    padding: 11px 16px !important;
    background-color: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
    text-align: center !important;
}

.dark .xt-notif-footer {
    background-color: #121215 !important;
    border-top-color: #222226 !important;
}

.xt-notif-footer a {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #4f46e5 !important;
    text-decoration: none !important;
    transition: color 0.15s ease !important;
}

.dark .xt-notif-footer a {
    color: #818cf8 !important;
}

.xt-notif-footer a:hover {
    text-decoration: underline !important;
}

/* Toggle Switch for Desktop Push Notifications */
.xt-toggle-label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    user-select: none !important;
}

.xt-toggle-label input {
    display: none !important;
}

.xt-toggle-slider {
    position: relative !important;
    width: 28px !important;
    height: 16px !important;
    background-color: #cbd5e1 !important;
    border-radius: 9999px !important;
    transition: background-color 0.2s ease !important;
}

.dark .xt-toggle-slider {
    background-color: #3f3f46 !important;
}

.xt-toggle-slider::before {
    content: '' !important;
    position: absolute !important;
    width: 12px !important;
    height: 12px !important;
    left: 2px !important;
    top: 2px !important;
    background-color: #ffffff !important;
    border-radius: 9999px !important;
    transition: transform 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2) !important;
}

.xt-toggle-label input:checked + .xt-toggle-slider {
    background-color: #10b981 !important;
}

.xt-toggle-label input:checked + .xt-toggle-slider::before {
    transform: translateX(12px) !important;
}

/* ── Framer Motion (Spring Physics & Motion System) Styles ────── */
@keyframes xtSpringIn {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    70% {
        transform: translateY(-2px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes xtPulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(79, 70, 229, 0);
    }
}

.xt-motion-spring {
    animation: xtSpringIn 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
}

.xt-notif-dropdown {
    will-change: transform, opacity;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15) !important;
}

.xt-notif-row {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s ease, opacity 0.2s ease !important;
}

.xt-notif-row:hover {
    transform: translateX(4px) scale(1.008) !important;
}

/* Table Row Micro-Interaction (Pixel-sharp background hover without text blur) */
#result_list tbody tr, table.results tbody tr {
    transition: background-color 0.15s ease !important;
    transform: none !important;
    will-change: auto !important;
}

#result_list tbody tr:hover, table.results tbody tr:hover {
    transform: none !important;
}

/* Button & Badge Active Feedback */
button:active, .button:active, input[type="submit"]:active {
    transform: scale(0.96) !important;
    transition: transform 0.1s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
    font-weight: 800 !important;
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    padding: 2px 7px !important;
    border-radius: 6px !important;
}

.dark .xt-notif-amount {
    background-color: #222226 !important;
    color: #f8fafc !important;
}

.xt-notif-time {
    font-size: 10px !important;
    color: #94a3b8 !important;
}

/* Empty state */
.xt-notif-empty {
    padding: 36px 18px !important;
    text-align: center !important;
}

.xt-notif-empty-icon {
    width: 48px !important;
    height: 48px !important;
    margin: 0 auto 10px auto !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.08) 100%) !important;
    color: #059669 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

.dark .xt-notif-empty-icon {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.25) 0%, rgba(16, 185, 129, 0.15) 100%) !important;
    color: #34d399 !important;
    border-color: rgba(52, 211, 153, 0.3) !important;
}

.xt-notif-empty-title {
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}

.dark .xt-notif-empty-title {
    color: #f8fafc !important;
}

.xt-notif-empty-desc {
    font-size: 11px !important;
    color: #64748b !important;
    margin-top: 3px !important;
}

.dark .xt-notif-empty-desc {
    color: #94a3b8 !important;
}

/* Dropdown Footer */
.xt-notif-footer {
    padding: 11px 16px !important;
    background-color: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
    text-align: center !important;
}

.dark .xt-notif-footer {
    background-color: #121215 !important;
    border-top-color: #222226 !important;
}

.xt-notif-footer a {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #4f46e5 !important;
    text-decoration: none !important;
    transition: color 0.15s ease !important;
}

.dark .xt-notif-footer a {
    color: #818cf8 !important;
}

.xt-notif-footer a:hover {
    text-decoration: underline !important;
}

/* Toggle Switch for Desktop Push Notifications */
.xt-toggle-label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    user-select: none !important;
}

.xt-toggle-label input {
    display: none !important;
}

.xt-toggle-slider {
    position: relative !important;
    width: 28px !important;
    height: 16px !important;
    background-color: #cbd5e1 !important;
    border-radius: 9999px !important;
    transition: background-color 0.2s ease !important;
}

.dark .xt-toggle-slider {
    background-color: #3f3f46 !important;
}

.xt-toggle-slider::before {
    content: '' !important;
    position: absolute !important;
    width: 12px !important;
    height: 12px !important;
    left: 2px !important;
    top: 2px !important;
    background-color: #ffffff !important;
    border-radius: 9999px !important;
    transition: transform 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2) !important;
}

.xt-toggle-label input:checked + .xt-toggle-slider {
    background-color: #10b981 !important;
}

.xt-toggle-label input:checked + .xt-toggle-slider::before {
    transform: translateX(12px) !important;
}

/* ── Framer Motion (Spring Physics & Motion System) Styles ────── */
@keyframes xtSpringIn {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    70% {
        transform: translateY(-2px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes xtPulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(79, 70, 229, 0);
    }
}

.xt-motion-spring {
    animation: xtSpringIn 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
}

.xt-notif-dropdown {
    will-change: transform, opacity;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15) !important;
}

.xt-notif-row {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s ease, opacity 0.2s ease !important;
}

.xt-notif-row:hover {
    transform: translateX(4px) scale(1.008) !important;
}

/* Table Row Micro-Interaction (Pixel-sharp background hover without text blur) */
#result_list tbody tr, table.results tbody tr {
    transition: background-color 0.15s ease !important;
    transform: none !important;
    will-change: auto !important;
}

#result_list tbody tr:hover, table.results tbody tr:hover {
    transform: none !important;
}

/* Button & Badge Active Feedback */
button:active, .button:active, input[type="submit"]:active {
    transform: scale(0.96) !important;
    transition: transform 0.1s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Equalized Form Input Heights & Address Field Layout */
textarea#id_address,
.field-address textarea {
    height: 48px !important;
}

.field-description textarea {
    height: 72px !important;
    min-height: 60px !important;
    max-height: 180px !important;
    resize: vertical !important;
}

/* ── Modern Custom Status Pill & Dropdown Popover ───────────── */
.field-status .relative {
    display: inline-flex !important;
    align-items: center !important;
    width: auto !important;
}

.xt-status-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    position: relative !important;
}

.xt-status-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    height: 26px !important;
    padding: 0 9px 0 10px !important;
    border-radius: 9999px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    cursor: pointer !important;
    border: 1px solid transparent !important;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
    user-select: none !important;
    outline: none !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

.xt-status-pill:hover {
    filter: brightness(0.96);
    transform: translateY(-0.5px);
}
.dark .xt-status-pill:hover {
    filter: brightness(1.15);
}

.xt-status-pill:active {
    transform: scale(0.96) !important;
}

.xt-status-text {
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.xt-status-chevron {
    width: 12px !important;
    height: 12px !important;
    flex-shrink: 0 !important;
    opacity: 0.65 !important;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.xt-status-pill.is-open .xt-status-chevron {
    transform: rotate(180deg) !important;
}

/* Status Pill Colors */
/* 1. New Order (Slight Blue) */
.xt-status-pill[data-status="new"] {
    background-color: rgba(59, 130, 246, 0.12) !important;
    color: #2563eb !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}
.dark .xt-status-pill[data-status="new"] {
    background-color: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
}

/* 2. In Progress (Slight Green) */
.xt-status-pill[data-status="in_progress"] {
    background-color: rgba(16, 185, 129, 0.12) !important;
    color: #059669 !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}
.dark .xt-status-pill[data-status="in_progress"] {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
}

/* 3. In Review (Slight Red) */
.xt-status-pill[data-status="review"] {
    background-color: rgba(239, 68, 68, 0.12) !important;
    color: #dc2626 !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}
.dark .xt-status-pill[data-status="review"] {
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
}

/* 4. Completed (As it is — default neutral / clean theme accent) */
.xt-status-pill[data-status="completed"] {
    background-color: #ffffff !important;
    color: #3f3f46 !important;
    border-color: #e4e4e7 !important;
}
.dark .xt-status-pill[data-status="completed"] {
    background-color: #222226 !important;
    color: #f4f4f5 !important;
    border-color: #2d2d34 !important;
}

/* 5. Cancelled (Grey accent — soft muted tone matching the UI) */
.xt-status-pill[data-status="cancelled"] {
    background-color: #f4f4f5 !important;
    color: #94a3b8 !important;
    border-color: #e4e4e7 !important;
    opacity: 0.75 !important;
}
.dark .xt-status-pill[data-status="cancelled"] {
    background-color: rgba(148, 163, 184, 0.08) !important;
    color: #94a3b8 !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
    opacity: 0.75 !important;
}

/* ── Custom Popover Floating Menu ───────────────────────────── */
.xt-status-menu {
    position: fixed !important;
    z-index: 999999 !important;
    min-width: 148px !important;
    background-color: #ffffff !important;
    border: 1px solid #e4e4e7 !important;
    border-radius: 12px !important;
    padding: 4px !important;
    box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.12), 0 4px 10px -2px rgba(0, 0, 0, 0.05) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    font-family: inherit !important;
    box-sizing: border-box !important;
}

.dark .xt-status-menu {
    background-color: #1b1b1f !important;
    border-color: #2d2d34 !important;
    box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.7), 0 6px 14px -2px rgba(0, 0, 0, 0.4) !important;
}

.xt-status-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #3f3f46 !important;
    cursor: pointer !important;
    transition: all 0.12s ease !important;
    user-select: none !important;
}

.dark .xt-status-item {
    color: #d4d4d8 !important;
}

.xt-status-item:hover {
    background-color: #f4f4f5 !important;
    color: #18181b !important;
}

.dark .xt-status-item:hover {
    background-color: #27272a !important;
    color: #ffffff !important;
}

.xt-status-item.is-selected {
    font-weight: 600 !important;
    color: #18181b !important;
}
.dark .xt-status-item.is-selected {
    color: #ffffff !important;
}

.xt-status-item-text {
    font-size: 12px !important;
    line-height: 1.4 !important;
}

.xt-status-item-check {
    width: 14px !important;
    height: 14px !important;
    color: #18181b !important;
    flex-shrink: 0 !important;
}
.dark .xt-status-item-check {
    color: #ffffff !important;
}

/* ── Mobile Layout Fixes for Django Unfold Admin ──────────────────── */
@media (max-width: 768px) {
    /* Prevent horizontal overflow on entire admin */
    html, body {
        overflow-x: hidden !important;
    }

    /* Input font-size 16px on mobile to prevent iOS auto-zoom */
    input, select, textarea {
        font-size: 16px !important;
    }

    /* Fix Notification Dropdown on Mobile */
    .xt-notif-dropdown {
        width: calc(100vw - 24px) !important;
        max-width: 360px !important;
        right: -8px !important;
    }

    /* Changelist table horizontal scroll container */
    #changelist, .change-list-content, .unfold-table-container, div.results, div.table-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Table columns wrap cleanly */
    table#result_list th, table#result_list td {
        white-space: nowrap !important;
        padding: 8px 10px !important;
        font-size: 12px !important;
    }
}

/* ── Project Status State Colors ───────────────────────────────────── */
/* Select elements in table or change forms */
select[name*="status"],
.field-status select,
.xt-status-badge {
    font-weight: 600 !important;
    border-radius: 6px !important;
    padding: 3px 8px !important;
    font-size: 0.8rem !important;
    transition: all 0.15s ease !important;
    cursor: pointer !important;
}

/* 1. New: Slight Blue */
select[name*="status"][data-status="new"],
.field-status[data-status="new"] select,
.xt-status-badge-new {
    background-color: rgba(59, 130, 246, 0.12) !important;
    color: #2563eb !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
}
.dark select[name*="status"][data-status="new"],
.dark .field-status[data-status="new"] select,
.dark .xt-status-badge-new {
    background-color: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
}

/* 2. In Progress: Slight Green */
select[name*="status"][data-status="in_progress"],
.field-status[data-status="in_progress"] select,
.xt-status-badge-in-progress {
    background-color: rgba(16, 185, 129, 0.12) !important;
    color: #059669 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}
.dark select[name*="status"][data-status="in_progress"],
.dark .field-status[data-status="in_progress"] select,
.dark .xt-status-badge-in-progress {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
}

/* 3. In Review: Slight Red */
select[name*="status"][data-status="review"],
.field-status[data-status="review"] select,
.xt-status-badge-review {
    background-color: rgba(239, 68, 68, 0.12) !important;
    color: #dc2626 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
}
.dark select[name*="status"][data-status="review"],
.dark .field-status[data-status="review"] select,
.dark .xt-status-badge-review {
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
}

/* 4. Completed: Clean default */
select[name*="status"][data-status="completed"],
.field-status[data-status="completed"] select,
.xt-status-badge-completed {
    background-color: transparent !important;
    color: inherit !important;
    border: 1px solid rgba(156, 163, 175, 0.3) !important;
}

/* 5. Cancelled: Greyed out */
select[name*="status"][data-status="cancelled"],
.field-status[data-status="cancelled"] select,
.xt-status-badge-cancelled {
    background-color: rgba(148, 163, 184, 0.08) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    opacity: 0.75 !important;
}
