/* This file is reserved for overriding and extending the template styles. */

/*
=========================================================
THEME TOKENS (Light defaults + dark overrides)
Global design tokens — surfaces, text, borders, shadows, hover,
etc. Centralised here (main.css loads on every page) so app-wide
consumers like the time-tracker modal and mail.css can rely on
them. They previously lived in css/modules/projects/projects.css,
which broke once that file became page-scoped.
=========================================================
*/
html {
    /* Surfaces */
    --dmu-surface-0: #ffffff;
    --dmu-surface-1: #fafafa;
    --dmu-surface-2: #f3f4f6;

    /* Text */
    --dmu-text-0: #111827;
    --dmu-text-1: #374151;
    --dmu-text-2: #6b7280;
    --dmu-text-3: #9ca3af;

    /* Borders */
    --dmu-border-0: #e5e7eb;
    --dmu-border-1: #d1d5db;

    /* Shadows */
    --dmu-shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.04);
    --dmu-shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.03);
    --dmu-shadow-drag: 0 12px 30px rgba(15, 23, 42, 0.10);

    /* Hover */
    --dmu-hover-0: #f9fafb;
    --dmu-hover-1: #e5e7eb;

    /* Scrollbars */
    --dmu-scrollbar-thumb: rgba(148, 163, 184, 0.55);

    /* Progress */
    --dmu-progress-fill: linear-gradient(90deg, #a855f7, #6366f1);

    /* Drawer backdrop */
    --dmu-drawer-backdrop: rgba(15, 23, 42, 0.35);

    /* Delete zone */
    --dmu-delete-bg: #fff1f2;
    --dmu-delete-border: rgba(239, 68, 68, 0.45);
    --dmu-delete-text: #b91c1c;
    --dmu-delete-icon-border: rgba(239, 68, 68, 0.35);

    --dmu-delete-over-bg: #fee2e2;
    --dmu-delete-over-border: #ef4444;
    --dmu-delete-over-ring: 0 0 0 3px rgba(248, 113, 113, 0.35);
}

html[data-color^="dark-"] {
    --dmu-surface-0: var(--foreground, #1d1d1d);
    --dmu-surface-1: rgba(255, 255, 255, 0.04);
    --dmu-surface-2: rgba(255, 255, 255, 0.06);

    --dmu-text-0: var(--light-text, #f0f0f0);
    --dmu-text-1: rgba(240, 240, 240, 0.85);
    --dmu-text-2: rgba(240, 240, 240, 0.70);
    --dmu-text-3: rgba(240, 240, 240, 0.55);

    --dmu-border-0: rgba(var(--separator-rgb, 71, 71, 71), 0.90);
    --dmu-border-1: rgba(var(--separator-rgb, 71, 71, 71), 1);

    --dmu-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.35);
    --dmu-shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.25);
    --dmu-shadow-drag: 0 16px 40px rgba(0, 0, 0, 0.45);

    --dmu-hover-0: rgba(255, 255, 255, 0.05);
    --dmu-hover-1: rgba(255, 255, 255, 0.10);

    --dmu-scrollbar-thumb: rgba(240, 240, 240, 0.22);

    --dmu-progress-fill: linear-gradient(90deg,
            var(--gradient-1, #9e62c7),
            var(--gradient-2, #a264cb));

    --dmu-drawer-backdrop: rgba(0, 0, 0, 0.55);

    --dmu-delete-bg: rgba(239, 68, 68, 0.12);
    --dmu-delete-border: rgba(239, 68, 68, 0.45);
    --dmu-delete-text: rgba(255, 255, 255, 0.88);
    --dmu-delete-icon-border: rgba(239, 68, 68, 0.35);

    --dmu-delete-over-bg: rgba(239, 68, 68, 0.18);
    --dmu-delete-over-border: rgba(239, 68, 68, 0.85);
    --dmu-delete-over-ring: 0 0 0 3px rgba(239, 68, 68, 0.25);
}

html,
body {

    overflow-x: hidden !important;
    overflow-x: clip !important;
}

.dmu-logo {

    font-family: 'Montserrat' !important;
    font-weight: 800 !important;
}

/* Tooltip target must NOT be full-width */
.dmu-info-item {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    width: auto;
    max-width: 100%;
}

/* Keep text from stretching the row */
.dmu-info-value {
    width: auto;
}

/* Optional: keep links looking like your text */
.dmu-info-value,
.dmu-info-value a {
    text-decoration: none;
}

/* DMU Top Loader Bar */
#dmu-loader-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

#dmu-loader-bar.active {
    opacity: 1;
}

.dmu-loader-bar-inner {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--quaternary), var(--primary));
    background-color: #6366f1;
    transform-origin: left center;
    transition: width 0.4s ease-out;
}

