/* ── LightCraft Design Tokens ─────────────────────────────────────
   Dark theme default. Light theme activates via data-theme="light"
   on <body> (stored in user profile and loaded by PHP on page load).
   ─────────────────────────────────────────────────────────────── */
:root {
    /* Backgrounds */
    --lc-bg-base:      #0d0d0d;
    --lc-bg-surface:   #1a1a1a;
    --lc-bg-elevated:  #242424;
    --lc-bg-input:     #1e2330;

    /* Text */
    --lc-text-primary:   #f0ece4;
    --lc-text-secondary: #a0a0a0;
    --lc-text-muted:     #666666;

    /* Accent — amber/gold */
    --lc-accent:       #e09200;
    --lc-accent-hover: #c47f00;
    --lc-accent-dim:   rgba(224, 146, 0, 0.15);

    /* Borders */
    --lc-border:       #2a2a2a;
    --lc-border-light: #333333;

    /* Status colours */
    --lc-danger:         #dc3545;
    --lc-danger-dim:     rgba(220, 53, 69, 0.15);
    --lc-success:        #28a745;
    --lc-success-dim:    rgba(40, 167, 69, 0.15);
    --lc-success-light:  #84cc16;
    --lc-info:           #2d7dd2;
    --lc-info-dim:       rgba(45, 125, 210, 0.15);
    --lc-warning:        #f59e0b;
    --lc-warning-dim:    rgba(245, 158, 11, 0.15);

    /* Gantt bar colours */
    --lc-gantt-bar:        #454545;  /* task bar fill */
    --lc-gantt-bar-border: #808080;  /* task bar outline */
    --lc-gantt-complete:   #40ff00;  /* completion overlay */

    /* Typography */
    --lc-font-body:    'Barlow', Arial, sans-serif;
    --lc-font-heading: 'Barlow Condensed', Arial, sans-serif;

    /* Spacing */
    --lc-space-xs: 4px;
    --lc-space-sm: 8px;
    --lc-space-md: 16px;
    --lc-space-lg: 24px;
    --lc-space-xl: 32px;

    /* Radius */
    --lc-radius-sm: 4px;
    --lc-radius-md: 6px;
    --lc-radius-lg: 10px;

    /* Z-index scale */
    --lc-z-nav:    100;
    --lc-z-sticky: 200;
    --lc-z-modal:  1000;
    --lc-z-toast:  10000;
}

/* ── Light Theme Override ── */
body[data-theme="light"] {
    --lc-bg-base:      #f2f4f7;
    --lc-bg-surface:   #ffffff;
    --lc-bg-elevated:  #eaecf0;
    --lc-bg-input:     #f8f9fb;

    --lc-text-primary:   #1a1a2e;
    --lc-text-secondary: #555570;
    --lc-text-muted:     #8888a0;

    --lc-accent:       #b87800;
    --lc-accent-hover: #8f5c00;
    --lc-accent-dim:   rgba(184, 120, 0, 0.12);

    --lc-border:       #d0d4dc;
    --lc-border-light: #e0e4ea;

    --lc-gantt-bar:        var(--lc-info);  /* keep blue task bar on light theme */
    --lc-gantt-bar-border: #5c9900;        /* darker lime border on light theme */
    --lc-gantt-complete:   #5c9900;        /* darker lime — legible on white backgrounds */

    --lc-success-light:  #65a30d;
    --lc-warning:        #d97706;
    --lc-warning-dim:    rgba(217, 119, 6, 0.12);
}

/* ── General ── */
body {
    font-family: var(--lc-font-body);
    margin: 0;
    padding: 0;
    background-color: var(--lc-bg-base);
    color: var(--lc-text-primary);
    background-image: url('/images/grid.png');
    background-repeat: repeat;
    background-size: 128px 92px;
}

/* ── Logo Banner ── */
.Logomodal {
    position: fixed;
    top: 20px;
    left: 0;
    width: 100%;
    height: 100px;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 10px 0;
    padding-left: 150px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    /* Smooth transition on ALL properties that change */
    transition: padding 0.4s ease, height 0.4s ease;
    will-change: height;
}

.Logomodal.small {
    padding-left: 50px;
    height: 25px;
}

.Logomodal img.logo {
    display: block;
    width: 80%;
    max-width: 800px;
    min-width: 100px;
    height: auto;
    margin: 0 10%;
    /* Smooth logo resize */
    transition: width 0.4s ease, max-width 0.4s ease, margin 0.4s ease;
    will-change: width; /* hint to browser: animate this efficiently */
}

.Logomodal img.logo.small {
    width: 30%;
    max-width: 240px;
    min-width: 50px;
    margin-right: 20%;
}

/* ── Layout ── */
.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 60px;
}


/* ── Floating Navigation ── */
.floating-nav {
    position: fixed;
    left: 20px;
    top: 40%;
    transform: translateY(-40%);
    display: flex;
    flex-direction: column;
    height: auto;
    z-index: 101;
}

.nav-expand-btn {
    visibility: hidden;
    font-size: 1.5em;
    color: white;
    margin: 10px 0;
    cursor: pointer;
    justify-content: flex-start;
    transition: transform 0.3s ease;
    width: 30px;
    height: 30px;
    background-image: url('/images/menu_open.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.8);
    border-radius: 5px;
}

.nav-button {
    background-image: url('/images/button.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    width: 200px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.8);
    margin: 5px 0;
    padding: 0 5px;
    gap: 10px;
    overflow: hidden;
    transition: width 0.3s ease, padding 0.3s ease;
}

.nav-button:hover {
    transform: scale(1.05);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.8);
}

.icon-badge {
    background-color: var(--button-color, #00BFFF);
    border-radius: 5px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    box-shadow: inset 2px 2px 1px rgba(0, 0, 0, 0.7),
                inset -2px -2px 1px rgba(255, 255, 255, 0.7);
}

.nav-button img {
    filter: drop-shadow(2px 2px 2px rgba(250, 250, 250, 0.5));
}

.button-label {
    display: inline;
    margin-left: 5px;
}

.nav-button > * { z-index: 1; }

.floating-nav.collapsed .nav-button,
.nav-button.collapsed {
    width: 37px;
    background-image: url('/images/shortbutton.png');
    background-size: 100% 100%;
}

/* ── Modal (unified — was defined twice) ──
   Default state is hidden. Use display:flex to show. */
.modal {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    overflow: auto;
}

.modal-content {
    background-color: var(--lc-bg-surface);
    color: var(--lc-text-primary);
    margin: 8% auto;
    padding: 20px 25px;
    border-radius: var(--lc-radius-lg);
    width: 40%;
    min-width: 300px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

.modal-content h2,
.modal-content h3 {
    margin-top: 0;
    color: var(--lc-accent);
    text-align: center;
}

.modal-content label {
    display: block;
    margin-top: 10px;
    color: var(--lc-text-secondary);
    font-weight: 500;
}

/* :not(checkbox/radio) added 2026-08-26 — this rule was catching every
   <input> in any .modal-content, checkboxes/radios included, stretching them
   to width:100% (found via the Request Quote modal's task-item checklist,
   where an unprotected checkbox visually ballooned to ~70% of its row).
   project.css's own narrower .modal-content input[type="..."] rule already
   lists text/date/number/email explicitly for the same reason — this is the
   bare, broader version of that same fix. */
.modal-content input:not([type="checkbox"]):not([type="radio"]),
.modal-content select {
    width: 100%;
    padding: 6px 10px;
    margin-top: 0;
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-md);
    box-sizing: border-box;
    background-color: var(--lc-bg-input);
    color: var(--lc-text-primary);
}

/* Wide modal */
.modal-content.wide-modal {
    display: flex;
    flex-direction: column;
    position: relative;
    width: 80%;
    max-width: 1200px;
    max-height: 90vh;
    background: var(--lc-bg-surface);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 2vh;
}

/* Image search modal */
.wide-modal.imagesearch {
    width: 90vw;
    max-width: 90%;
    height: 80vh;
    max-height: 80vh;
    z-index: 1100;
    display: none;
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    justify-content: center;
    align-items: flex-start;
    background: rgba(0, 0, 0, 0.5);
}

.wide-modal.imagesearch .modal-content {
    width: 100%;
    height: 100%;
    padding: 20px;
    overflow-y: auto;
    border-radius: 12px;
    background-color: #fff;
}

/* Scrollable modal area */
.modal-scrollable {
    overflow-y: auto;
    flex: 1 1 auto;
    padding: 1rem 0;
}

/* ── Item editor modal shell (shared by product/material/BOQ/cabinet editors) ── */
.le-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}
.le-modal-overlay.active { display: flex; }

.ai-loading{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  pointer-events:none;              /* clicks pass through */
  z-index:50;
}
.spinner{width:164px;height:182px;background:url('/images/spinner_sheet.png') 0 0/9840px 182px no-repeat;animation:sprite 1.8s steps(60, jump-none) infinite}
@keyframes sprite{to{background-position-x:100%}}

.le-modal-panel {
    position: relative; /* anchor for #ai_spinner overlay — covers the whole panel */
    background: var(--lc-bg-surface);
    border: 1px solid var(--lc-border);
    border-radius: 16px;
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}

.le-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}
.le-modal-header h3 {
    margin: 0;
    font-family: var(--lc-font-heading);
    font-size: 1.4rem;
    letter-spacing: 0.05em;
    color: var(--lc-text-primary);
}
.le-modal-close {
    background: transparent;
    border: none;
    border-radius: var(--lc-radius-sm);
    color: var(--lc-danger);
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.le-modal-close:hover { background: var(--lc-danger-dim); }
/* Positioned absolutely when used outside .le-modal-header's flex layout
   (BOQ/cabinet modals haven't been restructured onto that header yet). */
.modal-content .le-modal-close { position: absolute; top: 12px; right: 14px; }

.le-modal-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding: 20px 24px;
}

