/* =====================================================================
   Workshop software — modern-UI refinement layer.

   Loaded LAST in the workshop themed admin layout
   (app/Views/themes/workshop/layouts/admin.php), after admin.css,
   brand.css, themes/workshop.css and modern.css. Scoped to .admin (the
   workshop <body> class) and built on the admin.css design tokens
   (--gold, --ink, --line, --muted, --surface, --danger, --radius).

   Additive only — no layout is moved. The public website is a different
   layout and never loads this file, so nothing here touches it.
   ===================================================================== */

.admin {
    --rf-radius:    10px;
    --rf-radius-sm: 7px;
    --rf-shadow-sm: 0 1px 2px rgba(20, 22, 26, .05);
    --rf-shadow:    0 1px 2px rgba(20, 22, 26, .04), 0 10px 24px -12px rgba(20, 22, 26, .20);
    --rf-ring:      0 0 0 3px rgba(232, 178, 26, .28);
}

/* ---------- Cards: softer corners, a hair of elevation ---------- */
.admin .panel,
.admin .ro__facts,
.admin .ro__step,
.admin .ro__ai-panel,
.admin .ro__missing,
.admin .jobcard,
.admin .job-card,
.admin .chk__walk {
    border-radius: var(--rf-radius);
    box-shadow: var(--rf-shadow-sm);
}
.admin .job-card { transition: box-shadow .16s ease, transform .16s ease; }
.admin .job-card:hover { box-shadow: var(--rf-shadow); transform: translateY(-1px); }

/* ---------- Header: a bigger, tighter vehicle title ---------- */
.admin .ro__head h1 { font-size: 1.95rem; letter-spacing: -.01em; }

