/* TechMaxIT ISO Tracker - core stylesheet */
:root {
    --brand: #F55A00;
    --brand-dark: #0F172A;
    --brand-accent: #FFB724;
    --brand-light: #FFD28A;
    --brand-soft: #FFF7E6;
    --bg: #f8fafc;
    --panel: #ffffff;
    --border: #e2e8f0;
    --text: #0F172A;
    --muted: #64748B;
    --green: #2e7d32;
    --red: #c62828;
    --amber: #e08600;
    --grey: #757f90;
    --shadow: 0 1px 3px rgba(20, 35, 80, 0.08), 0 1px 2px rgba(20, 35, 80, 0.06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.45;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Login ---------- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 85% 15%, rgba(245, 90, 0, 0.45) 0%, rgba(245, 90, 0, 0) 45%),
                linear-gradient(135deg, #0F172A 0%, #1e293b 100%);
    padding: 20px;
}
.login-card {
    background: var(--panel);
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    padding: 32px 30px 28px;
}
.login-card .logo { text-align: center; margin-bottom: 6px; }
.login-card .logo img { max-width: 190px; height: auto; }
.login-card .login-brand { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--brand-dark); margin-top: 4px; }
.login-card h1 {
    font-size: 17px;
    text-align: center;
    margin: 8px 0 2px;
    color: var(--brand-dark);
}
.login-card .sub {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 22px;
}

