/* Praeco brand polish — layered on top of MudBlazor + PraecoTheme.
   Brand colours mirror Components/Theme/PraecoTheme.cs. */

:root {
    --praeco-teal: #0E7C86;
    --praeco-teal-dark: #0A5C63;
    --praeco-mint: #14B8A6;
    --praeco-ink: #0F172A;
    --praeco-muted: #475569;
    --praeco-canvas: #F6F8FA;
    --praeco-surface: #FFFFFF;
    --praeco-hairline: #E2E8F0;
    --praeco-teal-tint: rgba(14, 124, 134, 0.10);
}

html, body {
    background-color: var(--praeco-canvas);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Tighter, more editorial headings than MudBlazor's defaults. */
.mud-typography-h4 { font-weight: 700; letter-spacing: -0.02em; }
.mud-typography-h5 { font-weight: 700; letter-spacing: -0.015em; }
.mud-typography-h6 { font-weight: 600; letter-spacing: -0.01em; }

/* Slim, unobtrusive scrollbars. */
* {
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 transparent;
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #94A3B8; background-clip: content-box; }

/* ---- App bar ---------------------------------------------------------- */
.praeco-appbar {
    border-bottom: 1px solid var(--praeco-hairline);
    backdrop-filter: saturate(1.1);
}

.praeco-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.praeco-brand-mark {
    height: 34px;
    width: auto;
    display: block;
}
.praeco-brand-name {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    color: var(--praeco-ink);
}
.praeco-user { color: var(--praeco-muted); }

/* ---- Drawer / nav ----------------------------------------------------- */
.praeco-drawer {
    border-right: 1px solid var(--praeco-hairline);
}

/* Account context selector pinned at the top of the sidebar. */
.praeco-drawer-account {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--praeco-hairline);
}

/* Section labels in the nav menu. */
.praeco-nav-section {
    padding: 1rem 1.5rem 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94A3B8;
}

.mud-navmenu .mud-nav-link {
    border-radius: 8px;
    margin: 2px 10px;
    padding-top: 8px;
    padding-bottom: 8px;
    transition: background-color .12s ease, color .12s ease;
}
.mud-navmenu .mud-nav-link:hover {
    background-color: var(--praeco-teal-tint);
}
.mud-navmenu .mud-nav-link.active {
    background-color: var(--praeco-teal-tint);
    color: var(--praeco-teal) !important;
    font-weight: 600;
}
.mud-navmenu .mud-nav-link.active .mud-icon-root {
    color: var(--praeco-teal) !important;
}

/* ---- Surfaces --------------------------------------------------------- */
/* Give cards/papers a crisp hairline + soft shadow instead of the flat default. */
.mud-paper {
    border: 1px solid var(--praeco-hairline);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
}
.mud-paper.mud-elevation-0 { box-shadow: none; }

/* Stat cards on the dashboard. */
.praeco-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    height: 100%;
}
.praeco-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--praeco-teal-tint);
    color: var(--praeco-teal);
    flex: 0 0 auto;
}
.praeco-stat-icon .mud-icon-root { color: var(--praeco-teal); }
.praeco-stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; color: var(--praeco-ink); }
.praeco-stat-label { font-size: 0.8rem; color: var(--praeco-muted); }

/* Page header block. */
.praeco-page-header { margin-bottom: 1.25rem; }
.praeco-page-subtitle { color: var(--praeco-muted); }

/* Data-dense campaign status grid: scroll horizontally instead of wrapping cell text. */
.campaign-grid { overflow-x: auto; }
.campaign-grid table { width: 100%; }
.campaign-grid th, .campaign-grid td { white-space: nowrap; }

/* Campaign detail history: left-aligned timeline (line flush with the "History" heading). */
.history-tl { position: relative; border-left: 2px solid var(--mud-palette-lines-default); padding-left: 18px; }
.history-tl-item { position: relative; padding-bottom: 14px; }
.history-tl-item:last-child { padding-bottom: 0; }
.history-tl-dot { position: absolute; left: -24px; top: 4px; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px var(--mud-palette-surface); }
