﻿/* myOCI V3 — Ottenweller brand theme
   Brand colors from OC logo: #124777 (dark blue), #1B64A7 (medium blue) */

:root {
    --oci-dark: #124777;
    --oci-blue: #1B64A7;
    --oci-light: #eaf1f8;
}

html, body {
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background-color: #f5f7fa;
}

h1 { font-size: 1.6rem; color: var(--oci-dark); }
h1 i { color: var(--oci-blue); }

a { color: var(--oci-blue); }

.btn-primary {
    --bs-btn-bg: var(--oci-blue);
    --bs-btn-border-color: var(--oci-blue);
    --bs-btn-hover-bg: var(--oci-dark);
    --bs-btn-hover-border-color: var(--oci-dark);
    --bs-btn-active-bg: var(--oci-dark);
    --bs-btn-active-border-color: var(--oci-dark);
}

/* ---- layout ---- */
.page { position: relative; display: flex; min-height: 100vh; }

.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--oci-dark) 0%, #0d3557 100%);
}

.nav-brand .nav-logo { width: 190px; }
.nav-site-name { color: #ffffffaa; font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; margin-top: .35rem; }

.sidebar .nav-link { color: #d9e6f2; border-radius: .375rem; margin-bottom: .15rem; }
.sidebar .nav-link i { margin-right: .5rem; }
.sidebar .nav-link:hover { background: #ffffff1a; color: #fff; }
.sidebar .nav-link.active { background: var(--oci-blue); color: #fff; }

.nav-divider { border-color: #ffffff33; margin: .75rem .5rem; }

/* Collapsible nav groups (Admin > Navigation Menu). Native <details>; open state is
   remembered per user by js/myoci.js. */
.sidebar .nav-group { margin-bottom: .15rem; }
.sidebar .nav-group-toggle {
    list-style: none;
    display: flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
    color: #d9e6f2;
    border-radius: .375rem;
    padding: .5rem 1rem;
    user-select: none;
}
.sidebar .nav-group-toggle::-webkit-details-marker { display: none; }
.sidebar .nav-group-toggle:hover { background: #ffffff1a; color: #fff; }
.sidebar .nav-group-chevron { margin-left: auto; font-size: .75rem; transition: transform .15s ease; }
.sidebar .nav-group[open] > .nav-group-toggle .nav-group-chevron { transform: rotate(180deg); }
.sidebar .nav-group-items { padding-left: .8rem; }
.sidebar .nav-group-items .nav-link { font-size: .95em; }
.nav-section-label { color: #ffffff77; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: .25rem; }

main { flex: 1; min-width: 0; }

.top-bar {
    height: 3.25rem;
    background: #fff;
    border-bottom: 1px solid #e3e8ee;
}
.top-bar a { text-decoration: none; }
/* Header bell panel ("Waiting on you"): a 340px dropdown hanging off the bell on desktop;
   on phones (< 576px) it is fixed full-width just under the top bar, because anchored to
   the bell it ran off the left edge of the screen (D. Hite, Sep 7 2026). */
.action-panel {
    position: absolute; right: 0; margin-top: .5rem;
    width: 340px; max-width: 90vw; z-index: 1050;
}
.action-panel-list { max-height: 60vh; overflow-y: auto; }
@media (max-width: 575.98px) {
    .action-panel {
        position: fixed; top: 3.25rem; left: 0; right: 0;
        width: auto; max-width: none; margin-top: 0;
        border-radius: 0; border-left: 0; border-right: 0;
    }
    .action-panel-list { max-height: calc(100vh - 3.25rem - 3rem); }
    .top-bar { padding-left: 1rem !important; padding-right: 1rem !important; }
}
.header-avatar {
    width: 26px; height: 26px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #e3e8ee;
}

/* ---- emergency alerts ("red bar") ---- */
.emergency-bar {
    padding: .55rem 1rem;
    color: #fff;
    font-weight: 600;
    text-align: center;
}
.emergency-bar.sev-0 { background: #c0392b; }                        /* Red    */
.emergency-bar.sev-1 { background: #e67e22; }                        /* Amber  */
.emergency-bar.sev-2 { background: var(--oci-blue); }                /* Info   */
.login-alert { width: 100%; max-width: 640px; border-radius: .375rem; }
.sev-badge-0 { background: #c0392b; }
.sev-badge-1 { background: #e67e22; }
.sev-badge-2 { background: var(--oci-blue); }

/* ---- deploy countdown (Oct 24 2026) ---- */
.deploy-bar { display: block; padding: .5rem 1rem; background: #fff3cd; color: #664d03; border-bottom: 1px solid #ffe69c; font-weight: 600; text-align: center; }

/* ---- emergency roll call ---- */
.rollcall-bar {
    display: block;
    padding: .6rem 1rem;
    color: #fff;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}
.rollcall-bar:hover { color: #fff; text-decoration: underline; }
.rollcall-bar.real  { background: #b71c1c; animation: rollcall-pulse 1.6s ease-in-out infinite; }
.rollcall-bar.drill { background: #b58900; }
@keyframes rollcall-pulse {
    0%, 100% { background: #b71c1c; }
    50%      { background: #e53935; }
}
.nav-emergency { color: #ff8a80 !important; font-weight: 700; }
.nav-emergency:hover, .nav-emergency.active { color: #fff !important; background: rgba(183, 28, 28, .55) !important; }
.rollcall-over12 { background: #fff3cd; }
.rollcall-over24 { background: #ffe0b2; }
/* Live roll call (Sep 16 2026): rows stay put; marked rows go grey; the progress/jump bar sticks. */
.rollcall-done { background: #f1f3f5; color: #6c757d; }
.rollcall-sticky { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bs-body-bg, #fff);
                   padding: .35rem 0; margin-bottom: .5rem; border-bottom: 1px solid #dee2e6; }
.rollcall-sticky .btn { white-space: nowrap; }
@media print {
    .sidebar, .top-bar, .nav-backdrop, .d-print-none { display: none !important; }
}

/* ---- kiosk ---- */
.kiosk-banner {
    background: #fff3cd;
    border-bottom: 1px solid #ffe69c;
    padding: .35rem 1rem;
    font-size: .85rem;
}

/* ---- login ---- */
.login-page {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--oci-dark) 0%, var(--oci-blue) 100%);
}
.login-card { width: 100%; max-width: 420px; }
.login-card .card-header { background: #fff; border-bottom: none; text-align: center; padding-top: 2rem; }
.login-card .login-logo { width: 260px; max-width: 90%; }

/* ---- dashboard widgets ---- */
.widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1rem;
}
.widget-card .card-header {
    background: var(--oci-light);
    color: var(--oci-dark);
    font-weight: 600;
    display: flex; align-items: center; justify-content: space-between;
}
.widget-card .widget-tools button { border: none; background: none; color: var(--oci-blue); padding: 0 .2rem; }
.widget-card .widget-tools button:hover { color: var(--oci-dark); }

/* ---- calendar ---- */
.cal-dot {
    display: inline-block;
    width: .65rem; height: .65rem;
    border-radius: 50%;
    flex-shrink: 0;
}
.cal-grid { table-layout: fixed; background: #fff; }
.cal-cell { height: 6.5rem; vertical-align: top; padding: .25rem; overflow: hidden; }
.cal-daynum { font-size: .8rem; color: #6c757d; text-align: right; }
.cal-other-month { background: #f5f7fa; }
.cal-other-month .cal-daynum { color: #c3ccd6; }
.cal-today { background: var(--oci-light); }
.cal-today .cal-daynum { color: var(--oci-dark); font-weight: 700; }
.cal-event {
    font-size: .75rem;
    background: #fff;
    border: 1px solid #e3e8ee;
    border-left: 3px solid var(--oci-blue);
    border-radius: .25rem;
    padding: 0 .3rem;
    margin-bottom: .15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
}

/* ---- contact list ---- */
.contact-group-header {
    background: var(--oci-light);
    color: var(--oci-dark);
    border-radius: .25rem;
}

/* ---- misc ---- */
.help-tip { font-size: .9rem; }
.announcement-pinned { border-left: 4px solid var(--oci-blue); }
.spotlight-photo { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; }
.legacy-frame { width: 100%; height: calc(100vh - 180px); border: 1px solid #e3e8ee; border-radius: .375rem; }

/* ---- mobile: off-canvas menu with hamburger ---- */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--oci-dark);
    padding: 0 .25rem;
}

@media (max-width: 768px) {
    .nav-toggle { display: inline-flex; align-items: center; }

    .sidebar {
        position: fixed;
        top: 0; bottom: 0; left: 0;
        width: 264px;
        transform: translateX(-105%);
        transition: transform .25s ease;
        z-index: 1500;
        overflow-y: auto;
    }
    .page.nav-open .sidebar {
        transform: translateX(0);
        box-shadow: 0 0 28px rgba(0, 0, 0, .45);
    }

    .nav-backdrop { display: none; }
    .page.nav-open .nav-backdrop {
        display: block;
        position: fixed; inset: 0;
        background: rgba(10, 20, 30, .5);
        z-index: 1400;
    }
}

/* Header action center (things waiting on you) */
.action-item:hover { background: #f2f6fa; }

/* Circuit-error bar (App.razor #blazor-error-ui) — hidden until blazor.web.js shows it (Sep 2026) */
#blazor-error-ui { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 2000;
  background: #b02a37; color: #fff; padding: .75rem 2.5rem .75rem 1rem; box-shadow: 0 -2px 8px rgba(0,0,0,.25);
  font-size: .95rem; line-height: 1.4; }
#blazor-error-ui .bi-exclamation-triangle-fill { margin-right: .5rem; }
#blazor-error-ui .dismiss { position: absolute; right: .9rem; top: .5rem; cursor: pointer; font-size: 1.3rem; }

/* Row flash after a list scrolls back to where the person was (myociScroll.to, Sep 18 2026). */
.myoci-flash { box-shadow: inset 0 0 0 3px var(--bs-warning) !important; transition: box-shadow 1.2s ease-out; }

/* Grid kit (Sep 29 2026, D. Hite: "make the column headers follow when they go off the page"):
   .table-sticky-box = the table scrolls inside its own box (about 70% of the window) and the header
   row stays put at the top of it; works with the sideways scroll .table-responsive gives a wide grid.
   .table-dense = smaller type and tighter cells for wide grids, so they fit the window without
   scrolling sideways as often. First used on the payroll run (Employees and Lines views). */
.table-sticky-box { max-height: 70vh; overflow: auto; }
.table-sticky-box > .table > thead > tr > th { position: sticky; top: 0; z-index: 2;
  background: var(--bs-body-bg, #fff); box-shadow: inset 0 -1px 0 var(--bs-border-color, #dee2e6); }
.table-dense { font-size: .85rem; }
.table-dense > :not(caption) > * > * { padding: .15rem .3rem; }
.table-dense .badge { font-size: .7em; }

/* ---- phones (QA Oct 11 2026, mobile pass): the Time Off request, Time Off home and the dashboard ---- */
@media (max-width: 575.98px) {
    main h1 { font-size: 1.45rem; }
    main h2 { font-size: 1.25rem; }
    /* filter rows: every small control takes the full width instead of a 110-230 px slot */
    main .d-flex.flex-wrap > div > .form-control-sm,
    main .d-flex.flex-wrap > div > .form-select-sm { width: 100% !important; min-width: 0; }
    main .d-flex.flex-wrap > div { flex: 1 1 100%; }
    main .d-flex.flex-wrap > .btn, main .d-flex.flex-wrap > .btn-group { flex: 0 0 auto; }
    /* the request's day table: no fixed column widths; the hours box and the half-day picker shrink to fit */
    .to-days th[style], .to-days td[style] { width: auto !important; }
    .to-days .form-control-sm, .to-days .form-select-sm { min-width: 4.5rem; }
    .to-days td, .to-days th { padding-left: .25rem; padding-right: .25rem; }
    /* dashboard cards stack with a little less air */
    .card .card-body { padding: .75rem; }
    /* tables: a touch more compact */
    .table-sm > :not(caption) > * > * { padding: .25rem .3rem; }
    /* buttons that sit beside each other wrap rather than overflow */
    .btn-group-sm { flex-wrap: wrap; }
}

/* page marks drawn by myoci.js (Oct 12 2026): faint until hovered, no tooltip */
.oci-sp { cursor: pointer; position: absolute; z-index: 5; font-size: 1.3rem; color: #a9b8c6; opacity: .45; text-decoration: none; transition: opacity .2s ease, transform .2s ease; }
.oci-sp:hover { opacity: 1; color: #B3701F; transform: scale(1.35); }
/* 920 (Oct 18 2026): a mark may sit inside a help panel or an expanded sidebar group - that box becomes its frame */
.oci-sp-host { position: relative; }
