/* ================================================================
   owlops-master.css  —  OwlOps Master Design System
   Comprehensive design system for all OwlOps UI pages.

   LOAD ORDER:
     1. owlops-master.css  (this file — loaded globally by MasterPage)
     2. Page-specific stylesheet if needed (e.g., TaskUpdateOptionD.css)

   PREFIX CONVENTIONS:
     oo-   shared utility / design system (this file)
     tu-d- task update page-specific components (TaskUpdateOptionD.css)
     [xx-] new page-specific prefixes belong in that page's own CSS file
   ================================================================ */


/* ================================================================
   SECTION 1: DESIGN TOKENS
   ================================================================ */

:root {

    /* ── Brand — Orange (primary) ─────────────────────────────── */
    --oo-orange:         #F26722;
    --oo-orange-dark:    #d45a1a;
    --oo-orange-light:   #fff3ed;
    --oo-orange-mid:     #fed7aa;

    /* ── Brand — Blue (secondary/links) ──────────────────────── */
    --oo-blue:           #1a5499;
    --oo-blue-dark:      #154480;
    --oo-blue-light:     #e8f0fb;

    /* ── Nav default ─────────────────────────────────────────── */
    --oo-nav-bg:         #111111;

    /* ── Semantic — Success ───────────────────────────────────── */
    --oo-green:          #1b7e34;
    --oo-green-dark:     #166b2b;
    --oo-green-light:    #f0fdf4;

    /* ── Semantic — Danger ────────────────────────────────────── */
    --oo-red:            #dc2626;
    --oo-red-dark:       #b91c1c;
    --oo-red-light:      #fff1f1;

    /* ── Semantic — Warning ───────────────────────────────────── */
    --oo-yellow:         #d97706;
    --oo-yellow-light:   #fff7ed;

    /* ── Semantic — Purple (hold / sign-off) ─────────────────── */
    --oo-purple:         #7c3aed;
    --oo-purple-light:   #f5f3ff;

    /* ── Semantic — Teal (approval) ──────────────────────────── */
    --oo-teal:           #00897b;
    --oo-teal-light:     #f0fdfa;

    /* ── Surfaces & backgrounds ──────────────────────────────── */
    --oo-bg:             #ffffff;
    --oo-surface:        #fff;
    --oo-surface-2:      #f8fafc;

    /* ── Borders ─────────────────────────────────────────────── */
    --oo-border:         #ced0d7;
    --oo-border-light:   #e4e7ed;
    --oo-border-subtle:  #e2e8f0;

    /* ── Text ────────────────────────────────────────────────── */
    --oo-text:           #111827;
    --oo-text-secondary: #374151;
    --oo-text-muted:     #6b7280;
    --oo-text-faint:     #9ca3af;
    --oo-text-label:     #64748b;

    /* ── Shape & shadow ──────────────────────────────────────── */
    --oo-radius-card:    12px;
    --oo-radius-input:   8px;
    --oo-shadow-card:    0 1px 3px rgba(0,0,0,.04), 0 4px 14px rgba(0,0,0,.06);
    --oo-shadow-sm:      0 1px 4px rgba(0,0,0,.08);
    --oo-shadow-md:      0 4px 16px rgba(0,0,0,.10);
    --oo-shadow-lg:      0 8px 32px rgba(0,0,0,.12);
    --oo-focus-ring:     0 0 0 3px rgba(242,103,34,.15);
    --oo-focus-ring-blue: 0 0 0 3px rgba(26,84,153,.10);

    /* ── Spacing ─────────────────────────────────────────────── */
    --oo-space-xs:       4px;
    --oo-space-sm:       8px;
    --oo-space-md:       14px;
    --oo-space-lg:       20px;
    --oo-space-xl:       32px;

    /* ── Transitions ─────────────────────────────────────────── */
    --oo-transition:     .15s ease;
}


/* ================================================================
   SECTION 2: BASE
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; }

/*
 * DO NOT add overflow-x: hidden to html or body.
 * When set on the root element, browsers treat it as overflow-x: auto which
 * creates a scroll container — this clips absolutely-positioned navbar dropdowns
 * that extend beyond the viewport edge (e.g. the Setup menu on narrow pages).
 */
html { /* overflow-x intentionally omitted */ }

body {
    background-color: var(--oo-bg) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--oo-text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    /* overflow-x intentionally omitted — see html note above */
}


/* ================================================================
   SECTION 3: PAGE WRAPPERS
   ================================================================ */

/* Standard wrap — task detail, task update, form pages */
.oo-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 12px 14px 90px;
}
@media(min-width: 600px) { .oo-wrap { padding: 20px 20px 80px; } }

/* Wide wrap — dashboard, report pages */
.oo-wrap-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 14px 80px;
}
@media(min-width: 600px) { .oo-wrap-wide { padding: 20px 20px 80px; } }

/* Full width — admin pages */
.oo-wrap-full {
    max-width: none;
    margin: 0;
    padding: 12px 16px 80px;
}
@media(min-width: 600px) { .oo-wrap-full { padding: 20px 24px 80px; } }


/* ================================================================
   SECTION 4: CARD BASE
   ================================================================ */

.oo-card {
    background: var(--oo-surface);
    border: 1px solid var(--oo-border);
    border-radius: var(--oo-radius-card);
    box-shadow: var(--oo-shadow-card);
    margin-bottom: 10px;
    transition: box-shadow .17s, border-color .17s;
}
.oo-card:focus-within {
    box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 6px 22px rgba(242,103,34,.13);
    border-color: rgba(242,103,34,.35);
}

.oo-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--oo-border-light);
}

.oo-card-body { padding: 14px 16px; }

.oo-card-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--oo-border-light);
    background: var(--oo-surface-2);
}

/* Orange accent top border — primary brand highlight */
.oo-card-accent { border-top: 3px solid var(--oo-orange); }

/* Blue accent top border */
.oo-card-accent-blue { border-top: 3px solid var(--oo-blue); }


/* ================================================================
   SECTION 5: PAGE HEADER
   ================================================================ */

.oo-page-header {
    padding: 14px 0 12px;
    margin-bottom: 10px;
    border-left: 4px solid var(--oo-orange);
    padding-left: 14px;
}

.oo-page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--oo-text);
    line-height: 1.2;
    margin: 0 0 2px;
}

.oo-page-subtitle {
    font-size: 12px;
    color: var(--oo-text-muted);
    margin: 0;
}

.oo-page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}


/* ================================================================
   SECTION 6: BREADCRUMB
   ================================================================ */

.oo-breadcrumb {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
    margin: 0 0 6px;
    padding: 0;
    flex-wrap: wrap;
}

.oo-breadcrumb li {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--oo-text-muted);
}

.oo-breadcrumb li a {
    color: var(--oo-blue);
    text-decoration: none;
}
.oo-breadcrumb li a:hover { text-decoration: underline; }

.oo-breadcrumb li::after {
    content: '/';
    color: var(--oo-border);
    font-size: 10px;
}
.oo-breadcrumb li:last-child::after { display: none; }
.oo-breadcrumb li:last-child { color: var(--oo-text-secondary); font-weight: 500; }


/* ================================================================
   SECTION 7: SECTION HEADERS
   ================================================================ */

.oo-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.oo-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--oo-text-secondary);
    padding-left: 8px;
    border-left: 3px solid var(--oo-orange);
    line-height: 1.3;
}


/* ================================================================
   SECTION 8: BUTTONS
   ================================================================ */

/* Base button reset — applied to base class AND all variants so CssClass="oo-btn-primary" works alone */
.oo-btn,
.oo-btn-primary,
.oo-btn-outline,
.oo-btn-ghost,
.oo-btn-danger,
.oo-btn-secondary,
.oo-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
    padding: 0 18px;
    border-radius: var(--oo-radius-input);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none !important;
    transition: background var(--oo-transition), opacity var(--oo-transition), box-shadow var(--oo-transition);
    white-space: nowrap;
    letter-spacing: .1px;
    font-family: inherit;
    line-height: 1;
    box-sizing: border-box;
    vertical-align: middle;
}
.oo-btn:disabled,
.oo-btn-primary:disabled,
.oo-btn-outline:disabled,
.oo-btn-ghost:disabled,
.oo-btn-danger:disabled,
.oo-btn-secondary:disabled { opacity: .55; cursor: not-allowed; }

/* Primary — orange */
.oo-btn-primary {
    background: var(--oo-orange) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(242,103,34,.25);
}
.oo-btn-primary:hover:not(:disabled) {
    background: var(--oo-orange-dark) !important;
    box-shadow: 0 4px 12px rgba(242,103,34,.30);
}

/* Outline — orange border */
.oo-btn-outline {
    background: transparent !important;
    color: var(--oo-orange) !important;
    border: 1.5px solid var(--oo-orange) !important;
}
.oo-btn-outline:hover:not(:disabled) {
    background: var(--oo-orange-light) !important;
}

/* Save (green) */
.oo-btn-save {
    flex: 1;
    height: 44px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: var(--oo-radius-input) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-align: center !important;
    cursor: pointer;
    letter-spacing: .2px;
    transition: background var(--oo-transition), opacity var(--oo-transition);
    order: 2;
    background: var(--oo-green) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(27,126,52,.28);
}
.oo-btn-save:hover:not(:disabled) { background: var(--oo-green-dark) !important; }
/* Active "saving" state — prevents double-submits */
.oo-btn-save.oo-btn-saving {
    opacity: .6 !important;
    cursor: wait !important;
    pointer-events: none;
}

/* Cancel (red) */
.oo-btn-cancel {
    flex: 1;
    height: 44px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: var(--oo-radius-input) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-align: center !important;
    cursor: pointer;
    letter-spacing: .2px;
    transition: background var(--oo-transition), opacity var(--oo-transition);
    order: 1;
    background: var(--oo-red) !important;
    color: #fff !important;
    border: none !important;
}
.oo-btn-cancel:hover:not(:disabled) { background: var(--oo-red-dark) !important; }

.oo-btn-save:disabled,
.oo-btn-cancel:disabled { opacity: .6; cursor: not-allowed; }

/* Ghost — no border, subtle hover */
.oo-btn-ghost {
    background: transparent !important;
    color: var(--oo-text-muted) !important;
    border: none !important;
    box-shadow: none !important;
}
.oo-btn-ghost:hover:not(:disabled) {
    background: var(--oo-surface-2) !important;
    color: var(--oo-text-secondary) !important;
}

/* Small variant */
.oo-btn-sm {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 32px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    text-decoration: none !important;
    vertical-align: middle;
    box-sizing: border-box;
}

/* Icon-only square */
.oo-btn-icon {
    width: 36px;
    height: 36px;
    padding: 0 !important;
    border-radius: 8px !important;
}

/* Blue secondary button */
.oo-btn-secondary {
    background: var(--oo-blue) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(26,84,153,.2);
}
.oo-btn-secondary:hover:not(:disabled) { background: var(--oo-blue-dark) !important; }

/* Danger button */
.oo-btn-danger {
    background: var(--oo-red) !important;
    color: #fff !important;
}
.oo-btn-danger:hover:not(:disabled) { background: var(--oo-red-dark) !important; }


/* ================================================================
   SECTION 9: SAVE BAR
   ================================================================ */

.oo-save-bar {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
}


/* ================================================================
   SECTION 9b: ADMIN SUB-NAVIGATION
   ================================================================ */

/* ── Wrapper ── */
.oo-admin-subnav-wrap {
    position: relative;
    margin-bottom: 16px;
}

/* ── Mobile toggle button (hidden on desktop) ── */
.oo-admin-subnav-toggle {
    display: none;
}

/* ── Tab list ── */
.oo-admin-subnav {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: 2px solid var(--oo-border-light);
}
.oo-admin-subnav::-webkit-scrollbar { display: none; }
.oo-admin-subnav li { flex-shrink: 0; }
.oo-admin-subnav li a,
.oo-admin-subnav li a:visited {
    display: block;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--oo-text-muted);
    text-decoration: none !important;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
}
.oo-admin-subnav li a:hover,
.oo-admin-subnav li a:focus { color: var(--oo-text); text-decoration: none !important; }
.oo-admin-subnav li.active a {
    color: var(--oo-orange);
    font-weight: 600;
    border-bottom-color: var(--oo-orange);
}

/* ── Mobile: collapse to dropdown ── */
@media (max-width: 767px) {
    .oo-admin-subnav-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 10px 14px;
        background: var(--oo-surface);
        border: 1px solid var(--oo-border-light);
        border-radius: var(--oo-radius-input);
        font-size: 13px;
        font-weight: 600;
        color: var(--oo-text);
        cursor: pointer;
        box-shadow: var(--oo-shadow-sm);
    }
    .oo-admin-subnav-toggle i {
        font-size: 11px;
        color: var(--oo-text-muted);
        transition: transform .2s ease;
    }
    .oo-admin-subnav-wrap.open .oo-admin-subnav-toggle i {
        transform: rotate(180deg);
    }

    .oo-admin-subnav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 4px);
        left: 0;
        right: 0;
        background: var(--oo-surface);
        border: 1px solid var(--oo-border-light);
        border-radius: 8px;
        box-shadow: var(--oo-shadow-sm);
        z-index: 200;
        border-bottom: none;
        overflow: hidden;
    }
    .oo-admin-subnav-wrap.open .oo-admin-subnav {
        display: flex;
    }
    .oo-admin-subnav li { flex-shrink: unset; }
    .oo-admin-subnav li a,
    .oo-admin-subnav li a:visited {
        border-bottom: none;
        border-left: 3px solid transparent;
        margin-bottom: 0;
        padding: 11px 14px;
    }
    .oo-admin-subnav li + li {
        border-top: 1px solid var(--oo-border-light);
    }
    .oo-admin-subnav li.active a {
        border-bottom: none;
        border-left-color: var(--oo-orange);
        background: var(--oo-orange-light);
    }
}


