/* MauzoFlow — login & brand styles */

html:has(body.login-page),
body.login-page {
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

.login-page {
    background-color: #fff;
}

@media (max-width: 1023px) {
    .login-page {
        background-color: #e8eaef;
        background-image:
            radial-gradient(circle at 10% 20%, rgba(124, 58, 237, 0.08) 0%, transparent 40%),
            radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.06) 0%, transparent 35%);
    }
}

.login-viewport {
    display: flex;
    height: 100dvh;
    max-height: 100dvh;
    width: 100%;
    overflow: hidden;
    padding: 0;
}

/* Mobile: one column — image top, form bottom. Desktop: full-width row edge to edge */
.login-shell {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    max-height: 100dvh;
    overflow: hidden;
}

@media (max-width: 1023px) {
    .login-shell {
        box-shadow: none;
    }
}

@media (min-width: 1024px) {
    .login-shell {
        flex-direction: row;
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        max-width: none;
        border-radius: 0;
        box-shadow: none;
    }
}

.login-form-panel {
    order: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1 1 58%;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    background-color: #fff;
    border-top: 1px solid #e5e7eb;
}

@media (min-width: 1024px) {
    .login-form-panel {
        order: 2;
        flex: 1 1 50%;
        width: 50%;
        border-top: none;
        align-items: flex-start;
        justify-content: center;
        padding-left: 3rem;
        padding-right: 2rem;
    }
}

.login-brand-panel {
    order: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 42%;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    background-color: #0f0a1a;
}

@media (min-width: 1024px) {
    .login-brand-panel {
        order: 1;
        flex: 1 1 50%;
        width: 50%;
    }
}

.login-brand-panel::before {
    display: none;
}

.login-preview-area {
    position: relative;
    z-index: 10;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
    width: 100%;
    height: 100%;
    padding: 0;
}

.login-preview-wrap {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

.login-preview-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.login-brand-copy {
    display: none;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .login-brand-copy {
        display: block;
        padding: 0.5rem 2rem 2rem;
    }
}

/* Mobile: compact brand overlay at bottom of image room */
.login-brand-mobile-bar {
    position: absolute;
    z-index: 20;
    bottom: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    border-radius: 8px;
    background: linear-gradient(to top, rgba(15, 10, 26, 0.95) 0%, rgba(15, 10, 26, 0.75) 100%);
    backdrop-filter: blur(4px);
}

@media (min-width: 1024px) {
    .login-brand-mobile-bar {
        display: none;
    }
}

.login-form-inner {
    width: 100%;
    max-width: 20rem;
    margin: 0 auto;
    padding: 0.875rem 1rem;
    overflow: hidden;
}

@media (min-width: 640px) {
    .login-form-inner {
        padding: 1.25rem 1.5rem;
    }
}

@media (min-width: 1024px) {
    .login-form-inner {
        width: 100%;
        max-width: 26rem;
        margin: 0;
        padding: 2rem 0;
    }
}

@media (min-width: 1280px) {
    .login-form-panel {
        padding-left: 4rem;
    }

    .login-form-inner {
        max-width: 28rem;
    }
}

.login-form-logo {
    display: flex;
    margin-bottom: 0.25rem;
}

.login-form-logo-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.5rem 1.25rem 0.5rem 0.5rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 45%, #e0e7ff 100%);
    border: 1px solid #c4b5fd;
    box-shadow:
        0 2px 8px rgba(109, 40, 217, 0.12),
        0 0 0 1px rgba(139, 92, 246, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.login-form-logo-mark {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
}

.login-form-logo-name {
    padding-right: 0.25rem;
    font-size: 1.625rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: #5b21b6;
    white-space: nowrap;
}

@media (min-width: 640px) {
    .login-form-logo-mark {
        width: 3.25rem;
        height: 3.25rem;
        font-size: 1.0625rem;
    }

    .login-form-logo-name {
        font-size: 1.875rem;
    }
}

@media (min-width: 1024px) {
    .login-form-logo-badge {
        gap: 1rem;
        padding: 0.625rem 1.5rem 0.625rem 0.625rem;
        border-radius: 1.125rem;
    }

    .login-form-logo-mark {
        width: 3.75rem;
        height: 3.75rem;
        border-radius: 0.875rem;
        font-size: 1.25rem;
    }

    .login-form-logo-name {
        font-size: 2.125rem;
    }
}

.login-form-input {
    background-color: #f3f4f6;
    border: 1px solid transparent;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.login-form-input:hover {
    background-color: #eef0f3;
}

.login-form-input:focus {
    background-color: #fff;
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
    outline: none;
}

.login-submit-btn {
    background-color: #111827;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.login-submit-btn:hover:not(:disabled) {
    background-color: #1f2937;
}

.login-submit-btn:active:not(:disabled) {
    transform: scale(0.99);
}

.login-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.password-toggle-btn {
    color: #9ca3af;
    transition: color 0.15s ease;
}

.password-toggle-btn:hover {
    color: #4b5563;
}

.login-brand-logo {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    box-shadow: 0 4px 14px rgba(109, 40, 217, 0.35);
}

.login-form-subtitle {
    display: none;
}

@media (min-width: 480px) {
    .login-form-subtitle {
        display: block;
    }
}

.login-form-extras {
    display: none;
}

@media (min-width: 400px) {
    .login-form-extras {
        display: flex;
    }
}

.login-form-footer {
    display: none;
}

@media (min-width: 480px) {
    .login-form-footer {
        display: block;
    }
}

/* ——— TailAdmin app shell ——— */

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    border-radius: 9999px;
    background-color: #d0d5dd;
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #344054;
}

.menu-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25rem;
}

.menu-item-inactive {
    color: #344054;
}

.menu-item-inactive:hover {
    background-color: #f2f4f7;
    color: #344054;
}

.dark .menu-item-inactive {
    color: #d0d5dd;
}

.dark .menu-item-inactive:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #d0d5dd;
}