@media (max-width: 991px) {
    .editor-bar {
        top: 72px !important;
    }
}

@media (min-width: 2000px) {
    .col-xxxl-1 {
        width: 8.333333%;
    }

    .col-xxxl-2 {
        width: 16.666667%;
    }

    .col-xxxl-3 {
        width: 25%;
    }

    .col-xxxl-4 {
        width: 33.333333%;
    }

    .col-xxxl-5 {
        width: 41.666667%;
    }

    .col-xxxl-6 {
        width: 50%;
    }

    .col-xxxl-7 {
        width: 58.333333%;
    }

    .col-xxxl-8 {
        width: 66.666667%;
    }

    .col-xxxl-9 {
        width: 75%;
    }

    .col-xxxl-10 {
        width: 83.333333%;
    }

    .col-xxxl-11 {
        width: 91.666667%;
    }

    .col-xxxl-12 {
        width: 100%;
    }
}


/* SUCCESS */
.alert-success [data-notify="progressbar"] .progress-bar {
    background-color: var(--success) !important;
    /* Bootstrap success */
}

/* DANGER */
.alert-danger [data-notify="progressbar"] .progress-bar {
    background-color: var(--danger) !important;
    /* Bootstrap danger */
}

/* WARNING */
.alert-warning [data-notify="progressbar"] .progress-bar {
    background-color: var(--warning) !important;
    /* Bootstrap warning */
}

/* INFO */
.alert-info [data-notify="progressbar"] .progress-bar {
    background-color: var(--info) !important;
    /* Bootstrap info */
}

[data-notify="container"] {
    width: 450px !important;
    /* or whatever you want */
    max-width: 90vw !important;
    /* keeps it safe on mobile */
}

[data-notify="dismiss"] {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0.6;
    font-size: 18px;
    cursor: pointer;
}

[data-notify="dismiss"]:hover {
    opacity: 1;
}


/* Outer avatar circle (matches .sidebar-avatar visually) */
.dmu-employee-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(160deg,
            var(--gradient-1),
            var(--gradient-1),
            var(--gradient-1-lighter));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 32px;
}

/* Image avatar */
.dmu-employee-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Initial letter (matches .sidebar-avatar-initial) */
.dmu-employee-initial {
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    line-height: 1;
}


.dmu-employee-opt,
.dmu-employee-item {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.dmu-employee-avatar {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    overflow: hidden;
    flex: 0 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dmu-employee-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dmu-employee-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: rgba(148, 163, 184, .35);
    display: block;
}

.dmu-employee-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.dmu-employee-name {
    font-weight: 600;
}

.dmu-employee-role {
    font-size: 12px;
    opacity: .7;
}


.favicon-circle .favicon-loader {
    position: absolute;
    inset: 0;
    background: #f8f9fa;
    /* bg-light */
    z-index: 2;
    pointer-events: none;
    opacity: 1;
    transition: opacity 220ms ease;
}

.favicon-circle .favicon-loader::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    height: 100%;
    width: 150%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.7) 50%,
            transparent 100%);
    animation: faviconShimmer 1.1s linear infinite;
    will-change: left;
}

@keyframes faviconShimmer {
    0% {
        left: -150%;
    }

    100% {
        left: 150%;
    }
}

/* Image fades in */
.favicon-circle .favicon-img {
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: scale(0.985);
    transition: opacity 220ms ease, transform 220ms ease;
    will-change: opacity, transform;
}

/* Loaded state: hide loader, show image smoothly */
.favicon-circle.is-loaded .favicon-loader {
    opacity: 0;
}

.favicon-circle.is-loaded .favicon-img {
    opacity: 1;
    transform: scale(1);
}

.eye-icon {

    cursor: pointer;
    top: 19px;

}

.eye-icon:hover {

    color: var(--primary) !important;

}

.blurred {
    filter: blur(5px);
    user-select: none;
}

