/* ServiceDesk - shared look, following the UI mockups. Used by the web app and the desktop app. */

:root {
    --sd-brand: #0F6CBD;
    --sd-brand-dark: #0C3B5E;
    --sd-bg: #F5F5F5;
    --sd-card: #FFFFFF;
    --sd-border: #E0E0E0;
    --sd-divider: #EDEBE9;
    --sd-text: #242424;
    --sd-muted: #616161;
    --sd-hover: #EBEBEB;
    --sd-selected: #EBF3FC;
}

html, body {
    font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
    margin: 0;
    color: var(--sd-text);
    background: var(--sd-bg);
}

a {
    color: var(--sd-brand);
    text-decoration: none;
}

a:hover {
    color: var(--sd-brand-dark);
    text-decoration: underline;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.center-message {
    margin: 64px auto;
    text-align: center;
    color: var(--sd-muted);
}

.muted {
    color: var(--sd-muted);
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 16px;
    background: #FDE7E9;
    color: #A4262C;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    float: right;
}

/* ---- App frame: blue header, side menu, scrolling page area ---------------- */

.shell {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    padding: 10px 20px;
    background: var(--sd-brand);
    color: #FFFFFF;
    flex: none;
}

.topbar .brand {
    color: #FFFFFF;
    font-weight: 600;
    font-size: 18px;
    min-width: 196px;
    text-decoration: none;
}

.top-search {
    flex: 1 1 280px;
    max-width: 560px;
    margin: 0;
}

.top-search input {
    width: 100%;
    box-sizing: border-box;
    border: 0;
    border-radius: 6px;
    padding: 8px 12px;
    font: inherit;
    font-size: 14px;
    color: var(--sd-text);
}

.top-search input:focus {
    outline: 2px solid #FFFFFF;
    outline-offset: 1px;
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.shell-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
}

.sidenav {
    flex: none;
    width: 220px;
    box-sizing: border-box;
    background: var(--sd-card);
    border-right: 1px solid var(--sd-border);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.sidenav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 6px;
    color: var(--sd-text);
    font-size: 14px;
    text-decoration: none;
}

.sidenav a:hover {
    background: var(--sd-hover);
    color: var(--sd-text);
}

.sidenav a.active {
    background: var(--sd-selected);
    color: var(--sd-brand);
    font-weight: 600;
}

.nav-section {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--sd-muted);
    padding: 14px 12px 4px;
}

.shell-main {
    flex: 1 1 auto;
    min-width: 0;
    overflow: auto;
    padding: 20px 28px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* Narrow windows: the menu becomes a row under the header. */
@media (max-width: 760px) {
    .shell-body {
        flex-direction: column;
    }

    .sidenav {
        width: auto;
        flex-direction: row;
        flex-wrap: wrap;
        border-right: 0;
        border-bottom: 1px solid var(--sd-border);
        padding: 6px 8px;
    }

    .nav-section {
        display: none;
    }

    .topbar .brand {
        min-width: 0;
    }

    .shell-main {
        padding: 14px 12px;
    }
}

/* ---- Building blocks shared by the screens --------------------------------- */

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-bottom: 16px;
}

.page-head h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.page-head .actions {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card {
    background: var(--sd-card);
    border: 1px solid var(--sd-border);
    border-radius: 8px;
    padding: 14px 16px;
    box-sizing: border-box;
}

.card h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

/* Status badges, coloured as in the mockups. Dark text on light fill for contrast. */
.pill {
    display: inline-block;
    padding: 1px 9px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 18px;
    white-space: nowrap;
}

.pill-pending { background: #FFF4CE; color: #5C3B00; }
.pill-parked { background: #EBEBEB; color: #424242; }
.pill-transferred { background: #EBF3FC; color: #0C3B5E; }
.pill-completed { background: #E0F2E0; color: #0E4A0E; }
.pill-void { background: #FDE7E9; color: #8B0A16; }
.pill-other { background: #F5F5F5; color: #424242; }