.menu-item-active {
    background-color: #ecf3ff;
    color: #465fff;
}

.dark .menu-item-active {
    background-color: rgba(70, 95, 255, 0.12);
    color: #9cb9ff;
}

.menu-item-icon-active {
    color: #465fff;
}

.dark .menu-item-icon-active {
    color: #9cb9ff;
}

.menu-item-icon-inactive {
    color: #667085;
}

.dark .menu-item-icon-inactive {
    color: #98a2b3;
}

.menu-item-arrow {
    margin-left: auto;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.menu-item-arrow-active {
    color: #465fff;
}

.dark .menu-item-arrow-active {
    color: #9cb9ff;
}

.menu-item-arrow-inactive {
    color: #667085;
}

.dark .menu-item-arrow-inactive {
    color: #98a2b3;
}

.menu-item-arrow.is-open {
    transform: rotate(180deg);
}

.sidebar-nav-group .nav-dropdown-panel {
    display: none;
}

.sidebar-nav-group.is-open .nav-dropdown-panel {
    display: block;
}

.menu-dropdown-item {
    display: block;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.menu-dropdown-item-inactive {
    color: #344054;
}

.menu-dropdown-item-inactive:hover {
    background-color: #f2f4f7;
    color: #344054;
}

.dark .menu-dropdown-item-inactive {
    color: #d0d5dd;
}

.dark .menu-dropdown-item-inactive:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #d0d5dd;
}

.menu-dropdown-item-active {
    background-color: #ecf3ff;
    color: #465fff;
}

.dark .menu-dropdown-item-active {
    background-color: rgba(70, 95, 255, 0.12);
    color: #9cb9ff;
}

/* Task list */

.task {
    transition: all 0.2s ease;
}

.task.is-dragging {
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(16, 24, 40, 0.1), 0 1px 2px 0 rgba(16, 24, 40, 0.06);
    opacity: 0.85;
}

.taskCheckbox:checked ~ .box span {
    opacity: 1;
}

.taskCheckbox:checked ~ p {
    color: #98a2b3;
    text-decoration: line-through;
}

.dark .taskCheckbox:checked ~ p {
    color: #667085;
}

.taskCheckbox:checked ~ .box {
    border-color: #465fff;
    background-color: #465fff;
}

.task-form-input {
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid #d0d5dd;
    background-color: transparent;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    color: #1d2939;
    box-shadow: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
}

.task-form-input:not([type="date"]):not([type="time"]):not([type="datetime-local"]):not([type="month"]) {
    appearance: none;
    -webkit-appearance: none;
}

.task-form-input:focus {
    border-color: #9cb9ff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.1);
}

.dark .task-form-input {
    border-color: #374151;
    background-color: #101828;
    color: rgba(255, 255, 255, 0.9);
}

.dark .task-form-input:focus {
    border-color: #252dae;
}

.task-modal {
    display: none;
}

.task-modal.is-open {
    display: flex;
}

.task-filter-tab .task-filter-count {
    transition: background-color 0.15s ease, color 0.15s ease;
}

[data-task-lane].hidden {
    display: none;
}

.task-menu-dropdown.is-open {
    display: block;
}

[data-lane-menu-dropdown]:not(.hidden) {
    display: block;
}

.product-form-input {
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid #d0d5dd;
    background-color: transparent;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    color: #1d2939;
    box-shadow: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
}

.product-form-input:not([type="date"]):not([type="time"]):not([type="datetime-local"]):not([type="month"]) {
    appearance: none;
    -webkit-appearance: none;
}

.product-form-input:focus {
    border-color: #9cb9ff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.1);
}

.dark .product-form-input {
    border-color: #374151;
    background-color: #101828;
    color: rgba(255, 255, 255, 0.9);
}

.dark .product-form-input:focus {
    border-color: #252dae;
}

[data-products-filter-panel]:not(.hidden) {
    display: block;
}

[data-row-menu-panel]:not(.hidden) {
    display: block;
}

[data-row-menu-panel] button,
[data-row-menu-panel] a {
    white-space: nowrap;
}

[data-notifications-filter-panel]:not(.hidden) {
    display: block;
}

#notification-menu-dropdown:not(.hidden),
[data-notification-dropdown]:not(.hidden) {
    display: flex;
}

.notification-toast.is-success {
    border-color: #abefc6;
    background: #f6fef9;
}

.dark .notification-toast.is-success {
    border-color: rgba(18, 183, 106, 0.35);
    background: rgba(18, 183, 106, 0.12);
}

.notification-toast.is-error {
    border-color: #fecdca;
    background: #fef3f2;
}

.dark .notification-toast.is-error {
    border-color: rgba(240, 68, 56, 0.35);
    background: rgba(240, 68, 56, 0.12);
}

.notification-toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 100001;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: min(100vw - 2rem, 380px);
    pointer-events: none;
}