.le-modal-footer {
    padding: 14px 24px;
    border-top: 1px solid rgba(255,255,255,0.07);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .le-modal-overlay { padding: 0; align-items: flex-start; }
    .le-modal-panel {
        height: 100vh;
        height: 100dvh;
        max-height: none;
        border-radius: 0;
        max-width: 100%;
    }
}

/* ── Album item toolbar (2026-08-20) — select/lock/edit/delete grouped into
   one row along the top edge of each renderAlbum() thumbnail, instead of
   scattered across separate corners. Delete is pushed to the far right via
   margin-left:auto on that one button; select/lock/edit sit left-aligned
   in the order they're most commonly used together. ── */
.album-item-toolbar {
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    display: flex;
    align-items: center;
    gap: 3px;
    z-index: 2;
}
.album-item-toolbar-btn {
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.7em;
    padding: 1px 4px;
    line-height: 1.4;
}
.file-share-checkbox {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: var(--lc-accent);
    flex-shrink: 0;
}
#lc-share-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 150;
    display: none;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 24px;
    background: var(--lc-accent);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
    font-weight: 600;
    font-size: 0.9rem;
}
#lc-share-fab.show { display: flex; }
#lc-share-fab:hover { background: var(--lc-accent-hover); }

/* Editor body: image left, fields right */
.editor-body {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.editor-image {
    flex: 0 0 180px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}
.image-container {
    width: 160px;
    height: 160px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    cursor: pointer;
}
.image-container img.image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.editor-fields { flex: 1; min-width: 260px; max-width: none; box-sizing: border-box; }

/* Form grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.form-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.form-row label {
    flex: 0 0 140px;
    text-align: right;
    font-size: 0.82rem;
    color: var(--lc-text-secondary);
    font-family: var(--lc-font-heading);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    user-select: none;
}
.form-row address-field,
.form-row input[type="text"],
.form-row input[type="number"],
.form-row input[type="email"],
.form-row textarea,
.form-row select {
    flex: 1;
    background: var(--lc-bg-input);
    border: 1px solid var(--lc-border);
    border-radius: 7px;
    color: var(--lc-text-primary);
    padding: 8px 12px;
    font-family: var(--lc-font-body);
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.15s;
}
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
    border-color: var(--lc-accent);
    outline: none;
}
.form-row input[readonly],
.form-row textarea[readonly] {
    opacity: 0.5;
    cursor: not-allowed;
}
.form-row select[disabled] { opacity: 0.5; }

#message, #boqMessage, #cabinetConfigMsg {
    font-size: 0.85rem;
    color: var(--lc-danger);
    min-height: 1.2em;
}

/* Components (accordion sections below the image+fields row) — left flush
   in .le-modal-body's own padding box (24px both sides), same as the
   right edge, rather than aligned under .editor-fields. */
.components-section,
#prodDesignBlock,
#designConfigBlock {
    margin-top: 12px;
}
.component-block { margin-bottom: 4px; }
.toggle-btn {
    width: 100%;
    text-align: left;
    background: var(--lc-bg-elevated);
    border: 1px solid var(--lc-border);
    border-radius: 8px;
    color: var(--lc-text-secondary);
    padding: 10px 14px;
    font-family: var(--lc-font-heading);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.12s;
}
.toggle-btn:hover { background: var(--lc-bg-surface); }
.tab-content { padding: 4px 0; max-height: none; overflow-y: visible; }
.components-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    margin-bottom: 8px;
}
.components-table th {
    color: var(--lc-text-secondary);
    font-family: var(--lc-font-heading);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-align: left;
    user-select: none;
}
.components-table td {
    padding: 8px 10px;
    color: var(--lc-text-primary);
    border-bottom: 1px solid var(--lc-border);
    user-select: none;
}
.components-table tr:last-child td { border-bottom: none; }
.add-btn {
    background: var(--lc-info-dim);
    border: 1px dashed var(--lc-info);
    border-radius: var(--lc-radius-md);
    color: var(--lc-info);
    padding: 6px 14px;
    font-family: var(--lc-font-heading);
    font-size: 0.85rem;
    cursor: pointer;
    transition: filter 0.12s;
}
.add-btn:hover { filter: brightness(1.15); }

/* ── Buttons ── */
.button {
    --btn-color: #007bff;
    background-color: var(--btn-color);
    color: white;
    border: none;
    height: 30px;
    padding: 0 10px;
    line-height: 30px;
    box-sizing: border-box;
    font-size: 14px;
    vertical-align: middle;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: filter 0.2s, transform 0.1s;
}

.button:hover {
    filter: brightness(85%);
    transform: scale(1.02);
}

