/* ============================================================================
   SB Project Management -- Liquid Glass Design System
   Shares the SB brand shell with Time Tracker (FMLYTimeTracking.Web/wwwroot/app.css)
   and the www marketing site (sites/www, marketing.css). Keep the shared blocks
   (tokens, orbs, glass .mud-* overrides, brand, footer) in sync with Time; PM does
   NOT include Time's feature-specific classes (timer bar, calendar, entry cards).
   ============================================================================ */

/* -- SB marketing tokens (mirror sites/www marketing.css :root) ------------ */
:root {
    --mkt-primary:      #007AFF;
    --mkt-primary-2:    #3395FF;
    --mkt-primary-soft: rgba(0, 122, 255, 0.08);
    --mkt-text:         #1D1D1F;
    --mkt-text-soft:    #6E6E73;
    --mkt-text-faint:   #8E8E93;
    --mkt-bg:           #F8F9FB;
    --mkt-surface:      #FFFFFF;
    --mkt-border:       rgba(60, 60, 67, 0.12);
    --mkt-border-soft:  rgba(60, 60, 67, 0.06);
    --mkt-shadow-sm:    0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.04);
    --mkt-shadow-lg:    0 12px 36px rgba(0, 122, 255, 0.10), 0 2px 8px rgba(0,0,0,0.06);
}

/* -- Base ----------------------------------------------------------------- */
html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    background: var(--mkt-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Gradient orbs — the ambient background shared with www. Fixed so they stay put
   while the app scrolls; sit behind all content (z-index 0). */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(140px);
    opacity: 0.5;
}
body::before {
    top: -240px;
    left: -200px;
    width: 680px;
    height: 680px;
    background: radial-gradient(circle, rgba(51, 149, 255, 0.32), transparent 70%);
}
body::after {
    top: 420px;
    right: -260px;
    width: 760px;
    height: 760px;
    background: radial-gradient(circle, rgba(88, 86, 214, 0.20), transparent 70%);
}

/* Let the orbs read through the layout — content sits above at z-index 1. */
.mud-layout {
    background: transparent !important;
    position: relative;
    z-index: 1;
}

.mud-main-content {
    /* Keep MudBlazor's default `padding-top` (clears the fixed AppBar); zero the
       other three sides for the flush layout. */
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
    background: transparent !important;
}

.pm-page-title {
    font-weight: 600;
}

/* -- Glass mixin (reusable via class) ------------------------------------- */
.glass,
.mud-appbar,
.mud-drawer,
.mud-card,
.mud-paper:not(.mud-popover-paper),
.mud-dialog .mud-dialog-content,
.mud-dialog .mud-paper {
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
}

/* -- AppBar --------------------------------------------------------------- */
.mud-appbar {
    background: rgba(248, 249, 251, 0.78) !important;
    color: #1D1D1F !important;
    border-bottom: 0.5px solid rgba(60, 60, 67, 0.12);
    box-shadow: 0 0.5px 0 rgba(0, 0, 0, 0.04) !important;
}

.mud-appbar .mud-icon-button {
    color: #007AFF !important;
}

.mud-appbar .mud-typography {
    color: #1D1D1F !important;
}

/* -- Drawer --------------------------------------------------------------- */
.mud-drawer {
    background: rgba(251, 251, 253, 0.65) !important;
    border-right: 0.5px solid rgba(60, 60, 67, 0.12) !important;
    box-shadow: none !important;
}

.mud-drawer-header {
    background: transparent !important;
    border-bottom: 0.5px solid rgba(60, 60, 67, 0.08);
}

/* -- Cards & Paper -------------------------------------------------------- */
.mud-card,
.mud-paper {
    background: var(--mkt-surface) !important;
    border: 1px solid var(--mkt-border-soft) !important;
    box-shadow: var(--mkt-shadow-sm) !important;
    border-radius: 16px !important;
    overflow: hidden;
}

.mud-card-header {
    padding: 20px 20px 8px 20px;
}

.mud-card-content {
    padding: 8px 20px 20px 20px;
}

/* -- Nav links ------------------------------------------------------------ */
.mud-nav-link {
    border-radius: 10px !important;
    margin: 2px 8px !important;
    padding: 8px 12px !important;
    transition: background 0.2s ease, color 0.2s ease;
}

.mud-nav-link:hover {
    background: rgba(0, 122, 255, 0.08) !important;
}