/* ---------- Layout ---------- */
.topbar {
    background: var(--brand-dark);
    border-bottom: 3px solid var(--brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    height: 56px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar .brand { display: flex; align-items: center; gap: 12px; }
.topbar .brand img { height: 30px; width: 30px; }
.topbar .brand span { font-weight: 600; font-size: 15px; letter-spacing: .2px; }
.topbar .brand .brand-name { font-weight: 800; letter-spacing: -.02em; }
.brand-name .brand-max, .topbar .brand .brand-name .brand-max { color: var(--brand); font-weight: 800; }
.topbar .brand .product-name { font-weight: 500; color: #cbd5e1; }
.topbar .brand .trial-pill { font-size: 11px; font-weight: 600; color: #FFD28A; border: 1px solid rgba(255, 210, 138, .5); padding: 2px 9px; border-radius: 11px; }
.topbar .brand .site-badge { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; background: #FFB724; color: #0F172A; padding: 3px 9px; border-radius: 11px; }
.topbar .user-box { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.topbar .user-box .role-pill {
    background: var(--brand-accent);
    color: var(--brand-dark);
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 11px;
    font-size: 11px;
}
.logout-form { display: inline; margin: 0; }
.topbar .user-box .auditor-pill {
    display: inline-flex; align-items: center; gap: 5px;
    background: #7c4dcc; color: #fff; font-weight: 700;
    padding: 2px 9px; border-radius: 11px; font-size: 11px;
    text-decoration: none; margin-right: -6px;
}
.topbar .user-box a.auditor-pill:hover { background: #6a3bb8; }
.topbar .user-box .auditor-pill .auditor-count {
    background: #fff; color: #7c4dcc; border-radius: 8px; padding: 0 5px; font-size: 10px; line-height: 15px;
}

/* The ::before pseudo paints the full-height sidebar column so the dark-blue
   background fills the entire left gutter even when the nav is shorter than
   the main content (required because align-self:flex-start on .sidebar keeps
   the sticky working but limits the element's paint height). */
.layout {
    display: flex;
    min-height: calc(100vh - 56px);
    position: relative;
}
.layout::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 220px;
    background: var(--brand-dark);
    pointer-events: none;
    z-index: 0;
}
.sidebar {
    width: 220px;
    background: var(--brand-dark);
    padding: 12px 0;
    flex-shrink: 0;
    /* Stay visible while the main content scrolls. 56px = topbar height.
       align-self:flex-start is required for position:sticky to work in a
       flex row; .layout::before fills the remaining column height in blue. */
    position: sticky;
    top: 56px;
    align-self: flex-start;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    box-shadow: 2px 0 6px rgba(15, 30, 60, 0.12);
    z-index: 1;
}
.sidebar a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cdd7f0;
    padding: 9px 14px 9px 18px;
    font-size: 13.5px;
    border-left: 3px solid transparent;
    transition: background .18s ease, color .18s ease, border-color .18s ease, padding-left .18s ease;
    animation: nav-in .35s ease both;
}
/* Staggered entrance on page load. */
.sidebar a:nth-child(1)  { animation-delay: .02s; } .sidebar a:nth-child(2)  { animation-delay: .04s; } .sidebar a:nth-child(3)  { animation-delay: .06s; }
.sidebar a:nth-child(4)  { animation-delay: .08s; } .sidebar a:nth-child(5)  { animation-delay: .10s; } .sidebar a:nth-child(6)  { animation-delay: .12s; }
.sidebar a:nth-child(7)  { animation-delay: .14s; } .sidebar a:nth-child(8)  { animation-delay: .16s; } .sidebar a:nth-child(9)  { animation-delay: .18s; }
.sidebar a:nth-child(10) { animation-delay: .20s; } .sidebar a:nth-child(11) { animation-delay: .22s; } .sidebar a:nth-child(12) { animation-delay: .24s; }
.sidebar a:nth-child(13) { animation-delay: .26s; } .sidebar a:nth-child(14) { animation-delay: .28s; } .sidebar a:nth-child(15) { animation-delay: .30s; }
.sidebar a:nth-child(16) { animation-delay: .32s; } .sidebar a:nth-child(17) { animation-delay: .34s; } .sidebar a:nth-child(18) { animation-delay: .36s; }
.sidebar a:nth-child(19) { animation-delay: .38s; } .sidebar a:nth-child(20) { animation-delay: .40s; } .sidebar a:nth-child(n+21) { animation-delay: .42s; }
@keyframes nav-in { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.sidebar .nav-ico { flex: 0 0 17px; opacity: .75; transition: transform .2s ease, opacity .2s ease, color .2s ease; }
.sidebar .nav-label { flex: 1; }
.sidebar .nav-chev { opacity: 0; transform: translateX(-6px); transition: opacity .18s ease, transform .18s ease; font-size: 16px; line-height: 1; color: var(--brand-accent); }
.sidebar a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; padding-left: 22px; }
.sidebar a:hover .nav-ico { opacity: 1; transform: scale(1.15) rotate(-6deg); color: var(--brand-accent); }
.sidebar a:hover .nav-chev { opacity: 1; transform: none; }
.sidebar a.active {
    background: rgba(244, 210, 26, .12);
    color: #fff;
    border-left-color: var(--brand-accent);
    font-weight: 600;
}
.sidebar a.active .nav-ico { opacity: 1; color: var(--brand-accent); }
.sidebar a.active .nav-chev { opacity: .6; transform: none; }
@media (prefers-reduced-motion: reduce) { .sidebar a, .sidebar .nav-ico, .sidebar .nav-chev { animation: none !important; transition: none !important; } }

/* Hover help card shown to the right of the sidebar. */
.nav-tip {
    position: fixed; z-index: 60; width: 260px; background: #fff; color: var(--text);
    border: 1px solid var(--border); border-left: 4px solid var(--brand-accent); border-radius: 8px;
    box-shadow: 0 10px 28px rgba(20,35,80,.22); padding: 10px 12px; font-size: 12.5px; line-height: 1.45;
    pointer-events: none; animation: tip-in .14s ease-out;
}
.nav-tip::before { content: ''; position: absolute; left: -9px; top: 14px; border: 6px solid transparent; border-right-color: var(--brand-accent); }
.nav-tip-title { font-weight: 700; color: var(--brand-dark); margin-bottom: 3px; font-size: 13px; }
@keyframes tip-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.sidebar .nav-sep { color: #6f7fb3; font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px; padding: 14px 18px 6px; }
.sidebar .nav-sep-fav { color: var(--brand-accent); padding-top: 4px; }
.sidebar .nav-fav { border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 2px; }
.sidebar .nav-fav-empty { color: #8d9cc8; font-size: 11.5px; line-height: 1.4; padding: 2px 18px 8px; font-style: normal; }
.sidebar .nav-fav-empty em { font-style: normal; color: #cdd7f0; }
.sidebar .nav-fav-empty[hidden] { display: none; }
/* Right-click menu on sidebar pages (Add / Remove favorites). */
.nav-menu { position: fixed; z-index: 70; min-width: 200px; background: #fff; border: 1px solid var(--border); border-radius: 8px;
    box-shadow: 0 10px 28px rgba(20,35,80,.22); padding: 4px; }
.nav-menu[hidden] { display: none; }
.nav-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 7px 10px; border-radius: 5px;
    font-size: 13px; color: var(--text); cursor: pointer; }
.nav-menu button:hover { background: #FFF7E6; color: var(--brand-dark); }
.nav-menu button[hidden] { display: none; }

.content { flex: 1; padding: 22px 26px 0; overflow-x: auto; min-width: 0; display: flex; flex-direction: column; }
/* Footer lives inside the layout so the sidebar colour runs the full page height; it sits at the bottom on short pages. */
.content-body { flex: 1 0 auto; }
.app-footer { text-align: center; padding: 14px; color: #8a93a6; font-size: 11px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.page-head h1 { font-size: 21px; margin: 0; color: var(--brand-dark); }

/* ---------- Cards / panels ---------- */
.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    /* Slightly deeper shadow so panels visually lift off the page. */
    box-shadow: 0 2px 4px rgba(15, 30, 60, 0.06), 0 6px 18px rgba(15, 30, 60, 0.10);
    padding: 18px;
    margin-bottom: 18px;
    transition: box-shadow 160ms ease, transform 160ms ease;
}
.panel:hover {
    box-shadow: 0 4px 8px rgba(15, 30, 60, 0.08), 0 10px 28px rgba(15, 30, 60, 0.14);
}
.panel h2 { font-size: 15px; margin: 0 0 14px; color: var(--brand-dark); }

/* ---------- Dashboard top row (Search Records + Quick Actions side-by-side) ---------- */
.dash-top-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 0; align-items: start; }
.dash-top-row .panel { margin-bottom: 18px; }

/* ---------- Dashboard tiles (force all stat cards onto one row) ---------- */
.tiles { display: flex; flex-wrap: nowrap; gap: 10px; margin-bottom: 20px; overflow-x: auto; }
.tile {
    flex: 1 1 0;
    min-width: 0;
    background: var(--panel);
    border: 1px solid var(--border);
    border-left: 4px solid var(--brand);
    border-radius: 8px;
    padding: 14px 16px;
    box-shadow: var(--shadow);
}
.tile .num { font-size: 28px; font-weight: 700; color: var(--brand-dark); }
.tile .lbl { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tile.warn { border-left-color: var(--amber); }
.tile.danger { border-left-color: var(--red); }
.tile.ok { border-left-color: var(--green); }
.tile a { display:block; color: inherit; }
.tile a:hover { text-decoration: none; }

/* ---------- Tables ---------- */
table.grid { width: 100%; border-collapse: collapse; background: var(--panel); font-size: 13px; }
table.grid th, table.grid td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
table.grid th { background: #FFF7E6; color: var(--brand-dark); font-weight: 600; white-space: nowrap; }
table.grid th a.th-sort { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
table.grid th a.th-sort:hover { color: var(--brand); text-decoration: underline; }
table.grid th .sort-arr { font-size: 10px; opacity: 0.7; }
table.grid th .sort-arr.muted { opacity: 0.35; }
table.grid tr:hover td { background: #f7f9fd; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); }
/* Rows that are historical / revoked / returned - dim them slightly. */
table.grid tr.muted-row td { color: var(--muted); background: #fbfbfd; }

/* ---------- Combobox / autocomplete (used on Assign Asset picker) ---------- */
.combo { position: relative; }
.combo-input { width: 100%; }
.combo-results {
    position: absolute; z-index: 40; left: 0; right: 0; top: 100%;
    margin: 2px 0 0; padding: 4px 0;
    background: var(--panel); border: 1px solid var(--border); border-radius: 6px;
    box-shadow: var(--shadow); max-height: 280px; overflow-y: auto; list-style: none;
    font-size: 13px;
}
.combo-results li { padding: 6px 12px; cursor: pointer; }
.combo-results li:hover, .combo-results li.active { background: #FFF7E6; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.field label .req { color: var(--red); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=datetime-local], input[type=search], input[type=number], input[type=month], select, textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13.5px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(245,90,0,.15); }
textarea { resize: vertical; min-height: 70px; }
.form-actions { margin-top: 18px; display: flex; gap: 10px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    background: var(--brand);
    color: #fff;
    text-decoration: none;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn.full { width: 100%; padding: 11px; font-size: 15px; }
.btn.secondary { background: #FFF7E6; color: var(--brand-dark); }
.btn.secondary:hover { background: #d7deee; }
.btn.danger { background: var(--red); }
.btn.small { padding: 4px 10px; font-size: 12px; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.filters .field { min-width: 140px; }
.filters .field label { font-size: 11px; color: var(--muted); }
.filters select, .filters input { padding: 6px 8px; font-size: 13px; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 11px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge.green { background: #e3f3e4; color: var(--green); }
.badge.red { background: #fbe3e3; color: var(--red); }
.badge.amber { background: #fdefd6; color: var(--amber); }

/* ---------- Calendar ---------- */
.cal-btn { text-decoration: none; margin-right: 2px; }
.cal-badge { background: #fff; color: var(--brand-dark); }
.cal-filter-panel { padding: 10px 14px; }
.cal-filters { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.cal-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px; border-radius: 12px; border: 1px solid var(--border); background: #fff; font-size: 12px; cursor: pointer; user-select: none; }
.cal-chip input { margin: 0; accent-color: var(--chip); }
.cal-chip .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--chip); display: inline-block; }
.cal-chip:has(input:checked) { background: color-mix(in srgb, var(--chip) 12%, #fff); border-color: var(--chip); }
.cal-chip:has(input:not(:checked)) { opacity: .55; }
.cal-chip-actions { margin-left: auto; font-size: 12px; color: var(--muted); }
.cal-chip-actions .linkish { background: none; border: 0; color: var(--brand); cursor: pointer; font-size: 12px; padding: 0; }
.cal-chip-actions .linkish:hover { text-decoration: underline; }
#calendar { --fc-border-color: var(--border); --fc-button-bg-color: var(--brand); --fc-button-border-color: var(--brand); --fc-button-hover-bg-color: var(--brand-dark); --fc-button-hover-border-color: var(--brand-dark); --fc-button-active-bg-color: var(--brand-dark); --fc-button-active-border-color: var(--brand-dark); --fc-today-bg-color: #fff8db; --fc-page-bg-color: #fff; font-size: 13px; }
#calendar .fc-toolbar-title { font-size: 18px; color: var(--brand-dark); }
#calendar .fc-button { text-transform: none; font-weight: 600; padding: 5px 11px; font-size: 12.5px; border-radius: 6px; }
#calendar .fc-event { border: 0; border-radius: 4px; padding: 1px 4px; font-size: 11.5px; cursor: pointer; }
#calendar .fc-event.cal-overdue { box-shadow: inset 3px 0 0 #fff, inset 4px 0 0 var(--red); }
#calendar .fc-daygrid-day-number, #calendar .fc-col-header-cell-cushion { color: var(--brand-dark); text-decoration: none; }
#calendar .fc-multimonth { border-radius: 8px; }
#calendar .fc-list-event:hover td { background: #f3f7ff; }

/* ---------- Evidence list mini thumbnails ---------- */
.ev-mini-cell { padding: 4px 6px !important; }
.ev-mini { display: flex; align-items: center; justify-content: center; width: 48px; height: 36px; border-radius: 5px; background: #f3f5fa; border: 1px solid var(--border); overflow: hidden; text-decoration: none; transition: transform .12s, box-shadow .12s; }
.ev-mini:hover { transform: scale(1.08); box-shadow: 0 2px 8px rgba(20,40,80,.18); }
.ev-mini img { width: 100%; height: 100%; object-fit: cover; }
.ev-mini-ext { font-size: 9px; font-weight: 700; color: var(--brand); letter-spacing: .3px; }
.ev-pop-title { font-size: 16px !important; color: var(--brand-dark) !important; }

/* ---------- Link existing evidence (evidence_upload.php) ---------- */
.lk-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.lk-toolbar input[type=text] { flex: 1; min-width: 220px; }
.lk-toolbar select { width: auto; }
.lk-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.lk-seg button { border: 0; background: #fff; padding: 6px 10px; font-size: 12px; cursor: pointer; color: var(--text); }
.lk-seg button + button { border-left: 1px solid var(--border); }
.lk-seg button.active { background: var(--brand); color: #fff; }
.lk-grid { display: grid; gap: 10px; }
.lk-grid.large { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.lk-grid.small { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.lk-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 8px; background: #fff; overflow: hidden; cursor: pointer; transition: box-shadow .12s, border-color .12s; }
.lk-card:hover { box-shadow: 0 2px 10px rgba(20,40,80,.12); }
.lk-card.checked { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(245,90,0,.25); }
.lk-card input[type=checkbox] { position: absolute; top: 8px; left: 8px; z-index: 2; width: 18px; height: 18px; accent-color: var(--brand); }
.lk-thumb { position: relative; display: flex; align-items: center; justify-content: center; background: #f3f5fa; overflow: hidden; }
.lk-grid.large .lk-thumb { height: 140px; }
.lk-grid.small .lk-thumb { height: 90px; }
.lk-thumb img, .lk-thumb video { width: 100%; height: 100%; object-fit: cover; }
.lk-ext { position: absolute; bottom: 6px; right: 6px; background: rgba(15,23,42,.85); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.lk-ext-big { position: static; background: #FFF7E6; color: var(--brand); font-size: 15px; padding: 8px 14px; border-radius: 6px; }
.lk-open { position: absolute; top: 6px; right: 6px; background: rgba(255,255,255,.9); color: var(--brand); border-radius: 4px; padding: 1px 6px; font-size: 13px; text-decoration: none; opacity: 0; transition: opacity .12s; }
.lk-card:hover .lk-open { opacity: 1; }
.lk-meta { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; min-width: 0; }
.lk-title { font-weight: 600; font-size: 12.5px; color: var(--brand-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-grid.small .lk-sub { display: none; }
/* List view: one row per item, small thumbnail on the left. */
.lk-grid.list { grid-template-columns: 1fr; gap: 4px; }
.lk-grid.list .lk-card { flex-direction: row; align-items: center; padding-left: 34px; }
.lk-grid.list .lk-card input[type=checkbox] { top: 50%; transform: translateY(-50%); }
.lk-grid.list .lk-thumb { flex: 0 0 64px; height: 44px; }
.lk-grid.list .lk-ext-big { font-size: 10px; padding: 3px 6px; }
.lk-grid.list .lk-meta { flex: 1; flex-direction: row; gap: 12px; align-items: baseline; padding: 6px 10px; }
.lk-grid.list .lk-title { flex: 1; }
.lk-grid.list .lk-sub { flex: 0 0 auto; }

/* Employee department picker chips */
.dept-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; min-height: 26px; }
.dept-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 10px; border-radius: 12px; background: #FFF7E6; color: var(--brand); font-size: 12px; font-weight: 600; }
.dept-chip.primary { background: var(--brand); color: #fff; }
.dept-chip small { font-weight: 400; opacity: .8; font-size: 10px; text-transform: uppercase; letter-spacing: .3px; }
.dept-chip .x { border: 0; background: transparent; color: inherit; font-size: 15px; line-height: 1; cursor: pointer; padding: 0 2px; opacity: .7; }
.dept-chip .x:hover { opacity: 1; }
.badge.blue { background: #FFF7E6; color: var(--brand); }
.badge.grey { background: #e9ecf1; color: var(--grey); }
.badge.purple { background: #ede7f8; color: #5b3a9e; }

/* ---------- Risk score circle (Vanta-style pill for L x I) ---------- */
.risk-score { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 700; color: #fff; }
.risk-score-green { background: #2f8f3a; }
.risk-score-amber { background: #d68a1c; }
.risk-score-red   { background: #c1362f; }
.risk-score-grey  { background: #9aa3b2; }

/* ---------- Alerts ---------- */
.alert { padding: 11px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 16px; border: 1px solid transparent; }
.alert.error { background: #fbe3e3; color: var(--red); border-color: #f3c4c4; }
.alert.success { background: #e3f3e4; color: var(--green); border-color: #bfe3c1; }
.alert.info { background: #FFF7E6; color: var(--brand-dark); border-color: #FFD28A; }
.alert.warning { background: #fff6dc; color: #7a5600; border-color: #f0d58a; }

/* ---------- Storage usage (documents, admin settings) ---------- */
.storage-usage { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.storage-usage .pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #FFF7E6; border: 1px solid #FFD28A; color: var(--brand-dark); font-size: 12px; font-weight: 600; }
.storage-bar { display: inline-block; width: 160px; height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }
.storage-bar > span { display: block; height: 100%; background: #F55A00; }

/* ---------- Misc ---------- */
.muted { color: var(--muted); }
.right { text-align: right; }
.center { text-align: center; }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.mt0 { margin-top: 0; }
.checklist-step { border: 1px solid var(--border); border-radius: 8px; padding: 14px; margin-bottom: 12px; background: var(--panel); }
.checklist-step.done { border-left: 4px solid var(--green); }
.checklist-step .step-title { font-weight: 600; color: var(--brand-dark); }
.req-evidence { font-size: 12px; color: var(--muted); margin-top: 4px; }
.step-approval { margin-top: 8px; padding: 8px 10px; border-radius: 6px; background: #f6f8fb; border: 1px solid #e3e9f2; }
.step-approval .box { background: #fff; border: 1px solid #e3e9f2; border-radius: 6px; padding: 8px 10px; white-space: pre-wrap; }
.step-approval-form { margin-top: 8px; }
.step-approval-form > summary { cursor: pointer; color: var(--brand); font-weight: 600; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.step-approval-form > summary::-webkit-details-marker { display: none; }
.step-approval-form > summary::before { content: '\25B8'; font-size: 11px; transition: transform .15s; }
.step-approval-form[open] > summary::before { transform: rotate(90deg); }
.step-approval-form[open] { padding: 8px 10px 4px; border: 1px dashed var(--border); border-radius: 6px; }
.login-footer { text-align: center; font-size: 11px; color: var(--muted); margin-top: 18px; }
.section-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.section-actions form.pdf-export { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.section-actions form.pdf-export label { margin: 0; }

/* ---------- Notification bell ---------- */
.notif-bell { position: relative; }
.bell-btn {
    position: relative; background: transparent; border: none; color: #fff;
    cursor: pointer; padding: 6px; border-radius: 6px; display: flex; align-items: center;
}
.bell-btn:hover { background: rgba(255,255,255,.12); }
.bell-badge {
    position: absolute; top: -2px; right: -2px; background: var(--brand-accent);
    color: var(--brand-dark); font-size: 10px; font-weight: 700; line-height: 1;
    padding: 2px 5px; border-radius: 9px; min-width: 16px; text-align: center;
    box-shadow: 0 0 0 2px var(--brand-dark);
}
/* Keeps ringing (shake, short rest, shake...) for as long as anything is unread;
   stops the moment the last notification is read. Paused while the panel is open. */
.bell-btn.has-unread .bell-icon { animation: bell-ring 3s cubic-bezier(.36,.07,.19,.97) infinite; transform-origin: 50% 0; }
.bell-btn.has-unread { color: var(--brand-accent); }
.bell-btn.has-unread[aria-expanded="true"] .bell-icon { animation-play-state: paused; }
.bell-btn.ring .bell-icon { animation: bell-ring 1.4s cubic-bezier(.36,.07,.19,.97) 1; transform-origin: 50% 0; }
.bell-badge.pop { animation: badge-pop .6s cubic-bezier(.2,1.6,.4,1) 1; }
@keyframes bell-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
/* Hard shake: fast large swings that decay, like a bell that has just been struck. */
@keyframes bell-ring {
    0%   { transform: rotate(0); }
    6%   { transform: rotate(28deg); }
    12%  { transform: rotate(-26deg); }
    18%  { transform: rotate(24deg); }
    24%  { transform: rotate(-22deg); }
    30%  { transform: rotate(18deg); }
    36%  { transform: rotate(-15deg); }
    42%  { transform: rotate(12deg); }
    48%  { transform: rotate(-9deg); }
    54%  { transform: rotate(6deg); }
    60%  { transform: rotate(-4deg); }
    66%  { transform: rotate(2deg); }
    72%, 100% { transform: rotate(0); }
}
@keyframes badge-pop { 0% { transform: scale(.4); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .bell-btn .bell-icon, .bell-badge { animation: none !important; } }

.notif-panel {
    position: absolute; top: 44px; right: 0; width: 380px; max-width: 92vw;
    background: #fff; color: var(--text); border: 1px solid var(--border);
    border-radius: 10px; box-shadow: 0 12px 36px rgba(20,35,80,.24); z-index: 100; overflow: hidden;
    animation: notif-in .16s ease-out;
}
@keyframes notif-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-bottom: 1px solid var(--border); font-weight: 600; color: var(--brand-dark); }
.notif-head .notif-count { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 9px; background: var(--brand-accent); color: var(--brand-dark); font-size: 11px; font-weight: 700; vertical-align: 1px; }
.notif-head .linkish { background: none; border: none; color: var(--brand); cursor: pointer; font-size: 12px; padding: 0; }
.notif-head .linkish:hover { text-decoration: underline; }
.notif-list { max-height: 400px; overflow-y: auto; }
.notif-empty { padding: 28px 14px; text-align: center; color: var(--muted); font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.notif-empty svg { opacity: .35; }
.notif-item { display: flex; gap: 10px; padding: 11px 14px 11px 12px; border-bottom: 1px solid #eef1f7; border-left: 3px solid transparent; cursor: default; transition: background .12s; }
.notif-item:last-child { border-bottom: 0; }
.notif-item.unread { background: #f3f7ff; cursor: pointer; }
.notif-item.unread:hover { background: #e9f0ff; }
.notif-item:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.notif-item .notif-icon { flex: 0 0 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.notif-item.type-danger  { border-left-color: var(--red); }   .notif-item.type-danger  .notif-icon { background: #fbe3e3; color: var(--red); }
.notif-item.type-warning { border-left-color: var(--amber); } .notif-item.type-warning .notif-icon { background: #fdefd6; color: var(--amber); }
.notif-item.type-success { border-left-color: var(--green); } .notif-item.type-success .notif-icon { background: #e3f3e4; color: var(--green); }
.notif-item.type-info    { border-left-color: var(--brand); } .notif-item.type-info .notif-icon { background: #FFF7E6; color: var(--brand); }
.notif-item .notif-body { flex: 1; min-width: 0; }
.notif-item .notif-title { font-weight: 600; font-size: 13px; color: var(--brand-dark); line-height: 1.3; display: flex; align-items: center; gap: 6px; }
.notif-item .notif-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex: 0 0 auto; }
.notif-item .notif-msg { font-size: 12.5px; color: var(--text); margin-top: 3px; line-height: 1.4; }
.notif-item .notif-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }
.notif-item .notif-type { text-transform: capitalize; }
.notif-foot { display: block; text-align: center; padding: 10px; font-size: 12.5px; border-top: 1px solid var(--border); background: #fafbfe; font-weight: 600; }
.notif-row.unread { border-left: 4px solid var(--brand); }
.notif-row-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Permission grid ---------- */
table.grid td.perm-cell { text-align: center; }
table.grid td.perm-cell input { width: auto; }

/* ---------- Evidence paste / drop zone ---------- */
.paste-zone {
    margin-top: 8px;
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    background: #fbfcfe;
    transition: border-color .15s, background .15s;
    cursor: pointer;
}
.paste-zone:hover, .paste-zone:focus { border-color: var(--brand); outline: none; }
.paste-zone.drag { border-color: var(--brand); background: #FFF7E6; }
.paste-zone.has-file { border-color: var(--green); background: #f2fbf3; }
.paste-zone .pz-preview { margin-top: 10px; }
.paste-zone .pz-preview img {
    max-width: 100%; max-height: 240px; border-radius: 6px;
    box-shadow: var(--shadow); border: 1px solid var(--border);
}

/* ---------- Checklist template editor ---------- */
.step-edit {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
    background: #fbfcfe;
}
.step-edit-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.step-edit-head .step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; flex: none;
}
.inline-check { font-weight: 400 !important; display: inline-flex; align-items: center; gap: 6px; }
.inline-check input { width: auto !important; }
.row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.row-actions form { margin: 0; }

/* ---------- Asset module: subnav tabs + KPI cards ---------- */
.subnav { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 2px solid var(--border); margin-bottom: 16px; }
.subnav a {
    padding: 8px 16px; font-size: 13px; font-weight: 600; color: var(--brand-dark);
    text-decoration: none; border: 2px solid transparent; border-bottom: none;
    border-radius: 6px 6px 0 0; margin-bottom: -2px;
}
.subnav a:hover { background: #FFF7E6; }
.subnav a.active { background: #fff; border-color: var(--border); border-bottom: 2px solid #fff; color: var(--brand); }

.kpi-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.kpi {
    flex: 1; min-width: 150px; background: #fff; border: 1px solid var(--border);
    border-left: 4px solid var(--brand); border-radius: 8px; padding: 12px 16px; box-shadow: var(--shadow);
}
.kpi.danger  { border-left-color: var(--red); }
.kpi.warning { border-left-color: var(--amber); }
.kpi .kpi-num { display: block; font-size: 26px; font-weight: 700; color: var(--brand-dark); line-height: 1.1; }
.kpi .kpi-label { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
a.kpi-link { text-decoration: none; cursor: pointer; transition: box-shadow .15s; }
a.kpi-link:hover { text-decoration: none; box-shadow: 0 4px 14px rgba(15,30,60,.12); }
a.kpi-link.active { background: #FFF7E6; outline: 2px solid var(--brand); }

/* ---------- ISO control reference chips ---------- */
.iso-controls { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.iso-chip {
    display: inline-block; font-size: 11px; font-weight: 600; line-height: 1;
    padding: 3px 7px; border-radius: 10px; margin: 0 5px 3px 0;
    background: #FFF7E6; color: var(--brand); border: 1px solid #FFD28A; white-space: nowrap;
}
a.iso-chip { text-decoration: none; }
a.iso-chip:hover { background: #d8e4ff; }
.iso-chip-unknown { background: #f1f5f9; color: #64748B; border-color: #cbd5e1; }
.iso-chip-archived { opacity: .7; border-style: dashed; }
.iso-row-covered { background: #f3f9f3; }
.clean-list { list-style: none; padding: 0; margin: 0; }
.clean-list li { padding: 4px 0; border-bottom: 1px solid var(--border); }
.clean-list li:last-child { border-bottom: none; }

/* ---------- Quick Actions launcher (dashboard) ---------- */
.quick-actions .qa-search {
    width: 100%; padding: 11px 14px; font-size: 15px; border: 2px solid var(--border);
    border-radius: 8px; margin: 4px 0 14px; box-sizing: border-box;
}
.quick-actions .qa-search:focus { outline: none; border-color: var(--brand); }
.qa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.qa-grid[hidden] { display: none; }
.qa-card {
    display: flex; flex-direction: column; gap: 3px; text-decoration: none;
    background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--brand);
    border-radius: 8px; padding: 10px 12px; transition: box-shadow .12s, transform .12s;
}
.qa-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); border-left-color: var(--brand-dark); }
.qa-card .qa-cat { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.qa-card .qa-title { font-size: 14px; font-weight: 600; color: var(--brand-dark); }
.qa-card .qa-desc { font-size: 12px; color: var(--muted); line-height: 1.35; }

/* ---------- Global records search (dashboard) ---------- */
.global-search .qa-search { width: 100%; padding: 11px 14px; font-size: 15px;
    border: 2px solid var(--border); border-radius: 8px; margin: 4px 0 12px; box-sizing: border-box; }
.global-search .qa-search:focus { outline: none; border-color: var(--brand); }
.gs-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.gs-results[hidden] { display: none; }
.gs-group { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.gs-group h3 { margin: 0 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; color: var(--brand-dark); }
.gs-group ul { list-style: none; margin: 0; padding: 0; }
.gs-group li { border-top: 1px solid var(--border); }
.gs-group li:first-child { border-top: none; }
.gs-group li a { display: block; padding: 6px 4px; text-decoration: none; color: inherit; }
.gs-group li a:hover { background: #f2f6fb; }
.gs-title { display: block; font-size: 13px; font-weight: 600; color: var(--brand-dark); }
.gs-sub { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.3; margin-top: 1px; }

/* ---------- Management report preview / key-value ---------- */
table.kv { border-collapse: collapse; }
table.kv td { padding: 3px 14px 3px 0; vertical-align: top; font-size: 14px; }
table.kv td.muted { white-space: nowrap; }
.report-preview { border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; background: #fcfdff; }
.report-summary { background: #f6f8fb; border: 1px solid #e3e9f2; border-radius: 6px; padding: 10px 12px; white-space: pre-wrap; margin: 8px 0; }
.pwd-row { display: flex; gap: 8px; align-items: center; }
.pwd-row input { flex: 1; }

/* ---------- Asset type icons ---------- */
.asset-ico { vertical-align: -4px; color: var(--brand); flex: none; }
.asset-type-cell .asset-ico { margin-right: 4px; }
#typeIconsBtn .asset-ico { vertical-align: -3px; margin-right: 3px; }
.ti-overlay { position: fixed; inset: 0; background: rgba(20,28,45,.5); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.ti-overlay[hidden] { display: none; }
.ti-card { background: #fff; border-radius: 10px; padding: 18px 20px; width: 760px; max-width: calc(100vw - 32px); max-height: calc(100vh - 60px); overflow: auto; box-shadow: 0 12px 40px rgba(0,0,0,.28); }
.ti-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.ti-head h3 { margin: 0; color: var(--brand-dark); display: flex; align-items: center; gap: 6px; }
.type-icons-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px 18px; margin: 12px 0 8px; }
.type-icon-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; background: #fafbfe; }
.type-icon-name { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.type-icon-row select { max-width: 160px; padding: 4px 6px; font-size: 12.5px; }

/* ---------- Filter bar button groups (e.g. assets: [Filter][Reset] ... [Export CSV][View Archived]) ---------- */
.filters .filter-btns { flex: 0 0 auto; min-width: 0; }
.filters .filter-btns .btn-row { display: flex; gap: 6px; flex-wrap: nowrap; }
.filters .filter-btns .btn-row .btn { white-space: nowrap; }
.filters .filter-btns-end { margin-left: auto; }

/* ---------- Table tools: Columns chooser + sortable headers (data-table-tools) ---------- */
.tbl-tools { position: relative; display: flex; justify-content: flex-end; margin: 0 0 6px; }
.tbl-tools-menu { position: absolute; right: 0; top: 100%; z-index: 30; margin-top: 4px; min-width: 210px; max-height: 360px; overflow: auto;
    background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 10px 28px rgba(20,35,80,.18); padding: 6px 4px; }
.tbl-tools-menu[hidden] { display: none; }
.tbl-tools-menu label { display: flex; align-items: center; gap: 7px; padding: 4px 10px; font-size: 13px; font-weight: 400; cursor: pointer; border-radius: 5px; margin: 0; }
.tbl-tools-menu label:hover { background: #FFF7E6; }
.tbl-tools-head { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 2px 10px 4px; }
.tbl-tools-foot { border-top: 1px solid var(--border); margin-top: 4px; padding: 6px 10px 2px; font-size: 12px; color: var(--muted); }
table.grid th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
table.grid th.sortable a { color: inherit; text-decoration: none; }
table.grid th.sortable:hover, table.grid th.sortable:hover a { color: var(--brand); }
table.grid th.sorted, table.grid th.sorted a { color: var(--brand-dark); }
table.grid th .sort-ind { font-size: 10px; }
/* Alternate row colours on these tables (assets tabs etc.) + a hover highlight. */
table.grid[data-table-tools] tbody tr:nth-child(even) td { background: #f3f6fb; }
table.grid[data-table-tools] tbody tr:hover td { background: #e6eefb; }

/* ---------- Emailed link "opened" status (policies, change requests, checklist approvals) ---------- */
.lnk.lnk-yes { color: #1f6b3b !important; }
.lnk.lnk-old { color: #a67104 !important; }
.lnk.lnk-no  { color: #8a93a6 !important; }
.pol-chip .when.lnk { font-size: 10.5px; white-space: nowrap; }

/* ---------- Checklist step: multiple approvers ---------- */
.step-ap-list { margin-top: 6px; width: auto; }
.step-ap-list td { padding: 4px 8px; font-size: 12.5px; }
.step-ap-rows { border: 1px dashed var(--border); border-radius: 6px; padding: 8px; margin-bottom: 8px; }
.step-ap-summary { cursor: pointer; list-style: none; margin: 6px 0 2px; display: inline-flex; align-items: center; gap: 6px; }
.step-ap-summary::-webkit-details-marker { display: none; }
details[open] > .step-ap-summary .btn { opacity: .75; }
.step-ap-remove { margin-top: 6px; }
.step-ap-remove summary { cursor: pointer; color: var(--red); display: inline-block; }

/* ---------- Change request: approval status box ---------- */
.cr-ap-status { border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: 6px; background: #FFF7E6; padding: 10px 12px; margin-bottom: 12px; }
.cr-ap-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; }
.cr-ap-lbl { font-weight: 700; color: var(--brand-dark); margin-right: 4px; }
.cr-ap-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 6px; color: #4a5568; }
.cr-ap-hist { margin-top: 6px; }
.cr-ap-hist summary { cursor: pointer; color: var(--brand); }

/* ---------- Corrective action items (checklist) ---------- */
.car-progress { height: 6px; background: #e9edf5; border-radius: 3px; overflow: hidden; margin: 2px 0 10px; }
.car-progress span { display: block; height: 100%; background: var(--green); }
.car-items { list-style: none; margin: 0 0 10px; padding: 0; }
.car-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 4px; border-bottom: 1px solid var(--border); }
.car-item:last-child { border-bottom: 0; }
.car-item-form { margin: 0; display: inline; }
.car-check { width: 18px; height: 18px; margin-top: 2px; cursor: pointer; accent-color: var(--green); }
.car-item-body { flex: 1; min-width: 0; }
.car-item.done .car-item-text { text-decoration: line-through; color: var(--muted); }
.car-item-files a { margin-right: 10px; }
.car-item-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.car-item-edit summary { cursor: pointer; color: var(--brand); display: inline-block; margin-top: 2px; }
.car-item-fields { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.car-item-fields input[type=text] { flex: 1 1 320px; }
.car-item-fields select { flex: 0 1 200px; }
.car-item-add { padding-top: 8px; border-top: 1px dashed var(--border); }

/* ---------- Attachment thumbnails ---------- */
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-top: 6px; }
.att-card { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.att-thumb {
    position: relative; display: flex; align-items: center; justify-content: center;
    height: 120px; background: #f3f5f9; overflow: hidden; text-decoration: none;
}
.att-thumb img, .att-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-thumb .att-icon {
    font-size: 13px; font-weight: 700; letter-spacing: .05em; color: var(--brand);
    border: 2px solid var(--brand); border-radius: 6px; padding: 8px 12px; background: #fff;
}
.att-badge {
    position: absolute; bottom: 6px; right: 6px; background: rgba(31, 58, 99, .85); color: #fff;
    font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 2px 6px; border-radius: 4px;
}
.att-meta { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.att-meta .att-name { font-size: 13px; font-weight: 600; color: var(--brand-dark); word-break: break-word; }

/* ---------- Evidence thumbnail grid (evidence.php ?view=thumbs) ---------- */
.ev-thumbs .att-body { padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; }
.ev-thumbs .att-title a { font-size: 13px; font-weight: 600; color: var(--brand-dark); text-decoration: none; word-break: break-word; }
.ev-thumbs .att-title a:hover { text-decoration: underline; }
.ev-thumbs .att-meta { padding: 0; font-size: 11.5px; line-height: 1.35; }
.ev-thumbs .att-actions { margin-top: 6px; display: flex; gap: 4px; flex-wrap: wrap; }

/* ---------- Monthly review: per-area cards (review_edit.php) ---------- */
.ra-list { display: flex; flex-direction: column; gap: 12px; }
.ra-card { border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px 12px; background: #fcfdff; }
.ra-card:target { box-shadow: 0 0 0 2px var(--brand); }
.ra-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ra-title { font-weight: 600; color: var(--brand-dark); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ra-count { display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.ra-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ra-controls select { min-width: 130px; }
.ra-status.ok   { border-color: #2e8b57; background: #eef8f1; }
.ra-status.warn { border-color: #d39a00; background: #fff8e6; }
.ra-status.bad  { border-color: #c0392b; background: #fdf0ee; }
.ra-notes { width: 100%; margin-top: 8px; min-height: 44px; resize: vertical; font-size: 13.5px; }
.ra-evidence { margin-top: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ra-evidence .att-thumb { height: 100px; }
.ra-empty { margin: 8px 0 0; }
.ra-add { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--border); }
.ra-add h3 { margin: 0 0 4px; font-size: 15px; }
.ra-add-rows { display: flex; flex-direction: column; gap: 8px; }
.ra-add-row { display: grid; grid-template-columns: 2fr 130px 3fr; gap: 8px; }
.ra-add-row input, .ra-add-row select { width: 100%; }
.ra-add-actions { display: flex; align-items: center; gap: 14px; margin-top: 8px; flex-wrap: wrap; }
@media (max-width: 700px) { .ra-add-row { grid-template-columns: 1fr; } }

/* ---------- Evidence detail view ---------- */
.ev-detail { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.ev-preview {
    flex: 0 0 260px; max-width: 260px; border: 1px solid var(--border); border-radius: 8px;
    background: #f3f5f9; min-height: 180px; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.ev-preview img, .ev-preview video { width: 100%; height: auto; max-height: 320px; object-fit: contain; display: block; }
.ev-preview .att-icon {
    font-size: 14px; font-weight: 700; letter-spacing: .05em; color: var(--brand);
    border: 2px solid var(--brand); border-radius: 6px; padding: 14px 18px; background: #fff;
}
.ev-info { flex: 1 1 320px; min-width: 280px; }
.ev-linked-detail { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.ev-linked-detail h3 { font-size: 14px; color: var(--brand-dark); margin: 0 0 6px; }

/* ---------- Procedure rendered-view preview ---------- */
.proc-preview { margin-top: 8px; border: 1px solid var(--border); border-radius: 6px; background: #f8f9fc; padding: 8px 12px; }
.proc-preview > summary { cursor: pointer; user-select: none; padding: 2px 0; font-size: 13px; color: var(--brand-dark); }
.proc-preview-body { margin-top: 8px; padding: 10px 12px; background: #fff; border: 1px solid var(--border); border-radius: 4px; line-height: 1.55; font-size: 13.5px; color: #1f2937; }
.proc-preview-body strong { color: var(--brand-dark); font-weight: 700; }
.ph-unfilled { background: #fdecec; color: #b02020; padding: 1px 4px; border-radius: 3px; font-family: Consolas, monospace; font-size: 12.5px; }

/* ---------- Pager ---------- */
.pager { display: flex; align-items: center; gap: 14px; justify-content: center; margin: 16px 0; }
.btn.disabled { opacity: .45; pointer-events: none; cursor: default; }

@media (max-width: 720px) {
    .sidebar { display: none; }
    .form-grid { grid-template-columns: 1fr; }
}

/* ---------- Projects Planning ---------- */
.pj-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.pj-card { display: flex; flex-direction: column; gap: 10px; background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: 10px; padding: 16px 18px; box-shadow: var(--shadow); color: inherit; transition: box-shadow .15s, transform .15s; }
.pj-card:hover { text-decoration: none; box-shadow: 0 6px 20px rgba(15,30,60,.14); transform: translateY(-1px); }
.pj-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.pj-card-title { font-size: 16px; font-weight: 700; color: var(--brand-dark); }
.pj-badges { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.pj-card-prog { display: flex; align-items: center; gap: 12px; }
.pj-card-prog .pj-bar { flex: 1; }
.pj-big { font-size: 26px; font-weight: 700; color: var(--brand-dark); min-width: 64px; }
.pj-card-meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.pj-bar { --c: var(--brand); height: 8px; background: #e6eaf2; border-radius: 5px; overflow: hidden; }
.pj-bar > span { display: block; height: 100%; background: var(--c); border-radius: 5px; transition: width .4s ease; }
.pj-bar.done { --c: var(--green); } .pj-bar.mid { --c: var(--brand); } .pj-bar.low { --c: var(--amber); }
.pj-bar.lg { height: 14px; border-radius: 8px; } .pj-bar.lg > span { border-radius: 8px; }
.pj-bar.sm { height: 5px; margin-top: 5px; }

.pj-head h1 { margin: 2px 0; font-size: 23px; }
.pj-pill { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 4px 6px 4px 12px; font-size: 12.5px; font-weight: 600; color: var(--brand-dark); }
.pj-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 12px; }
.pj-kpi { display: flex; flex-direction: column; gap: 3px; background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--brand); border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow); color: inherit; }
a.pj-kpi:hover { text-decoration: none; box-shadow: 0 4px 14px rgba(15,30,60,.12); }
.pj-kpi .lbl { font-size: 12px; color: var(--muted); }
.pj-kpi .num { font-size: 26px; font-weight: 700; color: var(--brand-dark); line-height: 1.15; }
.pj-kpi .num.sm { font-size: 15px; line-height: 1.3; }
.pj-kpi .sub { font-size: 11.5px; color: var(--muted); }
.pj-kpi.danger { border-top-color: var(--red); } .pj-kpi.danger .num { color: var(--red); }
.pj-kpi.purple { border-top-color: #7b4fc9; }
.pj-dates { display: flex; gap: 8px 22px; flex-wrap: wrap; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 9px 14px; margin-bottom: 14px; }
.pj-dates .muted { margin-right: 4px; }
.pj-red { color: var(--red); }
.pj-overall { margin-bottom: 16px; }
.pj-overall-head { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--brand-dark); }
.pj-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pj-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pj-phase { margin-bottom: 12px; }
.pj-phase-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.pj-list { list-style: none; margin: 0; padding: 0; }
.pj-list li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid #eef1f7; }
.pj-list li:last-child { border-bottom: 0; }
.pj-dot { flex: 0 0 9px; height: 9px; border-radius: 50%; margin-top: 5px; background: #9aa3b2; }
.pj-dot.progress { background: var(--brand); } .pj-dot.vendor { background: #7b4fc9; } .pj-dot.blocked, .pj-dot.overdue { background: var(--red); }
.pj-dot.done { background: var(--green); } .pj-dot.todo { background: #9aa3b2; } .pj-dot.cancelled { background: #d0d5de; }
.pj-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.pj-panel-head h2 { margin: 0; }
.pj-phase-panel { border-left: 4px solid var(--c); }
.pj-phase-prog { display: flex; align-items: center; gap: 10px; flex: 1; max-width: 320px; }
.pj-phase-prog .pj-bar { flex: 1; --c: inherit; }
.pj-phase-panel .pj-phase-prog .pj-bar > span { background: var(--c); }
.pj-inline { display: inline-block; position: relative; }
.pj-inline > summary { list-style: none; } .pj-inline > summary::-webkit-details-marker { display: none; }
.pj-inline[open] form { position: absolute; right: 0; top: 30px; z-index: 5; display: flex; gap: 6px; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 8px; box-shadow: var(--shadow); width: 320px; }
.pj-quick { display: flex; gap: 6px; align-items: center; }
.pj-quick select { width: 150px; padding: 4px 6px; font-size: 12.5px; }
.pj-quick input[type=number] { width: 64px; padding: 4px 6px; font-size: 12.5px; }
.pj-h3 { font-size: 14px; color: var(--brand-dark); margin: 16px 0 6px; }
.lk-seg a { display: inline-block; padding: 6px 14px; font-size: 12.5px; font-weight: 600; color: var(--text); background: #fff; }
.lk-seg a + a { border-left: 1px solid var(--border); }
.lk-seg a.active { background: var(--brand); color: #fff; }
.lk-seg a:hover { text-decoration: none; }

/* Timeline / Gantt */
.gantt-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.gantt { position: relative; }
.gt-row { display: flex; min-height: 30px; border-bottom: 1px solid #eef1f7; }
.gt-label { position: sticky; left: 0; z-index: 6; flex: 0 0 280px; width: 280px; padding: 6px 10px; background: #fff; border-right: 1px solid var(--border); font-size: 12.5px; display: flex; align-items: center; gap: 4px; overflow: hidden; white-space: nowrap; }
.gt-label a { overflow: hidden; text-overflow: ellipsis; }
.gt-label .gt-pct { margin-left: auto; padding-left: 8px; font-weight: 600; color: var(--muted); font-size: 11.5px; }
.gt-track { position: relative; flex: none; background-image: linear-gradient(to right, #eef1f7 1px, transparent 1px); }
.gt-head { position: sticky; top: 0; z-index: 4; background: #f6f8fc; min-height: 0; }
.gt-head .gt-label, .gt-head .gt-track { background-color: #f6f8fc; }
.gt-months, .gt-ticks { position: relative; height: 22px; }
.gt-month { position: absolute; top: 0; height: 22px; line-height: 22px; font-size: 11px; font-weight: 700; color: var(--brand-dark); padding-left: 6px; border-left: 1px solid var(--border); letter-spacing: .5px; overflow: hidden; white-space: nowrap; }
.gt-tick { position: absolute; top: 0; height: 22px; line-height: 22px; font-size: 10.5px; color: var(--muted); padding-left: 3px; border-left: 1px solid #e3e8f1; overflow: hidden; white-space: nowrap; }
.gt-tick.we { background: #eef1f6; }
.gt-phase { background: #fafbfe; }
.gt-phase .gt-label { background: #fafbfe; color: var(--brand-dark); }
.gt-group .gt-label { background: #f3f5fa; }
.gt-sub .gt-label { padding-left: 22px; }
.gt-bar { position: absolute; top: 5px; height: 20px; border-radius: 4px; background: color-mix(in srgb, var(--bc) 22%, #fff); border: 1px solid var(--bc); overflow: hidden; display: flex; align-items: center; color: inherit; box-sizing: border-box; }
.gt-bar:hover { text-decoration: none; box-shadow: 0 2px 6px rgba(15,30,60,.25); z-index: 2; }
.gt-bar > span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--bc); }
.gt-bar > em { position: relative; z-index: 1; font-style: normal; font-size: 11.5px; font-weight: 700; line-height: 1; padding-left: 6px; white-space: nowrap; }
.gt-bar > em.on-fill  { color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.35); }
.gt-bar > em.on-track { color: color-mix(in srgb, var(--bc) 70%, #000); }
.gt-bar.has-out { overflow: visible; }
.gt-bar.has-out > span { border-radius: 3px; }
.gt-bar > em.out { position: absolute; left: 100%; padding-left: 5px; color: #0F172A; font-size: 11px; }
.gt-bar.phase { --bc: var(--brand-dark); top: 10px; height: 10px; border-radius: 5px; overflow: hidden; }
.gt-bar.phase.done { --bc: var(--green); }
.gt-bar.phase > em { display: none; }
.gt-bar.progress { --bc: var(--brand); } .gt-bar.todo { --bc: #8a94a6; } .gt-bar.vendor { --bc: #7b4fc9; }
.gt-bar.blocked { --bc: var(--red); background-image: repeating-linear-gradient(45deg, transparent 0 5px, rgba(198,40,40,.18) 5px 10px); }
.gt-bar.overdue { --bc: var(--red); } .gt-bar.done { --bc: var(--green); } .gt-bar.cancelled { --bc: #c3c9d4; opacity: .6; }
.gt-ms { position: absolute; top: 8px; width: 13px; height: 13px; margin-left: -1px; transform: rotate(45deg); background: #f4b400; border: 2px solid #b07d00; z-index: 2; }
.gt-ms.done { background: var(--green); border-color: #1b5e20; } .gt-ms.overdue { background: var(--red); border-color: #8e1b1b; } .gt-ms.cancelled { background: #c3c9d4; border-color: #9aa3b2; }
.gt-ms.static { position: relative; display: inline-block; top: 0; }
.gt-ms-ico { color: #d39a00; }
.gt-dep { color: var(--brand); font-weight: 700; cursor: help; }
.gt-warn { color: var(--red); cursor: help; }
.gt-today { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--red); z-index: 5; pointer-events: none; }
.gt-today span { position: absolute; top: 2px; left: 3px; background: var(--red); color: #fff; font-size: 9.5px; font-weight: 700; padding: 1px 5px; border-radius: 3px; }
.gt-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.gt-legend span { display: inline-flex; align-items: center; gap: 5px; }
.gt-sw { display: inline-block; width: 18px; height: 10px; border-radius: 3px; background: var(--bc); }
.gt-sw.progress { --bc: var(--brand); } .gt-sw.todo { --bc: #8a94a6; } .gt-sw.vendor { --bc: #7b4fc9; } .gt-sw.blocked, .gt-sw.overdue { --bc: var(--red); } .gt-sw.done { --bc: var(--green); }
.gt-sw-ms { display: inline-block; width: 9px; height: 9px; transform: rotate(45deg); background: #f4b400; border: 1px solid #b07d00; }
.gt-sw-today { display: inline-block; width: 2px; height: 12px; background: var(--red); }
@media (max-width: 1100px) { .pj-grid2, .pj-grid3 { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .gt-label { flex-basis: 170px; width: 170px; } .pj-cards { grid-template-columns: 1fr; } }
.pj-share-history { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 8px; }
.pj-share-history > summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.pj-green { color: var(--green); }
.pj-budget-nums { display: flex; flex-wrap: wrap; gap: 10px 34px; margin-bottom: 12px; }
.pj-budget-nums > div { display: flex; flex-direction: column; }
.pj-budget-nums .lbl { font-size: 12px; color: var(--muted); }
.pj-budget-nums .num { font-size: 20px; font-weight: 700; color: var(--brand-dark); }
.pj-budget-nums .sub { font-size: 11.5px; color: var(--muted); }
.pj-budget-bar { position: relative; height: 14px; background: #e6eaf2; border-radius: 8px; overflow: hidden; }
.pj-budget-bar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 8px; }
.pj-budget-bar .est { background: #FFD28A; } .pj-budget-bar .est.over { background: #f3b0b0; }
.pj-budget-bar .act { background: var(--brand); }
.pj-budget-legend { display: flex; gap: 16px; flex-wrap: wrap; margin: 6px 0 12px; }
.pj-budget-legend i { display: inline-block; width: 14px; height: 8px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.pj-budget-legend i.act { background: var(--brand); } .pj-budget-legend i.est { background: #FFD28A; }
.pj-budget-table { max-width: 520px; }
.pj-budget-table tfoot th { background: #f6f8fc; }
.sup-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: #fbfcfe; }
.sup-type-cell .badge { margin: 0 3px 3px 0; }
.sup-type-other { grid-column: 1 / -1; }
.sup-type-other[hidden] { display: none; }
.ia-signoff table.kv td { padding: 2px 16px 2px 0; font-size: 13px; }
tr.ia-hist-done td { background: #eef8f1; font-weight: 600; }
tr.ia-hist-removed td { background: #fdf3e7; color: #7a5a1e; }

/* Internal Audit checklist */
.ia-ck-summary { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px 10px; margin: 6px 0 10px; background: #f6f8fc; border: 1px solid var(--border); border-radius: 6px; }
.ia-ck-area { border: 1px solid var(--border); border-radius: 6px; margin-bottom: 8px; background: #fff; }
.ia-ck-area > summary { cursor: pointer; padding: 8px 12px; background: #fbfcfe; border-radius: 6px; }
.ia-ck-area[open] > summary { border-bottom: 1px solid var(--border); border-radius: 6px 6px 0 0; }
.ia-ck-facts { margin: 8px 12px; padding: 6px 10px; background: #f3f7ff; border-left: 3px solid #F55A00; border-radius: 4px; }
.ia-ck-facts ul { margin: 4px 0 0 16px; padding: 0; }
.ia-ck-item { padding: 8px 12px; border-top: 1px solid #eef1f6; border-left: 4px solid #d0d6e2; }
.ia-ck-item:first-of-type { border-top: 0; }
.ia-ck-item.ia-ck-conforming { border-left-color: #2e7d32; }
.ia-ck-item.ia-ck-observation { border-left-color: #e0a100; }
.ia-ck-item.ia-ck-nonconformity { border-left-color: #c62828; }
.ia-ck-item.ia-ck-na { border-left-color: #9aa3b2; }
.ia-ck-q { margin-bottom: 3px; }
.ia-ck-controls { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; }
.ia-ck-radios { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.ia-ck-opt { font-size: 12px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; background: #fff; white-space: nowrap; }
.ia-ck-opt input { margin: 0 3px 0 0; vertical-align: -1px; }
.ia-ck-opt-conforming:has(input:checked) { background: #e3f3e4; border-color: #2e7d32; }
.ia-ck-opt-observation:has(input:checked) { background: #fdefd6; border-color: #e0a100; }
.ia-ck-opt-nonconformity:has(input:checked) { background: #fbe3e3; border-color: #c62828; }
.ia-ck-opt-na:has(input:checked) { background: #e9ecf1; border-color: #9aa3b2; }
.ia-ck-note { flex: 2 1 240px; min-width: 200px; }
.ia-ck-ev { flex: 1 1 180px; min-width: 160px; }
.ia-ck-editlinks { margin-left: 6px; font-size: 11px; color: var(--muted, #6b7280); border: 1px dashed #c9d0dc; border-radius: 10px; padding: 0 7px; text-decoration: none; white-space: nowrap; }
.ia-ck-editlinks:hover { color: var(--brand); border-color: var(--brand); }
.ia-ck-car { margin-top: 5px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.ia-ck-car { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #e2e6ee; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.ia-ck-car { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #e2e6ee; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
/* Internal Audit - auditor signature */
.ia-sign { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: #fbfcfe; }
.ia-sign h3 { margin: 0 0 4px; font-size: 14px; }
.ia-sign-pad-wrap { position: relative; display: inline-block; max-width: 100%; }
.ia-sign-pad { display: block; width: 560px; max-width: 100%; height: auto; aspect-ratio: 560 / 170; background: #fff; border: 1px dashed #9aa6bd; border-radius: 6px; touch-action: none; cursor: crosshair; }
.ia-sign-hint { position: absolute; left: 14px; bottom: 12px; color: #b0b8c8; font-size: 13px; pointer-events: none; border-top: 1px solid #d6dbe6; padding-top: 2px; width: 60%; }
.ia-sign-meta { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.ia-sign-declare { display: block; margin-top: 4px; }
.ia-sign-img { max-width: 320px; max-height: 100px; background: #fff; border: 1px solid #d6dbe6; border-radius: 4px; padding: 2px; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; filter: grayscale(.4); box-shadow: none; }
/* Reusable signature pad (includes/signature.php) */
.sig-block { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: #fbfcfe; }
.sig-block h3 { margin: 0 0 4px; font-size: 14px; }
.sig-pad-wrap { position: relative; display: inline-block; max-width: 100%; }
.sig-pad { display: block; width: 560px; max-width: 100%; height: auto; aspect-ratio: 560 / 170; background: #fff; border: 1px dashed #9aa6bd; border-radius: 6px; touch-action: none; cursor: crosshair; }
.sig-hint { position: absolute; left: 14px; bottom: 12px; color: #b0b8c8; font-size: 13px; pointer-events: none; border-top: 1px solid #d6dbe6; padding-top: 2px; width: 60%; }
.sig-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.sig-save, .sig-declare { display: block; margin-top: 4px; }
.topbar .user-box .user-name-link { color: inherit; text-decoration: none; }
.topbar .user-box .user-name-link:hover { text-decoration: underline; }
/* Internal Audit sign-off: auditor + auditee side by side */
.ia-signoff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-top: 8px; }
.ia-signoff-col { background: #fff; border: 1px solid #cfe6d4; border-radius: 6px; padding: 8px 10px; color: var(--text, #1a1a1a); }
.ia-signoff-col.pending { border-style: dashed; border-color: #e0c36a; background: #fffbef; }
.ia-signoff-role { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #2e7d32; margin-bottom: 4px; }
.ia-signoff-col.pending .ia-signoff-role { color: #a67104; }
.ia-signoff-col table.kv td { padding: 1px 12px 1px 0; font-size: 12.5px; }
.pj-amber { color: #a67104; }
/* Tasks: instant search */
.filters .task-search input { min-width: 280px; }
tr.task-row mark { background: #fff1a8; padding: 0 1px; border-radius: 2px; }
/* Access request - Notify Employee: CC Other + picker */
.ar-cc-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ar-cc-row #ar_notify_cc_other { flex: 2 1 360px; }
.ar-cc-row #ar_notify_cc_pick { flex: 1 1 240px; }
/* Project - Export PDF options */
.pj-pdf-form { display: inline-block; }
.pj-pdf-opts { display: flex; flex-direction: column; gap: 6px; min-width: 230px; }
/* Incident: customer communication evidence row */
.inc-cust-ev { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
/* Audit Readiness - "What did the auditor ask?" */
.ask-panel { border-left: 4px solid var(--brand); }
.ask-label { display: block; font-weight: 700; font-size: 15px; color: var(--brand-dark, #0F172A); margin-bottom: 6px; }
.ask-input-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.ask-input-row input { font-size: 15px; padding: 9px 12px; }
.ask-grid { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(240px, 1fr); gap: 14px; margin-top: 12px; }
@media (max-width: 1000px) { .ask-grid { grid-template-columns: 1fr; } }
.ask-head { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; margin: 0 0 6px; }
.ask-card { border: 1px solid var(--border); border-radius: 6px; padding: 9px 11px; margin-bottom: 8px; background: #fff; }
.ask-card.best { border-color: #9cc9a3; box-shadow: 0 0 0 2px rgba(46,125,50,.08); }
.ask-title { margin-bottom: 3px; }
.ask-q { font-style: italic; color: #374151; margin-bottom: 6px; font-size: 13px; }
.ask-row { font-size: 13px; margin: 3px 0; line-height: 1.45; }
.ask-lbl { display: inline-block; min-width: 118px; font-weight: 600; color: #4b5563; font-size: 12px; }
.ask-foot { margin-top: 6px; font-size: 12px; }
.ask-reg { list-style: none; margin: 0 0 12px; padding: 0; }
.ask-reg li { padding: 5px 0; border-top: 1px dashed #e5e9f0; font-size: 13px; }
.ask-reg li:first-child { border-top: 0; }
.ask-none { margin-top: 10px; padding: 8px 10px; background: #fff8e1; border: 1px solid #f0d58a; border-radius: 6px; font-size: 13px; }