.btn-blue   { --btn-color: #007bff; }
.btn-green  { --btn-color: #28a745; }
.btn-red    { --btn-color: #dc3545; }
.btn-orange { --btn-color: #fd7e14; }
.btn-grey   { --btn-color: #aaaaaa; }

/* bluebutton — single definition */
.bluebutton {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 10px;
    transition: background-color 0.2s, transform 0.1s;
}

.bluebutton:hover {
    background-color: #0056b3;
    transform: scale(1.02);
}

.sendbutton {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 10px;
    transition: background-color 0.2s, transform 0.1s;
}

.sendbutton:hover {
    background-color: #218838;
    transform: scale(1.02);
}

/* ── Row-action icon buttons (Open/Edit/Delete) ──────────────────────────
   Shared across any per-row table (listeditor, render_boq, ...): SVG line
   icons on a soft tinted tile with a raised bevel border, rather than emoji
   (inconsistent cross-platform rendering, cartoonish look, can't be
   recolored to match the theme). */
.lc-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid;
    /* top / right / bottom / left — light top-left, shadow bottom-right,
       like a slightly raised key rather than a flat tile */
    border-color: rgba(255,255,255,0.22) rgba(0,0,0,0.3) rgba(0,0,0,0.3) rgba(255,255,255,0.22);
    box-shadow: 0 1px 2px rgba(0,0,0,0.25);
    cursor: pointer;
    transition: background 0.15s, filter 0.15s, box-shadow 0.1s, transform 0.1s;
}
.lc-action-btn svg { display: block; }
.lc-action-btn + .lc-action-btn { margin-left: 6px; }
.lc-action-open   { background: var(--lc-success-dim); color: var(--lc-success); }
.lc-action-edit   { background: var(--lc-info-dim);    color: var(--lc-info); }
.lc-action-delete { background: var(--lc-danger-dim);  color: var(--lc-danger); }
.lc-action-move   { background: var(--lc-accent-dim);  color: var(--lc-accent); cursor: ns-resize; }
/* Rescan — always present on every supplier_invoices row/item, colour-coded
   by how much the last AI extraction should be trusted. Only the red
   (low-confidence/failed/needs-review/no-data) state pulses; medium/high
   confidence still get a one-click rescan, just without the urgency cue. */
.lc-action-rescan-red     { background: var(--lc-danger-dim);  color: var(--lc-danger);  animation: lc-rescan-pulse 2s ease-in-out infinite; }
.lc-action-rescan-yellow  { background: var(--lc-warning-dim); color: var(--lc-warning); }
.lc-action-rescan-green   { background: var(--lc-success-dim); color: var(--lc-success); }
.lc-action-rescan-neutral { background: var(--lc-border);      color: var(--lc-text-secondary); }
@keyframes lc-rescan-pulse { 0%, 100% { box-shadow: 0 1px 2px rgba(0,0,0,0.25); } 50% { box-shadow: 0 0 0 3px var(--lc-danger-dim); } }
.lc-action-open:hover,
.lc-action-edit:hover,
.lc-action-delete:hover,
.lc-action-rescan-red:hover,
.lc-action-rescan-yellow:hover,
.lc-action-rescan-green:hover,
.lc-action-rescan-neutral:hover,
.lc-action-move:hover { filter: brightness(1.3); }
/* Pressed: bevel flips and the button sinks slightly, like it's actually
   being pushed rather than just changing color. */
.lc-action-btn:active {
    border-color: rgba(0,0,0,0.3) rgba(255,255,255,0.18) rgba(255,255,255,0.18) rgba(0,0,0,0.3);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.35);
    transform: translateY(1px);
}

/* ── Close buttons ── */
.close-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 1.2em;
    cursor: pointer;
    color: var(--lc-text-muted);
    background: none;
    border: none;
    padding: 4px 6px;
    border-radius: var(--lc-radius-sm);
    line-height: 1;
    transition: color 0.15s, background 0.15s;
}

.close-btn:hover { color: var(--lc-danger); background: var(--lc-danger-dim); }

.modal-content .close,
.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ── Animation (single definition) ── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes alertDrop {
    from { transform: translateY(-10px); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

/* ── Containers ──
   .container is only actually used on the landing page (index.php); its
   real rule lives in lightcraft.css (full-width — the section's own
   padding is the gutter). This boxed 80%-width variant used to load after
   lightcraft.css and silently win the cascade, re-narrowing every landing
   section (worst on mobile, e.g. the gallery). Removed rather than scoped
   since nothing else references class="container". */

.list-container {
    max-width: 1200px;
    max-height: 60vh;
    overflow-y: auto;
    margin: auto;
    padding: 20px;
    color: black;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(0, 255, 128, 0.9);
}


/* ── Filter Modal ── */
.filter-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.filter-modal-content {
    background: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    max-height: 80vh;
    overflow: auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.filter-column-options {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 10px;
    align-items: center;
    text-align: center;
    margin-top: 10px;
}

.filter-column-options label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px;
    background: #f4f4f4;
    border-radius: 5px;
}

.filter-column-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    align-items: center;
    text-align: center;
}

.filter-column-header {
    font-weight: bold;
    background: #ddd;
    padding: 5px;
    text-align: center;
}

.filter-column-label {
    padding: 5px 5px 5px 10px;
    background: #f4f4f4;
    border-radius: 5px;
    text-align: left;
}


/* ── Search Bar ── */
.search-container {
    display: flex;
    margin: 10px;
    width: 90%;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-container > div {
    flex: 1;
    min-width: 300px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.centeredtext {
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: auto;
    margin: 0;
}

.search-bar,
.field-bar {
    height: 30px;
    padding: 0 10px;
    line-height: 30px;
    box-sizing: border-box;
    font-size: 14px;
    vertical-align: middle;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.search-bar { width: 40%; min-width: 160px; }
.field-bar  { width: 15%; min-width: 80px; }


/* ── Forms ── */
form { margin-block-end: 0; }

.form-group {
    width: 100%;
    padding: 2px;
    display: flex;
    align-items: center;
}

.form-group textarea {
    width: 50%;
    padding: 2px;
    box-sizing: border-box;
    resize: vertical;
}

.form-group label {
    width: 50%;
    text-align: right;
    padding-right: 10px;
}

.form-group input {
    width: 40%;
    padding: 5px;
    border: 1px solid #ccc;
}

.form-group .readonly-field {
    width: 40%;
    padding: 5px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    text-align: left;
    box-sizing: border-box;
}

/* ── Tables ── */
.table-container { margin-top: 10px; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: small;
}

table, th, td { border: 1px solid var(--lc-border); }

th, td {
    white-space: nowrap;
    padding: 2px;
    text-align: left;
    height: 12px;
    color: var(--lc-text-primary);
}

#weathertable th, #weathertable td { color: unset; }

/* ── Components ── */
.component-qty {
    padding: 2px 4px;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    background-color: var(--lc-bg-input);
    color: var(--lc-text-primary);
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-sm);
}

/* ── Tabs (single definition) ── */
.tabs { margin-top: 20px; }

.tab-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
}

.tab-btn.active { background: var(--lc-accent); color: #000; }

/* ── Submit fixed ── */
.submit-fixed {
    position: sticky;
    bottom: 0;
    display: block;
    margin: 0 auto;
    padding: 10px 20px;
    background: #007bff;
    color: #fff;
    border-radius: 6px;
}

/* ── Misc ── */
.currency::before  { content: "R "; }
.percentage::after { content: "%"; }

.image-container { position: relative; }
.image  { width: 250px; height: 250px; object-fit: contain; }
.icon   { width: 30px;  height: 30px;  object-fit: contain; }

.listresultsbody { overflow: auto; }

.modal, .editcontainer {
    align-items: center;
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.itemeditor {
    color: black;
    display: grid;
    grid-template-columns: 60% 40%;
    background-color: white;
    margin: auto;
    padding: 20px;
    max-width: 1000px;
    text-align: center;
    border-radius: 10px;
    position: relative;
    gap: 20px;
}

.readonly-field {
    margin: 0;
    padding: 8px 10px;
    line-height: 1.2;
    text-align: left;
    height: 30px;
    display: inline-block;
    width: 90%;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f9f9f9;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
}

.selected { border: 2px solid red; }

.dropZone {
    border: 2px dashed #888;
    padding: 40px;
    text-align: center;
    color: #555;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* ── Album grouping (Images/Drawings/Documents) ──────────────────────────
   group_name cosmetic sub-headings, same spirit as project_boq.group_name's
   collapsible sub-headings — collapse state is per-view (not persisted). */
.album-group { width: 100%; margin-bottom: 4px; }
.album-group-heading {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 6px 4px;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--lc-text-secondary);
    cursor: pointer;
    user-select: none;
}
.album-group-toggle { display: inline-block; transition: transform 0.15s ease; }
.album-group.collapsed .album-group-toggle { transform: rotate(-90deg); }
.album-group-items { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
.album-group.collapsed .album-group-items { display: none; }

/* Drawing revision register — superseded revisions hidden by default;
   #drawingsAlbum.show-superseded (toggled in render_drawings.php) reveals
   them again. Only ever applied within the Drawings section. */
.lc-superseded-drawing { display: none; }
#drawingsAlbum.show-superseded .lc-superseded-drawing { display: block; }
.lc-drawing-revision-badge {
    position: absolute;
    bottom: 2px;
    left: 2px;
    background: var(--lc-bg-elevated);
    color: var(--lc-text-muted);
    border: 1px solid var(--lc-border-light);
    border-radius: 3px;
    font-size: 0.65em;
    padding: 1px 4px;
    line-height: 1.4;
}
.lc-superseded-drawing .lc-drawing-revision-badge { color: var(--lc-text-muted); opacity: 0.8; }

.selectFilesBtn {
    padding: 10px 20px;
    margin-bottom: 10px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

select {
    min-height: 30px;
    padding: 4px;
    font-size: 14px;
}

input {
    height: 24px;
    padding: 2px;
    font-size: 14px;
}

/* ── Custom Alert ── */
.custom-alert-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.60);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 20vh;
    /* Must outrank every other fixed overlay in the app (edit-iframe-overlay,
       comp-edit-overlay, selector-overlay top out at 10500) or the alert
       renders invisibly behind them until that overlay is closed. */
    z-index: 20000;
}

.custom-alert-box {
    background: var(--lc-bg-elevated);
    border: 1px solid var(--lc-border-light);
    padding: 24px 28px;
    border-radius: var(--lc-radius-md);
    max-width: 500px;
    width: calc(100% - 40px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65);
    animation: alertDrop .25s ease-out;
    text-align: center;
}

/* Dark theme: the overlay backdrop (rgba(0,0,0,0.6)) darkens an already-dark
   page, so a box at the plain --lc-bg-elevated tone doesn't stand out much
   from it. Lighten the box and give it a visible border/glow so alert,
   confirm, and prompt dialogs read clearly. Light theme doesn't have this
   problem — its box is already light against the dark backdrop. */
body[data-theme="dark"] .custom-alert-box {
    background: color-mix(in srgb, var(--lc-bg-elevated) 100%, white 14%);
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 16px 48px rgba(0, 0, 0, 0.65);
}

.custom-alert-box p {
    text-align: center;
    color: var(--lc-text-primary);
    margin: 0 0 18px;
    white-space: pre-line;
}

.custom-alert-box button {
    padding: 6px 14px;
    background: var(--lc-accent);
    color: #000;
    border: none;
    border-radius: var(--lc-radius-sm);
    font-family: var(--lc-font-heading);
    font-weight: 600;
    width: 100px;
    cursor: pointer;
    transition: filter 0.15s;
}
.custom-alert-box button:hover { filter: brightness(1.15); }

.custom-confirm-btns { display: flex; gap: 10px; justify-content: center; margin-top: 0; }
.custom-confirm-cancel {
    background: transparent;
    color: var(--lc-text-secondary);
    border: 1px solid var(--lc-border);
}
.custom-confirm-cancel:hover { filter: none; background: var(--lc-bg-input); }
/* 2026-11-08: `.custom-alert-box button` (0,1,1) out-ranked the plain
   .custom-confirm-cancel rule above, so Cancel kept the gold fill / black
   text, and on :hover (which did win) got the input background with that
   same black text -- unreadable on dark-ish tones / sticky touch hover. One
   explicit rule at higher specificity sets the whole look in both themes. */
.custom-alert-box .custom-confirm-cancel,
.custom-alert-box .custom-confirm-cancel:hover,
.custom-alert-box .custom-confirm-cancel:focus {
    background: transparent;
    color: var(--lc-text-primary);
    border: 1px solid var(--lc-border-light);
    filter: none;
}
.custom-alert-box .custom-confirm-cancel:hover { background: var(--lc-bg-input); }

/* ── AI Variant Picker ── */
#ai_variant_picker {
    padding: 12px 14px;
    background: var(--lc-bg-elevated);
    border: 1px solid var(--lc-accent-dim);
    border-left: 3px solid var(--lc-accent);
    border-radius: var(--lc-radius-md);
    margin-bottom: 12px;
}
.ai-vp-question {
    font-family: var(--lc-font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    color: var(--lc-accent);
    margin-bottom: 10px;
}
.ai-vp-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    margin-bottom: 6px;
    background: var(--lc-bg-input);
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-sm);
    color: var(--lc-text-primary);
    font-family: var(--lc-font-body);
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.ai-vp-btn:last-of-type { margin-bottom: 0; }
.ai-vp-btn:hover { border-color: var(--lc-accent); background: var(--lc-bg-surface); }
.ai-vp-btn strong { color: var(--lc-accent); font-family: var(--lc-font-heading); letter-spacing: 0.03em; }
.ai-vp-detail { color: var(--lc-text-secondary); font-size: 0.85em; }

/* ── Missing-items checkbox picker (2026-08-05) — Stage B's pending_missing
   list, shown by showMissingItemsPicker() in modal_edit_item.php. Same
   container look as #ai_variant_picker above (kept a separate id since the
   two are never shown at once, but styled identically for consistency). ── */
#ai_missing_picker {
    padding: 12px 14px;
    background: var(--lc-bg-elevated);
    border: 1px solid var(--lc-accent-dim);
    border-left: 3px solid var(--lc-accent);
    border-radius: var(--lc-radius-md);
    margin-bottom: 12px;
}
.ai-missing-btn {
    padding: 7px 16px;
    background: var(--lc-bg-input);
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-sm);
    color: var(--lc-text-primary);
    font-family: var(--lc-font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.ai-missing-btn:hover { border-color: var(--lc-accent); background: var(--lc-bg-surface); }

.custom-alert-box input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    background: var(--lc-bg-input);
    border: 1px solid var(--lc-border-light);
    border-radius: var(--lc-radius-sm);
    color: var(--lc-text-primary);
    font-size: 1.15rem;
    text-align: center;
    box-sizing: border-box;
    margin-bottom: 20px;
    outline: none;
    font-family: var(--lc-font-heading);
    letter-spacing: 0.05em;
}
.custom-alert-box input[type="number"]:focus {
    border-color: var(--lc-accent);
    box-shadow: 0 0 0 2px var(--lc-accent-dim);
}

/* ── Quantity prompt (Add Line Item to BOQ) ──────────────────────────────
   Reuses .custom-alert-overlay/.custom-alert-box for the same look as the
   rest of the custom dialog system; everything below is scoped under
   .qty-prompt-box so it always outranks the generic `.custom-alert-box
   button`/input rules above regardless of source order. */
.qty-prompt-box { text-align: left; max-width: 440px; }
.qty-prompt-box .qty-prompt-title { text-align: center; margin: 0 0 16px; }
.qty-prompt-box .qty-prompt-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--lc-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 10px 0 4px;
}
.qty-prompt-box .qty-prompt-hint { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--lc-text-muted); }
.qty-prompt-box .qty-prompt-input {
    width: 100%;
    padding: 8px 10px;
    background: var(--lc-bg-input);
    border: 1px solid var(--lc-border-light);
    border-radius: var(--lc-radius-sm);
    color: var(--lc-text-primary);
    font-size: 1rem;
    box-sizing: border-box;
    outline: none;
}
.qty-prompt-box .qty-prompt-input:focus { border-color: var(--lc-accent); box-shadow: 0 0 0 2px var(--lc-accent-dim); }
.qty-prompt-box .qty-prompt-qty-input { font-family: var(--lc-font-heading); font-size: 1.2rem; text-align: center; letter-spacing: 0.04em; }
.qty-prompt-box .qty-prompt-preview { min-height: 18px; text-align: center; font-size: 0.85rem; color: var(--lc-accent); margin-top: 4px; }
.qty-prompt-box .qty-prompt-dims { display: flex; gap: 8px; margin: 10px 0; }
.qty-prompt-box .qty-prompt-dim-field { flex: 1; }
.qty-prompt-box .qty-prompt-dim-field label { display: block; font-size: 0.72rem; color: var(--lc-text-muted); margin-bottom: 2px; text-align: center; }
.qty-prompt-box .qty-prompt-dim-field input {
    width: 100%;
    padding: 6px;
    text-align: center;
    background: var(--lc-bg-input);
    border: 1px solid var(--lc-border-light);
    border-radius: var(--lc-radius-sm);
    color: var(--lc-text-primary);
    box-sizing: border-box;
    outline: none;
}
.qty-prompt-box .qty-prompt-dim-field input:focus { border-color: var(--lc-accent); box-shadow: 0 0 0 2px var(--lc-accent-dim); }
.qty-prompt-box .qty-prompt-calc-toggle {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 6px;
    background: transparent;
    border: 1px dashed var(--lc-border);
    border-radius: var(--lc-radius-sm);
    color: var(--lc-text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
}
.qty-prompt-box .qty-prompt-calc-toggle:hover { background: var(--lc-bg-input); filter: none; }
.qty-prompt-box .qty-prompt-calc { margin-top: 10px; padding: 10px; background: var(--lc-bg-input); border: 1px solid var(--lc-border); border-radius: var(--lc-radius-sm); }
.qty-prompt-box .qty-calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.qty-prompt-box .qty-calc-grid button {
    width: auto;
    padding: 8px 0;
    background: var(--lc-bg-elevated);
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-sm);
    color: var(--lc-text-primary);
    font-family: var(--lc-font-heading);
    cursor: pointer;
}
.qty-prompt-box .qty-calc-grid button:hover { filter: brightness(1.15); }
.qty-prompt-box .qty-calc-clear { color: var(--lc-danger); }
.qty-prompt-box .qty-prompt-calc-use {
    width: 100%;
    margin-top: 8px;
    padding: 8px;
    background: var(--lc-accent);
    color: #000;
    border: none;
    border-radius: var(--lc-radius-sm);
    font-family: var(--lc-font-heading);
    font-weight: 600;
    cursor: pointer;
}
.qty-prompt-box .qty-prompt-btns { margin-top: 18px; }

/* ── Procurement Ordered/Paid/Delivered popup (2026-09-12) ───────────────
   Reuses .custom-alert-overlay/.custom-alert-box for the same look as the
   rest of the custom dialog system (render_procurement.js's
   openProcurementPopup previously built its own inline-styled div with no
   backdrop and plain unstyled buttons) — everything below is scoped under
   .proc-popup-box, same pattern as .qty-prompt-box above. */
.proc-popup-box { text-align: left; max-width: 420px; }
.proc-popup-box h3 { text-align: center; margin: 0 0 14px; }
.proc-popup-box .proc-popup-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.proc-popup-box .proc-popup-row label { flex: 1; color: var(--lc-text-primary); }
.proc-popup-box input[type="date"] {
    padding: 6px 8px;
    background: var(--lc-bg-input);
    border: 1px solid var(--lc-border-light);
    border-radius: var(--lc-radius-sm);
    color: var(--lc-text-primary);
    outline: none;
}
.proc-popup-box input[type="date"]:focus { border-color: var(--lc-accent); box-shadow: 0 0 0 2px var(--lc-accent-dim); }
.proc-popup-box input[type="date"]:disabled { opacity: 0.5; }
.proc-popup-box .proc-popup-qty-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--lc-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 10px 0 4px;
}
.proc-popup-box input[type="number"] {
    width: 100px;
    padding: 8px 10px;
    background: var(--lc-bg-input);
    border: 1px solid var(--lc-border-light);
    border-radius: var(--lc-radius-sm);
    color: var(--lc-text-primary);
    font-size: 1rem;
    box-sizing: border-box;
    outline: none;
}
.proc-popup-box input[type="number"]:focus { border-color: var(--lc-accent); box-shadow: 0 0 0 2px var(--lc-accent-dim); }
.proc-popup-box .proc-popup-hint { font-size: 0.78rem; color: var(--lc-text-muted); margin: 4px 0 0; }
.proc-popup-box .proc-popup-btns { margin-top: 18px; }

/* ── Completion-triggered procurement reconciliation toast (2026-09-12) ──
   Deliberately NOT the full-screen .custom-alert-overlay/.custom-alert-box
   used elsewhere — this must stay non-blocking/frictionless (David: a task
   hitting 100% shouldn't interrupt the flow), so it's a small corner card
   instead of a centered modal. */
.proc-reconcile-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 19000;
    max-width: 340px;
    background: var(--lc-bg-elevated);
    border: 1px solid var(--lc-border-light);
    border-radius: var(--lc-radius-md);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    padding: 16px 18px;
    animation: alertDrop .25s ease-out;
}
body[data-theme="dark"] .proc-reconcile-toast {
    background: color-mix(in srgb, var(--lc-bg-elevated) 100%, white 14%);
    border-color: rgba(255, 255, 255, 0.24);
}
.proc-reconcile-toast h4 {
    margin: 0 0 8px;
    font-size: 0.9rem;
    color: var(--lc-text-primary);
}
.proc-reconcile-toast .proc-reconcile-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--lc-text-secondary);
    margin-bottom: 6px;
}
.proc-reconcile-toast .proc-reconcile-row label { flex: 1; }
.proc-reconcile-toast .proc-reconcile-btns { display: flex; gap: 8px; margin-top: 12px; justify-content: flex-end; }
.proc-reconcile-toast .proc-reconcile-btns button {
    padding: 6px 14px;
    border-radius: var(--lc-radius-sm);
    font-family: var(--lc-font-heading);
    font-weight: 600;
    cursor: pointer;
}
.proc-reconcile-toast .proc-reconcile-confirm {
    background: var(--lc-accent);
    color: #000;
    border: none;
}
.proc-reconcile-toast .proc-reconcile-confirm:hover { filter: brightness(1.15); }
.proc-reconcile-toast .proc-reconcile-close {
    background: transparent;
    color: var(--lc-text-secondary);
    border: 1px solid var(--lc-border);
}
.proc-reconcile-toast .proc-reconcile-close:hover { background: var(--lc-bg-input); }