/* ---------- Spec strip: cleaner cards, stronger hierarchy ---------- */
.admin .ro__facts { overflow: hidden; }
.admin .ro__facts span {
    display: block; font-size: .68rem; letter-spacing: .06em;
    text-transform: uppercase; color: var(--muted); margin-bottom: .26rem;
}
.admin .ro__facts strong { font-size: 1.25rem; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.admin .ro__facts .ro__due { color: var(--danger); }
/* Inline editors in the strip read as text, not boxes. */
.admin .ro__facts select,
.admin .ro__facts input { border: 0; background: transparent; box-shadow: none; }
.admin .ro__facts select:focus,
.admin .ro__facts input:focus { border: 0; box-shadow: none; }

/* ---------- Section titles: gold marker, the "designed" signal ---------- */
.admin .ro__sec > h2 { position: relative; padding-left: 13px; }
.admin .ro__sec > h2::before {
    content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 4px; height: 12px; border-radius: 2px; background: var(--gold);
}

/* ---------- Tabs: hover + an unmistakable active state ---------- */
.admin .ro__tabs a { transition: color .15s, background .15s, box-shadow .15s; }
.admin .ro__tabs a:hover { color: var(--ink); background: #f4f5f7; }
.admin .ro__tabs a.is-on {
    color: var(--ink); font-weight: 700;
    box-shadow: inset 0 -3px 0 var(--gold);
    background: linear-gradient(180deg, rgba(232, 178, 26, .12), rgba(232, 178, 26, .02));
}

/* ---------- Unread dot on the Message tab ---------- */
.admin .ro__tab-dot {
    display: inline-block; min-width: 16px; margin-left: 5px; padding: 0 5px;
    background: #c0392b; color: #fff; border-radius: 999px;
    font-size: 11px; font-weight: 700; line-height: 16px; text-align: center; vertical-align: middle;
}

/* ---------- Status as a proper pill with a leading dot ---------- */
.admin .badge, .admin .chip, .admin .ro__status {
    border-radius: 999px; font-weight: 700;
    display: inline-flex; align-items: center; gap: 6px;
}
.admin .badge::before, .admin .ro__status::before {
    content: ""; width: 7px; height: 7px; border-radius: 999px;
    background: currentColor; flex: 0 0 auto;
}

/* ---------- Next-step banner ---------- */
.admin .ro__step { border-radius: var(--rf-radius); box-shadow: var(--rf-shadow-sm); }

/* ---------- AI panel ---------- */
.admin .ro__ai-panel {
    border: 1px solid var(--line);
    background:
        radial-gradient(120% 140% at 0 0, rgba(232, 178, 26, .07), transparent 60%),
        var(--surface);
}

/* ---------- Empty states read as intentional ---------- */
.admin .ro__none {
    padding: 14px 16px; border: 1px dashed var(--line);
    border-radius: var(--rf-radius); background: #f7f8fa; color: var(--muted);
}

/* ---------- Buttons: gold gets dimension ---------- */
.admin .btn-sm { transition: background .15s, border-color .15s, box-shadow .15s, transform .1s; }
.admin .btn-sm:active { transform: translateY(1px); }
.admin .btn-sm--primary {
    background: linear-gradient(180deg, #ecbb2b, #e0a80f);
    border-color: #c9990a; color: var(--ink);
    box-shadow: 0 1px 1px rgba(20, 22, 26, .12), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.admin .btn-sm--primary:hover { background: linear-gradient(180deg, #e6b421, #cf9a0c); color: var(--ink); }

/* ---------- Form controls in the content area (not the top search) ---- */
.admin .ro__body select,
.admin .ro__body textarea,
.admin .ro__body input:not([type="checkbox"]):not([type="radio"]):not([type="search"]):not([type="range"]) {
    border-radius: var(--rf-radius-sm);
    border: 1px solid var(--line);
    transition: border-color .15s, box-shadow .15s;
}
.admin .ro__body select:focus,
.admin .ro__body textarea:focus,
.admin .ro__body input:not([type="checkbox"]):not([type="radio"]):focus {
    outline: none; border-color: var(--gold); box-shadow: var(--rf-ring);
}
/* keep the spec-strip editors borderless even inside content */
.admin .ro__facts select,
.admin .ro__facts input { border: 0 !important; box-shadow: none !important; }

/* ---------- Two-way conversation on the RO Message tab ---------- */
.admin .romsg {
    display: flex; flex-direction: column; gap: 8px;
    max-height: 380px; overflow-y: auto; padding: 14px; margin-bottom: 16px;
    background: #f4f5f7; border: 1px solid var(--line); border-radius: var(--rf-radius);
}
.admin .romsg__b { align-self: flex-start; max-width: 76%; }
.admin .romsg__b--out { align-self: flex-end; text-align: right; }
.admin .romsg__body {
    display: inline-block; padding: 8px 12px; border-radius: 15px;
    background: #fff; border: 1px solid var(--line); color: var(--text);
    text-align: left; white-space: pre-wrap; border-bottom-left-radius: 5px;
}
.admin .romsg__b--out .romsg__body {
    background: #2f6bff; border-color: #2f6bff; color: #fff;
    border-bottom-left-radius: 15px; border-bottom-right-radius: 5px;
}
.admin .romsg__t { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }

/* ---------- Top-bar icon buttons + dropdown panels (notifications, messages) ---------- */
.admin .ws-pop-wrap { position: relative; display: inline-flex; }
.admin .ws-iconbtn {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border: 0; background: transparent; color: inherit;
    border-radius: 9px; cursor: pointer; opacity: .82;
}
.admin .ws-iconbtn:hover { opacity: 1; background: rgba(255, 255, 255, .09); }
.admin .ws-iconbtn__badge {
    position: absolute; top: 2px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px;
    background: #e5484d; color: #fff; border-radius: 999px;
    font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
}
.admin .ws-pop {
    position: absolute; top: calc(100% + 8px); right: 0; width: 340px;
    max-height: 72vh; overflow-y: auto;
    background: var(--surface, #fff); color: var(--text, #23272e);
    border: 1px solid var(--line, #e3e6ea); border-radius: 12px;
    box-shadow: 0 14px 36px rgba(20, 22, 26, .20); z-index: 90;
}
.admin .ws-pop[hidden] { display: none; }
.admin .ws-pop__head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 14px; border-bottom: 1px solid var(--line, #eee); font-weight: 700; font-size: 14px;
}
.admin .ws-pop__head a { font-size: 12px; font-weight: 600; color: var(--gold-dark, #b88a0c); text-decoration: none; }
.admin .ws-pop__empty { padding: 22px 14px; color: var(--muted, #6b7280); font-size: 13px; }
.admin .ws-pop__row {
    display: flex; align-items: center; gap: 10px; padding: 11px 14px;
    border-bottom: 1px solid var(--line-2, #f0f0f2); text-decoration: none; color: inherit;
}
.admin .ws-pop__row:last-child { border-bottom: 0; }
.admin .ws-pop__row:hover { background: #f7f8fa; }
.admin .ws-pop__av, .admin .ws-pop__ic {
    flex: 0 0 auto; width: 34px; height: 34px; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
    background: #eaf0fb; color: #2458bd;
}
.admin .ws-pop__ic { background: #f4f5f7; color: var(--muted, #6b7280); }
.admin .ws-pop__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.admin .ws-pop__body strong { font-size: 13px; font-weight: 600; line-height: 1.3; }
.admin .ws-pop__time, .admin .ws-pop__prev {
    font-size: 12px; color: var(--muted, #6b7280); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin .ws-pop__dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 999px; background: #e5484d; }