.blurred.show {
    filter: blur(0);
}

.skeleton-block {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.6s infinite;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}


/* =========================================
   LUCIDE ICONS – global default size
   ========================================= */

[data-lucide] {
    width: 21px;
    height: 21px;
    stroke-width: 1.5;
}


/* =========================================
   FORM CONTROL – padding tweak
   ========================================= */

.form-control {

    padding-top: 9.5px !important;
    padding-bottom: 9.5px !important;

}


/* =========================================
   INLINE TOOLTIP (CSS-only, optional)
   ========================================= */

.dmu-tooltip-target {
    position: relative;
}

.dmu-tooltip-inline {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(6px);
    opacity: 0;
    pointer-events: none;

    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
    transition: opacity 140ms ease, transform 140ms ease;
    z-index: 50;
}

.dmu-tooltip-target:hover .dmu-tooltip-inline,
.dmu-tooltip-target:focus-within .dmu-tooltip-inline {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Arrow */
.dmu-tooltip-inline::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(15, 23, 42, 0.92);
}

/* =========================================
   AVATAR STACK
   ========================================= */

.dmu-avatar-stack {
    display: inline-flex;
    align-items: center;
}

.dmu-avatar-stack .dmu-avatar {
    border: 2px solid var(--bs-body-bg, #fff);
    box-sizing: content-box;
    position: relative;
}

.dmu-avatar-stack .dmu-avatar:not(:first-child) {
    margin-left: -10px;
}

.dmu-avatar-stack .dmu-avatar:nth-child(1) {
    z-index: 1;
}

.dmu-avatar-stack .dmu-avatar:nth-child(2) {
    z-index: 2;
}

.dmu-avatar-stack .dmu-avatar:nth-child(3) {
    z-index: 3;
}

.dmu-avatar-stack .dmu-avatar:nth-child(4) {
    z-index: 4;
}

.dmu-avatar-stack .dmu-avatar:nth-child(5) {
    z-index: 5;
}

.dmu-avatar-stack .dmu-avatar:nth-child(6) {
    z-index: 6;
}

.dmu-avatar-stack .dmu-avatar:nth-child(7) {
    z-index: 7;
}

.dmu-avatar-stack .dmu-avatar:nth-child(8) {
    z-index: 8;
}

.dmu-avatar-stack .dmu-avatar:nth-child(9) {
    z-index: 9;
}

.dmu-avatar-stack .dmu-avatar:nth-child(10) {
    z-index: 10;
}

/* =========================================
   AVATAR CORE
   ========================================= */

.dmu-avatar {
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    color: #1f2937;
    font-weight: 600;
    position: relative;
}

.dmu-avatar-initial {
    font-size: 12px;
    line-height: 1;
}

/* =========================================
   AVATAR STATUS DOT
   ========================================= */

.dmu-avatar-status {
    position: absolute;
    bottom: 0;
    left: 0;
    border-radius: 999px;
    border: 2px solid var(--bs-body-bg, #fff);
    box-sizing: content-box;
}

.dmu-avatar-status--online {
    background: #22c55e;
}

.dmu-avatar-status--away {
    background: #f59e0b;
}

.dmu-avatar-status--offline {
    background: #9ca3af;
}

/* =========================================
   PAGE PRESENCE (topbar)
   ========================================= */

.dmu-page-presence {
    display: flex;
    align-items: center;
}

.dmu-page-presence:empty {
    display: none;
}

.dmu-page-presence .dmu-avatar {
    border: 1px solid color-mix(in srgb, var(--primary) 50%, var(--bs-body-bg, #fff));
    box-sizing: content-box;
    box-shadow: 0 0 6px 1px color-mix(in srgb, var(--primary) 35%, transparent);
}

.dmu-page-presence .dmu-avatar:not(:first-child) {
    margin-left: -8px;
}

/* =========================================
   PRESENCE EDIT BANNER
   ========================================= */

.dmu-presence-banner {
    position: fixed;
    top: calc(65px + 45px + 1rem);
    right: var(--main-spacing-horizontal, 1.5rem);
    z-index: 1050;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, var(--bs-body-bg, #fff) 92%);
    border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
    border-radius: 0.5rem;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.dmu-presence-banner svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.7;
}

/* =========================================
   GLOBAL PORTAL TOOLTIP (JS-driven)
   ========================================= */

.dmu-tooltip-portal {
    position: fixed;
    left: 0;
    top: 0;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    /* Tooltips must paint above everything — including the chat drawer
       (10000000001) and its attachment preview overlay (10000000010) —
       or they render behind those layers and appear invisible. */
    z-index: 10000000020;

    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.25;
    white-space: nowrap;
    max-width: min(320px, calc(100vw - 16px));
    overflow: hidden;
    text-overflow: ellipsis;

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);

    /* ✅ allow multi-line tooltips */
    white-space: normal;
    /* was nowrap */
    overflow: visible;
    /* was hidden */
    text-overflow: clip;
    /* was ellipsis */

    transform: translateY(6px);
    transition:
        opacity 120ms ease,
        transform 120ms ease,
        visibility 0s linear 120ms;
}

.dmu-tooltip-portal.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition:
        opacity 120ms ease,
        transform 120ms ease,
        visibility 0s;
}

/* Arrow (above target) */
.dmu-tooltip-portal::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(15, 23, 42, 0.92);
}

/* Arrow flipped (below target) */
.dmu-tooltip-portal.is-below::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: rgba(15, 23, 42, 0.92);
}

/* Right arrow */
.dmu-tooltip-portal.is-right::after {
    left: auto;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-top-color: transparent;
    border-right-color: rgba(15, 23, 42, 0.92);
}

/* Left arrow */
.dmu-tooltip-portal.is-left::after {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-top-color: transparent;
    border-left-color: rgba(15, 23, 42, 0.92);
}


/* ── DMU Alert — modern soft-tinted notice ────────────────────────────────── */
/* Reusable across the portal: icon-chip + title + message + optional actions
   on a color-mix() tinted card. Variants: --primary (informational),
   --warning, --danger. Lucide icons inside the chip inherit the chip
   color via currentColor.
   Originally defined per-page (hosting-landing.css, tasks.php); now in
   main.css so any view can drop in <div class="dmu-alert dmu-alert--*">
   without pulling per-page stylesheets. */

.dmu-alert {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.125rem;
    border: 1px solid transparent;
    border-radius: 14px;
    background: var(--foreground, #fff);
}

.dmu-alert__icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dmu-alert__body {
    flex: 1 1 auto;
    min-width: 0;
}

.dmu-alert__title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 0.15rem 0;
    color: var(--body);
}

.dmu-alert__message {
    font-size: 0.825rem;
    line-height: 1.5;
    margin: 0;
    color: var(--body);
    opacity: 0.78;
}

.dmu-alert__message b,
.dmu-alert__message strong {
    font-weight: 600;
    opacity: 1;
}

.dmu-alert__actions {
    flex: 0 0 auto;
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
}

.dmu-alert--danger {
    background: color-mix(in srgb, var(--danger, #dc3545) 7%, var(--foreground, #fff) 93%);
    border-color: color-mix(in srgb, var(--danger, #dc3545) 22%, transparent);
}

.dmu-alert--danger .dmu-alert__icon {
    background: color-mix(in srgb, var(--danger, #dc3545) 16%, transparent);
    color: var(--danger, #dc3545);
}

.dmu-alert--warning {
    background: color-mix(in srgb, var(--warning, #ffc107) 9%, var(--foreground, #fff) 91%);
    border-color: color-mix(in srgb, var(--warning, #ffc107) 28%, transparent);
}

.dmu-alert--warning .dmu-alert__icon {
    background: color-mix(in srgb, var(--warning, #ffc107) 22%, transparent);
    color: var(--warning, #ffc107);
}

.dmu-alert--primary {
    background: color-mix(in srgb, var(--primary, #6f42c1) 7%, var(--foreground, #fff) 93%);
    border-color: color-mix(in srgb, var(--primary, #6f42c1) 22%, transparent);
}

.dmu-alert--primary .dmu-alert__icon {
    background: color-mix(in srgb, var(--primary, #6f42c1) 16%, transparent);
    color: var(--primary, #6f42c1);
}

.dmu-alert__icon svg,
.dmu-alert__icon [data-lucide] {
    stroke: currentColor;
}

@media (max-width: 575.98px) {
    .dmu-alert {
        flex-wrap: wrap;
    }
    .dmu-alert__actions {
        flex-basis: 100%;
        justify-content: flex-start;
    }
}