/* ================================================================
   SECTION 9c: FORM HELPER COMPONENTS
   Reusable inside any oo-card or oo-details-strip.
   ================================================================ */

/* ── Inline status / validation message ── */
.oo-status-msg {
    display: block;
    padding: 10px 16px;
    margin: 12px 0;
    border-radius: var(--oo-radius-input);
    background: var(--oo-green-light);
    border: 1px solid var(--oo-green);
    color: var(--oo-green);
    font-weight: 500;
    font-size: 14px;
}
.oo-status-error {
    background: var(--oo-red-light);
    border-color: var(--oo-red);
    color: var(--oo-red);
}

/* ── Lightweight sub-section divider label ── */
.oo-section-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--oo-text);
    padding: 10px 14px 6px;
}
.oo-section-label:first-child { margin-top: 0; }

/* ── Inline hint beside a section label (lighter, smaller) ── */
.oo-section-hint {
    font-size: 11px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--oo-text-faint);
    margin-left: 6px;
}

/* ── Section description (sits below a label or section header) ── */
.oo-section-desc {
    font-size: 12px;
    color: var(--oo-text-muted);
    margin: 0 0 10px;
}

/* ── Toggle switch row (switch + label span) ── */
.oo-toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
}
.oo-toggle-row span {
    font-size: 13px;
    color: var(--oo-text);
}
input:disabled + .slider { opacity: 0.55; cursor: default; }
/* Compact toggle size for oo-toggle-row contexts */
.oo-toggle-row .switch { width: 36px; height: 20px; }
.oo-toggle-row .switch input { opacity: 0; width: 0; height: 0; }
.oo-toggle-row .slider:before { height: 14px; width: 14px; left: 3px; bottom: 3px; }
.oo-toggle-row input:checked + .slider:before { transform: translateX(16px); }

/* asp:CheckBox sometimes renders as <span><input/></span>, which breaks the
   adjacent-sibling selectors above (input is no longer a direct sibling of
   .slider). Use :has() so the parent .switch matches whenever an input
   inside it is :checked, regardless of whether the input is wrapped in a span.
   Supported across all major browsers since late 2023. */
.switch:has(input:checked) > .slider { background-color: #5cb85c; }
.switch:has(input:checked) > .slider:before { transform: translateX(17px); }
.oo-toggle-row .switch:has(input:checked) > .slider:before { transform: translateX(16px); }

/* ── Checkbox row (plain checkbox + label text) ── */
.oo-check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
    color: var(--oo-text);
}

/* ── Toggle group — wrapping flex strip of toggle rows (days, options) ── */
.oo-toggle-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    padding: 8px 0;
}
.oo-toggle-group .oo-toggle-row { padding: 0; }

/* ── Right-aligned action row inside a card ── */
.oo-apply-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

/* ── Inline checkbox + label (compact, single-line) ── */
.oo-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--oo-text-muted);
    white-space: nowrap;
    margin: 0;
    cursor: pointer;
    font-weight: 400;
}

/* ── Card spacing ── */
.oo-details-strip + .oo-details-strip { margin-top: 12px; }
.oo-card + .oo-card { margin-top: 12px; }

/* ── Grid wrap — seats a RadGrid/table flush inside a card, scrollable on small screens ── */
.oo-grid-wrap {
    padding: 0;
    overflow-x: auto;                    /* horizontal scroll instead of clipping */
    -webkit-overflow-scrolling: touch;   /* smooth momentum scroll on iOS */
}

/* ── RadGrid Bootstrap skin resets — normalize the skin to match our design tokens ── */
.oo-grid-wrap .RadGrid_Bootstrap {
    border: none;          /* card border handles the outer frame */
    min-width: 100%;       /* prevent grid from shrinking narrower than its container */
}

/*
 * CRITICAL — Telerik renders both the outer .RadGrid_Bootstrap div AND the inner
 * rgMasterTable with inline style="width:100%". This pins the table to exactly the
 * container width, so columns silently compress and overflow-x:auto never fires.
 *
 * Fix: override the table's inline width with !important so table-layout:auto can
 * size columns to their real content. min-width:100% keeps it full-width when there
 * is plenty of room. When columns need more space than the container provides, the
 * table overflows the .oo-grid-wrap and the scrollbar appears.
 */
.oo-grid-wrap .RadGrid_Bootstrap .rgMasterTable {
    width: auto !important;   /* override Telerik inline width:100% */
    min-width: 100%;          /* still fill the card when content is narrow */
    table-layout: auto;       /* let columns size to their content, not fixed */
}

/*
 * Global catch-all: ALL RadGrid Bootstrap header cells in this app use the brand
 * orange background — force white text unconditionally.
 *
 * Uses div.RadGrid_Bootstrap (element + class) for specificity 0,2,1 which beats
 * Telerik's embedded skin CSS (.RadGrid_Bootstrap .rgHeader = 0,2,0) regardless
 * of stylesheet load order.
 *
 * The `a` rule is critical: sortable columns render header text as <a> sort links,
 * and Bootstrap's a { color: #337ab7 } overrides color inherited from <th>.
 */
div.RadGrid_Bootstrap .rgHeader,
div.RadGrid_Bootstrap .rgHeader a {
    color: #fff !important;
}

/* Header row — full styling for grids inside oo-grid-wrap */
/* Also targets <a> sort links inside header cells — Bootstrap link color would override inherited white */
.oo-grid-wrap div.RadGrid_Bootstrap .rgHeader,
.oo-grid-wrap div.RadGrid_Bootstrap th.rgResizeCol,
.oo-grid-wrap div.RadGrid_Bootstrap .rgHeader a {
    background-color: var(--oo-orange);
    color: #fff !important;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .3px;
    padding: 10px 14px;
    border-bottom: none;
    white-space: nowrap;
}

/* Data rows */
.oo-grid-wrap .RadGrid_Bootstrap .rgRow td,
.oo-grid-wrap .RadGrid_Bootstrap .rgAltRow td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--oo-border-light);
    color: var(--oo-text-secondary);
    font-size: 13px;
    vertical-align: middle;
}

/* Alternate row — subtle zebra stripe */
.oo-grid-wrap .RadGrid_Bootstrap .rgAltRow td {
    background-color: var(--oo-surface-2);
}

/* Hover state */
.oo-grid-wrap .RadGrid_Bootstrap .rgHoveredRow td {
    background-color: #fff3ec;  /* soft orange tint on hover */
    color: var(--oo-text);
}

/* Edit row */
.oo-grid-wrap .RadGrid_Bootstrap .rgEditRow td {
    background-color: #fff8f3;
    border-top: 2px solid var(--oo-orange);
}

/* Pager row */
.oo-grid-wrap .RadGrid_Bootstrap .rgPager {
    background: var(--oo-surface-2);
    border-top: 1px solid var(--oo-border);
    padding: 8px 14px;
    font-size: 12px;
    color: var(--oo-text-muted);
}

/* Command row (Add New / Save / Cancel toolbar) */
.oo-grid-wrap .RadGrid_Bootstrap .rgCommandRow {
    background: var(--oo-surface-2);
    border-bottom: 1px solid var(--oo-border);
    padding: 8px 10px;
}

/* ── Grid header class — used on RadGrid HeaderStyle CssClass="oo-grid-header" ── */
/*    Overrides the Telerik Bootstrap skin's default grey header with brand orange  */
/*    Uses div.RadGrid_Bootstrap for specificity 0,2,1 to beat Telerik skin CSS    */
/*    The .oo-grid-header th/a fallback covers non-Bootstrap skin grids            */
.oo-grid-header,
.oo-grid-header th,
.oo-grid-header a,
.oo-grid-header th a,
div.RadGrid_Bootstrap .oo-grid-header th,
div.RadGrid_Bootstrap th.oo-grid-header,
div.RadGrid_Bootstrap .oo-grid-header a,
div.RadGrid_Bootstrap th.oo-grid-header a {
    background-color: var(--oo-orange) !important;
    color: #fff !important;
    font-weight: 600;
}

/* ── Footer links — horizontal action link row inside oo-card-footer ── */
.oo-footer-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ================================================================
   SECTION 10: FIELD LABELS & FORM ELEMENTS
   ================================================================ */

.oo-field-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--oo-text-muted);
    margin-bottom: 4px;
}

.oo-input,
.oo-select,
.oo-textarea {
    width: 100%;
    height: 36px;
    border: 1.5px solid var(--oo-border);
    border-radius: var(--oo-radius-input);
    font-size: 13px;
    padding: 0 10px;
    background: var(--oo-surface);
    color: var(--oo-text);
    font-family: inherit;
    transition: border-color var(--oo-transition), box-shadow var(--oo-transition);
    appearance: none;
}
.oo-input:focus,
.oo-select:focus,
.oo-textarea:focus {
    outline: none;
    border-color: var(--oo-orange);
    box-shadow: var(--oo-focus-ring);
}
.oo-input:disabled,
.oo-select:disabled { background: var(--oo-surface-2); color: var(--oo-text-muted); }

.oo-textarea {
    height: auto;
    padding: 8px 10px;
    resize: vertical;
    min-height: 80px;
}

.oo-select-wrap {
    position: relative;
}
.oo-select-wrap::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--oo-text-faint);
    pointer-events: none;
    font-size: 11px;
}
.oo-select-wrap .oo-select { padding-right: 28px; }

/* ── Select2 v3: copies classes from <select> to its container, causing double border.
      Reset the container and restyle the inner .select2-choice to match oo-select. ── */
.select2-container.oo-select {
    border: none;
    height: auto;
    padding: 0;
    background: transparent;
    appearance: auto;
}
.select2-container.oo-select .select2-choice {
    display: flex;
    align-items: center;
    height: 36px;
    border: 1.5px solid var(--oo-border);
    border-radius: var(--oo-radius-input);
    background: var(--oo-surface);
    background-image: none;
    color: var(--oo-text);
    font-size: 13px;
    padding: 0 10px;
    box-shadow: none;
    text-align: left;
}
.select2-container.oo-select .select2-choice .select2-chosen {
    flex: 1;
    line-height: normal;
    margin-right: 0;
}
.select2-container.oo-select .select2-choice:focus,
.select2-container.oo-select.select2-dropdown-open .select2-choice {
    border-color: var(--oo-orange);
    box-shadow: var(--oo-focus-ring);
    outline: none;
}
.select2-container.oo-select .select2-choice .select2-arrow {
    border-left: none;
    background: transparent;
    background-image: none;
    width: 24px;
}
.select2-container.oo-select .select2-choice .select2-arrow b {
    background: none;
    border: none;
}


/* ================================================================
   SECTION 11: FIELD ROW LAYOUT
   ================================================================ */

.oo-field-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}
.oo-field-row:last-child { margin-bottom: 0; }
.oo-field-row > .oo-field { flex: 1; min-width: 0; }
@media(max-width:600px) { .oo-field-row { flex-direction: column; gap: 8px; } }


/* ================================================================
   SECTION 12: CHIPS & BADGES
   ================================================================ */

/* Inline badge — use in tables/lists */
.oo-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

