/* 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-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); }

/* ---- 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; }
@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; }
