/* ============================================================
   UniProj: A Progressive Web Platform for Digital Work Order
   and Project Oversight  |  SLSU PMO
   Color Palette: #2A3F3F | #467750 | #89C07E | #E0E8E2 | #F0CD6E
   ============================================================ */

:root {
    /* Official palette */
    --up-dark-teal:    #2A3F3F;
    --up-green:        #467750;
    --up-forest-green: #006837;
    --up-green-mid:    #89C07E;
    --up-green-light:  #E0E8E2;
    --up-green-xlight: #f0f5f1;
    --up-gold:         #F0CD6E;
    --up-gold-dark:    #c9a227;
    --up-gold-light:   #fdf8e8;

    /* Layout */
    --up-sidebar-w:    255px;
    --up-topbar-h:     64px;
    --up-bg:           #f4f5f6;
    --up-border:       #dde3df;
    --up-text-muted:   #555555;
}

body {
    background: var(--up-bg) !important;
}

/* Bootstrap overrides */
.btn-primary,
.bg-primary        { background-color: var(--up-green)      !important; border-color: var(--up-green)      !important; color: #fff !important; }
.btn-primary:hover,
.btn-primary:focus { background-color: var(--up-dark-teal)  !important; border-color: var(--up-dark-teal)  !important; color: #fff !important; }

/* Radio / checkbox: visible on the light background, green when selected */
.form-check-input {
    border: 1px solid #7a8a7e;
    background-color: #fff;
}
.form-check-input:checked {
    background-color: var(--up-green);
    border-color: var(--up-green);
}
.form-check-input:focus {
    border-color: var(--up-green);
    box-shadow: 0 0 0 .25rem rgba(70, 119, 80, .25);
}

/* Page header action buttons: match Director Dashboard green */
.page-header-actions .btn {
    background-color: var(--up-forest-green) !important;
    border-color:     var(--up-forest-green) !important;
    color:            #fff                 !important;
}
.page-header-actions .btn:hover,
.page-header-actions .btn:focus {
    background-color: var(--up-dark-teal)  !important;
    border-color:     var(--up-dark-teal)  !important;
    color:            #fff                 !important;
}

/* Account Manager: admin / requester toggle */
.account-type-toggle-wrap {
    display: flex;
    justify-content: flex-start;
}
.account-type-toggle {
    display: inline-flex;
    align-items: stretch;
    padding: .25rem;
    border-radius: 999px;
    background: #e8ece9;
    border: 1px solid #6c757d;
    gap: .25rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .16);
}
.account-type-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem 1.1rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #444;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
    white-space: nowrap;
}
.account-type-toggle-btn:hover {
    color: var(--up-forest-green);
}
.account-type-toggle-btn.active {
    background: var(--up-forest-green);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 104, 55, .22);
}
.account-type-toggle-btn.active:hover {
    background: var(--up-dark-teal);
    color: #fff;
}
.account-type-toggle-btn .badge {
    font-size: .68rem;
    font-weight: 700;
    padding: .28rem .5rem;
    background: rgba(0, 0, 0, .08);
    color: inherit;
}
.account-type-toggle-btn.active .badge {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}
.account-type-toggle-btn.active .badge.bg-warning {
    background: var(--up-gold) !important;
    color: #000 !important;
}
@media (max-width: 575.98px) {
    .account-type-toggle {
        width: 100%;
    }
    .account-type-toggle-btn {
        flex: 1;
        justify-content: center;
        padding-inline: .75rem;
    }
}
.text-primary      { color: #000 !important; }
.border-primary    { border-color: var(--up-green) !important; }

/* Modals: black title/text, colour lives on the icon only; footer centred */
.modal-header:not(.text-white) .modal-title { color: #000; }
.modal-footer { justify-content: center; }
.btn-outline-primary       { color: #000 !important; border-color: var(--up-green) !important; }
.btn-outline-primary:hover { background-color: var(--up-green-light) !important; color: #000 !important; }

/* Export / Download buttons: a deeper, distinct green from the View buttons above */
.btn-outline-forest,
.btn-outline-forest:focus { color: var(--up-forest-green) !important; border-color: var(--up-forest-green) !important; background-color: transparent !important; }
.btn-outline-forest:hover { background-color: var(--up-forest-green) !important; color: #fff !important; border-color: var(--up-forest-green) !important; }

/* View Timeline button: logo blue */
.btn-timeline,
.btn-timeline:focus       { color: #3a7cba !important; border-color: #3a7cba !important; background-color: transparent !important; }
.btn-timeline:hover       { background-color: #3a7cba !important; color: #fff !important; border-color: #3a7cba !important; }

/* Fill Out CSM button: solid, same blue as View Timeline */
.btn-fillout,
.btn-fillout:focus        { background-color: #3a7cba !important; border-color: #3a7cba !important; color: #fff !important; }
.btn-fillout:hover        { background-color: #2f6699 !important; border-color: #2f6699 !important; color: #fff !important; }

.btn-warning,
.bg-warning        { background-color: var(--up-gold)      !important; border-color: var(--up-gold)      !important; color: #000 !important; }
.btn-warning:hover { background-color: var(--up-gold-dark) !important; border-color: var(--up-gold-dark) !important; color: #fff !important; }

.form-control:focus,
.form-select:focus { border-color: var(--up-green); box-shadow: 0 0 0 .2rem rgba(70,119,80,.2); }

.progress-bar { background-color: var(--up-green) !important; transition: width .65s ease; }

/* Text color overrides: black/white only */
.text-success { color: #000 !important; }
.text-muted   { color: var(--up-text-muted) !important; }

/* Explicit green, for spots (like a completed task check) that need to
   read as done at a glance and shouldn't follow the black-only rule above */
.text-up-green { color: var(--up-green) !important; }

/* Work-order control numbers */
code { color: var(--up-green) !important; }

/* Profile page: detail fields (readonly text-field style) */
.profile-fields {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: .7rem .8rem;
}
.profile-field {
    min-width: 0;
    grid-column: 1 / -1;
}
.profile-field--wide { grid-column: 1 / -1; }
.profile-field--name  { grid-column: span 5; }
.profile-field--mi    { grid-column: span 2; }
.profile-field-label {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--up-forest-green);
    margin: 0 0 .25rem .1rem;
}
.profile-field-value {
    display: block;
    background: #eaf4ed;
    border: 1px solid #cbe4d3;
    border-radius: 9px;
    padding: .5rem .8rem;
    font-size: .92rem;
    line-height: 1.35;
    color: #16281d;
    word-break: break-word;
}
.profile-field-empty { color: #7c8a80; font-style: italic; }
@media (max-width: 575.98px) {
    .profile-field,
    .profile-field--name,
    .profile-field--mi { grid-column: 1 / -1; }
}

/* Hide browser-native password reveal button */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none !important;
}
input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-contacts-auto-fill-button,
input[type="password"]::-webkit-password-saving-indicator {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
}
input.no-pwd-reveal::-ms-reveal,
input.no-pwd-reveal::-ms-clear,
input.no-pwd-reveal::-webkit-credentials-auto-fill-button,
input.no-pwd-reveal::-webkit-contacts-auto-fill-button,
input.no-pwd-reveal::-webkit-password-saving-indicator {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* ============================================================
   AUTH PAGES: Floating split-card layout
   ============================================================ */
body.auth-body {
    margin: 0;
    background:
        radial-gradient(1200px 600px at 15% 0%, #f3f0ec 0%, transparent 60%),
        radial-gradient(1000px 700px at 100% 100%, #e9ebec 0%, transparent 55%),
        #e7e8ea;
    min-height: 100vh;
}

.auth-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 2.5vw, 36px);
    overflow: hidden;
}

.auth-shell {
    width: 100%;
    max-width: 1120px;
    height: 100%;
    max-height: 680px;
    display: flex;
    gap: 22px;
}

/* Left: dark showcase card */
.auth-hero {
    position: relative;
    flex: 1.05;
    border-radius: 30px;
    background: #0b3623;
    overflow: hidden;
    padding: clamp(1.75rem, 3vw, 3rem) clamp(1.5rem, 2.6vw, 2.5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}
.auth-hero-bg {
    position: absolute;
    inset: -50px;
    background-image: url('../img/SLSU/SLSU.jpg');
    background-size: cover;
    background-position: center;
    filter: blur(12px) brightness(.75) saturate(.7);
    opacity: .8;
    z-index: 0;
}
.auth-hero-inst,
.auth-hero-main { position: relative; z-index: 2; }

.auth-hero-inst {
    font-size: clamp(1.55rem, 2.5vw, 2.25rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: -.025em;
    line-height: 1.2;
    white-space: nowrap;
    margin: 0 0 1.8rem;
    text-shadow: 0 2px 16px rgba(0,0,0,.45);
}
.auth-hero-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.auth-hero-logo {
    width: clamp(128px, 15vw, 184px);
    height: auto;
    filter: drop-shadow(0 16px 36px rgba(0,0,0,.5));
}
.auth-hero-title {
    margin: 0;
    font-size: clamp(1.55rem, 2.5vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.02em;
    color: #fff;
    text-shadow: 0 2px 16px rgba(0,0,0,.45);
}

/* Right: form card */
.auth-card {
    flex: 1;
    min-width: 0;
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 40px 80px -30px rgba(20,30,30,.28);
    display: flex;
    flex-direction: column;
    padding: clamp(1.5rem, 2.4vw, 2.6rem) clamp(1.6rem, 2.8vw, 2.9rem);
    overflow: hidden;
}
.auth-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    text-decoration: none;
    color: #141414;
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: -.01em;
}
.auth-logo img { width: 20px; height: 20px; object-fit: contain; }
.auth-logo .auth-logo-text { width: auto; height: 15px; }

.auth-toplink {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    text-decoration: none;
    color: #2b2f2e;
    font-size: .95rem;
    font-weight: 600;
}
.auth-toplink:hover { color: var(--up-forest-green); }

.auth-card-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.75rem 0;
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
}
.auth-card-body.is-top {
    justify-content: flex-start;
}

.auth-card-title {
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
    font-weight: 700;
    letter-spacing: -.02em;
    color: #111;
    margin: 0 0 1.6rem;
}
.auth-card-body.is-top .auth-card-title { margin-bottom: .8rem; }
.auth-card-sub {
    margin: -1.15rem 0 1.6rem;
    color: #3a3f3e;
    font-size: .88rem;
    line-height: 1.5;
}
.auth-card-notice {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    margin: 0 0 1.15rem;
    color: #2b2f2e;
    font-size: .92rem;
    font-weight: 500;
    line-height: 1.45;
}
.auth-card-notice i {
    flex-shrink: 0;
    margin-top: .12rem;
    font-size: 1rem;
    color: var(--up-forest-green);
}

/* Fields */
.auth-group { margin-bottom: 1rem; position: relative; }
.auth-input {
    width: 100%;
    border: 1px solid #dfe1e3;
    border-radius: 999px;
    padding: .88rem 1.35rem;
    font-size: .92rem;
    color: #161616;
    background: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.auth-input::placeholder { color: #767c7b; }
.auth-input:focus {
    border-color: var(--up-green);
    box-shadow: 0 0 0 3px rgba(70,119,80,.12);
}
.auth-group-pass .auth-input { padding-right: 3rem; }
.auth-eye {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    border: 0;
    background: none;
    color: #6b7170;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    padding: .25rem;
}
.auth-eye:hover { color: #333; }

.auth-inline-link {
    display: inline-block;
    margin: .4rem 0 1.6rem .3rem;
    color: var(--up-forest-green);
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
}
.auth-inline-link:hover { text-decoration: underline; }

.auth-btn {
    width: 100%;
    border: 0;
    border-radius: 999px;
    padding: .95rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(90deg, #4a7d54 0%, #006837 55%, #0b8a4a 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    cursor: pointer;
    transition: filter .15s ease;
}
.auth-btn:hover { background: var(--up-dark-teal); background-image: none; }
.auth-btn:active { filter: brightness(.95); }
.auth-btn i { font-size: 1.1rem; }

.auth-switch {
    margin: 1.5rem 0 0;
    text-align: center;
    font-size: .88rem;
    color: #3a3f3e;
}
.auth-switch a {
    color: var(--up-forest-green);
    font-weight: 600;
    text-decoration: none;
}
.auth-switch a:hover { text-decoration: underline; }

/* Signup: multi-field grid inside the card */
.auth-card-body.is-top .row { --bs-gutter-x: .6rem; --bs-gutter-y: .55rem; }
.auth-card .form-control,
.auth-card .form-select {
    border-radius: 999px;
    padding: .7rem 1.2rem;
    font-size: .88rem;
    color: #161616;
    border: 1px solid #dfe1e3;
    line-height: 1.4;
}
.auth-card .form-control::placeholder { color: #767c7b; }
.auth-card .form-control:focus,
.auth-card .form-select:focus {
    border-color: var(--up-green);
    box-shadow: 0 0 0 3px rgba(70,119,80,.12);
}
.auth-card .form-label {
    font-size: .75rem;
    font-weight: 600;
    color: #4a504f;
    margin: 0 0 .2rem .9rem;
}
.auth-card .form-text {
    font-size: .72rem;
    margin: .15rem 0 0 .9rem;
    line-height: 1.35;
    color: #4a504f;
}
.auth-card .input-group .form-control { border-radius: 999px 0 0 999px; }
.auth-card .input-group .btn {
    border: 1px solid #dfe1e3;
    border-left: 0;
    border-radius: 0 999px 999px 0;
    background: #fff;
    color: #6b7170;
    padding-top: 0;
    padding-bottom: 0;
    font-size: 1.05rem;
}
.auth-card .alert { border-radius: 14px; padding: .55rem .85rem; margin-bottom: .75rem; font-size: .82rem; }
.auth-card-body.is-top .auth-btn { padding: .9rem 1.5rem; }

/* Signup affiliation picker: drop labels, placeholders carry the meaning */
#regAffiliation .form-label { display: none; }
#regAffiliation .row { --bs-gutter-y: .55rem; }

/* Responsive */
@media (max-width: 900px) {
    .auth-page { height: auto; min-height: 100vh; overflow-y: auto; align-items: flex-start; }
    .auth-shell {
        flex-direction: column;
        height: auto;
        max-height: none;
        max-width: 460px;
    }
    .auth-card { flex: none; overflow: visible; }
    .auth-hero {
        min-height: 170px;
        flex: none;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    .auth-hero-inst { font-size: clamp(1.15rem, 4.6vw, 1.7rem); white-space: normal; margin-bottom: 1.1rem; }
    .auth-hero-main { gap: 1rem; }
    .auth-hero-title { font-size: clamp(1.15rem, 4.6vw, 1.7rem); }
    .auth-hero-logo { width: clamp(96px, 22vw, 128px); }
    .auth-card-body { padding: 1.5rem 0; }
}
@media (max-width: 560px) {
    .auth-page { padding: 0; }
    .auth-shell { gap: 0; max-width: none; }
    .auth-hero { border-radius: 0; }
    .auth-card { border-radius: 24px 24px 0 0; margin-top: -20px; padding-top: 3rem; box-shadow: none; }
}

/* Campus / College / Office picker: clip long option text with an ellipsis */
select.affiliation-select {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}


/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    width: var(--up-sidebar-w);
    background: #2A3F3F;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: transform .25s ease, left .25s ease;
    box-shadow: 2px 0 16px rgba(0,0,0,.18);
    border-radius: 0 16px 16px 0;
}

/* Brand area */
.sidebar-brand {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .85rem;
    text-decoration: none;
    background: #2A3F3F;
    flex-shrink: 0;
}
.sidebar-brand-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    flex-shrink: 0;
}
.sidebar-brand-text {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -.3px;
    line-height: 1.1;
}

/* Section label */
.sidebar-section {
    display: block;
    padding: 1.25rem 1.5rem .4rem;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: rgba(255,255,255,.8);
    font-weight: 700;
    text-align: left !important;
}

/* Nav list */
.sidebar-nav {
    list-style: none;
    padding: .25rem 0;
    flex: 1;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: left !important;
}
.sidebar-nav li {
    width: 100%;
    text-align: left !important;
}
.sidebar-nav .nav-link {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: left !important;
    gap: 1rem;
    padding: .8rem 1.5rem;
    color: #fff;
    font-size: .95rem;
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 500;
    border-left: 4px solid transparent;
    border-radius: 0;
    margin: 0;
    line-height: 1.2;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
    text-decoration: none !important;
    position: relative;
    width: 100%;
}
.sidebar-nav .nav-link .nav-icon {
    font-size: 1.2rem;
    width: 1.6rem;
    min-width: 1.6rem;
    height: 1.6rem;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    flex-shrink: 0;
    line-height: 1 !important;
    opacity: 1;
    transition: opacity .2s ease, transform .2s ease;
}
.sidebar-nav .nav-link:hover {
    background: #fff;
    color: #2A3F3F;
    border-left-color: transparent;
    text-decoration: none !important;
}
.sidebar-nav .nav-link:hover .nav-icon {
    color: #2A3F3F;
    opacity: 1;
}
.sidebar-nav .nav-link.active {
    background: #fff;
    color: #2A3F3F;
    border-left-color: transparent;
    font-weight: 700;
    text-decoration: none !important;
}
.sidebar-nav .nav-link.active .nav-icon {
    color: #2A3F3F;
    opacity: 1;
}
.sidebar-nav .nav-link.active:hover {
    background: #fff;
    color: #2A3F3F;
}
.sidebar-nav:has(.nav-link:hover) .nav-link.active:not(:hover) {
    background: transparent;
    color: #fff;
}
.sidebar-nav:has(.nav-link:hover) .nav-link.active:not(:hover) .nav-icon {
    color: #fff;
}
.sidebar-nav .nav-link .nav-label {
    flex: 1;
    text-align: left !important;
    line-height: 1.2 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.sidebar-nav .nav-link .nav-badge {
    position: relative;
    right: auto;
    background: var(--up-forest-green);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    line-height: 1;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.sidebar-nav .nav-link.active .nav-badge {
    background: #fff;
    color: var(--up-forest-green);
}

/* Footer */
.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,.08);
    background: #2A3F3F;
    flex-shrink: 0;
}
.sidebar-avatar {
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .9rem;
    color: #000;
    flex-shrink: 0;
}
.sidebar-user-name { color: #fff; font-size: .84rem; font-weight: 600; }
.sidebar-user-role { color: rgba(255,255,255,.8); font-size: .68rem; }
.sidebar-logout { color: rgba(255,255,255,.5); font-size: 1.1rem; transition: color .15s; }
.sidebar-logout:hover { color: #fff; }

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.main-wrap {
    margin-left: var(--up-sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--up-bg);
    padding-top: var(--up-topbar-h);
    transition: margin-left .25s ease;
}

/* Fixed top bar (page title, notifications, role badge) */
.topbar-shell {
    position: fixed;
    top: 0;
    left: var(--up-sidebar-w);
    right: 0;
    z-index: 1030;
    transition: left .25s ease;
}

/* Desktop collapsed state when toggled by hamburger menu */
@media (min-width: 992px) {
    body.sidebar-collapsed .sidebar {
        transform: translateX(-100%);
    }
    body.sidebar-collapsed .main-wrap {
        margin-left: 0;
    }
    body.sidebar-collapsed .topbar-shell {
        left: 0;
    }
}

/* Topbar */
.topbar {
    height: var(--up-topbar-h);
    background: #fff;
    border-bottom: 1px solid var(--up-border);
    box-shadow: 0 1px 6px rgba(0,0,0,.05);
}
.topbar-toggle-btn {
    color: #2A3F3F !important;
    padding: .35rem .55rem;
    border-radius: 8px;
    transition: background .15s ease, color .15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.topbar-toggle-btn:hover {
    background: var(--up-green-light) !important;
    color: #2A3F3F !important;
}
.topbar-title {
    font-size: 1rem;
    font-weight: 700;
    color: #000;
}

/* Back navigation (shared backButton() helper) */
.back-nav {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: 1.25rem;
}
.page-create-top .back-nav {
    margin-bottom: 0;
}

/* Uniform page description / subtitle: upper-left of every page */
.back-nav-desc,
.page-desc {
    font-size: 1.05rem;
    font-weight: 400;
    color: #000;
    margin-bottom: 0;
}
.back-nav-desc {
    margin: 0;
    max-width: 65ch;
}

/* Glass CTA card (frosted glassmorphism panel) */
.glass-cta {
    position: relative;
    background: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    padding: .7rem .95rem;
    color: #3f4652;
    font-size: .92rem;
}
.glass-cta-title {
    color: #2b303b;
    font-weight: 600;
    font-size: .95rem;
}
.glass-cta-icon {
    color: #5b6472;
}
.glass-cta-success,
.glass-cta-danger {
    border: 1px solid #000;
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .glass-cta { background: rgba(255, 255, 255, 0.88); }
}

/* Neutral-toned buttons (pair with .glass-cta or use standalone) */
.btn-neutral {
    background: #4b5563;
    border-color: #4b5563;
    color: #fff;
}
.btn-neutral:hover,
.btn-neutral:focus {
    background: #374151;
    border-color: #374151;
    color: #fff;
}
.btn-outline-neutral {
    border-color: rgba(107, 114, 128, 0.55);
    color: #374151;
    background: rgba(255, 255, 255, 0.35);
}
.btn-outline-neutral:hover,
.btn-outline-neutral:focus {
    background: rgba(107, 114, 128, 0.14);
    color: #1f2937;
}

/* Banner buttons */
.glass-cta .btn-neutral,
.glass-cta .btn-outline-neutral {
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
/* Primary action: highlighted by default */
.glass-cta .btn-neutral {
    background: #1e5f2b;
    border-color: #1e5f2b;
    color: #fff;
}
.glass-cta .btn-neutral:hover,
.glass-cta .btn-neutral:focus {
    background: #164821;
    border-color: #164821;
    color: #fff;
}
/* Secondary action: transparent, fills in on hover */
.glass-cta .btn-outline-neutral {
    background: transparent;
    border-color: #1e5f2b;
    color: #1e5f2b;
}
.glass-cta .btn-outline-neutral:hover,
.glass-cta .btn-outline-neutral:focus {
    background: #1e5f2b;
    border-color: #1e5f2b;
    color: #fff;
}
/* Hovering the secondary action de-emphasises the primary one */
.glass-cta:has(.btn-outline-neutral:hover) .btn-neutral {
    background: transparent;
    border-color: #1e5f2b;
    color: #1e5f2b;
}

/* Create request page: title stays visible below fixed topbar */
.page-create-top {
    position: sticky;
    top: var(--up-topbar-h);
    z-index: 1020;
    background: var(--up-bg);
    padding: .25rem 0 .75rem;
    margin-bottom: 1rem !important;
    border-bottom: 1px solid var(--up-border);
}

/* Notification button */
.notif-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #000;
    padding: .35rem .45rem;
    border-radius: 8px;
    transition: background .15s, color .15s;
    line-height: 1;
}
.notif-btn:hover { background: var(--up-green-light); color: #000; }
.notif-count {
    position: absolute;
    top: 0; right: 0;
    background: var(--up-forest-green);
    color: #fff;
    font-size: .58rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    padding: 0 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    line-height: 1;
}

/* Notification dropdown (frosted glass, matches .topbar-glass) */
.notif-dropdown {
    position: absolute;
    top: calc(var(--up-topbar-h) + 2px);
    right: 1rem;
    width: 370px;
    background: linear-gradient(150deg, rgba(255,255,255,.9), rgba(255,255,255,.82));
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid #6c757d;
    border-radius: 14px;
    box-shadow:
        -4px 6px 18px rgba(15,23,42,.16),
        inset 0 1px 0 rgba(255,255,255,.6);
    z-index: 1050;
    display: none;
    flex-direction: column;
    max-height: 490px;
    overflow: hidden;
}
.notif-dropdown.show { display: flex; }
.notif-dropdown,
.notif-dropdown .small,
.notif-dropdown .fw-semibold { color: #1c1c1c; }
.notif-dropdown .text-muted { color: #555 !important; }

/* header action buttons: circular green hover like .topbar-glass-btn */
.notif-head-btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    border: 0;
    background: transparent;
    border-radius: 999px;
    padding: .2rem .55rem;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.notif-head-btn.is-read  { color: var(--up-green); }
.notif-head-btn.is-clear { color: #b02a37; }
.notif-head-btn.is-read:hover  { background: var(--up-green); color: #fff; }
.notif-head-btn.is-clear:hover { background: #b02a37; color: #fff; }

/* list rows */
.notif-item {
    transition: background-color .13s ease;
}
.notif-item:hover { background: var(--up-green-xlight); }
.notif-item-unread { background: #f2f8f3; }
.notif-item-unread:hover { background: #e6f1e8 !important; }

.notif-dropdown-foot a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border-radius: 999px;
    padding: .25rem .7rem;
    transition: background-color .15s ease, color .15s ease;
}
.notif-dropdown-foot a:hover { background: var(--up-green); color: #fff !important; }
.notif-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}
.notif-dot.info    { background: #000; }
.notif-dot.success { background: #000; }
.notif-dot.warning { background: #555; }
.notif-dot.danger  { background: #000; }

/* Notifications page list */
.notif-list {
    display: flex;
    flex-direction: column;
    border-radius: inherit;
    overflow: hidden;
}
.notif-row {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--up-border);
    text-decoration: none;
    color: inherit;
    transition: background .13s;
}
.notif-row:last-child { border-bottom: 0; }
.notif-row .notif-dot { margin-top: .4rem; }
.notif-row-link { cursor: pointer; }
.notif-row-link:hover { background: var(--up-green-xlight); color: inherit; }
.notif-row-unread { background: #f2f8f3; }
.notif-row-unread:hover { background: #e6f1e8; }
.notif-row-title {
    font-weight: 600;
    font-size: .92rem;
    color: #1c1c1c;
}
.notif-row-msg {
    margin: .15rem 0 .35rem;
    font-size: .85rem;
    color: #555;
    line-height: 1.4;
}
.notif-row-time {
    font-size: .76rem;
    color: #8a8a8a;
}
.notif-row-new {
    font-size: .66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #fff;
    background: var(--up-green);
    border-radius: 999px;
    padding: .1rem .5rem;
}
.notif-row-chev {
    align-self: center;
    color: #bbb;
    font-size: 1rem;
}
.notif-row-link:hover .notif-row-chev { color: var(--up-green); }
.min-w-0 { min-width: 0; }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.stat-icon.green  { background: var(--up-green-light); color: #000; }
.stat-icon.teal   { background: rgba(42,63,63,.1);     color: #000; }
.stat-icon.gold   { background: var(--up-gold-light);  color: #000; }
.stat-icon.yellow { background: #fff8e1;               color: #000; }
.stat-icon.gray   { background: #f3f4f6;               color: #000; }
.stat-icon.red    { background: #fee2e2;               color: #000; }
.stat-icon.blue   { background: #dbeafe;               color: #000; }

/* Flat stat strip: read-only KPI readout (no hover, no click) */
.stat-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}
.stat-stack .stat-group {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.stat-group-title {
    display: flex;
    align-items: baseline;
    gap: .4rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -.01em;
    color: #1f2937;
    margin-bottom: .5rem;
}
.stat-group-total {
    font-weight: 700;
    color: #1f2937;
}
/* Boxed group: wraps a stat-strip in its own bordered, shadowed panel,
   like Hostinger's "Essentials" / "Performance" dashboard cards */
.stat-group--boxed {
    background: #fff;
    border: 1px solid #adb5bd;
    border-radius: 14px;
    box-shadow: 0 .35rem 1rem rgba(0, 0, 0, .12);
    padding: 1.1rem 1.25rem;
}
.stat-strip {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
    gap: 1px;
    background: var(--up-border);
    border: 1px solid var(--up-border);
    border-radius: 10px;
    overflow: hidden;
}
.stat-strip-item {
    background: #fff;
    padding: .5rem .45rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: .15rem;
    min-height: 58px;
}
.stat-strip-value {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
    color: #1f2937;
}
.stat-strip-label {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .85rem;
    font-weight: 500;
    color: #000;
    line-height: 1.2;
}
/* Match each work-order count's label to that status's badge color */
.text-status-pending,
.text-status-todo,
.text-status-inprogress,
.text-status-completed,
.text-status-declined {
    font-weight: 700;
}
.text-status-pending     { color: #333333; }
.text-status-todo        { color: #0d6efd; }
.text-status-inprogress  { color: #FFBF00; }
.text-status-completed   { color: #16A34A; }
.text-status-declined    { color: #dc2626; }
.stat-strip-icon {
    font-size: .8rem;
    color: #000;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .stat-strip--wo   { grid-template-columns: repeat(4, 1fr); }
    .stat-strip--acct { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   WORK ORDER FORM  (create + resubmit)
   ============================================================ */
.wo-section-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
}
.wo-form .form-control,
.wo-form .form-select {
    background-color: #f3f7f3;
}
.wo-form .form-control:focus,
.wo-form .form-select:focus {
    background-color: #fff;
}

/* ============================================================
   ATTACHMENT / PICTURE THUMBNAILS  (create + resubmit forms)
   ============================================================ */
.pic-dropzone {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .2rem .5rem;
    text-align: center;
    padding: .65rem .85rem;
    border: 1.5px dashed var(--up-border);
    border-radius: 10px;
    background: #f3f7f3;
    color: var(--up-text-muted);
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}
.pic-dropzone:hover { border-color: var(--up-green); }
.pic-dropzone.dragover {
    border-color: var(--up-green);
    background: var(--up-green-xlight);
}
.pic-dropzone i { font-size: 1.05rem; color: var(--up-green); }
.pic-dropzone .pic-dropzone-main { font-weight: 600; font-size: .85rem; color: #2b303b; }
.pic-dropzone small { font-size: .72rem; flex-basis: 100%; }

.att-remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease;
}
.att-remove-btn:hover { background: #dc2626; }
.att-remove-flag {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: .375rem;
    background: rgba(220, 38, 38, .4);
    color: #fff;
    font-weight: 600;
    font-size: .8rem;
}
.att-thumb.marked .att-thumb-media img { filter: grayscale(1); opacity: .45; }
.att-thumb.marked .att-remove-flag { display: flex; }
.att-thumb.marked .att-remove-btn { background: #16a34a; }
.att-thumb.marked .att-remove-btn:hover { background: #15803d; }
.att-new-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: #1e5f2b;
    color: #fff;
    font-size: .65rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 999px;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge.bg-success  { background-color: var(--up-green)     !important; color: #fff !important; }
.badge.bg-warning  { background-color: var(--up-gold)      !important; color: #000 !important; }
.badge.bg-primary  { background-color: var(--up-green)     !important; color: #fff !important; }
.badge.bg-info     { background-color: var(--up-green-mid) !important; color: #000 !important; }
.badge.bg-secondary { background-color: #555 !important;   color: #fff !important; }
.badge.bg-danger   { background-color: #dc2626 !important; color: #fff !important; }
.badge.bg-status-blue { background-color: #0d6efd !important; color: #fff !important; }

/* Role badges */
.badge.role-super  { background: var(--up-dark-teal); color: #fff; }
.badge.role-admin1 { background: #555; color: #fff; }
.badge.role-admin2 { background: #555; color: #fff; }
.badge.role-user   { background: #555; color: #fff; }

/* Verified badges */
.badge-verified   { background: var(--up-green); color: #fff; }
.badge-unverified { background: #555; color: #fff; }

/* Topbar role badge */
.topbar-role-badge {
    font-size: .68rem;
    padding: .28rem .65rem;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: .02em;
    background: #000;
    color: #fff;
}

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline { padding-left: 1.5rem; position: relative; }
.tl-item { position: relative; margin-bottom: 1.75rem; }
.tl-item:last-child { margin-bottom: 0; }
/* Connector line only between items: nothing after the final entry */
.tl-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: calc(-1.35rem + 6px);
    top: .4rem;
    bottom: -1.75rem;
    width: 2px;
    background: var(--up-border);
}
.tl-dot {
    position: absolute;
    left: -1.35rem; top: .3rem;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #555;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #555;
}
.tl-dot.done   { background: var(--up-dark-teal); box-shadow: 0 0 0 2px var(--up-dark-teal); }
.tl-dot.reject { background: #dc2626; box-shadow: 0 0 0 2px #dc2626; }

/* ============================================================
   CARDS & TABLES
   ============================================================ */
.card { border-radius: 12px; border: 1px solid var(--up-border); }
.card-header {
    background: #fff;
    border-bottom: 1px solid var(--up-border);
    border-radius: 12px 12px 0 0 !important;
    padding: .9rem 1.25rem;
}

.table thead th {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #000;
    font-weight: 700;
    border-bottom: 2px solid var(--up-border);
    background: #fafbfa;
}
.table-hover tbody tr:hover { background: var(--up-green-xlight); }

/* ============================================================
   DIRECTOR DASHBOARD: SLSU forest green, white, and yellow
   ============================================================ */
.director-dashboard {
    --director-green: #006837;
    --director-yellow: #fff200;
    --director-ink: #123b2a;
}
.director-dashboard .director-hero {
    background: #006837;
    border-radius: 18px;
    padding: 1.65rem 1.75rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    box-shadow: 0 12px 30px rgba(0, 104, 55, .18);
}
.director-dashboard .director-eyebrow {
    color: #fff200;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .13em;
    margin-bottom: .4rem;
}
.director-dashboard .director-hero h1 {
    color: #fff;
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 750;
    letter-spacing: -.03em;
    margin: 0;
}
.director-dashboard .director-hero p {
    color: rgba(255,255,255,.85) !important;
    margin-top: .35rem !important;
    font-size: .86rem;
}
.director-dashboard .director-hero-action {
    background: #fff200;
    border: 1px solid #fff200;
    border-radius: 9px;
    color: #006837;
    font-weight: 750;
    padding: .65rem 1rem;
    white-space: nowrap;
}
.director-dashboard .director-hero-action:hover {
    background: #fff;
    border-color: #fff;
    color: #006837;
}
.director-dashboard .director-stat-card,
.director-dashboard .director-panel {
    border: 0;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(0,104,55,.05);
}
.director-dashboard .director-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0,104,55,.12);
}
.director-dashboard .director-stat-card .stat-icon,
.director-dashboard .stat-icon.green,
.director-dashboard .stat-icon.teal,
.director-dashboard .stat-icon.gold,
.director-dashboard .stat-icon.yellow,
.director-dashboard .stat-icon.gray,
.director-dashboard .stat-icon.red,
.director-dashboard .stat-icon.blue {
    background: #fff;
    color: #006837;
    border: 0;
    border-radius: 50%;
}
.director-dashboard .director-panel .card-header {
    color: #000;
    font-weight: 750 !important;
    border-bottom-color: rgba(0,104,55,.12);
}
.director-dashboard .director-panel .card-header i {
    color: #006837;
}
.director-dashboard .director-activity-icon { color: #006837 !important; }
.director-dashboard .director-panel .table thead th {
    background: #fff;
    color: #000;
    border-bottom-color: rgba(0,104,55,.18);
}
.director-dashboard .director-panel .table-hover tbody tr:hover { background: rgba(255,242,0,.14); }
.director-dashboard .progress-bar { background-color: #006837 !important; }
.director-dashboard .btn-primary { background-color: #006837 !important; border-color: #006837 !important; color: #fff !important; }
.director-dashboard .btn-outline-secondary { border-color: #006837; color: #006837; }
.director-dashboard .btn-outline-secondary:hover { background: #006837; border-color: #006837; color: #fff; }

@media (max-width: 575.98px) {
    .director-dashboard .director-hero { align-items: flex-start; flex-direction: column; padding: 1.35rem; }
    .director-dashboard .director-hero-action { width: 100%; }
}

/* ============================================================
   SIDEBAR BACKDROP (mobile)
   ============================================================ */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1039;
}
.sidebar-backdrop.show { display: block; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-wrap { margin-left: 0; }
    .topbar-shell { left: 0; }
    .notif-dropdown { right: .5rem; width: 320px; }
}

@media print {
    .sidebar, .topbar-shell, .btn, .no-print { display: none !important; }
    .main-wrap { margin-left: 0; padding-top: 0; }
}

/* ============================================================
   PROFILE AVATAR
   ============================================================ */
.profile-avatar-wrap {
    position: relative;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-block;
    flex-shrink: 0;
}
.profile-avatar-img {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--up-green-light);
    display: block;
}
.profile-avatar-initial {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    font-size: 1.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--up-green-light);
    user-select: none;
}
.profile-avatar-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0,0,0,.6);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: .58rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.1;
    opacity: 0;
    transition: opacity .2s ease;
    pointer-events: none;
}
.profile-avatar-overlay .bi { font-size: 1.1rem; }
.profile-avatar-wrap:hover .profile-avatar-overlay { opacity: 1; }

/* ============================================================
   SIDEBAR AVATAR: photo variant
   ============================================================ */
.sidebar-avatar-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none;
}
.sidebar-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,.25);
    display: block;
    transition: border-color .15s;
}
.sidebar-avatar-wrap:hover .sidebar-avatar-img { border-color: #fff; }

/* ============================================================
   HOSTING-PANEL STYLE CARD (Update Work Order page)
   ============================================================ */
.hcard {
    background: #fff;
    border: 1px solid var(--up-border);
    border-radius: 16px;
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .06);
    padding: 1.5rem;
}
.hcard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.hcard-title {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}
.hcard-title .bi {
    color: #000;
}
.hcard-badge {
    background: var(--up-green-light);
    color: var(--up-green);
    font-size: .72rem;
    font-weight: 700;
    padding: .3rem .7rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .02em;
}
.hcard-action {
    margin-left: auto;
}
.hcard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.1rem 1.75rem;
}
.hcard-grid .hcard-label {
    display: block;
    font-size: .78rem;
    color: var(--up-text-muted);
    font-weight: 500;
    margin-bottom: .25rem;
}
.hcard-grid .hcard-value {
    display: block;
    font-size: .95rem;
    font-weight: 600;
    color: #1f2937;
}
.hcard-grid-full {
    grid-column: 1 / -1;
}

/* ============================================================
   WORK ORDER STATUS STEPPER (4-step)
   ============================================================ */
.wo-status-card {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================
   WORK ORDER DOCUMENT LAYOUT (view and update)
   ============================================================ */
.wo-doc {
    background: #fff;
    border: 1px solid var(--up-border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .05);
    max-width: 1180px;
    margin: 0 auto 1.5rem;
    padding: 1.5rem 1.75rem 1.75rem;
}
.wo-doc-head {
    padding-bottom: .5rem;
    margin-bottom: 1rem;
}
.wo-doc-title {
    font-size: 2.10rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 .4rem;
    line-height: 1.25;
}
.wo-doc-sub {
    font-size: 1.15rem;
    color: var(--up-text-muted);
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
.wo-doc-sub code { font-size: 1.15rem; color: #1a1a1a; }

.wo-doc-group {
    background: #fff;
    border: 1px solid var(--up-border);
    border-radius: 16px;
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .06);
    padding: 1.5rem 1.5rem .25rem;
    margin-bottom: 1.25rem;
}
.wo-doc-group:last-of-type { margin-bottom: 1.1rem; }
.wo-doc-section { margin-bottom: 1.1rem; }
.wo-doc-section:last-child { margin-bottom: 0; }
.wo-doc-section-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--up-dark-teal);
    text-align: left;
    margin-bottom: .75rem;
}
.wo-doc-grid {
    display: grid;
    grid-template-columns: minmax(150px, max-content) 1fr;
    gap: 0;
    font-size: 1rem;
    margin: 0;
}
.wo-doc-grid.wo-doc-grid--2col {
    grid-template-columns: minmax(150px, max-content) 1fr minmax(150px, max-content) 1fr;
}
.wo-doc-grid dt {
    color: var(--up-text-muted);
    font-weight: 500;
    font-size: .78rem;
    align-self: stretch;
    display: flex;
    align-items: center;
    padding: .5rem .75rem .5rem 0;
}
.wo-doc-grid dd {
    margin: 0;
    min-width: 0;
    color: #1a1a1a;
    font-weight: 600;
    font-size: .95rem;
    text-align: right;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: .5rem 0 .5rem .75rem;
    overflow-wrap: anywhere;
}
.wo-doc-grid dd code {
    font: inherit;
    color: inherit !important;
}
.wo-doc-subhead {
    font-size: 1.40rem;
    font-weight: 500;
    color: var(--up-text-muted);
    margin: 1rem 0 .3rem;
}
.wo-doc-prose {
    font-size: 1rem;
    line-height: 1.55;
    color: #1a1a1a;
    white-space: pre-wrap;
    word-break: break-word;
    background: #f0f5f1;
    border-radius: 8px;
    padding: .75rem 1rem;
    max-height: 220px;
    overflow-y: auto;
}
.wo-doc-media-box {
    background: #f0f5f1;
    border-radius: 8px;
    padding: 1rem;
}
.wo-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 2px;
    background: #b9c2bc;
    border: 1px solid #b9c2bc;
    border-radius: 6px;
    overflow: hidden;
}
.wo-photo-grid-item {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fff;
}
.wo-photo-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .2s ease;
}
.wo-photo-grid-item:hover img {
    transform: scale(1.06);
}
.wo-photo-grid-item.wo-photo-grid-file {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--up-text-muted);
    font-size: 1.6rem;
    text-decoration: none;
}
.wo-doc-foot {
    border-top: 1px solid var(--up-border);
    margin-top: 1rem;
    padding-top: .6rem;
    font-size: .85rem;
    color: var(--up-text-muted);
    text-align: center;
}
@media (max-width: 767.98px) {
    .wo-doc { padding: 1.5rem 1.25rem; }
    .wo-doc-grid,
    .wo-doc-grid.wo-doc-grid--2col {
        grid-template-columns: minmax(120px, max-content) 1fr;
    }
}
/* Keep the edit-page forms aligned to the same column as the document */
.wo-doc ~ .card { max-width: 1180px; margin-left: auto; margin-right: auto; }

/* Soft-gray fill on editable inputs (assign, office action, update status),
   turning white on focus: signals "editable" and sets them apart from the
   green read-only value boxes above. */
.wo-input-soft .form-control,
.wo-input-soft .form-select {
    background-color: #f4f6f5;
    border-color: #c7d2cb;
    font-size: .95rem;
}
.wo-input-soft .form-control:focus,
.wo-input-soft .form-select:focus {
    background-color: #fff;
    border-color: var(--up-green);
    box-shadow: 0 0 0 .2rem rgba(70, 119, 80, .15);
}
/* Match the Work Order Details card's label size */
.wo-input-soft .form-label {
    font-size: .78rem;
}

/* Frosted-glass action bar (Update / Export) that reads as extending in from the right edge */
.topbar-glass {
    display: inline-flex;
    align-items: stretch;
    gap: .25rem;
    padding: .4rem .85rem;
    background: linear-gradient(150deg, rgba(70, 119, 80, 0.2), rgba(70, 119, 80, 0.08));
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid rgba(70, 119, 80, 0.55);
    border-radius: 14px;
    box-shadow:
        0 6px 18px rgba(15, 23, 42, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}
/* Work-order header. Pinned below the fixed topbar while the page scrolls.
   Same layout at every screen size: back button left · status card centred ·
   a single "more actions" menu button flush right. */
.wo-topbar {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: sticky;
    top: calc(var(--up-topbar-h) + .75rem);
    z-index: 1020;
}
.wo-topbar .back-nav { margin-bottom: 0; }
/* Its children (the retired labelled pill + the menu button) become direct
   flex items of .wo-topbar, so the status card can centre between them. */
.wo-topbar-actions { display: contents; }
.wo-status-glass,
.topbar-glass { transition: padding .2s ease, box-shadow .2s ease; }

/* The labelled action pill has been replaced by the "more actions" menu
   button everywhere, for a consistent look across screen sizes. */
.wo-topbar-actions .topbar-glass { display: none; }

.wo-topbar > .wo-status-glass {
    margin-left: auto;
    margin-right: auto;
}

/* Once the header sticks, collapse the stepper away (height AND width) so the
   status pill shrink-wraps to just the % and badge, identical padding/size at
   every screen width, so condensed looks the same on desktop and mobile. */
.wo-topbar.is-stuck .wo-stepper {
    max-height: 0;
    max-width: 0;
    opacity: 0;
    margin-top: 0;
    margin-bottom: 0;
    overflow: hidden;
}
.wo-topbar.is-stuck .wo-status-glass {
    padding: .3rem .85rem;
}
.wo-topbar.is-stuck .wo-status-glass .text-center {
    margin-top: 0 !important;
    white-space: nowrap;
}
.wo-topbar.is-stuck { gap: .5rem; }
.wo-topbar.is-stuck .wo-status-glass,
.wo-topbar.is-stuck .glass-circle-btn {
    box-shadow: 0 10px 24px -12px rgba(15, 23, 42, 0.45);
}

@media (max-width: 767.98px) {
    /* Small screens: one row: back button, status card (fills the middle),
       the "more actions" menu button. */
    .wo-topbar {
        position: sticky;
        top: calc(var(--up-topbar-h) + .5rem);
        z-index: 1020;
        flex-wrap: nowrap;
        gap: .5rem;
        transition: gap .2s ease;
    }
    .wo-topbar > .back-nav,
    .wo-topbar > .wo-actions-toggle {
        flex-shrink: 0;
    }
    /* Shrink-wrap to content and let the shared margin-left/right: auto rule
       (set above, unscoped) centre it between the back and menu buttons,
       exactly the same mechanism desktop uses, so it's centred here too. */
    .wo-topbar > .wo-status-glass {
        min-width: 0;
        align-items: center;
        padding: .7rem .75rem .4rem;
    }

    /* max-width: 100% only: no overflow clipping here. Clipping (even just
       on one axis) would crop the active step's glow ring, which extends a
       few pixels past the circle itself. A step row that's occasionally a
       little tight on a very small phone is a smaller issue than that. */
    .wo-stepper { max-width: 100%; }
}
/* Circular frosted-glass button (back arrow): same glass as .topbar-glass */
.glass-circle-btn {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--up-green);
    font-size: 1.05rem;
    text-decoration: none;
    cursor: pointer;
    padding: 0;
    background: linear-gradient(150deg, rgba(70, 119, 80, 0.2), rgba(70, 119, 80, 0.08));
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid rgba(70, 119, 80, 0.55);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .2s ease;
}
.glass-circle-btn:hover,
.glass-circle-btn:focus {
    background: var(--up-dark-teal);
    border-color: var(--up-dark-teal);
    color: #fff;
}
.glass-circle-btn--danger {
    color: #b02a37;
    background: linear-gradient(150deg, rgba(176, 42, 55, 0.18), rgba(176, 42, 55, 0.07));
    border-color: rgba(176, 42, 55, 0.55);
}
.glass-circle-btn--danger:hover,
.glass-circle-btn--danger:focus {
    background: #b02a37;
    border-color: #b02a37;
    color: #fff;
}
.glass-circle-btn:disabled,
.glass-circle-btn[disabled] {
    opacity: .4;
    pointer-events: none;
}

/* Row of standalone circle buttons in a page header (top-right) */
.topbar-glass-row {
    display: inline-flex;
    align-items: flex-start;
    gap: .65rem;
    flex-wrap: wrap;
}
.icon-label-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    text-decoration: none;
    color: inherit;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
}
.icon-label-text {
    font-size: .68rem;
    font-weight: 600;
    color: var(--up-green);
    line-height: 1;
    white-space: nowrap;
}
.icon-label-btn:has(.glass-circle-btn--danger) .icon-label-text {
    color: #b02a37;
}
.topbar-glass-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 0 .35rem;
    color: var(--up-green);
    line-height: 1;
    text-decoration: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
}
.topbar-glass-btn .tg-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.05rem;
    transition: background-color .15s ease, color .15s ease;
}
.topbar-glass-btn:hover .tg-icon,
.topbar-glass-btn:focus .tg-icon {
    background: var(--up-green);
    color: #fff;
}
.topbar-glass-btn .tg-label {
    font-size: .66rem;
    font-weight: 600;
}
/* Destructive action in the pill (Clear All) */
.topbar-glass-btn--danger { color: #b02a37; }
.topbar-glass-btn--danger:hover .tg-icon,
.topbar-glass-btn--danger:focus .tg-icon {
    background: #b02a37;
    color: #fff;
}
/* Highlighted call-to-action button in the action pill (requester "Confirm") */
.topbar-glass-btn--cta .tg-icon {
    background: var(--up-green);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(70, 119, 80, .35);
}
.topbar-glass-btn--cta:hover .tg-icon,
.topbar-glass-btn--cta:focus .tg-icon {
    background: #164821;
    color: #fff;
}
.topbar-glass-btn--cta .tg-label { color: var(--up-green); }

/* "More actions" (3-dot) menus: dark teal card, white text, visible hover.
   Uses Bootstrap 5's dropdown CSS variables so every state (hover, active,
   the border, the divider) stays consistent automatically. */
.dropdown-menu {
    --bs-dropdown-bg: var(--up-dark-teal);
    --bs-dropdown-border-color: var(--up-dark-teal);
    --bs-dropdown-link-color: #fff;
    --bs-dropdown-link-hover-color: #fff;
    --bs-dropdown-link-hover-bg: rgba(255, 255, 255, .18);
    --bs-dropdown-link-active-color: #fff;
    --bs-dropdown-link-active-bg: rgba(255, 255, 255, .28);
    --bs-dropdown-divider-bg: rgba(255, 255, 255, .25);
}
.dropdown-menu .dropdown-item i {
    color: inherit;
}
/* Keep "Delete" items white too (icon + label already signal danger) instead
   of Bootstrap's red utility text, which would fight the dark teal card. */
.dropdown-menu .dropdown-item.text-danger {
    color: #fff !important;
}

/* Table row actions: plain icon, no box, dark teal, circular hover.
   Same class for the "more actions" (3-dot) trigger and any lone action
   button (e.g. a table row with only a View action), so every action in
   every table reads the same regardless of how many actions it opens. */
.row-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--up-dark-teal);
    border-radius: 50%;
    font-size: 1.05rem;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.row-action-btn:hover,
.row-action-btn:focus {
    background-color: var(--up-dark-teal);
    color: #fff;
}

/* Small dot on the 3-dot trigger flagging a work order ready to confirm completion */
.row-action-flag {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--up-green);
    border: 1.5px solid #fff;
    pointer-events: none;
}

/* "View All" card-header link: rounder pill, dark teal on hover */
.view-all-btn {
    border-radius: 50rem;
}
.view-all-btn:hover,
.view-all-btn:focus {
    background-color: var(--up-dark-teal);
    border-color: var(--up-dark-teal);
    color: #fff;
}

/* Underline-style filter tabs (e.g. Request Count By Category) */
.org-tab-filter {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    border-bottom: 1px solid #dee2e6;
}
.org-tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: .4rem .1rem .5rem;
    font-size: .85rem;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease;
}
.org-tab-btn:hover {
    color: var(--up-dark-teal);
}
.org-tab-btn.active {
    color: var(--up-dark-teal);
    border-bottom-color: var(--up-dark-teal);
}

/* Frosted-glass modal (e.g. Confirm Completion) */
.modal-glass {
    background: linear-gradient(150deg, rgba(255, 255, 255, .8), rgba(255, 255, 255, .62));
    -webkit-backdrop-filter: blur(24px) saturate(170%);
    backdrop-filter: blur(24px) saturate(170%);
    border: 1px solid #6c757d;
    border-radius: 18px;
    box-shadow:
        0 24px 60px rgba(15, 23, 42, .28),
        inset 0 1px 0 rgba(255, 255, 255, .65);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .modal-glass { background: rgba(255, 255, 255, .96); }
}

/* Work-order status container: same glass treatment as .topbar-glass,
   shrink-wrapped around the stepper and centered in the top row. */
.wo-status-glass {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: .8rem 1.5rem .5rem;
    background: linear-gradient(150deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.07));
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid rgba(0, 0, 0, 0.55);
    border-radius: 14px;
    box-shadow:
        0 6px 18px rgba(15, 23, 42, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.wo-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 440px;
    max-height: 120px;
    margin-left: auto;
    margin-right: auto;
    transition: max-height .22s ease, max-width .22s ease, opacity .18s ease, margin .22s ease;
}
.wo-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.wo-step-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    color: #7a857e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border: 2px solid #9aa8a0;
    transition: background .2s, color .2s, border-color .2s;
}
.wo-step.active .wo-step-circle {
    background: var(--up-dark-teal);
    color: #fff;
    border-color: var(--up-dark-teal);
    box-shadow: 0 0 0 4px rgba(70,119,80,.55);
}
.wo-step.done .wo-step-circle {
    background: var(--up-dark-teal);
    color: #fff;
    border-color: var(--up-dark-teal);
}
.wo-step-label {
    font-size: .66rem;
    font-weight: 600;
    color: #5f6b64;
    white-space: nowrap;
    text-align: center;
}
.wo-step.active .wo-step-label { color: var(--up-dark-teal); }
.wo-step.done .wo-step-label   { color: var(--up-dark-teal); }

.wo-step-line {
    flex: 1;
    height: 2px;
    background: #9aa8a0;
    margin-bottom: 16px;
    min-width: 16px;
    transition: background .2s;
}
.wo-step-line.done { background: var(--up-dark-teal); }

@media (max-width: 575.98px) {
    .wo-step-circle { width: 30px; height: 30px; font-size: .8rem; }
    .wo-step-label  { font-size: .58rem; }
}

/* ============================================================
   WORK TASKS: one auto-saving row per task
   ============================================================ */
.wo-tasks {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}
.wo-task {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.wo-task .task-num {
    flex-shrink: 0;
    min-width: 20px;
    font-size: .78rem;
    font-weight: 700;
    color: #8a8f8a;
    text-align: right;
}
.wo-task .task-label-input {
    flex: 1 1 auto;
    min-width: 0;
}
.wo-task .task-label-input:focus {
    border-color: var(--up-green);
    box-shadow: 0 0 0 .18rem rgba(70, 119, 80, .15);
}
.wo-task.is-done .task-label-input {
    text-decoration: line-through;
    color: #8a8f8a;
    background: #f0fdf4;
    border-color: #cbe4d3;
}
.wo-task .done-at {
    flex-shrink: 0;
    font-size: .72rem;
    white-space: nowrap;
    color: #8a8f8a;
}
.wo-task .task-toggle-btn {
    flex-shrink: 0;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}
.wo-task .task-toggle-btn:disabled {
    opacity: .4;
    cursor: default;
}
.wo-task .remove-task-btn {
    flex-shrink: 0;
    line-height: 1;
    font-size: .8rem;
}