.mud-nav-link.active {
    background: rgba(0, 122, 255, 0.12) !important;
    color: #007AFF !important;
    font-weight: 600;
}

.mud-nav-link.active .mud-nav-link-icon {
    color: #007AFF !important;
}

.mud-nav-group-text {
    border-radius: 10px !important;
    margin: 2px 8px !important;
    padding: 8px 12px !important;
}

/* -- Buttons -------------------------------------------------------------- */
.mud-button-filled {
    border-radius: 12px !important;
    box-shadow: 0 1px 4px rgba(0, 122, 255, 0.2) !important;
    text-transform: none !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    transition: all 0.2s ease;
}

.mud-button-filled:hover {
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3) !important;
    transform: translateY(-0.5px);
}

.mud-button-filled.mud-button-filled-primary {
    background: linear-gradient(135deg, #3395FF 0%, #007AFF 100%) !important;
}

.mud-button-filled.mud-button-filled-error {
    background: linear-gradient(180deg, #FF5E57 0%, #FF3B30 100%) !important;
    box-shadow: 0 1px 4px rgba(255, 59, 48, 0.2) !important;
}

.mud-button-filled.mud-button-filled-success {
    background: linear-gradient(180deg, #4CD964 0%, #34C759 100%) !important;
    box-shadow: 0 1px 4px rgba(52, 199, 89, 0.2) !important;
}

.mud-button-outlined {
    border-radius: 12px !important;
    border-color: rgba(60, 60, 67, 0.18) !important;
    text-transform: none !important;
    font-weight: 500 !important;
    transition: all 0.2s ease;
}

.mud-button-outlined:hover {
    background: rgba(0, 122, 255, 0.06) !important;
    border-color: rgba(0, 122, 255, 0.3) !important;
}

.mud-button-text {
    border-radius: 10px !important;
    text-transform: none !important;
    font-weight: 500 !important;
}

/* -- Chips ---------------------------------------------------------------- */
.mud-chip {
    border-radius: 20px !important;
    font-weight: 500 !important;
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.mud-chip.mud-chip-outlined {
    background: rgba(255, 255, 255, 0.6) !important;
    border: 0.5px solid rgba(0, 122, 255, 0.3) !important;
    color: #007AFF !important;
}

/* -- Inputs / Selects / Pickers ------------------------------------------- */
.mud-input-outlined .mud-input-outlined-border {
    border-radius: 12px !important;
    border-color: rgba(60, 60, 67, 0.18) !important;
    transition: border-color 0.2s ease;
}

.mud-input-outlined:hover .mud-input-outlined-border {
    border-color: rgba(0, 122, 255, 0.4) !important;
}

.mud-select .mud-input-outlined .mud-input-outlined-border {
    border-radius: 12px !important;
}

/* -- Table ---------------------------------------------------------------- */
.mud-table,
.mud-data-grid {
    border-radius: 16px !important;
    overflow: hidden;
    border: 0.5px solid rgba(60, 60, 67, 0.12);
}

.mud-table-head .mud-table-cell {
    background: rgba(118, 118, 128, 0.04) !important;
    font-weight: 600 !important;
    font-size: 0.8125rem;
    color: #6E6E73;
    border-bottom: 0.5px solid rgba(60, 60, 67, 0.12) !important;
}

.mud-table-body .mud-table-row:hover {
    background: rgba(0, 122, 255, 0.04) !important;
}

.mud-table-cell {
    border-bottom: 0.5px solid rgba(60, 60, 67, 0.08) !important;
}

/* -- Dialogs -------------------------------------------------------------- */
.mud-dialog {
    border-radius: 20px !important;
    overflow: hidden;
}

.mud-dialog .mud-paper {
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(60px) saturate(200%);
    -webkit-backdrop-filter: blur(60px) saturate(200%);
    border: 0.5px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.12),
                0 8px 24px rgba(0, 0, 0, 0.08) !important;
}

.mud-dialog-title {
    padding: 20px 24px 8px 24px !important;
}

.mud-dialog-content {
    padding: 8px 24px 16px 24px !important;
}

.mud-dialog-actions {
    padding: 8px 24px 20px 24px !important;
}

/* -- Task drawer (right-anchored side panel) ------------------------------
   Opened via DialogPosition.CenterRight + Class="pm-task-drawer". Turns the
   modal into a full-height panel that slides in from the right (Teamwork-style
   task drawer), used identically from the List view, the Board, and My Work.
   MudBlazor's centerright container centres the surface and pads the right edge
   by 32px; stretch it full-height and remove the gap so it reads as a drawer. */
.mud-dialog-container.mud-dialog-centerright:has(.pm-task-drawer) {
    padding-right: 0;
    align-items: stretch;
}

.pm-task-drawer.mud-dialog {
    margin: 0;
    height: 100dvh;
    max-height: 100dvh;
    width: min(760px, 96vw);
    max-width: 96vw;
    border-radius: 0 !important;
    display: flex;
    flex-direction: column;
    box-shadow: -16px 0 60px rgba(0, 0, 0, 0.16) !important;
}

.pm-task-drawer .mud-dialog-content {
    flex: 1 1 auto;
    overflow-y: auto;
    max-height: none !important;
}

.pm-task-drawer .mud-dialog-actions {
    flex: 0 0 auto;
    border-top: 0.5px solid var(--mkt-border);
}

/* -- Task-list view rows -------------------------------------------------- */
.pm-task-row {
    border-top: 0.5px solid var(--mkt-border-soft);
    transition: background 0.12s ease;
    border-radius: 8px;
}

.pm-task-row:hover {
    background: rgba(0, 122, 255, 0.05);
}

/* Drag affordance + a droppable strip below the last task so empty lists accept drops. */
.pm-dropzone {
    min-height: 24px;
}

.pm-dropzone .mud-drop-item {
    cursor: grab;
}

.pm-dropzone .mud-drop-item:active {
    cursor: grabbing;
}

/* Aligns the checkbox of a task with no subtask-toggle under those that have one. */
.pm-row-toggle-spacer {
    display: inline-block;
    width: 30px;
}

/* Inline subtask list, indented under its parent task. */
.pm-subtask-group {
    margin-left: 40px;
    border-left: 2px solid var(--mkt-border-soft);
    padding-left: 6px;
    margin-bottom: 4px;
}

/* -- Overlay / Backdrop --------------------------------------------------- */
.mud-overlay-dark {
    background: rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* -- Popover -------------------------------------------------------------- */
.mud-popover-paper {
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(60px) saturate(200%);
    -webkit-backdrop-filter: blur(60px) saturate(200%);
    border: 0.5px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
                0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

/* -- Snackbar ------------------------------------------------------------- */
.mud-snackbar {
    border-radius: 14px !important;
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
}

/* -- Progress ------------------------------------------------------------- */
.mud-progress-linear {
    border-radius: 8px !important;
    overflow: hidden;
}

.mud-progress-linear .mud-progress-linear-bar {
    border-radius: 8px;
}

/* -- Menu ----------------------------------------------------------------- */
.mud-menu .mud-list {
    border-radius: 14px !important;
}

.mud-menu-item {
    border-radius: 8px !important;
    margin: 2px 6px !important;
    transition: background 0.15s ease;
}

.mud-menu-item:hover {
    background: rgba(0, 122, 255, 0.08) !important;
}

/* -- Checkbox ------------------------------------------------------------- */
.mud-checkbox .mud-icon-root {
    border-radius: 6px;
}

/* -- Alert ---------------------------------------------------------------- */
.mud-alert {
    border-radius: 12px !important;
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
}

/* -- Dividers ------------------------------------------------------------- */
.mud-divider {
    border-color: rgba(60, 60, 67, 0.12) !important;
}

/* -- Badge ---------------------------------------------------------------- */
.mud-badge-content {
    font-weight: 600 !important;
    font-size: 0.7rem !important;
}

/* -- Scrollbar (WebKit) --------------------------------------------------- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* ============================================================================
   Anonymous landing (home) — the branded sign-in screen anonymous/stale visitors
   land on instead of being bounced. Centered by AuthLayout over the gradient orbs;
   kept visually identical across the Time and Project apps.
   ============================================================================ */
.sb-landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 440px;
}
.sb-landing-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(60px) saturate(200%);
    -webkit-backdrop-filter: blur(60px) saturate(200%);
    border: 0.5px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.06);
    padding: 44px 36px;
    text-align: center;
}
.sb-landing-mark {
    display: inline-flex;
    line-height: 0;
    margin-bottom: 20px;
    filter: drop-shadow(0 8px 20px rgba(0, 122, 255, 0.28));
}
.sb-landing-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--mkt-text);
    margin: 0 0 8px;
}
.sb-landing-tag {
    font-size: 15px;
    line-height: 1.5;
    color: var(--mkt-text-soft);
    margin: 0 0 28px;
}
.sb-landing-cta {
    margin-bottom: 16px;
}
.sb-landing-alt {
    font-size: 14px;
    color: var(--mkt-text-soft);
    margin: 0;
}
.sb-landing-alt a {
    color: var(--mkt-primary);
    font-weight: 600;
    text-decoration: none;
}
.sb-landing-alt a:hover { text-decoration: underline; }
.sb-landing-foot {
    font-size: 13px;
    color: var(--mkt-text-faint);
    margin: 0;
}