/* Dismissed procurement rows (any of materials/tools/labour) — reduced
   opacity instead of the deadline-based red/yellow alert colours, so a
   line the user explicitly decided not to track reads as "acknowledged,
   not urgent" rather than either "needs action" or a normal on-track row. */
.proc-row-dismissed { opacity: 0.5; }
.proc-dismiss-btn {
    background: transparent;
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-sm);
    color: var(--lc-text-secondary);
    font-size: 0.72rem;
    padding: 2px 8px;
    cursor: pointer;
}
.proc-dismiss-btn:hover { background: var(--lc-bg-input); }

/* ── Unified Headings ── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--lc-font-heading);
    color: var(--lc-text-primary);
    margin-top: 0;
    letter-spacing: 0.04em;
}
h1 { font-size: 2rem;    font-weight: 700; }
h2 { font-size: 1.5rem;  font-weight: 700; text-transform: uppercase; }
h3 { font-size: 1.2rem;  font-weight: 600; }
h4 { font-size: 1rem;    font-weight: 600; }

/* ── Page heading (.lc-page-heading) — the title at the top of every
   app-style page: listeditor, payroll, cash account, attendance, column
   permissions, prompt editor, design formula editor. Single source of
   truth — change font/size/spacing here once, not per page. ── */
.lc-page-heading {
    font-family: var(--lc-font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: none;
    margin: 0;
    color: var(--lc-text-primary);
}

/* ── Auth card (.lc-auth-*) — the standalone-page form used by
   set_password.php and forgot_password.php (magic-link activation /
   SMS password reset). Single source of truth for that "one card centred
   on the page" look — add a page here, don't re-inline the styles. ── */
.lc-auth-wrap {
    max-width: 440px;
    margin: 60px auto;
    padding: 0 16px 80px;
}
.lc-auth-card {
    background: var(--lc-bg-surface);
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-lg);
    padding: 32px;
}
.lc-auth-card h2 {
    font-family: var(--lc-font-heading);
    font-size: 1.6rem;
    color: var(--lc-text-primary);
    margin: 0 0 8px;
}
.lc-auth-card p.lc-auth-sub {
    color: var(--lc-text-secondary);
    margin: 0 0 24px;
    font-size: 0.9rem;
}
.lc-auth-alert {
    padding: 10px 14px;
    border-radius: var(--lc-radius-md);
    margin-bottom: 16px;
    font-size: 0.9rem;
}
.lc-auth-alert-error {
    background: var(--lc-danger-dim);
    color: var(--lc-danger);
    border: 1px solid var(--lc-danger);
}
.lc-auth-alert-success {
    background: var(--lc-success-dim);
    color: var(--lc-success);
    border: 1px solid var(--lc-success);
}
.lc-auth-field {
    margin-bottom: 16px;
}
.lc-auth-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--lc-text-secondary);
    margin-bottom: 5px;
}
.lc-auth-field input {
    width: 100%;
    box-sizing: border-box;
    background: var(--lc-bg-input);
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-md);
    padding: 9px 12px;
    color: var(--lc-text-primary);
    font-size: 0.95rem;
}
.lc-auth-btn {
    width: 100%;
    background: var(--lc-accent);
    color: #fff;
    border: none;
    border-radius: var(--lc-radius-md);
    padding: 11px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}