/* Status variants */
.oo-badge-open     { background: var(--oo-blue-light); color: var(--oo-blue); }
.oo-badge-inprog   { background: var(--oo-orange-light); color: var(--oo-orange-dark); }
.oo-badge-hold     { background: var(--oo-purple-light); color: var(--oo-purple); }
.oo-badge-closed   { background: #f3f4f6; color: var(--oo-text-muted); }
.oo-badge-active   { background: var(--oo-green-light); color: var(--oo-green); }
.oo-badge-inactive { background: #f3f4f6; color: var(--oo-text-muted); }
.oo-badge-pending  { background: var(--oo-yellow-light); color: var(--oo-yellow); }
.oo-badge-high     { background: var(--oo-red-light); color: var(--oo-red); }
.oo-badge-med      { background: var(--oo-yellow-light); color: var(--oo-yellow); }
.oo-badge-low      { background: var(--oo-green-light); color: var(--oo-green); }
.oo-badge-admin    { background: var(--oo-orange-light); color: var(--oo-orange-dark); }

/* Status dot */
.oo-status-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.oo-status-dot.active  { background: var(--oo-green); }
.oo-status-dot.inactive { background: var(--oo-text-faint); }
.oo-status-dot.pending { background: var(--oo-orange); }


/* ================================================================
   SECTION 13: ATTACH BAR
   ================================================================ */

.oo-attach-bar {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--oo-border-light);
    padding: 2px 8px;
    gap: 2px;
}

.oo-attach-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 10px;
    border-radius: 6px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: var(--oo-text-muted);
    font-family: inherit;
    transition: all var(--oo-transition);
    white-space: nowrap;
}
.oo-attach-btn:hover { background: #f0f2f5; color: var(--oo-blue); }
.oo-attach-btn.active { color: var(--oo-orange); background: var(--oo-orange-light); }
.oo-attach-btn.oo-bar-hidden { display: none; }

.oo-attach-hint {
    margin-left: auto;
    font-size: 11px;
    color: var(--oo-text-faint);
    padding-right: 6px;
    display: none;
}
@media(min-width: 480px) { .oo-attach-hint { display: block; } }

/* Hides the raw uploader button while keeping the control in the DOM */
.oo-uploader-hidden {
    height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
}


/* ================================================================
   SECTION 14: ATTACHMENTS CARD
   ================================================================ */

.oo-attachments-card {
    /* Clip the inner panel so its corners follow the rounded outer card edge. */
    overflow: hidden;
    /* The whole card is the upload trigger (see TaskCreation click handler). */
    cursor: pointer;
}
/* Restore default cursor on interactive children so they don't all look clickable. */
.oo-attachments-card .thumbnail,
.oo-attachments-card a,
.oo-attachments-card button,
.oo-attachments-card input,
.oo-attachments-card video { cursor: default; }
.oo-attachments-card a,
.oo-attachments-card button { cursor: pointer; }
.oo-attachments-card .panel,
.oo-attachments-card .panel-default {
    border: none !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
}
.oo-attachments-card .panel-heading {
    background: none !important;
    border-bottom: none;
    padding: 10px 14px 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--oo-text-secondary);
}
.oo-attachments-card .panel-body { padding: 4px 0 0; }


/* ================================================================
   SECTION 14b: UPLOAD PREVIEWS (compact thumbnail grid)
   Used by SingleFileUploadDropzone.ascx — class .oo-upload-previews
   on the preview container merges images, docs, and videos into a
   single responsive grid. Thumbnails are intentionally small —
   their job is "did I upload it?" / "click to mark up", not display.
   ================================================================ */

.oo-upload-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, 80px);
    gap: 6px;
    /* 14px horizontal padding aligns thumbnails with the card's heading copy
       above (.oo-attachments-card .panel-heading is also padded 14px). */
    padding: 8px 14px 10px;
    justify-content: start;
    float: none;
}
.oo-upload-previews > #niuploads,
.oo-upload-previews > #imgPrev,
.oo-upload-previews > #vidPrev {
    /* Unwrap the legacy three-row split so all thumbnails share one grid. */
    display: contents;
}
/* Bootstrap's .row clearfix injects ::before/::after pseudo-elements; with display:contents
   on the wrapper they bubble up as empty grid items (the blank cell before the first thumb).
   Suppress them. */
.oo-upload-previews > #niuploads::before,
.oo-upload-previews > #niuploads::after,
.oo-upload-previews > #imgPrev::before,
.oo-upload-previews > #imgPrev::after,
.oo-upload-previews > #vidPrev::before,
.oo-upload-previews > #vidPrev::after {
    display: none !important;
}
.oo-upload-previews > #console {
    grid-column: 1 / -1;
}
.oo-upload-previews .thumbnail {
    position: relative;
    float: none !important;
    width: 80px !important;
    height: 80px !important;
    margin: 0 !important;
    padding: 3px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
.oo-upload-previews .thumbnail > a.editbutton {
    display: block;
    width: 100%;
    height: 100%;
}
.oo-upload-previews .thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
}
.oo-upload-previews .thumbnail video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}
.oo-upload-previews .thumbnail .glyphicon-file {
    font-size: 32px !important;
}
.oo-upload-previews .thumbnail > div {
    width: 100%;
    padding: 4px 2px !important;
}
.oo-upload-previews .thumbnail > div > div {
    font-size: 10px !important;
    line-height: 1.2 !important;
    max-height: 24px;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (min-width: 768px) {
    .oo-upload-previews { grid-template-columns: repeat(auto-fill, 96px); }
    .oo-upload-previews .thumbnail { width: 96px !important; height: 96px !important; }
    .oo-upload-previews .thumbnail .glyphicon-file { font-size: 38px !important; }
}


/* ================================================================
   SECTION 14c: INSTRUCTION TEXT (loaded from data — UXRefresh TaskCreation)
   ID is suffix-matched because runat=server prefixes it (e.g. cphContent_dvInstruction1).
   Scoped under .oo-card so we don't bleed into the legacy TaskUpdate.aspx,
   which has its own dvInstruction1 with Bootstrap col-* centering and inline
   red-banner styling we mustn't override.
   ================================================================ */

.oo-card [id$="dvInstruction1"] {
    float: none !important;
    width: 100% !important;
    padding: 12px 16px 6px;
    background: var(--oo-surface);
    border-top: 1px solid #f0f2f5;
}
.oo-card [id$="dvInstruction1"] .lblInstruction {
    display: block;
    font-size: 12px;
    color: var(--oo-text-secondary);
    white-space: pre-wrap;
    overflow-wrap: break-word;
    padding: 6px 0 10px;
}


/* ================================================================
   SECTION 15: ACTION ROW (ICON BUTTON ROW AT CARD BOTTOM)
   ================================================================ */

/* ================================================================
   SECTION 16: DETAILS STRIP (COLLAPSIBLE)
   ================================================================ */

.oo-details-summary {
    display: flex;
    align-items: center;
    padding: 11px 14px;
    gap: 7px;
    cursor: pointer;
    flex-wrap: wrap;
    transition: background var(--oo-transition);
}
.oo-details-summary:hover { background: var(--oo-surface-2); }

.oo-details-expand-icon {
    margin-left: auto;
    color: var(--oo-text-faint);
    font-size: 11px;
    transition: transform .25s;
    flex-shrink: 0;
}
.oo-details-strip.open .oo-details-expand-icon { transform: rotate(180deg); }

.oo-details-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s cubic-bezier(.4,0,.2,1);
    border-top: 0 solid var(--oo-border-light);
}
.oo-details-strip.open .oo-details-body {
    max-height: 4000px;
    border-top-width: 1px;
}
/* Flex+gap layout removes margin-collapse / :last-child quirks for nested groups
   like dvDetails (which wraps its own inner field rows). All children — direct
   .oo-field-row siblings AND wrapper divs — get a uniform 10px vertical gap. */
.oo-details-inner {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.oo-details-inner > * { margin: 0 !important; }
.oo-details-inner > [id$="dvDetails"] {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.oo-details-inner > [id$="dvDetails"] > .oo-field-row { margin: 0 !important; }


/* ================================================================
   SECTION 17: TASK LOG LIST (tll-)
   ================================================================ */

.tll-feed {}
.tll-entry {
    padding: 12px 14px;
    border-bottom: 1px solid var(--oo-border-light);
}
.tll-entry:last-child { border-bottom: none; }

.tll-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}
.tll-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    color: #fff;
    font-size: 10px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    letter-spacing: .5px;
}
.tll-author { font-size: 13px; font-weight: 600; color: var(--oo-text); }
.tll-date { font-size: 11px; color: var(--oo-text-faint); margin-left: auto; white-space: nowrap; }

.tll-body { font-size: 13px; color: var(--oo-text-secondary); line-height: 1.55; }
.tll-body:empty { display: none; }

.tll-attachments {
    margin-top: 8px;
    display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px;
}
.tll-attachments a.pop img,
.tll-attachments a.popvideo img {
    border-radius: 6px;
    border: 1px solid var(--oo-border-light);
    object-fit: cover;
}
.tll-docs a {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; color: var(--oo-blue);
    padding: 3px 8px;
    background: var(--oo-blue-light);
    border-radius: 20px;
    text-decoration: none;
    margin-right: 4px; margin-top: 4px;
}
.tll-docs a:hover { text-decoration: underline; }

.tll-footer {
    display: flex; align-items: center; justify-content: flex-end;
    margin-top: 8px;
}
.tll-invoice-btn {
    font-size: 11px !important;
    padding: 3px 10px !important;
    border-radius: 20px !important;
    background: var(--oo-surface-2) !important;
    border: 1px solid var(--oo-border) !important;
    color: var(--oo-text-secondary) !important;
    cursor: pointer;
}
.tll-invoice-btn:hover {
    background: var(--oo-blue-light) !important;
    color: var(--oo-blue) !important;
    border-color: var(--oo-blue) !important;
}
.tll-empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--oo-text-faint);
    font-size: 13px;
}
.tll-empty i { display: block; font-size: 26px; margin-bottom: 8px; color: var(--oo-border); }


/* ================================================================
   SECTION 18: STAT / KPI CARDS
   ================================================================ */

.oo-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}
@media(min-width: 640px) {
    .oo-stat-grid { grid-template-columns: repeat(4, 1fr); }
}

.oo-stat-card {
    background: var(--oo-surface);
    border: 1px solid var(--oo-border);
    border-radius: var(--oo-radius-card);
    box-shadow: var(--oo-shadow-card);
    padding: 14px 16px;
    position: relative;
    overflow: hidden;
}

.oo-stat-icon {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 34px; height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    opacity: .9;
}
.oo-stat-icon.orange { background: var(--oo-orange-light); color: var(--oo-orange); }
.oo-stat-icon.blue   { background: var(--oo-blue-light);   color: var(--oo-blue); }
.oo-stat-icon.green  { background: var(--oo-green-light);  color: var(--oo-green); }
.oo-stat-icon.red    { background: var(--oo-red-light);    color: var(--oo-red); }
.oo-stat-icon.purple { background: var(--oo-purple-light); color: var(--oo-purple); }
.oo-stat-icon.teal   { background: var(--oo-teal-light);   color: var(--oo-teal); }

.oo-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--oo-text);
    line-height: 1.1;
    margin-bottom: 3px;
    display: block;
}

.oo-stat-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--oo-text-muted);
    display: block;
    margin-bottom: 8px;
}

.oo-stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 20px;
}
.oo-stat-trend.up   { color: var(--oo-green); background: var(--oo-green-light); }
.oo-stat-trend.down { color: var(--oo-red);   background: var(--oo-red-light); }
.oo-stat-trend.flat { color: var(--oo-text-faint); background: #f3f4f6; }


/* ================================================================
   SECTION 18.5: NOTES MODAL
   ─────────────────────────────────────────────────────────────────
   Shared styles for the orange-header notes modal used on
   AdminCategory and AdminAssetDefaultUserNotes.
   ================================================================ */

/* ── Orange header bar ───────────────────────────── */
.divHeader {
    display: flex;
    padding: 10px 5px;
    align-items: center;
    gap: 10px;
    align-self: stretch;
    background: var(--oo-orange);
    color: #fff;
    font-weight: 600;
}

/* ── Notes textarea + read-only content area ─────── */
/* Shared chrome (border / radius / background). Heights diverge: the editable
   textarea sizes to its rows attribute, the read-only display gets a tall
   bottom pad so short notes still feel like a "notes panel". */
.txtNotes,
.divNotesContent {
    padding: 11px 12px;
    border-radius: 0 0 4px 4px;
    border: 1px solid var(--oo-border);
    background: var(--oo-surface-2);
}
.divNotesContent {
    white-space: pre-wrap;
    padding-bottom: 150px;
}

/* ── Loader overlay ──────────────────────────────── */
#loadermodal1 {
    position: fixed;
    z-index: 999;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    background-color: transparent;
    opacity: 0.6;
}

/* ── Three-dot ellipsis icon ─────────────────────── */
.three-v {
    float: right;
    cursor: pointer;
    font-size: 20px !important;
}

/* ── Last-updated stamp ──────────────────────────── */
.lastupdate {
    color: var(--oo-text-muted);
    font-size: 15px;
    font-weight: 500;
}

/* ── Modal close button alignment ────────────────── */
.modal-header .close { margin-top: 2.5%; }

/* ── Delete confirmation modal sizing ────────────── */
#DeleteModal .modal-content {
    margin: 5% auto 15% auto;
    width: 65%;
}

/* ── Modal footer button row ─────────────────────── */
.oo-modal-actions {
    display: flex;
    gap: 8px;
}
.oo-modal-actions .oo-btn-outline,
.oo-modal-actions .oo-btn-primary,
.oo-modal-actions .oo-btn-danger,
.oo-modal-actions .oo-btn-cancel {
    flex: 1;
}


/* ================================================================
   SECTION 19: DATA TABLE  (.oo-table)
   ─────────────────────────────────────────────────────────────────
   Use .oo-table for plain HTML <table> elements inside cards.
   For Telerik RadGrid, use .oo-grid-wrap + .oo-grid-header (above).
   ================================================================ */

/* ── Table card shell — wraps an .oo-table when not inside an .oo-card ── */
.oo-table-card {
    background: var(--oo-surface);
    border: 1px solid var(--oo-border);
    border-radius: var(--oo-radius-card);
    box-shadow: var(--oo-shadow-card);
    overflow: hidden;
    margin-bottom: 10px;
}

/* ── Compact selects inside config/notification tables ── */
.oo-table-card .oo-select { font-size: 12px; height: 32px; padding: 0 6px; }
.oo-table-card td:first-child { font-weight: 500; }

/* ── Base table layout ── */
.oo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

