/* ============================================================================
   main-layout.css — internal tools layout (_Shared/_mainLayout.leaf)
   Ported from BDomain: wwwroot/css/app.css + Components/Layout/MainLayout.razor.css
   + Dashboard/NotFound/Parked scoped CSS.

   Blazor's `::deep` prefix has been stripped throughout; the scoping it provided
   is carried by the .main-app-layout wrapper the layout renders.
   ========================================================================= */

:root {
    --page-maxw: 1200px;
    --page-pad: 32px;
    --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* ── Base ─────────────────────────────────────────────────────────────── */
html {
    height: 100%;
    width: 100%;
    scroll-behavior: smooth;
}

body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: #f3f3f1;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    text-align: center;
}

h1:focus {
    outline: none;
}

a {
    color: #404040;
    text-decoration: none;
}

a:hover {
    color: #0BA5D1;
}

.main-app-layout {
    padding-top: 68px;
}

/* ── Buttons & forms ──────────────────────────────────────────────────── */
.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.main-app-layout .btn {
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.main-app-layout .btn-primary {
    background-color: #D97757;
    border-color: #D97757;
    color: #fff;
}

.main-app-layout .btn-primary:hover,
.main-app-layout .btn-primary:focus {
    background-color: #C15F3C;
    border-color: #C15F3C;
    color: #fff;
}

.main-app-layout .btn-outline-primary {
    color: #D97757;
    border-color: #D97757;
}

.main-app-layout .btn-outline-primary:hover,
.main-app-layout .btn-outline-primary:focus {
    background-color: #D97757;
    border-color: #D97757;
    color: #fff;
}

.main-app-layout .btn-outline-secondary {
    color: #292521;
    border-color: rgba(41, 37, 33, 0.18);
}

.main-app-layout .btn-outline-secondary:hover,
.main-app-layout .btn-outline-secondary:focus {
    background-color: rgba(41, 37, 33, 0.04);
    border-color: #292521;
    color: #292521;
}

/* ── Page container & cards ───────────────────────────────────────────── */
.container {
    padding: 0 15px;
}

.cover-container {
    max-width: 100em;
}

.text-justify {
    text-align: justify;
}

.border-vapor {
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.176);
    border-width: 1px;
    background-color: rgb(255, 255, 255, 0.3);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    border-radius: 15px;
    padding: 25px;
    min-height: 300px;
    width: auto;
}

/* Card default mt-5 (48px) stacks on the layout's 68px top padding, pushing the
   body below the sidebar. Trim it so the card top lines up with the sidebar. */
.main-app-layout #container {
    margin-top: 16px !important;
}

/* ── Tables & badges ──────────────────────────────────────────────────── */
table tr td,
table tr th {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.table-translucent {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.15);
    background-color: transparent;
    border-radius: 8px;
    overflow: hidden;
}

.table-translucent tr td,
.table-translucent tr th {
    background-color: transparent !important;
}

.table-translucent tbody tr:hover td,
.table-translucent tbody tr:hover th {
    background-color: rgba(255, 255, 255, 0.15) !important;
}

.todo-hide-completed .todo-completed {
    display: none;
}

/* ── Sidebar layout & chrome ──────────────────────────────────────────────
   The sidebar floats over the left gutter; it does not push the page. */

.app-sidebar {
    position: fixed;
    width: 270px;
    top: 84px;
    left: 12px;
    height: calc(100vh - 168px);
    z-index: 1040;
    overflow-y: auto;
    border-radius: 12px;
    min-height: 0;
    color: #000;
    background-color: #f6f6f5;
    transition: width 0.2s ease, transform 0.25s ease;
}