.lc-auth-btn:disabled {
    opacity: 0.6;
    cursor: default;
}
.lc-auth-link-row {
    margin-top: 14px;
    text-align: center;
    font-size: 0.85rem;
}
.lc-auth-link-row a {
    color: var(--lc-accent);
}

/* ── Unified Table (.lc-table) ── */
.lc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    font-family: var(--lc-font-body);
}
.lc-table th {
    background: var(--lc-bg-elevated);
    color: var(--lc-text-secondary);
    font-family: var(--lc-font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 8px 10px;
    border-bottom: 2px solid var(--lc-accent);
    text-align: left;
    white-space: nowrap;
}
.lc-table td {
    padding: 8px 10px;
    color: var(--lc-text-primary);
    border-bottom: 1px solid var(--lc-border);
    vertical-align: middle;
}
.lc-table tr:hover td { background: var(--lc-bg-elevated); }
.lc-table tr:last-child td { border-bottom: none; }

/* ── Unified Buttons (.lc-btn) ── */
.lc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 32px;
    padding: 0 14px;
    border: none;
    border-radius: var(--lc-radius-md);
    font-family: var(--lc-font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: filter 0.15s, transform 0.1s;
    text-decoration: none;
}
.lc-btn:hover:not([disabled]) { filter: brightness(1.15); transform: scale(1.02); }
.lc-btn:active { transform: scale(0.98); }
.lc-btn[disabled] { opacity: 0.4; cursor: not-allowed; }

.lc-btn-primary  { background: var(--lc-accent);   color: #000; }
.lc-btn-info     { background: var(--lc-info);      color: #fff; }
.lc-btn-success  { background: var(--lc-success);   color: #fff; }
.lc-btn-danger   { background: var(--lc-danger);    color: #fff; }
.lc-btn-ghost    { background: transparent; color: var(--lc-accent); border: 1px solid var(--lc-accent); }

/* Rescan header button (item editor) — same trust colour-coding as the list's
   .lc-action-rescan-* icons, pill form. Only red pulses. */
.lc-rescan-red     { background: var(--lc-danger);  color: #fff; animation: lc-rescan-pulse 2s ease-in-out infinite; }
.lc-rescan-yellow  { background: var(--lc-warning); color: #000; }
.lc-rescan-green   { background: var(--lc-success); color: #fff; }
.lc-rescan-neutral { background: var(--lc-bg-elevated); color: var(--lc-text-secondary); border: 1px solid var(--lc-border); }
.lc-btn-secondary {
    background: var(--lc-bg-elevated);
    color: var(--lc-text-primary);
    border: 1px solid var(--lc-border);
}
.lc-btn-warning  { background: var(--lc-warning);  color: #000; }

/* Small size modifier */
.lc-btn-sm { height: 26px; padding: 0 10px; font-size: 0.78rem; }

/* Pressed state for the Procurement Per Schedule/Per Consolidated toggle
   (render_procurement.php) — .lc-btn-ghost has no built-in "on" look since it
   was never used as a segmented toggle before. */
.proc-view-toggle-btn.proc-view-active { background: var(--lc-accent); color: #000; }

/* ── Scrollbars ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--lc-bg-base); }
::-webkit-scrollbar-thumb { background: var(--lc-border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--lc-border); }

/* ── FK clear button ── */
.fk-clear-btn,
.cc-mat-clear {
    flex-shrink: 0;
    padding: 4px 8px;
    background: transparent;
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-sm);
    color: var(--lc-text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    line-height: 1;
    transition: color 0.15s, border-color 0.15s;
}
.fk-clear-btn:hover,
.cc-mat-clear:hover {
    color: var(--lc-danger);
    border-color: var(--lc-danger);
}

/* ── Unified Form Inputs (.lc-input, .lc-select, .lc-textarea) ── */
.lc-input,
.lc-select,
.lc-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-md);
    background-color: var(--lc-bg-input);
    color: var(--lc-text-primary);
    font-family: var(--lc-font-body);
    font-size: 0.9rem;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.lc-input:focus,
.lc-select:focus,
.lc-textarea:focus {
    outline: none;
    border-color: var(--lc-accent);
    box-shadow: 0 0 0 2px var(--lc-accent-dim);
}
.lc-textarea { resize: vertical; min-height: 80px; }

/* ── Unified Form Layout (.lc-form-grid, .lc-form-row) ── */
.lc-form-grid {
    display: grid;
    grid-template-columns: minmax(120px, 22%) 1fr;
    column-gap: 12px;
    row-gap: 10px;
    align-items: start;
}
.lc-form-grid label {
    text-align: right;
    font-size: 0.85rem;
    color: var(--lc-text-secondary);
    padding-top: 9px;
}
.lc-form-row {
    display: flex;
    align-items: center;
    gap: var(--lc-space-md);
    flex-wrap: wrap;
}

/* ── Unified Badges (.lc-badge + variants) ── */
.lc-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: var(--lc-font-heading);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    border: 1px solid currentColor;
}
.lc-badge-draft    { color: var(--lc-text-secondary); background: var(--lc-bg-elevated);   border-color: var(--lc-border); }
.lc-badge-pending  { color: var(--lc-warning);        background: var(--lc-warning-dim);    }
.lc-badge-approved { color: var(--lc-success);        background: var(--lc-success-dim);    }
.lc-badge-rejected { color: var(--lc-danger);         background: var(--lc-danger-dim);     }
.lc-badge-info     { color: var(--lc-info);           background: var(--lc-info-dim);       }
.lc-badge-accent   { color: var(--lc-accent);         background: var(--lc-accent-dim);     }
.lc-badge-invoiced { color: var(--lc-success-light);  background: rgba(132, 204, 22, 0.12); }

/* ── Toggle Switch (.lc-toggle + .lc-slider) ── */
.lc-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}
.lc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.lc-slider {
    position: absolute;
    inset: 0;
    background: var(--lc-border-light);
    border-radius: 22px;
    transition: background 0.2s;
    cursor: pointer;
}
.lc-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}
.lc-toggle input:checked + .lc-slider { background: var(--lc-accent); }
.lc-toggle input:checked + .lc-slider::before { transform: translateX(18px); }
.lc-toggle input:focus + .lc-slider { box-shadow: 0 0 0 2px var(--lc-accent-dim); }

/* ── Tab Navigation (.lc-tab-btn system) ── */
.lc-tab-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.lc-tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 8px 16px;
    cursor: pointer;
    font-family: var(--lc-font-heading);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--lc-text-secondary);
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.lc-tab-btn:hover { color: var(--lc-text-primary); }
.lc-tab-btn.active { color: var(--lc-accent); border-bottom-color: var(--lc-accent); }

/* ── Subnav Tab (.subnav-link) — sticky page sub-navigation strip ── */
.subnav-link {
    font-family: var(--lc-font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lc-text-secondary);
    text-decoration: none;
    padding: 3px 18px;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}
.subnav-link:hover,
.subnav-link.active {
    color: var(--lc-accent);
    border-bottom-color: var(--lc-accent);
}

/* ── View Tab (.view-tab) — BOQ/Gantt/Claims tab strip ── */
/* .proc-tab shares the same visual style for the Materials/Tools/Labour strip */
.view-tab,
.proc-tab {
    font-family: var(--lc-font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--lc-text-secondary);
    padding: 10px 20px;
    cursor: pointer;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    user-select: none;
}
.view-tab:hover,
.proc-tab:hover {
    color: var(--lc-text-primary);
}
.view-tab.active,
.proc-tab.active {
    color: var(--lc-accent);
    border-bottom-color: var(--lc-accent);
}

/* ── Floating Save Button (.save-btn) — sticky dirty-state save ── */
.save-btn {
    position: fixed;
    right: 24px;
    z-index: var(--lc-z-sticky);
    background: var(--lc-accent);
    color: #000;
    border: none;
    border-radius: var(--lc-radius-md);
    padding: 10px 22px;
    font-family: var(--lc-font-heading);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 20px var(--lc-accent-dim);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
}
.save-btn.hidden { display: none; }
.dirty-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lc-danger);
    display: inline-block;
    animation: pulse 1.6s ease-in-out infinite;
}

/* ── Toast (.lc-toast) — temporary feedback message ── */
.lc-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--lc-bg-elevated);
    color: var(--lc-text-primary);
    border: 1px solid var(--lc-border);
    padding: 10px 16px;
    border-radius: var(--lc-radius-md);
    z-index: var(--lc-z-toast);
    font-size: 0.85rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.3s;
}
.lc-toast.visible { opacity: 1; }

/* ── Welcome toast (.lc-toast-welcome) — appears centred, then flies toward the
   account button (top-right) after a brief pause. JS sets --fly-x/--fly-y to the
   real on-screen delta, via the .lc-toast-fly class. ── */
.lc-toast-welcome {
    position: fixed;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    background: var(--lc-bg-elevated);
    color: var(--lc-text-primary);
    border: 1px solid var(--lc-border);
    padding: 14px 28px;
    border-radius: var(--lc-radius-md);
    z-index: var(--lc-z-toast);
    font-size: 2.4rem;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    opacity: 1;
    transition: transform 0.6s ease-in, opacity 0.6s ease-in;
    pointer-events: none;
}
.lc-toast-welcome.lc-toast-fly {
    transform: translate(calc(-50% + var(--fly-x, 0px)), calc(-50% + var(--fly-y, 0px))) scale(var(--fly-scale, 0.1));
    opacity: 0;
}

/* ── Card (.lc-card) — general surface container ── */
.lc-card {
    background: var(--lc-bg-surface);
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-lg);
    padding: var(--lc-space-md) var(--lc-space-lg);
}
.lc-card-elevated {
    background: var(--lc-bg-elevated);
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-md);
    padding: var(--lc-space-md);
}