/* ============================================================================
   Brand lockup + footer — shared with Time Tracker and the www marketing site
   so the product reads as the same brand. Brand mark sits in the AppBar; the
   footer renders at the bottom of MainLayout.
   ============================================================================ */
.sb-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none !important;
}
.sb-brand-mark { display: inline-flex; line-height: 0; }
.sb-brand-text {
    font-weight: 700;
    font-size: 17px;
    color: var(--mkt-text);
    letter-spacing: -0.01em;
}

.mkt-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.mkt-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
}
.mkt-brand-mark { display: inline-flex; line-height: 0; }
.mkt-brand-text {
    font-weight: 700;
    font-size: 17px;
    color: var(--mkt-text);
    letter-spacing: -0.01em;
}
.mkt-footer {
    border-top: 1px solid var(--mkt-border-soft);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    padding: 56px 0 32px;
    position: relative;
    z-index: 1;
    margin-top: 64px;
}
.mkt-footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 40px;
}
@media (max-width: 900px) {
    .mkt-footer-grid { grid-template-columns: 1fr 1fr; }
}
.mkt-footer-tag { color: var(--mkt-text-soft); font-size: 14px; margin-top: 12px; max-width: 320px; }
.mkt-footer-col h4 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--mkt-text-faint);
    margin: 0 0 12px;
}
.mkt-footer-col a {
    display: block;
    color: var(--mkt-text);
    font-size: 14px;
    text-decoration: none !important;
    padding: 5px 0;
}
.mkt-footer-col a:hover { color: var(--mkt-primary); }
.mkt-footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--mkt-border-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--mkt-text-faint);
    font-size: 13px;
    flex-wrap: wrap;
    gap: 12px;
}