/* ── Header cells — orange brand bar, matches RadGrid oo-grid-header style ── */
.oo-table th {
    background-color: var(--oo-orange);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .3px;
    padding: 10px 14px;
    border-bottom: none;
    white-space: nowrap;
    text-align: left;
}

/* ── Data cells ── */
.oo-table td {
    padding: 10px 14px;        /* consistent vertical padding — replaces old height:44px hack */
    border-bottom: 1px solid var(--oo-border-light);
    color: var(--oo-text-secondary);
    vertical-align: middle;
}

/* ── Last row — no trailing divider ── */
.oo-table tbody tr:last-child td { border-bottom: none; }

/* ── Row hover — soft orange tint to match RadGrid hover ── */
.oo-table tbody tr:hover td { background-color: #fff3ec; color: var(--oo-text); }

/* ── Cell modifiers ── */
.oo-table td.oo-td-name    { font-weight: 600; color: var(--oo-text); }
.oo-table td.oo-td-num     { font-family: monospace; font-size: 12px; color: var(--oo-text-muted); }
.oo-table td.oo-td-actions { white-space: nowrap; text-align: right; padding-right: 12px; }


/* ================================================================
   SECTION 20: FILTER BAR / SEARCH
   ================================================================ */

/* ── Filter toggle — mobile-only button to show/hide filter bar ── */
.oo-filter-toggle {
    display: none;
    width: 100%;
    margin-bottom: 8px;
    justify-content: space-between;
    align-items: center;
    background: var(--oo-surface-2);
    border: 1px solid var(--oo-border);
    border-radius: var(--oo-radius-input);
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--oo-text);
    cursor: pointer;
}
.oo-filter-toggle i { color: var(--oo-text-muted); transition: transform .2s; }
.oo-filter-toggle.open i { transform: rotate(180deg); }

.oo-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.oo-search-wrap {
    position: relative;
    flex: 1;
    min-width: 160px;
    max-width: 320px;
}
.oo-search-wrap i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--oo-text-faint);
    font-size: 12px;
    pointer-events: none;
}
.oo-search-input {
    width: 100%;
    height: 36px;
    border: 1.5px solid var(--oo-border);
    border-radius: var(--oo-radius-input);
    font-size: 13px;
    padding: 0 10px 0 30px;
    background: var(--oo-surface);
    color: var(--oo-text);
    font-family: inherit;
    transition: border-color var(--oo-transition), box-shadow var(--oo-transition);
}
.oo-search-input:focus {
    outline: none;
    border-color: var(--oo-orange);
    box-shadow: var(--oo-focus-ring);
}

.oo-filter-select {
    height: 36px;
    border: 1.5px solid var(--oo-border);
    border-radius: var(--oo-radius-input);
    font-size: 13px;
    padding: 0 28px 0 10px;
    background: var(--oo-surface);
    color: var(--oo-text);
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239ca3af' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color var(--oo-transition);
}
.oo-filter-select:focus {
    outline: none;
    border-color: var(--oo-orange);
    box-shadow: var(--oo-focus-ring);
}


/* ================================================================
   SECTION 21: USER LIST ITEM
   ================================================================ */

.oo-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--oo-border-light);
    transition: background var(--oo-transition);
}
.oo-user-item:last-child { border-bottom: none; }
.oo-user-item:hover { background: var(--oo-surface-2); }

.oo-user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: .5px;
}

.oo-user-info { flex: 1; min-width: 0; }
.oo-user-name { font-size: 14px; font-weight: 600; color: var(--oo-text); }
.oo-user-role { font-size: 12px; color: var(--oo-text-muted); margin-top: 1px; }

.oo-user-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}


/* ================================================================
   SECTION 22: ALERT / BANNER
   ================================================================ */

.oo-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid;
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.5;
}
.oo-alert i { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.oo-alert-title { font-weight: 600; display: block; margin-bottom: 2px; }

.oo-alert-info    { background: var(--oo-blue-light);   border-color: rgba(26,84,153,.2);  color: var(--oo-blue); }
.oo-alert-warning { background: var(--oo-orange-light); border-color: rgba(242,103,34,.25); color: var(--oo-orange-dark); }
.oo-alert-success { background: var(--oo-green-light);  border-color: rgba(27,126,52,.2);  color: var(--oo-green); }
.oo-alert-danger  { background: var(--oo-red-light);    border-color: rgba(220,38,38,.2);  color: var(--oo-red); }


/* ================================================================
   SECTION 23: EMPTY STATE
   ================================================================ */

.oo-empty-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--oo-text-faint);
}
.oo-empty-state i {
    display: block;
    font-size: 36px;
    margin-bottom: 12px;
    color: var(--oo-border);
}
.oo-empty-state-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--oo-text-muted);
    display: block;
    margin-bottom: 4px;
}
.oo-empty-state-sub {
    font-size: 13px;
    color: var(--oo-text-faint);
    display: block;
}


/* ================================================================
   SECTION 24: DASHBOARD GRID
   ================================================================ */

.oo-dash-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 10px;
}
@media(min-width: 640px) {
    .oo-dash-grid { grid-template-columns: repeat(2, 1fr); }
}

.oo-dash-grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 10px;
}
@media(min-width: 640px) {
    .oo-dash-grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.oo-dash-col-span-2 { grid-column: span 2; }
@media(max-width:639px) { .oo-dash-col-span-2 { grid-column: span 1; } }


/* ================================================================
   SECTION 25: PROGRESS BAR
   ================================================================ */

.oo-progress {
    height: 6px;
    background: var(--oo-border-light);
    border-radius: 3px;
    overflow: hidden;
}
.oo-progress-fill {
    height: 100%;
    background: var(--oo-orange);
    border-radius: 3px;
    transition: width .5s ease;
}
.oo-progress-fill.blue  { background: var(--oo-blue); }
.oo-progress-fill.green { background: var(--oo-green); }
.oo-progress-fill.red   { background: var(--oo-red); }


/* ================================================================
   SECTION 26: CHART PLACEHOLDER
   ================================================================ */

.oo-chart-placeholder {
    min-height: 180px;
    border: 1.5px dashed var(--oo-border);
    border-radius: var(--oo-radius-input);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--oo-text-faint);
    background: var(--oo-surface-2);
    font-size: 13px;
}
.oo-chart-placeholder i { font-size: 28px; color: var(--oo-border); }


/* ================================================================
   SECTION 27: ANIMATIONS
   ================================================================ */

@keyframes ooFadeSlide {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes ooFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes ooSlideUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.oo-animate-fade    { animation: ooFadeIn .2s ease; }
.oo-animate-slide   { animation: ooFadeSlide .2s ease; }


/* ================================================================
   SECTION 28: INLINE FORM PANEL (EDIT DRAWER)
   ================================================================ */

.oo-panel {
    border: 1.5px solid var(--oo-border);
    border-radius: var(--oo-radius-card);
    background: var(--oo-surface);
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: var(--oo-shadow-sm);
}

.oo-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--oo-surface-2);
    border-bottom: 1px solid var(--oo-border-light);
    font-size: 14px;
    font-weight: 600;
    color: var(--oo-text);
}
.oo-panel-header .oo-panel-icon {
    width: 30px; height: 30px;
    border-radius: 8px;
    background: var(--oo-orange-light);
    color: var(--oo-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.oo-panel-header .oo-panel-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--oo-text-faint);
    font-size: 13px;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all var(--oo-transition);
}
.oo-panel-header .oo-panel-close:hover {
    background: var(--oo-border-light);
    color: var(--oo-text-secondary);
}

.oo-panel-body { padding: 16px; }

.oo-panel-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--oo-border-light);
    background: var(--oo-surface-2);
    display: flex;
    gap: 8px;
}


/* ================================================================
   SECTION 29: CHECKBOX GROUP (FEATURE FLAGS)
   ================================================================ */

.oo-check-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}
@media(min-width:480px) { .oo-check-group { grid-template-columns: repeat(3, 1fr); } }

.oo-check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1.5px solid var(--oo-border-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--oo-transition);
    font-size: 12px;
    font-weight: 500;
    color: var(--oo-text-secondary);
}
.oo-check-item:hover { border-color: var(--oo-orange); background: var(--oo-orange-light); }
.oo-check-item input { accent-color: var(--oo-orange); flex-shrink: 0; }
.oo-check-item.checked {
    border-color: var(--oo-orange);
    background: var(--oo-orange-light);
    color: var(--oo-orange-dark);
}


/* ================================================================
   SECTION 30: ACTIVITY FEED
   ================================================================ */

.oo-activity-feed {}

.oo-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--oo-border-light);
}
.oo-activity-item:last-child { border-bottom: none; }

.oo-activity-av {
    width: 30px; height: 30px;
    border-radius: 50%;
    font-size: 11px; font-weight: 700;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.oo-activity-body { flex: 1; min-width: 0; }
.oo-activity-action {
    font-size: 13px;
    color: var(--oo-text-secondary);
    line-height: 1.4;
}
.oo-activity-action strong { color: var(--oo-text); font-weight: 600; }
.oo-activity-time {
    font-size: 11px;
    color: var(--oo-text-faint);
    margin-top: 2px;
    display: block;
}


/* ================================================================
   SECTION 31: DONUT / RING CHART (CSS-ONLY)
   ================================================================ */

.oo-ring-chart {
    display: flex;
    align-items: center;
    gap: 16px;
}
.oo-ring {
    position: relative;
    width: 80px; height: 80px;
    flex-shrink: 0;
}
.oo-ring svg { transform: rotate(-90deg); }
.oo-ring-bg { fill: none; stroke: var(--oo-border-light); stroke-width: 8; }
.oo-ring-fill { fill: none; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.oo-ring-label {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    text-align: center;
    line-height: 1.2;
}
.oo-ring-label-val { font-size: 15px; font-weight: 700; color: var(--oo-text); display: block; }
.oo-ring-label-sub { font-size: 9px; color: var(--oo-text-faint); display: block; text-transform: uppercase; letter-spacing: .3px; }

.oo-ring-legend { flex: 1; }
.oo-ring-legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--oo-text-secondary);
    margin-bottom: 6px;
}
.oo-ring-legend-item:last-child { margin-bottom: 0; }
.oo-ring-legend-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.oo-ring-legend-val { margin-left: auto; font-weight: 600; color: var(--oo-text); font-size: 13px; }


/* ================================================================
   SECTION 32: BAR CHART (CSS-ONLY HORIZONTAL)
   ================================================================ */

.oo-bar-chart {}
.oo-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.oo-bar-row:last-child { margin-bottom: 0; }
.oo-bar-label {
    font-size: 12px;
    color: var(--oo-text-secondary);
    width: 60px;
    flex-shrink: 0;
    font-weight: 500;
}
.oo-bar-track {
    flex: 1;
    height: 20px;
    background: var(--oo-surface-2);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--oo-border-light);
}
.oo-bar-fill {
    height: 100%;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding-left: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    transition: width .6s ease;
    min-width: 28px;
}
.oo-bar-val {
    font-size: 12px;
    font-weight: 600;
    color: var(--oo-text);
    width: 30px;
    text-align: right;
    flex-shrink: 0;
}


/* ================================================================
   SECTION 33: UTILITY CLASSES
   ================================================================ */

.oo-text-muted   { color: var(--oo-text-muted); }
.oo-text-faint   { color: var(--oo-text-faint); }
.oo-text-orange  { color: var(--oo-orange); }
.oo-text-blue    { color: var(--oo-blue); }
.oo-text-green   { color: var(--oo-green); }
.oo-text-red     { color: var(--oo-red); }
.oo-text-sm      { font-size: 12px; }
.oo-text-xs      { font-size: 11px; }
.oo-fw-600       { font-weight: 600; }
.oo-fw-700       { font-weight: 700; }
.oo-mt-8         { margin-top: 8px; }
.oo-mt-12        { margin-top: 12px; }
.oo-mt-16        { margin-top: 16px; }
.oo-mb-8         { margin-bottom: 8px; }
.oo-mb-12        { margin-bottom: 12px; }
.oo-d-flex       { display: flex; }
.oo-align-center { align-items: center; }
.oo-gap-8        { gap: 8px; }
.oo-ml-auto      { margin-left: auto; }
.oo-ml-0         { margin-left: 0 !important; }   /* replaces old marginLeftClear */
.oo-monospace    { font-family: monospace; }


/* ================================================================
   SECTION 34: TELERIK RADWINDOW / RADALERT / RADCONFIRM
   Global overrides for RadWindow Bootstrap skin popups used
   site-wide (alerts, confirms, and custom RadWindows).
   ================================================================ */

/* ── Hide the title bar on alert/confirm dialogs — cleaner modal look ── */
.RadWindow_Bootstrap[id*="alert"] .rwTitleBar,
.RadWindow_Bootstrap[id*="confirm"] .rwTitleBar {
    display: none;
}

/* ── Top accent strip — brand orange to signal an action is required ── */
.RadWindow_Bootstrap[id*="alert"],
.RadWindow_Bootstrap[id*="confirm"] {
    border-top: 4px solid var(--oo-orange-dark);
}

/* ── Dialog buttons — remove rounded corners for compact look ── */
.RadWindow_Bootstrap input[type="button"] {
    border-radius: unset !important;
}