.app-sidebar .nav-link,
.app-sidebar .link-body-emphasis {
    color: #000;
    display: flex;
    align-items: center;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.app-sidebar .sidebar-profile {
    margin-bottom: 0.5rem !important;
    padding-bottom: 0.375rem !important;
}

.app-sidebar .mt-auto {
    padding-top: 0.5rem !important;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar-collapsed .app-sidebar {
    width: 72px;
}

.sidebar-icon {
    display: inline-block;
    width: 24px;
    margin-right: 0.375rem;
    font-size: 0.875rem;
    text-align: center;
}

.sidebar-label {
    font-size: 0.875rem;
    transition: opacity 0.15s ease;
}

.sidebar-collapsed .sidebar-label {
    display: none;
}

.sidebar-collapsed .sidebar-icon {
    margin-right: 0;
}

.sidebar-collapsed .app-sidebar .nav-link,
.sidebar-collapsed .app-sidebar .link-body-emphasis {
    display: flex;
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.sidebar-collapsed .sidebar-profile {
    min-height: 32px;
}

/* Group labels are hidden when collapsed, so add a little gap between the
   icon groups (Main, Job Hunt). */
.sidebar-collapsed .app-sidebar .nav.flex-column {
    margin-top: 0.75rem;
}

.sidebar-collapsed .sidebar-section-label {
    display: none;
}

/* ── Sidebar controls: hamburger, toggle, backdrop ────────────────────── */
.sidebar-hamburger {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1031;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #404040;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.sidebar-hamburger:hover,
.sidebar-hamburger:focus-visible {
    color: #0BA5D1;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1029;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.sidebar-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #404040;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
    color: #0BA5D1;
}

.sidebar-collapsed .sidebar-toggle {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

/* ── Sidebar responsive ───────────────────────────────────────────────── */
@media (max-width: 767.98px) {
    .sidebar-hamburger {
        display: inline-flex;
    }

    .app-sidebar {
        width: 72px;
        transform: translateX(calc(-100% - 24px));
    }

    .sidebar-collapsed .app-sidebar {
        width: 72px;
    }

    .app-sidebar .sidebar-label,
    .app-sidebar .sidebar-profile {
        display: none;
    }

    .app-sidebar .sidebar-icon {
        margin-right: 0;
    }

    .app-sidebar .nav-link,
    .app-sidebar .link-body-emphasis {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }

    .sidebar-open .app-sidebar {
        transform: translateX(0);
        width: 270px;
    }

    .sidebar-open .app-sidebar .sidebar-label,
    .sidebar-open .app-sidebar .sidebar-profile {
        display: revert;
    }

    .sidebar-open .app-sidebar .sidebar-icon {
        margin-right: 0.375rem;
    }

    .sidebar-open .app-sidebar .nav-link,
    .sidebar-open .app-sidebar .link-body-emphasis,
    .sidebar-open .app-sidebar .mt-auto .nav-link {
        justify-content: flex-start;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar-open .sidebar-hamburger {
        display: none;
    }

    .app-sidebar .sidebar-toggle {
        display: none;
    }

    .app-sidebar .nav {
        margin-top: 0.25rem;
    }
}

/* ── Dashboard ────────────────────────────────────────────────────────── */
.dashboard-container {
    padding-bottom: 64px;
}

.dashboard-links {
    --bs-gutter-x: 0;
}

.dashboard-links li {
    list-style-position: inside;
    margin-bottom: 0.15rem;
}

.dashboard-links .col + .col {
    padding-left: 1.5rem;
}

@media (max-width: 575.98px) {}

@media (max-width: 767.98px) {
    .dashboard-links .col + .col {
        padding-left: 0;
        margin-top: 1rem;
    }
}

/* The error and parked pages are full-bleed — in BDomain they rendered under
   EmptyLayout, not the app chrome — so cancel the layout's navbar padding and
   the cover container's gutter for them. */
.main-app-layout:has(.pn-404),
.main-app-layout:has(.pn-parked) {
    padding-top: 0;
}

.main-app-layout:has(.pn-404) .cover-container,
.main-app-layout:has(.pn-parked) .cover-container {
    padding: 0 !important;
    max-width: none;
}

/* ── Error page (Utilities/error, Utilities/notfound) ─────────────────────
   Scoped under .pn-404 because Parked below reuses the same .e-* names, which
   Blazor kept apart with per-component scope attributes. */
.pn-404 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.pn-404 .e-inner {
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.pn-404 .e-code {
    font-size: 88px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.pn-404 .e-title { font-size: 30px; font-weight: 600; margin: 0; letter-spacing: -0.02em; }

.pn-404 .e-sub { font-size: 17px; line-height: 1.6; margin: 0; }

.pn-404 .e-btn {
    margin-top: 8px;
    padding: 13px 26px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    transition: background 0.2s, box-shadow 0.2s;
}

/* Neitzke brand (neitzke.ca / cl.neitzke.ca) */
.pn-404.is-neitzke {
    background: #FAF8F4;
    color: #292521;
    font-family: system-ui, -apple-system, sans-serif;
}

.pn-404.is-neitzke .e-code { color: rgba(217, 119, 87, 0.22); }

.pn-404.is-neitzke .e-title { font-family: Georgia, 'Iowan Old Style', serif; color: #1F1B16; }

.pn-404.is-neitzke .e-sub { color: #4A443C; }

.pn-404.is-neitzke .e-btn { background: #D97757; }

.pn-404.is-neitzke .e-btn:hover { background: #C15F3C; color: #fff; }

/* Blup brand (blup.ca / default) */
.pn-404.is-blup {
    background: #f7f9fc;
    color: #2b2b2e;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.pn-404.is-blup .e-code {
    background: linear-gradient(160deg, #a3c3e0 0%, #8f9adb 48%, #7670d3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.pn-404.is-blup .e-title { font-family: "Space Grotesk", system-ui, sans-serif; color: #2b2b2e; }

.pn-404.is-blup .e-sub { color: #5b5d63; }

.pn-404.is-blup .e-btn { background: #1e81ce; }

.pn-404.is-blup .e-btn:hover { background: #1868a6; color: #fff; box-shadow: 0 12px 26px -12px rgba(30, 129, 206, .6); }

@media (max-width: 600px) {
    .pn-404 .e-code { font-size: 68px; }
    .pn-404 .e-title { font-size: 24px; }
    .pn-404 .e-sub { font-size: 15px; }
}

/* ── Parked page (Utilities/parking) ──────────────────────────────────── */
.pn-parked {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    background: #f7f9fc;
    color: #2b2b2e;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.pn-parked .e-inner {
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.pn-parked .e-eyebrow {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #1e81ce;
}

.pn-parked .e-title {
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-size: 42px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.02em;
    color: #2b2b2e;
    word-break: break-word;
}

.pn-parked .e-sub { font-size: 17px; line-height: 1.6; margin: 0; color: #5b5d63; }

.pn-parked .e-btn {
    margin-top: 8px;
    padding: 13px 26px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    background: #1e81ce;
    transition: background 0.2s, box-shadow 0.2s;
}

.pn-parked .e-btn:hover { background: #1868a6; color: #fff; box-shadow: 0 12px 26px -12px rgba(30, 129, 206, .6); }

.pn-parked .e-link {
    font-size: 14px;
    font-weight: 600;
    color: #1e81ce;
    text-decoration: none;
    transition: color 0.2s;
}

.pn-parked .e-link:hover { color: #1868a6; text-decoration: underline; }

@media (max-width: 600px) {
    .pn-parked .e-title { font-size: 32px; }
    .pn-parked .e-sub { font-size: 15px; }
}