/* ── Action Buttons in tables (.lc-action-btn) ── */
.lc-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--lc-radius-sm);
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.15s;
}
.lc-action-edit   { background: var(--lc-info-dim);   color: var(--lc-info); }
.lc-action-delete { background: var(--lc-danger-dim);  color: var(--lc-danger); }
.lc-action-move   { background: var(--lc-accent-dim);  color: var(--lc-accent); cursor: ns-resize; }
.lc-action-edit:hover   { filter: brightness(1.3); }
.lc-action-delete:hover { filter: brightness(1.3); }
.lc-action-move:hover   { filter: brightness(1.3); }

/* ── Section Title (.lc-section-title) ── */
.lc-section-title {
    font-family: var(--lc-font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--lc-text-primary);
    letter-spacing: 0.04em;
    margin: 0 0 var(--lc-space-md);
}

/* ── Top Band (.lc-top-band) — header strip used on list/editor pages ── */
.lc-top-band {
    padding: 20px 24px 14px;
    background: var(--lc-bg-base);
    border-bottom: 1px solid var(--lc-border);
}

/* ── Search Wrap (.lc-search-wrap) ── */
.lc-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--lc-bg-input);
    border: 1px solid var(--lc-border);
    border-radius: 8px;
    padding: 6px 14px;
}
.lc-search-wrap svg { flex-shrink: 0; opacity: 0.4; color: var(--lc-text-secondary); }
.lc-search-wrap input[type="text"] {
    background: transparent;
    border: none;
    outline: none;
    color: var(--lc-text-primary);
    font-family: var(--lc-font-body);
    font-size: 0.95rem;
    width: 100%;
}
.lc-search-wrap input[type="text"]::placeholder { color: var(--lc-text-muted); }