/* ── OK button — blue underline style ── */
.RadWindow_Bootstrap input[type="button"].rwOkBtn {
    color: var(--oo-blue) !important;
    border-bottom: 2px solid var(--oo-blue) !important;
    width: 59px;
}
.RadWindow_Bootstrap input[type="button"].rwOkBtn:focus {
    background-color: initial;
}

/* ── Cancel button — red underline style ── */
.RadWindow_Bootstrap input[type="button"].rwCancelBtn {
    color: var(--oo-red) !important;
    border-bottom: 2px solid var(--oo-red) !important;
    width: 59px;
}
.RadWindow_Bootstrap input[type="button"].rwCancelBtn:focus {
    background-color: initial;
}

/* ── Dialog message body ── */
.RadWindow_Bootstrap .rwDialogMessage {
    padding-top: 10px;
    color: var(--oo-text-secondary);
}

/* ── Confirm icon color ── */
.RadWindow .rwDialog:before {
    color: var(--oo-text-muted);
}


/* ================================================================
   SECTION 35: MAIN NAV (oo-main-nav)
   Reskins Bootstrap 3 navbar. Bootstrap JS (collapse/dropdown) is
   preserved — only visual styles are overridden.
   ================================================================ */

.oo-main-nav {
    background-color: var(--oo-nav-bg) !important;
    border: none !important;
    border-radius: 0 !important;
    margin-bottom: 0 !important;
    min-height: 52px;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
}

.oo-main-nav .container-fluid {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 16px !important;
    min-height: 52px;
}

/* Logo stays left, right-side items stay right, links fill center */
.oo-main-nav .navbar-header {
    margin-right: auto !important;
}
.oo-main-nav .navbar-right {
    margin-left: auto !important;
}

/* Brand / logo */
.oo-main-nav .navbar-brand,
.oo-main-nav .oo-nav-brand {
    padding: 0 !important;
    height: 52px !important;
    display: flex !important;
    align-items: center !important;
    margin-right: 12px !important;
    float: none !important;
}
.oo-main-nav .oo-nav-logo {
    width: 125px !important;
    height: auto !important;
    display: block;
}

