/* Page gutter. Lives in one variable because .logged-in-bar cancels it with a
   negative margin to reach the screen edges — change it here, not in two places. */
:root { --page-gutter: 12px; }

body { font-family: Arial, sans-serif; background-color: #f4f4f4; padding: 0; margin: 0; }
.container { max-width: 1400px; margin: auto; width: 100%; box-sizing: border-box; padding: 0 var(--page-gutter) var(--page-gutter); }
.card { padding: 25px; background: #ffffff; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.15); margin-bottom: 20px; box-sizing: border-box; }
.login-card { max-width: 400px; margin: 60px auto; padding: 35px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.form-group { margin-bottom: 15px; }
label { display: block; margin-bottom: 5px; font-weight: bold; }
select,
textarea, input[type="text"], input[type="password"], input[type="date"], input[type="number"] { width: 100%; padding: 12px 10px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px; font-size: 16px; line-height: 1.4; background-color: #fafafa; transition: border-color 0.2s, background-color 0.2s; }
select:focus, textarea:focus, input[type="text"]:focus, input[type="password"]:focus, input[type="date"]:focus, input[type="number"]:focus { border-color: #0056b3; background-color: #ffffff; outline: none; }
button { width: 100%; padding: 12px; background-color: #0056b3; color: white; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; }
button:hover { background-color: #003d80; }
.error { color: #d9534f; margin-bottom: 15px; }
.success { color: #5cb85c; margin-bottom: 15px; }
.action-btn { display: block; font-size: 20px; font-weight: bold; padding: 20px; text-align: center; border-radius: 8px; cursor: pointer; text-transform: uppercase; margin: 10px 0; border: none; width: 100%; color: white; }
.btn-to-warehouse { background-color: #f0ad4e; }
.btn-to-warehouse:hover { background-color: #ec971f; }
.btn-to-plant { background-color: #5cb85c; }
.btn-to-plant:hover { background-color: #449d44; }
.btn-disabled { background-color: #777; cursor: not-allowed; }
/* Logged-in status bar — full-bleed chrome pinned to the top of every
   authenticated page, kept deliberately thin to buy back vertical space on
   small tablets.
   position: sticky rather than fixed so the bar stays in normal flow: its
   height is free to grow if the user/server text ever wraps, without
   overlapping the content beneath it the way an out-of-flow fixed bar would.
   The negative horizontal margin cancels .container's gutter so the bar reaches
   the screen edges; above .container's 1400px max-width it spans the content
   column rather than the whole viewport, which is the intended look.
   z-index sits above the tooltips and the job-search dropdown (both 100/50) but
   well below .loading-overlay (10000), which must still cover it. */
.logged-in-bar {
    position: sticky;
    top: 0;
    z-index: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 0 calc(-1 * var(--page-gutter)) 10px;
    padding: 4px var(--page-gutter);
    font-size: 13px;
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
/* Two classes deep, so this beats the mobile `.logout-btn { width: 100% }`
   rule below and keeps Log Out compact instead of stretching the bar. */
.logged-in-bar .logout-btn { width: auto; }
.logout-btn { display: inline-block; padding: 10px 20px; background-color: #d9534f; color: white; text-decoration: none; border-radius: 4px; font-weight: bold; font-size: 14px; text-align: center; border: none; cursor: pointer; transition: background-color 0.2s; }
.logout-btn:hover { background-color: #c9302c; }
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.fields-table { width: 100%; border-collapse: collapse; margin-top: 15px; min-width: 600px; }
table.fields-table th, table.fields-table td { border: 1px solid #ddd; padding: 12px 8px; text-align: left; }
table.fields-table th { background-color: #f2f2f2; }
.text-nowrap { white-space: nowrap; }
/* Success Banner styling */
.success-banner {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}
/* Error Banner styling */
/* Unused since 2026-10-29: every message renders through pepaceMessage() (.status-msg).
   Kept so a page missed in that migration still looks right; remove once confirmed. */
.error-banner {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}
.debug-card { background-color: #1e1e1e; color: #39ff14; font-family: 'Courier New', Courier, monospace; padding: 20px; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.15); margin-top: 20px; max-height: 600px; overflow-y: auto; }
pre.debug-pre { background: #2d2d2d; color: #f8f8f2; padding: 10px; border-radius: 4px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; margin: 5px 0; }

/* Debug subsystem: content only ever shown once the Debug toggle (see .pace-debug-toggle
   in the stats footer) is switched on. Hidden by default so nothing extra is visible until asked for. */
.debug-panel { display: none; }
body.pace-debug-on .debug-panel { display: block; }

.debug-console { max-height: 80vh; }
.debug-console-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; border-bottom: 2px solid #00ffff; padding-bottom: 10px; margin-bottom: 12px; position: sticky; top: 0; background-color: #1e1e1e; }
.debug-console-header h2 { color: #00ffff; margin: 0; font-size: 1.2rem; }
.debug-console-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: #aaa; }

.debug-btn { background-color: #333; color: #f8f8f2; border: 1px solid #555; border-radius: 4px; padding: 4px 10px; font-size: 11px; font-family: inherit; cursor: pointer; transition: background-color 0.15s ease; }
.debug-btn:hover { background-color: #444; }
.debug-btn-primary { background-color: #0056b3; border-color: #0056b3; color: #fff; }
.debug-btn-primary:hover { background-color: #00408a; }
.debug-btn-copied { background-color: #2ecc71 !important; border-color: #2ecc71 !important; color: #113 !important; }

.debug-entry { border: 1px solid #3a3a3a; border-radius: 6px; margin-bottom: 8px; background: #262626; }
.debug-entry-error { border-color: #ff0033; }
.debug-entry summary { list-style: none; cursor: pointer; padding: 8px 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.debug-entry summary::-webkit-details-marker { display: none; }
.debug-entry summary::before { content: '\25B6'; font-size: 9px; color: #888; transition: transform 0.15s ease; flex-shrink: 0; }
.debug-entry[open] summary::before { transform: rotate(90deg); }
.debug-entry-status { font-weight: bold; padding: 2px 6px; border-radius: 4px; font-size: 11px; flex-shrink: 0; }
.debug-entry-status.is-ok { color: #39ff14; }
.debug-entry-status.is-error { color: #ff0033; }
.debug-entry-method { color: #ff007f; font-weight: bold; flex-shrink: 0; }
.debug-entry-url { color: #00ffff; word-break: break-all; flex: 1 1 200px; }
.debug-entry-time { color: #888; font-size: 11px; white-space: nowrap; flex-shrink: 0; }
.debug-entry-body { padding: 0 12px 12px 26px; }
.debug-entry-body strong { display: block; margin: 8px 0 4px; color: #fff; font-size: 12px; }
.debug-payload-toggle summary { cursor: pointer; color: #4fc3f7; font-size: 12px; padding: 2px 0; list-style: none; }
.debug-payload-toggle summary::-webkit-details-marker { display: none; }

/* Debug on/off pill switch, shown in the stats footer on any page that produces Pace API traffic */
.pace-debug-toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12px; font-weight: 600; color: #777; user-select: none; }
.pace-debug-toggle-input { position: absolute; opacity: 0; width: 0; height: 0; }
.pace-debug-toggle-track { width: 30px; height: 16px; background-color: #d5d5d5; border-radius: 8px; position: relative; transition: background-color 0.2s ease; display: inline-block; flex-shrink: 0; }
.pace-debug-toggle-thumb { width: 10px; height: 10px; background-color: #fff; border-radius: 50%; position: absolute; top: 3px; left: 3px; transition: left 0.2s ease; box-shadow: 0 1px 2px rgba(0,0,0,0.25); }
.pace-debug-toggle-input:checked + .pace-debug-toggle-track { background-color: #2ecc71; }
.pace-debug-toggle-input:checked + .pace-debug-toggle-track .pace-debug-toggle-thumb { left: 17px; }
.pace-debug-toggle-label { opacity: 0.9; }

/* Stats footer: minimal, modern tech-stats strip shared by every module page.
   Houses the performance readout and (via .pace-debug-toggle) the debug switch,
   deliberately understated so it's available without competing with the nav bar. */
.stats-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 28px;
    max-width: 900px;
    margin: 30px auto 15px;
    padding: 14px 10px 0;
    border-top: 1px solid #e5e5e5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.stats-footer-item { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 56px; }
.stats-footer-value { font-size: 13px; font-weight: 600; color: #555; }
.stats-footer-label { font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #aaa; }
.stats-footer-divider { width: 1px; height: 22px; background-color: #e5e5e5; }

/* Tab styling */
.tabs { display: flex; border-bottom: 2px solid #ccc; margin-bottom: 20px; gap: 5px; }
.tab-btn { flex: 1; padding: 10px 20px; background: none; border: none; border-bottom: 3px solid transparent; font-weight: bold; cursor: pointer; font-size: 14px; color: #555; border-radius: 0; }
.tab-btn:hover { background-color: #f0f0f0; color: #0056b3; }
.tab-btn.active { border-bottom-color: #0056b3; color: #0056b3; background: none; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Loading Overlay styling */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #ffffff;
}
.loading-overlay.hidden { display: none; }
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border-left-color: #2ecc71;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tooltip popup style to replace details expander */
.tooltip-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
    margin-left: 6px;
    vertical-align: middle;
}
.tooltip-content {
    display: none;
    position: absolute;
    bottom: 125%;
    left: -10px;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    padding: 12px;
    z-index: 100;
    width: 300px;
    color: #333;
    font-size: 0.8rem;
    font-weight: normal;
    line-height: 1.4;
    text-align: left;
}
.tooltip-container:hover .tooltip-content,
.tooltip-container.active .tooltip-content {
    display: block;
}
.tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 15px;
    border-width: 6px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
}
.tooltip-content::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 14px;
    border-width: 7px;
    border-style: solid;
    border-color: #ddd transparent transparent transparent;
    z-index: -1;
}

/* Mobile Optimization overrides */
@media (max-width: 600px) {
    :root { --page-gutter: 8px; }
    .card { padding: 20px 15px; }
    .login-card { margin: 20px auto; padding: 25px 20px; }
    .action-btn { font-size: 18px; padding: 15px; }
    /* The status bar deliberately stays one row here — stacking it would make it
       taller, which defeats the point of pinning a thin bar to the top. */
    .logout-btn { width: 100%; box-sizing: border-box; }
    .stats-footer { gap: 16px 20px; padding: 12px 10px 0; }
}

/* Roll grid: compact serial/weight card list used by the EMBARC manifest preview. */
.roll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; max-height: 250px; overflow-y: auto; padding: 8px 6px 8px 8px; border: 1px solid #ddd; border-radius: 4px; background-color: #fafafa; box-sizing: border-box; }
.roll-grid-row { display: flex; justify-content: space-between; align-items: center; background: #fff; padding: 6px 8px 6px 12px; border: 1px solid #e2e8f0; border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); box-sizing: border-box; }
.roll-grid-serial { font-family: monospace; font-weight: bold; font-size: 13px; color: #333; flex: 1; min-width: 0; word-break: break-all; padding-right: 8px; text-align: left; }
.roll-grid-weight { font-family: monospace; font-size: 13px; font-weight: bold; color: #0056b3; flex-shrink: 0; text-align: right; margin-left: auto; }
/* A roll already in Pace. Amber, not red: these are skipped automatically at
   process time rather than blocking it, which is a warning worth seeing (wrong
   manifest?) but not a stop. See partitionRollsByExistence(). */
.roll-grid-row-skipped { background: #fff8e6; border-color: #ffe8a1; }
.roll-grid-row-skipped .roll-grid-serial { color: #8a6100; text-decoration: line-through; }

/* Roll chip grid: smaller, denser pill-shaped tiles that wrap freely (flexbox,
   not a fixed column grid) — used by the Received Rolls list, where the goal
   is packing as many rolls as possible into the available width. */
.roll-chip-grid { display: flex; flex-wrap: wrap; gap: 6px; max-height: 260px; overflow-y: auto; padding: 4px 2px; }
.roll-chip { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #e2e8f0; border-radius: 20px; padding: 5px 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); box-sizing: border-box; text-decoration: none; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.roll-chip:hover { border-color: #0056b3; box-shadow: 0 1px 4px rgba(0,86,179,0.25); }
.roll-chip-serial { font-family: monospace; font-weight: bold; font-size: 12px; color: #333; }
.roll-chip-weight { font-family: monospace; font-weight: bold; font-size: 12px; color: #0056b3; white-space: nowrap; }

/* Collapsible settings cards (Admin) — collapsed by default, toggled via toggleSettingsCard() */
.settings-card-header { cursor: pointer; user-select: none; margin: 0; padding: 15px 20px; display: flex; align-items: center; gap: 8px; }
.settings-card-header:hover { background-color: #f8f9fa; }
.settings-card-body { padding: 0 20px 20px 20px; }
.settings-chevron { display: inline-block; font-size: 12px; color: #999; }

/* Admin Server Status (includes/partials/server_status.php): a grid of small
   cards, each a header (title + worst-status pill) over label/value rows. */
.srv-summary { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; font-size: 14px; margin-bottom: 8px; }
.srv-action { margin-top: 4px; font-size: 12px; }
.srv-action code { background: rgba(0,0,0,0.06); padding: 1px 5px; border-radius: 3px; word-break: break-all; }
.srv-conn-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 14px 0 8px 0; font-size: 14px; }
.srv-conn-head .btn { margin-left: auto; }
.srv-dismiss { float: right; margin: -3px 0 0 10px; }
.srv-dismiss .btn { padding: 3px 10px; font-size: 12px; }
.srv-dismissed { margin: 6px 0 10px 0; font-size: 13px; color: #6c757d; }
.srv-dismissed summary { cursor: pointer; }
.srv-dismissed-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid #f3f4f6; }
.srv-dismissed-row .btn { padding: 3px 10px; font-size: 12px; flex: none; }
.srv-call-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.srv-call-table th { text-align: left; color: #6c757d; font-weight: 600; padding: 6px 8px 6px 0; border-bottom: 1px solid #e3e7eb; }
.srv-call-table td { padding: 5px 8px 5px 0; border-bottom: 1px solid #f3f4f6; vertical-align: top; }
.srv-call-endpoint { font-family: monospace; overflow-wrap: anywhere; }
.srv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.srv-card { border: 1px solid #e3e7eb; border-radius: 6px; background: #fff; overflow: hidden; }
.srv-card-wide { grid-column: 1 / -1; }
.srv-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; background: #f8f9fa; border-bottom: 1px solid #e3e7eb; font-weight: 600; font-size: 14px; color: #333; }
.srv-sub { font-weight: normal; font-size: 12px; color: #888; margin-left: 6px; }
.srv-pill { font-size: 12px; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; }
/* Every status icon sits in one fixed-width column at the card's right edge —
   header and rows alike — so a card's statuses read as one vertical line. */
.srv-icon { display: inline-block; width: 22px; flex: none; text-align: right; }
.srv-rows { margin: 0; padding: 4px 0; }
.srv-row { display: grid; grid-template-columns: 40% 1fr 22px; gap: 10px; padding: 7px 14px; border-bottom: 1px solid #f3f4f6; font-size: 13px; line-height: 1.4; }
.srv-row:last-child { border-bottom: 0; }
.srv-row dt { color: #6c757d; }
.srv-row dd { margin: 0; color: #212529; overflow-wrap: anywhere; }
.srv-pkg-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 4px 24px; padding: 8px 14px 12px 14px; align-items: start; }
.srv-pkg-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.srv-pkg-table caption { text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: #888; padding: 8px 0 4px 0; }
.srv-pkg-table td { padding: 5px 6px 5px 0; border-bottom: 1px solid #f3f4f6; white-space: nowrap; }
.srv-pkg-table td.srv-icon { display: table-cell; width: 22px; padding-right: 0; text-align: right; }
.srv-pkg-name { font-family: monospace; color: #333; }
@media (max-width: 480px) {
    .srv-grid, .srv-pkg-groups { grid-template-columns: 1fr; }
    .srv-row { grid-template-columns: 1fr 22px; gap: 2px 10px; }
    .srv-row dt { grid-column: 1 / -1; }
}

/* Status badges (upcoming/planned pills used on the portal grid and in module tables) */
.badge-upcoming {
    display: inline-block;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    align-self: center;
}

/* Portal landing page: module launcher grid */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.app-card {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    box-sizing: border-box;
}
.app-card:hover:not(.disabled) {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #0056b3;
}
.app-card.disabled {
    background-color: #fbfbfb;
    color: #999;
    cursor: not-allowed;
    opacity: 0.8;
    border-style: dashed;
}
.app-icon {
    font-size: 40px;
    margin-bottom: 12px;
}
.app-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #0056b3;
}
.app-card.disabled .app-title {
    color: #777;
}
.app-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 15px;
    flex-grow: 1;
}
.app-card.disabled .app-desc {
    color: #999;
}/* Status levels — pair with pepaceStatusIcons() in includes/helpers.php:
   ✅ ok (green), ⚠️ warn (yellow), 🛑 stop (red), ℹ️ info (blue). */
.status-msg { padding: 10px 12px; border-radius: 4px; margin: 10px 0; font-size: 14px; }
.status-ok   { background-color: #d4edda; border: 1px solid #c3e6cb; color: #155724; }
.status-warn { background-color: #fff3cd; border: 1px solid #ffeeba; color: #856404; }
.status-stop { background-color: #f8d7da; border: 1px solid #f5c6cb; color: #721c24; }
.status-info { background-color: #e7f1fb; border: 1px solid #c5ddf4; color: #0b4f8a; }
.status-text-ok   { color: #155724; }
.status-text-warn { color: #856404; }
.status-text-stop { color: #c0392b; }
.status-text-info { color: #0b4f8a; }
/* Suite buttons — modelled on Reports' "⬇ Download" (.rpt-action-btn): bordered,
   bold, a little depth. Explicit :hover colours because the bare `button:hover`
   rule above would otherwise win on hover. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: auto; padding: 6px 12px;
       font-family: inherit; font-size: 13px; font-weight: bold; line-height: 1.2; border-radius: 4px;
       border: 1px solid transparent; box-shadow: 0 1px 2px rgba(0,0,0,0.15); text-decoration: none; white-space: nowrap; cursor: pointer; }
.btn[disabled], .btn.is-disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn-action { background-color: #f1f5f9; border-color: #cbd5e1; color: #1e3a5f; }
.btn-action:hover { background-color: #e2e8f0; color: #1e3a5f; }
/* Same weight as .btn-action, in green: a pale tint, not the solid fills below.
   Pairs with it where two actions sit side by side and the second should read
   as its own thing (Purchase Orders' Download + Send to Bill.com). */
.btn-action-green { background-color: #edf7ed; border-color: #c3e6cb; color: #1e4620; }
.btn-action-green:hover { background-color: #dcefdc; color: #1e4620; }
/* Same pale weight again, in amber: the action is still available but has
   already been done once, so it should read as "look before you click". */
.btn-action-orange { background-color: #fdf3e3; border-color: #f0d9a8; color: #7a4e00; }
.btn-action-orange:hover { background-color: #fae8cc; color: #7a4e00; }
.btn-blue { background-color: #0056b3; border-color: #00438c; color: #fff; }
.btn-blue:hover { background-color: #00438c; }
.btn-teal { background-color: #0f766e; border-color: #0b5c56; color: #fff; }
.btn-teal:hover { background-color: #0b5c56; }
.btn-grey { background-color: #6c757d; border-color: #545b62; color: #fff; }
.btn-grey:hover { background-color: #545b62; }
.btn-blue[disabled]:hover { background-color: #0056b3; }
.btn-teal[disabled]:hover { background-color: #0f766e; }
.btn-grey[disabled]:hover { background-color: #6c757d; }
.btn-action-green[disabled]:hover { background-color: #edf7ed; }
.btn-action-orange[disabled]:hover { background-color: #fdf3e3; }

/* Admin → Permissions (admin/partials/permissions_card.php) */
.perm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.perm-table th { text-align: left; color: #6c757d; font-weight: 600; padding: 6px 8px; border-bottom: 1px solid #e3e7eb; }
.perm-table td { padding: 8px; border-bottom: 1px solid #f1f3f5; vertical-align: top; }
.perm-module { font-weight: 600; white-space: nowrap; }
.perm-report { font-weight: normal; padding-left: 26px !important; }
.perm-group td { background: #f8f9fa; font-weight: 600; }
.perm-mode { white-space: nowrap; }
.perm-users { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.perm-off .perm-chip { opacity: 0.45; }
.perm-chip { display: inline-flex; align-items: center; gap: 4px; margin: 0; padding: 2px 4px 2px 10px;
             background: #eef2f7; border: 1px solid #d6dee8; border-radius: 14px; }
.perm-chip button { width: auto; padding: 0 7px; background: none; border: 0; color: #888; font-size: 15px; line-height: 1.4; cursor: pointer; }
.perm-chip button:hover { color: #c0392b; }
.perm-user { color: #6c757d; font-size: 12px; font-family: monospace; }
.perm-add { display: inline-flex; gap: 6px; margin: 0; }
.perm-add .btn { padding: 4px 10px; }
.perm-just-changed td { background: #fffbea; }
.perm-details { margin-top: 14px; font-size: 13px; }
.perm-details summary { cursor: pointer; font-weight: 600; color: #555; }
.perm-table select { width: auto; height: auto; min-height: 0; padding: 4px 8px; font-size: 13px; margin: 0; }
.perm-table .btn { padding: 4px 10px; font-size: 12px; }
.perm-table td { padding: 6px 8px; vertical-align: middle; }
.perm-pre { font-size: 12px; color: #6c757d; cursor: pointer; }
.perm-pre summary { list-style: none; }
.perm-pre summary::-webkit-details-marker { display: none; }
.perm-pre[open] summary { display: none; }
/* Server Status cards that fold (Pace call problems, Errors shown to users) */
.srv-collapsible > summary { cursor: pointer; user-select: none; list-style: none; }
.srv-collapsible > summary::-webkit-details-marker { display: none; }
.srv-collapsible > summary:hover { background-color: #f1f3f5; }
.srv-collapsible:not([open]) > summary { border-bottom: 0; }
.srv-collapsible .settings-chevron { margin-right: 4px; }

/* Staging site marker (includes/partials/staging_banner.php). Striped and loud on
   purpose: the one thing it must never be is mistaken for the live site. */
.staging-banner {
    background: repeating-linear-gradient(135deg, #ffe08a 0 14px, #ffd24d 14px 28px);
    color: #3d2e00;
    border-bottom: 2px solid #b38600;
    padding: 6px var(--page-gutter, 12px);
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
}
.login-card .staging-banner { margin: 0 0 15px; border: 1px solid #b38600; border-radius: 4px; }
/* Server Status → Refresh: a link-sized button beside "checked …" */
.srv-refresh { display: inline; margin: 0; }
.srv-refresh button { width: auto; padding: 0; margin: 0; background: none; border: 0; color: #0056b3;
                      font-size: 14px; text-decoration: underline; cursor: pointer; box-shadow: none; }
.srv-refresh button:hover { color: #003d80; background: none; }