/* ── Theme Toggle Button ── */
.theme-toggle-btn {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}
#theme-toggle-label { transition: none; }

/* ── Footer ── */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 20px;
}

/* ================================================
   RESPONSIVE BREAKPOINTS
   ================================================ */

/* Tablet & small laptop (up to 1024px) */
@media screen and (max-width: 1024px) {
    .Logomodal { padding-left: 40px; }

    .wide-modal {
        top: 10px;
        width: 80%;
        min-width: 500px;
    }

    .nav-expand-btn { visibility: visible; }

    .floating-nav.auto-collapse .nav-button {
        width: 38px;
        background-image: url('/images/shortbutton.png');
    }
}

/* Tablet & large phone (up to 768px) */
@media screen and (max-width: 768px) {
    .wide-modal { top: 10px; width: 90%; min-width: unset; }

    .editor-body { flex-direction: column; }
    .editor-image { width: 100%; margin-bottom: 10px; }

    /* One field per row, label stacked above its input. (The old 30%/60%
       rule made the GRID two-column, cramming two .form-rows side by side —
       on a phone the inputs were squashed to nothing.) */
    .form-grid { grid-template-columns: 1fr; }
    .form-row { flex-wrap: wrap; }
    .form-row label { flex: 1 1 100%; text-align: left; }
    .form-row input[type="text"],
    .form-row input[type="number"],
    .form-row input[type="email"],
    .form-row textarea,
    .form-row select { font-size: 16px; } /* ≥16px stops iOS focus auto-zoom */
}

/* Small phones (up to 500px) */
@media screen and (max-width: 500px) {
    .modal-content {
        width: 80%;
        min-width: 250px;
        margin-top: 20%;
    }

    .wide-modal { top: 10px; width: 95%; min-width: unset; margin-top: 10%; }

    .bluebutton { width: 100%; }
}

/* ================================================
   SYSTEM DARK MODE FALLBACK
   Applies when no data-theme attribute is set (e.g. logged-out pages).
   When data-theme is set by PHP, these CSS variable overrides on body
   take precedence via the body[data-theme="light"] rule above.
   ================================================ */
@media (prefers-color-scheme: light) {
    body:not([data-theme]) {
        --lc-bg-base:      #f2f4f7;
        --lc-bg-surface:   #ffffff;
        --lc-bg-elevated:  #eaecf0;
        --lc-bg-input:     #f8f9fb;
        --lc-text-primary:   #1a1a2e;
        --lc-text-secondary: #555570;
        --lc-text-muted:     #8888a0;
        --lc-accent:       #b87800;
        --lc-accent-hover: #8f5c00;
        --lc-accent-dim:   rgba(184, 120, 0, 0.12);
        --lc-border:       #d0d4dc;
        --lc-border-light: #e0e4ea;
    }
}

/* ── Upload Queue Widget ─────────────────────────────────────────────────── */
#lcUploadWidget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9000;
    width: 300px;
    background: var(--lc-bg-elevated);
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-md);
    box-shadow: 0 4px 24px rgba(0,0,0,0.35);
    font-size: 0.8rem;
    overflow: hidden;
    display: none; /* shown by JS when there are jobs */
}
#lcUploadWidget.lc-uw-visible { display: block; }

#lcUWHeader {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--lc-bg-surface);
    border-bottom: 1px solid var(--lc-border);
    font-weight: 600;
    font-family: var(--lc-font-heading);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
#lcUWHeader .lc-uw-title { flex: 1; color: var(--lc-text-primary); }
#lcUWHeader .lc-uw-badge {
    background: var(--lc-accent);
    color: #fff;
    border-radius: 999px;
    padding: 1px 7px;
    font-size: 0.7rem;
    font-weight: 700;
}
#lcUWHeader .lc-uw-badge.done { background: var(--lc-success, #2a7a2a); }
#lcUWHeader .lc-uw-close {
    background: none; border: none; cursor: pointer; padding: 2px 4px;
    color: var(--lc-text-muted); font-size: 1rem; line-height: 1;
}
#lcUWHeader .lc-uw-close:hover { color: var(--lc-text-primary); }

#lcUWItems { max-height: 260px; overflow-y: auto; padding: 6px 0; }