.notification-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border: 1px solid #e4e7ec;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 12px 16px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03);
    pointer-events: auto;
    cursor: pointer;
    animation: notification-toast-in 0.25s ease-out;
}

.notification-toast.is-leaving {
    animation: notification-toast-out 0.2s ease-in forwards;
}

.dark .notification-toast {
    border-color: #1f2937;
    background: #1a2231;
}

.notification-toast-icon {
    display: flex;
    height: 2.5rem;
    width: 2.5rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.notification-toast-body {
    min-width: 0;
    flex: 1;
}

.notification-toast-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #101828;
}

.dark .notification-toast-title {
    color: rgba(255, 255, 255, 0.9);
}

.notification-toast-message {
    margin-top: 0.125rem;
    font-size: 0.75rem;
    line-height: 1.25rem;
    color: #667085;
}

.dark .notification-toast-message {
    color: #98a2b3;
}

.notification-toast-close {
    flex-shrink: 0;
    border: 0;
    background: transparent;
    font-size: 1.25rem;
    line-height: 1;
    color: #98a2b3;
    cursor: pointer;
}

.notification-toast-close:hover {
    color: #667085;
}

@keyframes notification-toast-in {
    from {
        opacity: 0;
        transform: translateY(-0.5rem);
    }

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

@keyframes notification-toast-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-0.5rem);
    }
}

.sidebar-open {
    overflow: hidden;
}

#sidebar.is-open {
    transform: translateX(0);
}

.ta-progress-fill-85 {
    width: 85%;
}

.ta-progress-fill-55 {
    width: 55%;
}

.ta-progress-fill-0 {
    width: 0%;
}

.chart-placeholder {
    min-height: 280px;
}

.chart-gauge {
    min-height: 220px;
}

.chart-donut {
    min-height: 200px;
    max-width: 200px;
}

.profile-field-label {
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    line-height: 1.25rem;
    color: #667085;
}

.dark .profile-field-label {
    color: #98a2b3;
}

.profile-field-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: #101828;
}

.dark .profile-field-value {
    color: rgba(255, 255, 255, 0.9);
}

.profile-form-input {
    height: 2.75rem;
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid #d0d5dd;
    background-color: transparent;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    color: #101828;
    box-shadow: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
}

.profile-form-input:focus {
    border-color: #9cb9ff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.1);
}