/* -- Blazor error UI ------------------------------------------------------ */
#blazor-error-ui {
    background: #ffeaa7;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* Nav drawer section header (Work / Manage / Admin separation). */
.pm-nav-section {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #AEAEB2;
    padding: 1rem 1rem 0.35rem 1rem;
}

/* ── Dashboard activity feed + project surfaces (revamp) ─────────────────────── */
.pm-activity-row {
    border-radius: 8px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    transition: background-color 120ms ease;
}

.pm-activity-row:hover {
    background-color: rgba(0, 122, 255, 0.06);
}

/* Agenda group header — subtle separator between Overdue / Today / Upcoming. */
.pm-agenda-group {
    border-top: 0.5px solid var(--mkt-border-soft, rgba(15,23,42,0.08));
}

    .pm-agenda-group:first-child {
        border-top: none;
    }

    .pm-agenda-group:hover {
        background-color: rgba(0, 122, 255, 0.04);
    }

/* Project cards (Projects list) lift slightly on hover. */
.pm-project-card {
    transition: box-shadow 140ms ease, transform 140ms ease, border-color 140ms ease;
    cursor: pointer;
    height: 100%;
}

.pm-project-card:hover {
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.10);
    transform: translateY(-2px);
    border-color: rgba(0, 122, 255, 0.35);
}

/* Overlapping avatar stack (who's on a project). */
.pm-avatar-stack {
    display: inline-flex;
    align-items: center;
}

    .pm-avatar-stack > * {
        margin-left: -8px;
        border: 2px solid #fff;
    }

        .pm-avatar-stack > *:first-child {
            margin-left: 0;
        }

/* Subtle metric tile used on the project detail header / overview. */
.pm-metric {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid var(--mkt-border-soft, rgba(15,23,42,0.08));
    height: 100%;
}

    .pm-metric .pm-metric-value {
        font-size: 1.5rem;
        font-weight: 700;
        line-height: 1.1;
        letter-spacing: -0.02em;
    }

    .pm-metric .pm-metric-label {
        font-size: 0.75rem;
        color: #6E6E73;
    }