.lc-uw-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-bottom: 1px solid var(--lc-border-light, var(--lc-border));
    color: var(--lc-text-secondary);
}
.lc-uw-item:last-child { border-bottom: none; }
.lc-uw-item .lc-uw-icon { font-size: 0.85rem; flex-shrink: 0; }
.lc-uw-item .lc-uw-name {
    flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: var(--lc-text-primary);
}
.lc-uw-item .lc-uw-status { font-size: 0.7rem; color: var(--lc-text-muted); white-space: nowrap; }
.lc-uw-item.lc-uw-done   .lc-uw-icon { color: var(--lc-success, #3a9a3a); }
.lc-uw-item.lc-uw-error  .lc-uw-icon { color: var(--lc-danger, #cc3030); }
.lc-uw-item.lc-uw-active .lc-uw-icon { color: var(--lc-accent); }

/* Pulsing dot while processing */
@keyframes lcUWPulse { 0%,100% { opacity:1; } 50% { opacity:0.35; } }
.lc-uw-pulse { animation: lcUWPulse 1.4s ease-in-out infinite; }

/* ── Backlog widget (Global Admin only, header.php) ────────────────────────
   Tiny sticky "+" button under the logo (.lc-header has 24px left padding,
   see lightcraft.css — 24px here lines this button up under it); click
   expands one panel: the add-issue box at the top, the outstanding backlog
   checklist below it. Merged 2026-08-04 from two separate buttons/panels
   into one. */
#lcBacklogWidget {
    position: fixed;
    top: calc(var(--nav-h, 56px) + 8px);
    left: 24px;
    z-index: 850;
}
#lcBacklogToggle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--lc-border);
    background: var(--lc-accent);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
#lcBacklogToggle:hover { filter: brightness(1.1); }
#lcBacklogPanel {
    margin-top: 8px;
    width: min(480px, calc(100vw - 48px));
    max-height: 70vh;
    overflow-y: auto;
    background: var(--lc-bg-elevated);
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-md);
    box-shadow: 0 4px 24px rgba(0,0,0,0.35);
    padding: 10px;
    font-size: 0.78rem;
}
.lc-backlog-add {
    padding-bottom: 10px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--lc-border);
}
.lc-todos-section-label {
    font-size: 0.68rem;
    color: var(--lc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 10px 0 4px;
}
.lc-todos-section-label:first-child { margin-top: 0; }

/* Pending notes (from the "+" widget) */
.lc-note-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--lc-border);
}
.lc-note-page {
    font-size: 0.68rem;
    color: var(--lc-text-muted);
    flex: 0 0 auto;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lc-note-text { flex: 1 1 auto; color: var(--lc-text-primary); }
.lc-note-dismiss {
    flex: 0 0 auto;
    background: transparent;
    border: 1px solid var(--lc-border);
    color: var(--lc-text-muted);
    border-radius: var(--lc-radius-sm);
    width: 22px;
    height: 22px;
    cursor: pointer;
}
.lc-note-dismiss:hover { color: var(--lc-success, #28a745); border-color: currentColor; }

/* Checklist blocks — todo title/description/fix, then indented checks */
.lc-todo-block {
    padding: 8px 0;
    border-bottom: 1px solid var(--lc-border);
}
.lc-todo-block .lc-todo-title {
    font-weight: 600;
    color: var(--lc-text-primary);
}
.lc-todo-progress {
    font-weight: 400;
    font-size: 0.82em;
    color: var(--lc-text-muted, var(--lc-text-secondary));
}
.lc-todo-desc {
    color: var(--lc-text-secondary);
    margin-top: 2px;
}
.lc-todo-fix {
    color: var(--lc-success, #28a745);
    margin-top: 2px;
}
.lc-todo-checks {
    margin-top: 6px;
    padding-left: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.lc-todo-check-row {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    cursor: pointer;
    color: var(--lc-text-secondary);
}
.lc-todo-check-row input {
    width: 15px;
    height: 15px;
    margin-top: 1px;
    accent-color: var(--lc-accent);
    cursor: pointer;
    flex: 0 0 auto;
}

/* Per-item feedback box (2026-08-04) — sits after a todo's checks; David
   uses it to say a test failed or needs more work, for Claude to read back
   and action next time, instead of just leaving a box unticked. */
.lc-todo-feedback {
    margin-top: 8px;
    padding-left: 10px;
}
.lc-todo-feedback-input {
    width: 100%;
    box-sizing: border-box;
    background: var(--lc-bg-input, var(--lc-bg-surface));
    color: var(--lc-text-primary);
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-sm);
    padding: 5px 7px;
    font-size: 0.74rem;
    font-family: inherit;
    resize: vertical;
}
.lc-todo-feedback-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
}
.lc-todo-feedback-status {
    font-size: 0.68rem;
    color: var(--lc-text-muted);
}
.lc-todo-feedback-save {
    background: var(--lc-accent);
    color: #fff;
    border: none;
    border-radius: var(--lc-radius-sm);
    padding: 3px 10px;
    font-size: 0.72rem;
    cursor: pointer;
}

/* Backlog item dependency note, shown inline in .lc-todo-title (merged
   Checklist+Backlog view, 2026-08-09) */
.lc-overview-dep {
    font-weight: 400;
    font-size: 0.82em;
    color: var(--lc-text-muted);
}

/* Add-issue box at the top of the panel */
#lcNotesInput {
    width: 100%;
    box-sizing: border-box;
    background: var(--lc-bg-input, var(--lc-bg-surface));
    color: var(--lc-text-primary);
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-sm);
    padding: 6px 8px;
    font-size: 0.8rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 6px;
}
.lc-notes-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.lc-notes-actions button {
    background: var(--lc-accent);
    color: #fff;
    border: none;
    border-radius: var(--lc-radius-sm);
    padding: 4px 12px;
    font-size: 0.78rem;
    cursor: pointer;
}
#lcNotesStatus {
    font-size: 0.72rem;
    color: var(--lc-text-muted);
}

/* Flat, uniform colour-picker swatches everywhere in the app (Plan Measure's
   colour fields, Gantt bar-colour pickers, etc.) — the browser default draws
   an inset border/padding around a tiny inner swatch that reads as a grainy
   textured box at this size; this makes the whole control one solid square
   of colour instead. */
input[type="color"] {
    padding: 0;
    border: none;
    width: 28px;
    height: 24px;
    border-radius: var(--lc-radius-sm);
    cursor: pointer;
    background: none;
}
input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: var(--lc-radius-sm);
}
input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: var(--lc-radius-sm);
}
input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: var(--lc-radius-sm);
}

/* ── Spinning gradient ring (2026-10-21) ───────────────────────────────────
   Wrap any element in .lc-spin-ring: a slowly rotating blue → whitish-blue
   conic border around it. The wrapped element keeps its own opaque
   background; the 2px of padding is the visible ring. Needs @property so the
   angle itself can animate. Switched off for prefers-reduced-motion. */
@property --lc-spin-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}
@keyframes lc-spin-angle { to { --lc-spin-angle: 360deg; } }
.lc-spin-ring {
    padding: 2px;
    border-radius: calc(var(--radius, 12px) + 2px);
    background: conic-gradient(from var(--lc-spin-angle),
        #1456d9, #4f9bff, #cfe6ff, #f2f8ff, #cfe6ff, #4f9bff, #1456d9);
    animation: lc-spin-angle 6s linear infinite;
}
.lc-spin-ring > * { margin: 0; }
@media (prefers-reduced-motion: reduce) {
    .lc-spin-ring { animation: none; }
}

/* ── Phone text size (2026-10-21, David) ──────────────────────────────────
   Phones only (desktop is untouched). Raises the page base size ~12.5% (rem-based text follows) and floors the tiniest text at 0.75rem.
   Fixed-pixel and compact badge/counter text is deliberately NOT touched here;
   point those out individually if they are still too small. */
@media (max-width: 768px) {
  html {
    font-size: 112.5%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  .qty-prompt-box .qty-prompt-dim-field label,
  .proc-dismiss-btn,
  .lc-uw-item .lc-uw-status,
  .lc-todos-section-label,
  .lc-note-page,
  .lc-todo-feedback-input,
  .lc-todo-feedback-status,
  .lc-todo-feedback-save,
  #lcNotesStatus { font-size: 0.75rem; }
}

.lc-popia-notice {
    margin: 16px 0 0;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--lc-text-secondary);
}
.lc-popia-notice a {
    color: var(--lc-accent);
}

/* Exposure-cap prompt (project page, payment terms) */
.lc-exposure-prompt {
    margin: 0 0 12px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--lc-warning);
    background: var(--lc-warning-dim);
    color: var(--lc-text-primary);
    font-size: 0.9rem;
    line-height: 1.4;
}
.lc-exposure-prompt.danger { border-color: var(--lc-danger); background: var(--lc-danger-dim); }
.lc-exposure-prompt.ok     { border-color: var(--lc-success); background: var(--lc-success-dim); }
.lc-exposure-prompt .lc-btn { margin-left: 8px; }
.lc-exposure-locked { color: var(--lc-text-muted); font-size: 0.8rem; }