.dark .profile-form-input {
    border-color: #374151;
    background-color: #101828;
    color: rgba(255, 255, 255, 0.9);
}

.dark .profile-form-input:focus {
    border-color: #252dae;
}

.profile-modal {
    display: none;
}

.profile-modal.is-open {
    display: flex;
}

.confirm-modal {
    display: none;
}

.confirm-modal.is-open {
    display: flex;
}

.profile-toggle-track {
    height: 1.25rem;
    width: 2.25rem;
    border-radius: 9999px;
    background-color: #e4e7ec;
    transition: background-color 0.2s ease;
}

.profile-toggle-track.is-on {
    background-color: #465fff;
}

.dark .profile-toggle-track {
    background-color: rgba(255, 255, 255, 0.1);
}

.profile-toggle-thumb {
    position: absolute;
    top: 0.125rem;
    left: 0.125rem;
    height: 1rem;
    width: 1rem;
    border-radius: 9999px;
    background-color: #fff;
    box-shadow: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
    transition: transform 0.2s ease;
}

.profile-toggle-thumb.is-on {
    transform: translateX(1rem);
}

/* Legacy helpers used on stub pages */

.empty-state {
    border-radius: 1rem;
    border: 1px dashed #d0d5dd;
    background-color: #f9fafb;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.dark .empty-state {
    border-color: #374151;
    background-color: rgba(255, 255, 255, 0.02);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.5rem;
    background-color: #465fff;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    transition: background-color 0.15s ease;
}

.btn-primary:hover {
    background-color: #3641f5;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid #d0d5dd;
    background-color: #fff;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #344054;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-secondary:hover {
    background-color: #f9fafb;
}

.dark .btn-secondary {
    border-color: #374151;
    background-color: #111827;
    color: #e5e7eb;
}

.dark .btn-secondary:hover {
    background-color: #1f2937;
}

.ta-notice {
    border-radius: 0.75rem;
    border: 1px solid #c7d7fe;
    background-color: #eef4ff;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    color: #3538cd;
}

.dark .ta-notice {
    border-color: rgba(70, 95, 255, 0.3);
    background-color: rgba(70, 95, 255, 0.1);
    color: #9cb9ff;
}

.ta-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #101828;
}

.dark .ta-page-title {
    color: #f9fafb;
}

.ta-page-subtitle {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #667085;
}

.dark .ta-page-subtitle {
    color: #98a2b3;
}

.page-loader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background-color: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(4px);
}

.dark .page-loader {
    background-color: rgba(16, 24, 40, 0.75);
}

.page-loader.is-active {
    display: flex;
}

.page-loader-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid #e4e7ec;
    border-top-color: #465fff;
    border-radius: 9999px;
    animation: page-loader-spin 0.7s linear infinite;
}

.dark .page-loader-spinner {
    border-color: #344054;
    border-top-color: #9cb9ff;
}

.page-loader-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: #344054;
}

.dark .page-loader-text {
    color: #d0d5dd;
}

@keyframes page-loader-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Inline flash / status alerts */
.alert-success {
    border-radius: 0.75rem;
    border: 1px solid #bbf7d0;
    background-color: #f0fdf4;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #15803d;
}

.dark .alert-success {
    border-color: rgba(18, 183, 106, 0.35);
    background-color: rgba(18, 183, 106, 0.12);
    color: rgba(255, 255, 255, 0.95);
}

.alert-error {
    border-radius: 0.75rem;
    border: 1px solid #fecaca;
    background-color: #fef2f2;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #b91c1c;
}

.dark .alert-error {
    border-color: rgba(240, 68, 56, 0.35);
    background-color: rgba(240, 68, 56, 0.12);
    color: rgba(255, 255, 255, 0.95);
}

.alert-info {
    border-radius: 0.75rem;
    border: 1px solid #bfdbfe;
    background-color: #eff6ff;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #1d4ed8;
}

.dark .alert-info {
    border-color: rgba(70, 95, 255, 0.35);
    background-color: rgba(70, 95, 255, 0.12);
    color: rgba(255, 255, 255, 0.95);
}

/* Native date/time picker icon — visible on dark backgrounds (all agent & admin pages) */
.date-input,
input.date-input[type="date"],
input.date-input[type="time"],
input.date-input[type="datetime-local"],
input.date-input[type="month"] {
    -webkit-appearance: auto;
    appearance: auto;
    color-scheme: light;
}