/* Hamburger (mobile) */
.oo-main-nav .navbar-toggle {
    border: none !important;
    background: none !important;
    padding: 8px 10px !important;
    margin: 0 !important;
    float: right !important;
    margin-top: 10px !important;
}
.oo-main-nav .navbar-toggle i {
    color: var(--oo-nav-text, #fff);
    opacity: .85;
    font-size: 18px;
}
.oo-main-nav .navbar-toggle:hover i { opacity: 1; }
.oo-main-nav .navbar-toggle .icon-bar { background: var(--oo-nav-text, #fff) !important; opacity: .8; }

/* Nav links */
.oo-main-nav .navbar-nav > li > a {
    color: var(--oo-nav-text, #fff) !important;
    padding: 0 11px !important;
    height: 52px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    background: none !important;
    border-radius: 0 !important;
    line-height: 1 !important;
    transition: color .13s, background .13s !important;
}
.oo-main-nav .navbar-nav > li > a:hover,
.oo-main-nav .navbar-nav > li > a:focus {
    color: var(--oo-nav-text, #fff) !important;
    background: rgba(255,255,255,.1) !important;
    outline: none !important;
}
.oo-main-nav .navbar-nav > li.active > a,
.oo-main-nav .navbar-nav > li.open > a {
    color: var(--oo-nav-text, #fff) !important;
    background: rgba(255,255,255,.12) !important;
}

/* Nav icon */
.oo-nav-icon {
    font-size: 14px !important;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
    opacity: .8;
}
.oo-main-nav .navbar-nav > li > a:hover .oo-nav-icon,
.oo-main-nav .navbar-nav > li > a:focus .oo-nav-icon,
.oo-main-nav .navbar-nav > li.open > a .oo-nav-icon { opacity: 1; }

/* Caret */
.oo-main-nav .caret {
    margin-left: 1px;
    border-top-color: var(--oo-nav-text, #fff) !important;
    border-bottom-color: var(--oo-nav-text, #fff) !important;
    opacity: .6;
}

/* Dropdown menus */
.oo-main-nav .dropdown-menu {
    background: var(--oo-surface) !important;
    border: 1px solid var(--oo-border) !important;
    border-top: 2px solid var(--oo-orange) !important;
    border-radius: 0 0 var(--oo-radius-card) var(--oo-radius-card) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.12) !important;
    padding: 5px !important;
    min-width: 190px !important;
    margin-top: 0 !important;
}
.oo-main-nav .dropdown-menu > li > a {
    color: var(--oo-text-secondary) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    padding: 8px 12px !important;
    border-radius: 7px !important;
    background: none !important;
    height: auto !important;
    display: block !important;
    transition: background .12s, color .12s !important;
}
.oo-main-nav .dropdown-menu > li > a:hover,
.oo-main-nav .dropdown-menu > li > a:focus {
    background: var(--oo-orange-light) !important;
    color: var(--oo-orange-dark) !important;
}
.oo-main-nav .dropdown-menu .divider {
    margin: 4px 0 !important;
    background-color: var(--oo-border-light) !important;
    height: 1px;
}
/* LinkButton inside dropdown (Refresh Data etc.) */
.oo-main-nav .dropdown-menu > li > a[id*="btnResetCache"] {
    color: var(--oo-text-secondary) !important;
}

/* Right-side nav items */
.oo-main-nav .navbar-right > li > a {
    color: var(--oo-nav-text, #fff) !important;
}
.oo-main-nav .navbar-right > li > a:hover {
    color: var(--oo-nav-text, #fff) !important;
    background: rgba(255,255,255,.1) !important;
}

/* LogonControl wrapper in nav */
.oo-main-nav .oo-nav-logon > a,
.oo-main-nav .oo-nav-logon span,
.oo-main-nav .oo-nav-logon a {
    color: var(--oo-nav-text, #fff) !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    padding: 0 11px !important;
    height: 52px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: none !important;
    transition: color .13s !important;
}
.oo-main-nav .oo-nav-logon a:hover { color: var(--oo-nav-text, #fff) !important; }

/* Mobile collapse panel */
@media(max-width:767px) {
    /* Fixed on mobile — position:sticky can shrink to content width on some mobile browsers.
       position:fixed always fills the viewport exactly. */
    .oo-main-nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
    }
    /* Push page content below the fixed nav */
    body { padding-top: 52px; }

    /* Switch container to block so Bootstrap's float-based mobile layout works */
    .oo-main-nav .oo-nav-container {
        display: block !important;
        padding: 0 8px !important;
        min-height: 52px;
    }
    .oo-main-nav .navbar-header {
        overflow: hidden;
        height: 52px;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .oo-main-nav .navbar-nav {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    /* Brand floats left, toggle floats right — Bootstrap's natural mobile layout */
    /* Remove flex (conflicts with float on iOS Safari) — use inline-block + line-height instead */
    .oo-main-nav .navbar-brand,
    .oo-main-nav .oo-nav-brand {
        float: left !important;
        display: inline-block !important;
        margin-left: 0 !important;
        line-height: 52px !important;
        padding: 0 !important;
    }
    .oo-main-nav .oo-nav-logo {
        vertical-align: middle !important;
    }
    .oo-main-nav .navbar-toggle {
        float: right !important;
        margin-top: 8px !important;
        margin-right: 0 !important;
    }
    /* Collapse panel: scrollable so long menus (e.g. Setup) don't get cut off */
    .oo-main-nav .navbar-collapse {
        background: var(--oo-nav-bg) !important;
        border-top: 1px solid rgba(255,255,255,.1) !important;
        box-shadow: 0 4px 12px rgba(0,0,0,.2) !important;
        padding: 6px 4px !important;
        max-height: calc(100vh - 52px) !important;
        overflow-y: auto !important;
    }
    /* Nav links: reset flex/height from desktop, use padding instead */
    .oo-main-nav .navbar-nav > li > a {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        padding: 10px 14px !important;
        height: auto !important;
        min-height: 40px;
        line-height: 1.3 !important;
        border-radius: 7px !important;
        margin: 1px 0 !important;
    }
    .oo-main-nav .dropdown-menu {
        background: rgba(0,0,0,.18) !important;
        border: none !important;
        border-top: none !important;
        box-shadow: none !important;
        border-radius: 7px !important;
        padding: 3px 6px !important;
    }
    .oo-main-nav .dropdown-menu > li > a {
        color: rgba(255,255,255,.78) !important;
        border-radius: 6px !important;
        height: auto !important;
        display: block !important;
    }
    .oo-main-nav .dropdown-menu > li > a:hover {
        background: rgba(255,255,255,.1) !important;
        color: #fff !important;
    }
    .oo-main-nav .dropdown-menu .divider {
        background: rgba(255,255,255,.15) !important;
    }
    /* Right-side nav (Chat + LogonControl): separator + match main nav item style */
    .oo-main-nav .navbar-right {
        float: none !important;
        border-top: 1px solid rgba(255,255,255,.12) !important;
        margin: 4px 0 0 !important;
        padding: 4px 0 0 !important;
    }
    .oo-main-nav .navbar-right > li > a {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        padding: 10px 14px !important;
        height: auto !important;
        min-height: 40px;
        line-height: 1.3 !important;
        border-radius: 7px !important;
        margin: 1px 0 !important;
    }
    /* LogonControl: reset desktop fixed height so it matches other nav items */
    .oo-main-nav .oo-nav-logon > a,
    .oo-main-nav .oo-nav-logon span,
    .oo-main-nav .oo-nav-logon a {
        display: flex !important;
        align-items: center !important;
        height: auto !important;
        min-height: 40px !important;
        padding: 10px 14px !important;
        line-height: 1.3 !important;
        border-radius: 7px !important;
    }
}


/* ================================================================
   SECTION 36: SITE FOOTER
   ================================================================ */

.oo-site-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 10px 20px;
    border-top: 1px solid var(--oo-border-light);
    background: var(--oo-surface);
    margin-top: 24px;
    flex-wrap: wrap;
    text-align: center;
}

.oo-account-switcher {
    max-width: 220px !important;
    height: 32px !important;
    font-size: 12px !important;
    padding: 0 8px !important;
}

.oo-footer-copy {
    font-size: 11px;
    color: var(--oo-text-muted);
}

.oo-footer-geo {
    font-size: 10px;
    color: var(--oo-text-faint);
}

.oo-status-banner {
    padding: 8px 20px;
    background: var(--oo-yellow-light);
    border-bottom: 1px solid var(--oo-yellow);
    color: var(--oo-yellow);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}


/* ================================================================
   SECTION 37: SHARED ANIMATION KEYFRAMES
   ================================================================ */

@keyframes ooSlideIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ================================================================
   SECTION 38: RECORD HEADER (asset/entity display bar)
   Shared between TaskDetails and TaskUpdate pages.
   ================================================================ */

/* Base state — used on TaskDetails (always visible) */
.oo-record-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px 11px;
    border-bottom: 1px solid var(--oo-border-light);
}

/* Toggled state — used on TaskUpdate (JS adds .visible) */
.oo-record-header.visible {
    display: flex;
    border-top: 1px solid #e8e8e8;
    padding: 8px 14px 10px;
}

/* Hidden initial state for TaskUpdate variant */
.oo-record-header:not(.oo-record-header--always-visible) {
    /* pages that need always-visible add this modifier;
       TaskUpdate starts hidden and adds .visible via JS */
}

.oo-record-icon {
    width: 36px; height: 36px;
    border-radius: 9px;
    background: linear-gradient(135deg, #f97316, var(--oo-orange), #d45a1a);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 15px; flex-shrink: 0;
    overflow: hidden;
    position: relative;
}
.oo-record-icon.has-img,
.oo-record-icon:has(img) { background: none; }
.oo-record-icon img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: contain; border-radius: 9px; display: block;
    cursor: pointer;
}

.oo-record-info {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: 1px;
}

.oo-record-top {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}

.oo-record-name {
    display: block;
    font-size: 14px; font-weight: 600; color: var(--oo-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-top: 3px;
}

.oo-record-sub {
    display: block;
    font-size: 12px; color: var(--oo-text-muted); margin-top: 1px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.oo-record-num {
    font-family: monospace;
    font-size: 11px; color: var(--oo-text-faint); font-weight: 500;
}

/* Task-level action icon strip (top-right of header card) */
.oo-record-actions {
    margin-left: auto; flex-shrink: 0;
    display: inline-flex; align-items: center; gap: 2px;
}
.oo-record-action-btn {
    background: none; border: none; cursor: pointer;
    color: var(--oo-text-faint); font-size: 13px;
    width: 30px; height: 30px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 6px;
    transition: color .15s, background .15s; line-height: 1;
    text-decoration: none;
}
.oo-record-action-btn:hover { color: var(--oo-blue); background: var(--oo-blue-light); }
.oo-record-action-btn:focus { outline: none; }

/* Legacy alias — keep for any control still referencing the old class */
.oo-record-edit-btn {
    margin-left: auto; flex-shrink: 0;
    background: none; border: none; cursor: pointer;
    color: var(--oo-text-faint); font-size: 12px;
    padding: 5px 7px; border-radius: 6px;
    transition: color .15s, background .15s; line-height: 1;
    text-decoration: none; display: inline-flex; align-items: center;
}
.oo-record-edit-btn:hover { color: var(--oo-blue); background: var(--oo-blue-light); }


/* ================================================================
   SECTION 39: SUBJECT / META STRIP
   ================================================================ */

.oo-record-subject-wrap {
    padding: 4px 14px 6px;
}

.oo-record-subject {
    font-size: 14px;
    font-weight: 600;
    color: var(--oo-text);
    line-height: 1.4;
    display: block;
}

.oo-record-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 5px 14px 8px;
    flex-wrap: wrap;
}
.oo-record-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--oo-text-secondary);
}
.oo-record-meta i {
    font-size: 11px;
    color: var(--oo-text-faint);
}


/* ================================================================
   SECTION 40: CHIPS (status / type / priority)
   ================================================================ */

/* Base chip */
.oo-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: 20px;
    font-size: 11px; font-weight: 600; letter-spacing: .2px;
    background: #f0f2f5; color: var(--oo-text-muted);
    border: 1px solid var(--oo-border-light);
    white-space: nowrap; flex-shrink: 0;
}
.oo-chip .chip-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.oo-chip .chip-av {
    width: 16px; height: 16px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 8px; font-weight: 700; color: #fff; flex-shrink: 0;
}

/* Status dot indicator */
.oo-chip.oo-status-open,
.oo-chip.oo-status-inprog,
.oo-chip.oo-status-hold,
.oo-chip.oo-status-closed {
    /* dot added via ::before */
}
.oo-chip.oo-status-open::before,
.oo-chip.oo-status-inprog::before,
.oo-chip.oo-status-hold::before,
.oo-chip.oo-status-closed::before {
    content: ''; width: 5px; height: 5px;
    border-radius: 50%; background: currentColor; display: block;
}

/* Status color variants */
.oo-status-open   { background: var(--oo-blue-light); color: var(--oo-blue); }
.oo-status-inprog { background: #fff3e6; color: var(--oo-orange); }
.oo-status-hold   { background: #f5f3ff; color: #7c3aed; }
.oo-status-closed { background: #f3f4f6; color: var(--oo-text-muted); }

/* Task type chip — base + per-type color variants */
.oo-tasktype-chip  { background: #fff1f1; color: var(--oo-red); }
.oo-tasktype-1  { background: #fff1f1; color: var(--oo-red); }               /* Fix */
.oo-tasktype-2  { background: #fffbeb; color: #d97706; }                     /* Need */
.oo-tasktype-3  { background: var(--oo-blue-light); color: var(--oo-blue); } /* Do */
.oo-tasktype-4  { background: #f8fafc; color: var(--oo-text-muted); }        /* Log */
.oo-tasktype-5  { background: #f5f0ff; color: #7c3aed; }                     /* Project */
.oo-tasktype-6  { background: #ecfdf5; color: #059669; }                     /* Checklist */
.oo-tasktype-10 { background: #fff7ed; color: var(--oo-orange); }            /* Timesheet */

/* Priority chips  (SortOrder: Non-Urgent=1, Low=2, Med=3, High=4, Urgent=5) */
.oo-priority-urgent    { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; font-weight: 700; }
.oo-priority-high      { background: #fff1f1; color: var(--oo-red); }
.oo-priority-med       { background: #fff7ed; color: #d97706; }
.oo-priority-low       { background: #f0fdf4; color: #16a34a; }
.oo-priority-nonurgent { background: #f8fafc; color: var(--oo-text-faint); }


/* ================================================================
   SECTION 41: ATTACH BAR HELPERS
   ================================================================ */

.oo-attach-divider {
    width: 1px; height: 36px;
    background: var(--oo-border);
    margin: 0 4px; flex-shrink: 0; align-self: center;
}

.oo-attach-group-label {
    width: 100%;
    padding: 2px 2px 2px;
    font-size: 10px; font-weight: 700; letter-spacing: .5px;
    text-transform: uppercase; color: var(--oo-text-faint);
}

/* ================================================================
   SECTION 42: ACTION PANEL (expandable panel beneath action bar)
   ================================================================ */

.oo-action-panel {
    display: none;
    border-top: 1px solid var(--oo-border-light);
    animation: ooSlideIn .17s ease;
}
.oo-action-panel.visible { display: block; }

.oo-action-panel-header {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--oo-border-light);
    font-size: 13px; font-weight: 600; color: var(--oo-text-secondary);
}

.oo-action-panel-close {
    margin-left: auto; background: none; border: none; cursor: pointer;
    color: var(--oo-text-faint); font-size: 13px;
    padding: 2px 4px; border-radius: 6px;
    transition: color .15s, background .15s; line-height: 1;
}
.oo-action-panel-close:hover { color: var(--oo-text-secondary); background: var(--oo-border-light); }

.oo-action-panel-body { padding: 12px 14px 14px; }

/* form elements inside action panels */
.oo-action-panel-body .form-control,
.oo-action-panel-body .oo-input {
    height: 36px;
    border: 1.5px solid var(--oo-border);
    border-radius: var(--oo-radius-input);
    font-size: 13px;
    padding: 0 10px;
    transition: border-color .15s, box-shadow .15s;
    background: var(--oo-surface);
}
.oo-action-panel-body .form-control:focus,
.oo-action-panel-body .oo-input:focus {
    border-color: var(--oo-orange);
    box-shadow: var(--oo-focus-ring);
    outline: none;
}
.oo-action-panel-body textarea.form-control { height: auto; padding: 8px 10px; }
.oo-action-panel-body .form-control[readonly] { background: var(--oo-surface-2); color: var(--oo-text-muted); }
.oo-action-panel-body .input-group-addon { display: none !important; }
.oo-action-panel-body .input-group { display: block; }
.oo-action-panel-body .input-group .form-control { width: 100%; }


/* ================================================================
   SECTION 43: FORM ELEMENTS INSIDE PANELS
   ================================================================ */

.oo-field-row {
    display: flex; gap: 10px; margin-bottom: 10px;
}
.oo-field-row > * { flex: 1; min-width: 0; }

.oo-form-actions {
    display: flex; gap: 8px;
    margin-top: 14px; padding-top: 12px;
    border-top: 1px solid var(--oo-border-light);
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* Inside action panels (Parts, Receipts, Hours, etc.) the divider line should
   span the full card width — drop the 320px clamp + auto-centering so the
   form-actions block is panel-body-wide. Buttons stay flex:1 so they share
   width evenly. */
.oo-action-panel-body .oo-form-actions {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}


/* Primary save button — orange (brand) */
.oo-btn-save {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 1; height: 38px; padding: 0 18px;
    background: var(--oo-orange); color: #fff;
    border: none; border-radius: var(--oo-radius-input);
    font-size: 13px; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: background .15s;
    text-decoration: none !important; white-space: nowrap; box-sizing: border-box;
}
.oo-btn-save:hover { background: var(--oo-orange-dark); }
.oo-btn-save.secondary { background: var(--oo-blue); }
.oo-btn-save.secondary:hover { background: var(--oo-blue-dark); }
.oo-btn-save.danger { background: var(--oo-red); }
.oo-btn-save.danger:hover { background: var(--oo-red-dark); }
.oo-btn-save:disabled { opacity: .5; cursor: not-allowed; }

/* Secondary cancel button */
.oo-btn-cancel {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 1; height: 38px; padding: 0 18px;
    background: none; color: var(--oo-text-muted);
    border: 1.5px solid var(--oo-border);
    border-radius: var(--oo-radius-input);
    font-size: 13px; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: background .15s, color .15s;
    text-decoration: none !important; white-space: nowrap; box-sizing: border-box;
}
.oo-btn-cancel:hover { background: var(--oo-surface-2); color: var(--oo-text-secondary); }


/* ================================================================
   SECTION 44: ATTACH PREVIEW (inside action panels)
   ================================================================ */

/* Preview thumbnails appear below the attach bar — full-width block
   so the embedded SingleFileUploadDropZone's Bootstrap row/col grid
   renders correctly (thumbnails would be squeezed if nested in flex). */
.oo-attach-preview {
    display: block;
    width: 100%;
}
.oo-attach-preview .col-xs-12 { padding: 0; }
.oo-attach-preview .thumbnail {
    margin-bottom: 6px;
    border: 1px solid var(--oo-border);
    border-radius: 6px;
    padding: 4px;
}


/* ================================================================
   SECTION 45: TAB SYSTEM
   ================================================================ */

.oo-tab-bar {
    display: flex;
    border-bottom: 1px solid var(--oo-border);
    overflow-x: auto; scrollbar-width: none;
    padding: 0;
    margin: 0; list-style: none;
}
.oo-tab-bar::-webkit-scrollbar { display: none; }

.oo-tab {
    display: flex;
}
.oo-tab > a {
    display: flex; align-items: center; gap: 5px;
    padding: 11px 14px 10px;
    font-size: 12px; font-weight: 600; color: var(--oo-text-muted);
    cursor: pointer; white-space: nowrap; text-decoration: none;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    transition: color .15s, border-color .15s;
}
.oo-tab > a i { font-size: 12px; }
.oo-tab > a:hover { color: var(--oo-blue); }
.oo-tab.active > a {
    color: var(--oo-blue);
    border-bottom-color: var(--oo-blue);
}

.oo-tab-count {
    background: var(--oo-border-light); color: var(--oo-text-muted);
    border-radius: 10px; padding: 1px 6px;
    font-size: 10px; font-weight: 700; line-height: 1.5;
}
.oo-tab.active .oo-tab-count {
    background: var(--oo-blue-light); color: var(--oo-blue);
}

.oo-tab-panel { display: none; }
.oo-tab-panel.active { display: block; }

.oo-tab-footer {
    display: flex; justify-content: flex-end; gap: 20px;
    padding: 10px 14px;
    border-top: 1px solid var(--oo-border-light);
    background: var(--oo-surface-2);
    font-size: 12px; color: var(--oo-text-muted);
}
.oo-tab-footer strong { color: var(--oo-text); margin-left: 4px; }


/* ================================================================
   SECTION 46: LOG ENTRIES
   ================================================================ */

.oo-log-list { padding: 0 14px; }

.oo-log-entry {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 11px 0; border-bottom: 1px solid var(--oo-border-light);
}
.oo-log-entry:last-child { border-bottom: none; }

.oo-log-dot {
    width: 30px; height: 30px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; color: #fff; flex-shrink: 0; margin-top: 1px;
}
.oo-log-dot.hours    { background: #0891b2; }
.oo-log-dot.parts    { background: #d97706; }
.oo-log-dot.receipt  { background: #059669; }
.oo-log-dot.note     { background: #7c3aed; }
.oo-log-dot.approval { background: #00897b; }
.oo-log-dot.signoff  { background: #9333ea; }
.oo-log-dot.email    { background: #6b7280; }
.oo-log-dot.system   { background: var(--oo-text-faint); }

.oo-log-body { flex: 1; min-width: 0; }
.oo-log-who  { font-size: 13px; font-weight: 600; color: var(--oo-text); }
/* Long descriptions wrap; preserve author line breaks. */
.oo-log-desc { font-size: 12px; color: var(--oo-text-muted); margin-top: 1px;
               white-space: pre-wrap; overflow-wrap: break-word; word-break: break-word; }
.oo-log-meta { font-size: 11px; color: var(--oo-text-faint); margin-top: 3px; }

.oo-log-value {
    font-size: 12px; font-weight: 600;
    color: var(--oo-text-secondary); white-space: nowrap;
    flex-shrink: 0; text-align: right;
}

.oo-log-edit {
    font-size: 11px; color: var(--oo-blue); text-decoration: none;
    display: block; margin-top: 3px; text-align: right;
}
.oo-log-edit:hover { text-decoration: underline; }
/* Admin per-row edit links hidden until "Show edit" toggle is enabled */
.oo-log-edit-toggle { display: none; }
.oo-log-edit-on .oo-log-edit-toggle { display: block; }

.oo-log-images { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.oo-log-img-link img {
    width: 48px; height: 48px; object-fit: cover; border-radius: 4px;
    border: 1px solid var(--oo-border); cursor: pointer;
}
.oo-log-img-link img:hover { opacity: .8; }

/* Document chips on log entries — mirror the image gallery row's spacing. */
.oo-log-docs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.oo-log-doc-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 9px;
    border: 1px solid var(--oo-border);
    border-radius: 14px;
    background: var(--oo-surface);
    color: var(--oo-text-secondary);
    font-size: 11px; font-weight: 500;
    text-decoration: none;
    max-width: 100%;
    transition: background .15s, border-color .15s, color .15s;
}
.oo-log-doc-chip:hover {
    background: var(--oo-surface-2);
    border-color: var(--oo-blue);
    color: var(--oo-blue);
    text-decoration: none;
}
.oo-log-doc-chip > i { font-size: 12px; flex-shrink: 0; }
.oo-log-doc-chip > span {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 220px;
}

/* ── Image lightbox / carousel ─────────────────────────────────── */
.oo-lightbox {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 10000;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: flex; align-items: center; justify-content: center;
    animation: ooLightboxFade .15s ease;
}
@keyframes ooLightboxFade { from { opacity: 0; } to { opacity: 1; } }
.oo-lightbox-img {
    max-width: 92vw; max-height: 88vh;
    object-fit: contain; box-shadow: 0 8px 32px rgba(0,0,0,.5);
    user-select: none;
    cursor: zoom-in;
    transition: transform .12s ease;
    transform-origin: center center;
}
.oo-lightbox-close,
.oo-lightbox-prev,
.oo-lightbox-next {
    position: absolute; z-index: 2;
    background: rgba(0,0,0,.55); color: #fff;
    border: 1px solid rgba(255,255,255,.25); border-radius: 50%;
    width: 44px; height: 44px; font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .15s, transform .15s;
}
.oo-lightbox-close:hover,
.oo-lightbox-prev:hover,
.oo-lightbox-next:hover { background: rgba(0,0,0,.85); transform: scale(1.05); }
.oo-lightbox-close { top: 18px; right: 18px; }
.oo-lightbox-prev  { left: 18px; top: 50%; transform: translateY(-50%); }
.oo-lightbox-next  { right: 18px; top: 50%; transform: translateY(-50%); }
.oo-lightbox-prev:hover { transform: translateY(-50%) scale(1.05); }
.oo-lightbox-next:hover { transform: translateY(-50%) scale(1.05); }
.oo-lightbox-counter {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    color: rgba(255,255,255,.85); font-size: 13px;
    background: rgba(0,0,0,.55); padding: 4px 10px; border-radius: 12px;
}
.oo-lightbox-prev[disabled],
.oo-lightbox-next[disabled] { opacity: .3; cursor: default; pointer-events: none; }


/* ================================================================
   SECTION: TOAST NOTIFICATION
   ================================================================ */

.oo-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: var(--oo-text-primary, #222); color: #fff;
    padding: 10px 24px; border-radius: 6px; font-size: 13px;
    opacity: 0; transition: opacity .3s; z-index: 9999;
    pointer-events: none;
}
.oo-toast.visible { opacity: 1; }


/* ================================================================
   SECTION 47: OVERFLOW MENU
   ================================================================ */

.oo-overflow-wrap { position: relative; }

.oo-overflow-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: var(--oo-surface);
    border: 1.5px solid var(--oo-border);
    border-radius: var(--oo-radius-card);
    box-shadow: 0 4px 20px rgba(0,0,0,.12);
    min-width: 170px;
    z-index: 200;
    padding: 4px;
    animation: ooSlideIn .15s ease;
}
.oo-overflow-menu.open { display: block; }

.oo-overflow-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--oo-text-secondary);
    cursor: pointer;
    transition: background .12s, color .12s;
    text-decoration: none;
    text-align: left;
    line-height: 1.3;
    box-sizing: border-box;
}
.oo-overflow-item:hover:not([disabled]) {
    background: var(--oo-surface-2);
    color: var(--oo-text);
    text-decoration: none;
}
.oo-overflow-item i { width: 16px; text-align: center; font-size: 13px; }
.oo-overflow-item i.fa-pen-nib             { color: #7c3aed; }
.oo-overflow-item i.fa-check-circle        { color: #00897b; }
.oo-overflow-item i.fa-pause-circle        { color: #d97706; }
.oo-overflow-item i.fa-file-alt            { color: var(--oo-text-faint); }
.oo-overflow-item i.fa-file-invoice-dollar { color: var(--oo-blue); }
.oo-overflow-item i.fa-pencil-alt          { color: var(--oo-orange); }
.oo-overflow-item i.fa-copy                { color: var(--oo-blue); }
.oo-overflow-item i.fa-print               { color: var(--oo-text-muted); }
.oo-overflow-item i.fa-share-alt           { color: var(--oo-blue); }


/* ================================================================
   SECTION 47b: TASK UPDATES ACTION BAR (oo-actbar)
   Two-tier hierarchy: primary CTAs (Update / Close / Re-Open / Approve / Deny)
   on top, secondary chips (Parts / Receipts / Hours / Tag Users / More) below.
   Used by TaskDetails Task Updates section. Reusable wherever a dominant
   "next action" should be visually separated from supporting actions.
   ================================================================ */

.oo-actbar { padding: 12px 14px 10px; }

/* Primary tier — the most common next action(s). */
.oo-actbar__primary {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.oo-actbar__btn {
    flex: 1 1 200px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 10px;
    border: 1.5px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .01em;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
    font-family: inherit;
    line-height: 1;
}
.oo-actbar__btn i { font-size: 14px; }
.oo-actbar__btn:focus-visible {
    outline: none;
    box-shadow: var(--oo-focus-ring);
}
.oo-actbar__btn.active { transform: translateY(1px); }

/* Update — orange filled (most prominent). */
.oo-actbar__btn--update {
    background: var(--oo-orange);
    color: #fff;
    box-shadow: 0 2px 6px rgba(242,103,34,.25);
}
.oo-actbar__btn--update:hover {
    background: var(--oo-orange-dark);
    box-shadow: 0 4px 12px rgba(242,103,34,.32);
}

/* Close — outlined red. Prominent but distinct from Update. */
.oo-actbar__btn--close {
    background: #fff;
    color: var(--oo-red);
    border-color: var(--oo-red);
}
.oo-actbar__btn--close:hover {
    background: var(--oo-red-light, #fff1f1);
    color: var(--oo-red-dark, #b91c1c);
    border-color: var(--oo-red-dark, #b91c1c);
}

/* Re-Open — outlined green (mutually exclusive with Close). */
.oo-actbar__btn--reopen {
    background: #fff;
    color: var(--oo-green, #1b7e34);
    border-color: var(--oo-green, #1b7e34);
}
.oo-actbar__btn--reopen:hover {
    background: var(--oo-green-light, #f0fdf4);
    color: var(--oo-green-dark, #166b2b);
    border-color: var(--oo-green-dark, #166b2b);
}

/* Approve / Deny / Cancel Request — appear in primary row when on approval-flow tasks. */
.oo-actbar__btn--approve {
    background: var(--oo-green, #1b7e34);
    color: #fff;
}
.oo-actbar__btn--approve:hover { background: var(--oo-green-dark, #166b2b); }

.oo-actbar__btn--deny {
    background: #fff;
    color: var(--oo-red);
    border-color: var(--oo-red);
}
.oo-actbar__btn--deny:hover { background: var(--oo-red-light, #fff1f1); }

.oo-actbar__btn--cancelreq {
    background: #fff;
    color: var(--oo-text-secondary);
    border-color: var(--oo-border);
}
.oo-actbar__btn--cancelreq:hover {
    background: var(--oo-surface-2);
    color: var(--oo-text);
}

/* Divider — visually separates primary from secondary. */
.oo-actbar__divider {
    height: 1px;
    background: var(--oo-border-light);
    margin: 12px 2px 6px;
}

/* Secondary tier — supporting actions as ghost chips. */
.oo-actbar__secondary {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    align-items: center;
}
.oo-actbar__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--oo-text-secondary);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    transition: background .12s, color .12s;
}
.oo-actbar__chip:hover {
    background: var(--oo-surface-2);
    color: var(--oo-blue);
}
.oo-actbar__chip.active {
    background: var(--oo-blue-light, #e8f0fb);
    color: var(--oo-blue);
}
.oo-actbar__chip i {
    width: 14px;
    text-align: center;
    font-size: 13px;
}
.oo-actbar__chip[data-panel="parts"]    i { color: var(--oo-yellow); }
.oo-actbar__chip[data-panel="receipt"]  i { color: var(--oo-green, #1b7e34); }
.oo-actbar__chip[data-panel="hours"]    i { color: #0891b2; }
.oo-actbar__chip[data-panel="tagusers"] i { color: var(--oo-blue); }
.oo-actbar__chip[data-panel="signoff"]  i { color: #7c3aed; }
.oo-actbar__chip[data-panel="approval"] i { color: #00897b; }
.oo-actbar__chip[data-panel="hold"]     i { color: var(--oo-yellow); }
.oo-actbar__chip[data-panel="invoice"]  i { color: var(--oo-green, #1b7e34); }

/* More — overflow toggle on the right. */
.oo-actbar__more {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    background: none;
    border: 1px solid var(--oo-border-light);
    border-radius: 6px;
    cursor: pointer;
    color: var(--oo-text-muted);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
}
.oo-actbar__more:hover {
    background: var(--oo-surface-2);
    color: var(--oo-text-secondary);
    border-color: var(--oo-border);
}
.oo-actbar__more.active {
    background: var(--oo-surface-2);
    color: var(--oo-text-secondary);
}

/* Mobile — primaries stack full-width, secondary becomes a horizontal scroll rail. */
@media (max-width: 600px) {
    .oo-actbar { padding: 10px 10px 8px; }
    .oo-actbar__primary {
        flex-direction: column;
        gap: 8px;
    }
    .oo-actbar__btn {
        flex: 1 1 auto;
        width: 100%;
        min-height: 50px;
        font-size: 16px;
    }
    .oo-actbar__divider { margin: 10px 0 6px; }
    .oo-actbar__secondary {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        margin: 0 -10px;
        padding-left: 10px;
        padding-right: 10px;
    }
    .oo-actbar__secondary::-webkit-scrollbar { display: none; }
    .oo-actbar__chip {
        flex: 0 0 auto;
        border: 1px solid var(--oo-border-light);
        background: var(--oo-surface);
        padding: 8px 12px;
        font-size: 13px;
    }
    .oo-actbar__more {
        margin-left: 0;
        flex: 0 0 auto;
    }
}


/* ================================================================
   SECTION 48: ACTION ROW (horizontal button strip)
   ================================================================ */

.oo-action-row {
    display: flex;
    border-top: 1px solid var(--oo-border-light);
}

.oo-action-col {
    flex: 1;
    border-right: 1px solid var(--oo-border-light);
}
.oo-action-col:last-child { border-right: none; }

.oo-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 100%;
    padding: 10px 4px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    color: var(--oo-text-muted);
    text-decoration: none;
    transition: background .15s, color .15s;
    line-height: 1.2;
    text-align: center;
}
.oo-action-btn i { font-size: 16px; color: var(--oo-text-faint); transition: color .15s; }
.oo-action-btn:hover:not(.disabled) { background: var(--oo-surface-2); color: var(--oo-text-secondary); }
.oo-action-btn.disabled { opacity: .4; cursor: default; pointer-events: none; }


/* ================================================================
   SECTION: ADMIN PEOPLE / MY ACCOUNT PAGE  (prefix: ap-)
   ================================================================ */

/* Field layout */
.ap-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.ap-field:last-child { margin-bottom: 0; }

.ap-field-narrow { max-width: 260px; }

.ap-field-error {
    display: block;
    font-size: 11px;
    color: var(--oo-red);
    margin-top: 2px;
}

/* Toggle switch rows */
.ap-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    min-height: 30px;
}

.ap-toggle-label {
    font-size: 13px;
    color: var(--oo-text);
}

.ap-toggle-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 32px;
    margin-bottom: 12px;
}

/* Day checkboxes (email days) */
.ap-days-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 14px;
    padding: 10px 0;
    border-top: 1px solid var(--oo-border-light);
    border-bottom: 1px solid var(--oo-border-light);
}

/* Day toggle switches (notifications) */
.ap-days-switches {
    gap: 16px 24px;
}

.ap-day-switch {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Subsection headings within cards */
.ap-section-subtitle {
    font-size: 13px;
    font-weight: 700;
    color: var(--oo-text);
    margin: 20px 0 4px;
    padding-top: 16px;
    border-top: 1px solid var(--oo-border-light);
}

.ap-section-subtitle:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.ap-section-help {
    font-size: 12px;
    color: var(--oo-text-muted);
    margin: 0 0 10px;
}

.ap-note {
    font-size: 12px;
    padding: 8px 12px;
    border-radius: var(--oo-radius-input);
    margin-bottom: 12px;
}

.ap-note-warning {
    background: var(--oo-orange-light);
    color: var(--oo-orange-dark);
    border-left: 3px solid var(--oo-orange);
}

/* Notification matrix table */
.ap-notification-table-wrap {
    overflow-x: auto;
    margin-bottom: 16px;
}

.ap-notification-table {
    width: 100%;
    min-width: 500px;
    font-size: 13px;
}

.ap-notification-table thead th {
    background: var(--oo-orange);
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    padding: 8px 10px;
    white-space: nowrap;
}

.ap-notification-table tbody td {
    padding: 8px;
    vertical-align: middle;
}

.ap-notif-row-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--oo-text);
    white-space: nowrap;
}

/* Report rows */
.ap-report-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: flex-end;
    padding: 10px 0;
    border-bottom: 1px solid var(--oo-border-light);
}

.ap-report-row:last-child { border-bottom: none; }

.ap-report-row .ap-field { flex: 1; min-width: 120px; margin-bottom: 0; }

.ap-report-num {
    flex: 0 0 100%;
    justify-content: flex-start;
    border-bottom: 1px solid var(--oo-border-light);
    padding-bottom: 6px;
    margin-bottom: 2px;
}

.ap-report-num .oo-field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--oo-text-dark);
    text-transform: none;
    letter-spacing: 0;
}

/* Department section */
.ap-dept-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-end;
    margin-bottom: 12px;
}

.ap-dept-filters .ap-field { flex: 1; min-width: 160px; margin-bottom: 0; }

.ap-dept-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
    padding-bottom: 2px;
}

/* Footer actions */
.ap-footer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px solid var(--oo-border-light);
}

.ap-footer-actions .oo-save-bar {
    margin-top: 0;
    padding: 0;
    border-top: none;
}

.ap-clear-cookies {
    font-size: 12px;
}

.ap-help-link {
    font-size: 12px;
    color: var(--oo-blue);
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Sticky save bar on mobile */
@media (max-width: 767px) {
    .ap-footer-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--oo-surface);
        border-top: 2px solid var(--oo-border-light);
        margin-top: 0;
        padding: 10px 14px;
        z-index: 200;
        box-shadow: 0 -2px 10px rgba(0,0,0,.1);
    }
    /* Extra bottom padding so content isn't hidden behind the sticky bar */
    .oo-wrap:has(.ap-footer-actions) { padding-bottom: 100px; }

    /* Report rows — controlled stacking on narrow screens */
    .ap-report-row .ap-field:nth-child(2) { flex: 0 0 100%; }
    .ap-report-row .ap-field:nth-child(3),
    .ap-report-row .ap-field:nth-child(4) { flex: 0 0 calc(50% - 6px); }
    .ap-report-row .ap-field:nth-child(5) { flex: 0 0 100%; }
}


/* ================================================================
   SECTION 99: MOBILE / TOUCH OPTIMISATIONS
   All rules scoped to max-width: 600px unless noted.
   ================================================================ */

@media (max-width: 600px) {

    /* ── 1. Prevent iOS Safari input zoom (font-size must be ≥ 16px on mobile) ── */
    .oo-input,
    .oo-select,
    .oo-textarea,
    .oo-search-input,
    .oo-filter-select {
        font-size: 16px !important;
    }

    /* ── 2. Touch targets — toggle rows & checkbox rows (min 44px) ── */
    .oo-toggle-row {
        padding: 10px 0;
        min-height: 44px;
    }
    .oo-check-row {
        padding: 9px 0;
        min-height: 44px;
    }
    .oo-checkbox-label {
        min-height: 44px;
    }

    /* ── 3. Collapsible card header tap target (min 48px) ── */
    .oo-details-summary {
        min-height: 48px;
        padding: 13px 14px;
    }

    /* ── 4. Save bar — taller tap targets, keep side-by-side on mobile ── */
    .oo-save-bar {
        padding: 12px 14px;
        gap: 8px;
    }
    .oo-save-bar .oo-btn-save,
    .oo-save-bar .oo-btn-cancel {
        height: 48px;
        justify-content: center;
    }

    /* ── 5. Filter bar — toggle button visible, bar hidden until opened ── */
    .oo-filter-toggle { display: flex; }
    .oo-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        display: none;
    }
    .oo-filter-bar.open { display: flex; }
    .oo-filter-bar .oo-filter-select,
    .oo-filter-bar select.oo-filter-select,
    .oo-filter-bar .oo-search-wrap,
    .oo-filter-bar .oo-btn-primary,
    .oo-filter-bar .oo-btn-sm,
    .oo-filter-bar .oo-checkbox-label {
        width: 100%;
        max-width: none;
        min-width: 0;
    }
    .oo-filter-bar .oo-btn-primary,
    .oo-filter-bar .oo-btn-sm {
        justify-content: center;
        height: 44px;
    }
    .oo-search-wrap {
        max-width: none;
    }

    /* ── 6. Card body inner padding — slightly tighter on small screens ── */
    .oo-details-inner {
        padding: 12px;
    }

    /* ── 7. oo-form-actions (grid edit forms) — taller tap targets, keep side-by-side ── */
    .oo-form-actions {
        max-width: none;
        gap: 8px;
    }
    .oo-form-actions .oo-btn-save,
    .oo-form-actions .oo-btn-cancel {
        height: 48px;
        justify-content: center;
        flex: 1;
    }
}

/* ── Ultra-small screens (<400px) — tighten horizontal padding ── */
@media (max-width: 400px) {
    .oo-wrap,
    .oo-wrap-wide,
    .oo-wrap-full { padding-left: 8px; padding-right: 8px; }
    .oo-details-inner { padding: 10px 8px; }
    .oo-card-body { padding: 10px 8px; }
}


/* ================================================================
   SECTION 50: DETAIL PAGE COMPONENTS
   ================================================================ */

/* ---------- Detail page wrap (flex column variant of oo-wrap) ---------- */
.oo-detail-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 12px 8px 80px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
@media(min-width:600px) { .oo-detail-wrap { padding: 20px 16px 80px; } }
/* Wide variant — for pages where horizontal real estate is valuable (e.g.
   ChecklistDetails, where each row has description + inputs + action). */
.oo-detail-wrap--wide { max-width: 1200px; }

/* ---------- Accent card (orange top border) ---------- */
.oo-card-accent { border-top: 3px solid var(--oo-orange); }

/* ---------- Description (legacy class name "oo-desc-clamp"; no longer clamps) ---------- */
.oo-desc-clamp {
    padding: 4px 14px 8px;
    font-size: 14px;
    color: var(--oo-text-secondary);
    line-height: 1.5;
    /* No line clamp on detail pages — description should grow vertically.
       Class name is legacy; kept to avoid touching every consumer. */
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.oo-desc-clamp p,
.oo-desc-clamp span,
.oo-desc-clamp div {
    font-size: inherit;
    color: inherit;
    line-height: inherit;
    margin: 0;
}

/* ---------- Inline banners (contextual, not page-level alerts) ---------- */
.oo-warn-banner {
    background: var(--oo-yellow-light); border: 1.5px solid #fcd34d;
    border-radius: 10px; padding: 10px 12px;
    display: flex; gap: 8px; align-items: flex-start;
    margin-bottom: 10px; font-size: 12px; color: #78350f; line-height: 1.4;
}
.oo-warn-banner i { color: var(--oo-yellow); flex-shrink: 0; margin-top: 1px; }

.oo-confirm-banner {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 12px; background: var(--oo-red-light);
    border: 1.5px solid #fecaca; border-radius: 10px;
    margin-bottom: 10px; font-size: 12px; color: #7f1d1d; cursor: pointer;
    line-height: 1.4;
}
.oo-confirm-banner input[type=checkbox] { margin-top: 1px; flex-shrink: 0; accent-color: var(--oo-red); }
.oo-confirm-banner label { cursor: pointer; }

/* ---------- Card overflow visible (for dropdowns) ---------- */
.oo-card-overflow { overflow: visible !important; }

/* ---------- Action bar wrapping ---------- */
.oo-action-bar-wrap {
    flex-wrap: wrap;
    padding: 2px 8px 10px;
    gap: 2px;
    overflow: visible;
}

/* ---------- RadGrid overrides inside tab panels ---------- */
.oo-tab-panel .rgRow td,
.oo-tab-panel .rgAltRow td { padding: 10px 14px; border-bottom: 1px solid var(--oo-border-light); font-size: 14px !important; }
.oo-tab-panel .rgHeader { display: none; }
.oo-tab-panel .rgHeader th { font-size: 14px !important; }
.oo-tab-panel .RadGrid { border: none !important; }
.oo-tab-panel .rgPager { padding: 8px 14px; background: var(--oo-surface-2); border-top: 1px solid var(--oo-border-light); }

/* ---------- Tab panel page-specific overrides ---------- */
#oo-dtab-subtask .oo-action-panel-body { border-top: none; }
#oo-dtab-parts > .row { display: none; }
#oo-dtab-history .rgHeader { display: none; }

/* ---------- Attach button icon color assignments ---------- */
.oo-attach-btn[data-panel="update"]   i { color: var(--oo-blue); }
.oo-attach-btn[data-panel="hours"]    i { color: #0891b2; }
.oo-attach-btn[data-panel="parts"]    i { color: var(--oo-yellow); }
.oo-attach-btn[data-panel="receipt"]  i { color: #059669; }
.oo-attach-btn[data-panel="note"]     i { color: var(--oo-purple); }
.oo-attach-btn[data-panel="approval"] i { color: var(--oo-teal); }
.oo-attach-btn[data-panel="signoff"]  i { color: var(--oo-purple); }
.oo-attach-btn[data-panel="close"]    i { color: var(--oo-red); }
.oo-attach-btn[data-panel="hold"]     i { color: var(--oo-yellow); }
.oo-attach-btn[data-panel="invoice"]  i { color: #0369a1; }
.oo-attach-btn[data-panel="tagusers"] i { color: var(--oo-blue); }
.oo-attach-btn[data-panel="share"]    i { color: var(--oo-blue); }
.oo-attach-btn[data-panel="reopen"]   i { color: #059669; }
.oo-attach-btn.active i               { color: var(--oo-blue) !important; }
.oo-attach-btn.oo-reopen-btn i        { color: #059669; }

/* ---------- Action panel header icon colors ---------- */
.oo-action-panel-header > i.fa-pen          { color: var(--oo-blue); }
.oo-action-panel-header > i.fa-tasks        { color: var(--oo-blue); }
.oo-action-panel-header > i.fa-clock        { color: #0891b2; }
.oo-action-panel-header > i.fa-box          { color: var(--oo-yellow); }
.oo-action-panel-header > i.fa-receipt      { color: #059669; }
.oo-action-panel-header > i.fa-sticky-note  { color: var(--oo-purple); }
.oo-action-panel-header > i.fa-check-circle { color: var(--oo-teal); }
.oo-action-panel-header > i.fa-pen-nib      { color: var(--oo-purple); }
.oo-action-panel-header > i.fa-times-circle { color: var(--oo-red); }
.oo-action-panel-header > i.fa-pause-circle { color: var(--oo-yellow); }
.oo-action-panel-header > i.fa-file-invoice-dollar { color: #0369a1; }
.oo-action-panel-header > i.fa-user-tag     { color: var(--oo-blue); }
.oo-action-panel-header > i.fa-share-alt    { color: var(--oo-blue); }
.oo-action-panel-header > i.fa-copy         { color: var(--oo-blue); }
.oo-action-panel-header > i.fa-rotate-left  { color: #059669; }

/* ---------- Clock-in warning banner ---------- */
.oo-clockin-banner {
    display: flex; align-items: center; gap: 8px;
    background: var(--oo-yellow-light); border: 1.5px solid var(--oo-orange-mid);
    border-radius: 10px; padding: 10px 14px;
    font-size: 12px; color: #7c2d12;
}
.oo-clockin-banner i { color: var(--oo-orange); flex-shrink: 0; }
.oo-clockin-banner span { flex: 1; }
.oo-clockin-link {
    background: var(--oo-orange); color: #fff !important;
    border-radius: 6px; padding: 4px 10px;
    font-size: 11px; font-weight: 600; text-decoration: none;
    flex-shrink: 0;
}
.oo-clockin-link:hover { background: var(--oo-orange-dark); }
.oo-clockin-dismiss {
    background: none; border: none; cursor: pointer;
    color: #9a3412; opacity: .6; padding: 0 2px; flex-shrink: 0;
}
.oo-clockin-dismiss:hover { opacity: 1; }

/* ---------- Tagged users chip ---------- */
.oo-tagged-users {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; color: var(--oo-text-secondary);
}
.oo-tagged-users i { color: var(--oo-blue); opacity: .7; font-size: 11px; }

/* ---------- Overflow menu divider ---------- */
.oo-overflow-divider {
    height: 1px; background: var(--oo-border-light);
    margin: 4px 0;
}

/* ---------- Inline error ---------- */
.oo-inline-error {
    background: #fef2f2; border: 1.5px solid #fecaca;
    border-radius: 8px; padding: 8px 12px;
    font-size: 12px; color: #991b1b; margin-bottom: 10px;
}

/* ---------- Required field indicator ---------- */
.oo-required { color: var(--oo-red); margin-left: 2px; }


/* ================================================================
   SECTION 51: MINI MODAL
   ================================================================ */

.oo-modal-overlay {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(0,0,0,.45);
    z-index: 9999; display: flex; align-items: center; justify-content: center;
}
.oo-modal {
    background: #fff; border-radius: 14px;
    width: min(420px, 92vw);
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    overflow: hidden;
}
.oo-modal-header {
    padding: 16px 20px 12px;
    font-size: 15px; font-weight: 600; color: var(--oo-text);
    border-bottom: 1px solid var(--oo-border-light);
}
.oo-modal-body {
    padding: 16px 20px;
    font-size: 13px; color: var(--oo-text-secondary); line-height: 1.5;
}
.oo-modal-body p { margin: 0 0 6px; }
.oo-modal-footer {
    padding: 12px 20px 16px;
    display: flex; justify-content: flex-end; gap: 8px;
    border-top: 1px solid var(--oo-border-light);
}
.oo-variance-detail {
    display: flex; flex-direction: column; gap: 4px;
    background: var(--oo-surface-2); border-radius: 8px;
    padding: 10px 12px; margin: 10px 0 0;
    font-size: 13px;
}
.oo-variance-detail strong { color: var(--oo-text); }

/* ---------- Detail page responsive ---------- */
@media(max-width:480px) {
    .oo-detail-wrap { padding: 8px 6px 40px; }
    .oo-field-row { flex-direction: column; }
    .oo-modal { width: 96vw; }
}