html.dark .date-input,
.dark .date-input,
html.dark input.date-input[type="date"],
html.dark input.date-input[type="time"],
html.dark input.date-input[type="datetime-local"],
html.dark input.date-input[type="month"],
.dark input.date-input[type="date"],
.dark input.date-input[type="time"],
.dark input.date-input[type="datetime-local"],
.dark input.date-input[type="month"] {
    color-scheme: dark;
}

html.dark .date-input::-webkit-calendar-picker-indicator,
.dark .date-input::-webkit-calendar-picker-indicator,
html.dark input.date-input[type="date"]::-webkit-calendar-picker-indicator,
html.dark input.date-input[type="time"]::-webkit-calendar-picker-indicator,
html.dark input.date-input[type="datetime-local"]::-webkit-calendar-picker-indicator,
html.dark input.date-input[type="month"]::-webkit-calendar-picker-indicator,
.dark input.date-input[type="date"]::-webkit-calendar-picker-indicator,
.dark input.date-input[type="time"]::-webkit-calendar-picker-indicator,
.dark input.date-input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.dark input.date-input[type="month"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 1;
    width: 1.125rem;
    height: 1.125rem;
    margin-inline-start: 0.125rem;
    background-color: #fff;
    background-image: none;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000000' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000000' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    filter: none;
}

/* ——— Dark theme text readability ——— */
html.dark body {
    color: rgba(255, 255, 255, 0.9);
}

html.dark .dark\:text-gray-300 {
    color: rgba(255, 255, 255, 0.88) !important;
}

html.dark .dark\:text-gray-400 {
    color: rgba(255, 255, 255, 0.82) !important;
}

html.dark .dark\:text-gray-500 {
    color: rgba(255, 255, 255, 0.76) !important;
}

html.dark .dark\:text-white\/90 {
    color: rgba(255, 255, 255, 0.95) !important;
}

html.dark .dark\:text-white\/85 {
    color: rgba(255, 255, 255, 0.85) !important;
}

html.dark .dark\:text-white\/75 {
    color: rgba(255, 255, 255, 0.75) !important;
}

html.dark .dark\:text-white\/70 {
    color: rgba(255, 255, 255, 0.7) !important;
}

html.dark .text-gray-800 {
    color: rgba(255, 255, 255, 0.92);
}

html.dark .text-gray-700 {
    color: rgba(255, 255, 255, 0.88);
}

html.dark .text-gray-600 {
    color: rgba(255, 255, 255, 0.85);
}

html.dark .text-gray-500 {
    color: rgba(255, 255, 255, 0.78);
}

html.dark .text-gray-400 {
    color: rgba(255, 255, 255, 0.72);
}

/* ——— Searchable combobox (mobile-friendly select replacement) ——— */

.searchable-combobox {
    position: relative;
}

.combobox-native-select {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.searchable-combobox-trigger {
    position: relative;
}

.searchable-combobox-panel {
    position: absolute;
    z-index: 50;
    margin-top: 0.25rem;
    width: 100%;
    overflow: hidden;
    border-radius: 0.5rem;
    border: 1px solid #e4e7ec;
    background-color: #fff;
    box-shadow: 0 12px 16px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03);
}

.dark .searchable-combobox-panel {
    border-color: #344054;
    background-color: #101828;
}

.searchable-combobox-search {
    border: 0;
    border-bottom: 1px solid #e4e7ec;
    border-radius: 0;
}

.dark .searchable-combobox-search {
    border-bottom-color: #344054;
}

.searchable-combobox-list {
    max-height: 16rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 0.25rem 0;
}

.searchable-combobox-option {
    cursor: pointer;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #344054;
}

.searchable-combobox-option:hover,
.searchable-combobox-option:focus {
    outline: none;
    background-color: #f2f4f7;
}

.searchable-combobox-option.is-selected {
    background-color: #ecf3ff;
    color: #3641f5;
    font-weight: 500;
}

.dark .searchable-combobox-option {
    color: rgba(255, 255, 255, 0.88);
}

.dark .searchable-combobox-option:hover,
.dark .searchable-combobox-option:focus {
    background-color: rgba(255, 255, 255, 0.06);
}

.dark .searchable-combobox-option.is-selected {
    background-color: rgba(70, 95, 255, 0.15);
    color: #9cb9ff;
}

.searchable-combobox-empty {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #667085;
}

.dark .searchable-combobox-empty {
    color: rgba(255, 255, 255, 0.55);
}
