/* The shared app look - loaded by the staff console and by both portals' base
   templates. Layered over tokens.css and sidebar.css. */

:root { --orange: #F2A33A; }

.icon { width: 1.15rem; height: 1.15rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- left menu ---- */
.sidebar .sidebar-link { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.8rem; }
.sidebar .sidebar-link.is-active { background: color-mix(in srgb, var(--accent-teal) 22%, transparent); color: var(--text); }

.nav-row { display: flex; align-items: center; gap: 0.25rem; }
.nav-row .sidebar-link { flex: 1; min-width: 0; }

.nav-chevron, .nav-row-button {
  display: inline-flex; align-items: center; color: var(--text-secondary); background: none; border: none; cursor: pointer; font-family: inherit;
}
.nav-chevron { padding: 0.45rem; border-radius: 6px; }
.nav-chevron:hover, .nav-row-button:hover { color: var(--text); }
.nav-chevron .icon, .nav-row-button .icon:last-child { transition: transform 0.15s ease; }
.nav-item.is-open .nav-chevron .icon, .nav-item.is-open .nav-row-button .icon:last-child { transform: rotate(90deg); }

.nav-row-button { width: 100%; gap: 0.75rem; padding: 0.55rem 0.8rem; font-size: 0.9rem; border-radius: 6px; }
.nav-row-button .nav-label { flex: 1; text-align: left; }

.nav-sub { display: none; flex-direction: column; gap: 0.1rem; margin: 0.1rem 0 0.3rem; }
.nav-item.is-open .nav-sub { display: flex; }
.nav-sub .sidebar-link { padding-left: 2.6rem; font-size: 0.86rem; }

.sidebar-bottom { display: flex; flex-direction: column; gap: 0.5rem; border-top: 1px solid color-mix(in srgb, var(--border) 55%, transparent); padding-top: 0.6rem; }

.sidebar-user { display: flex; align-items: center; gap: 0.75rem; border-top: none; padding: 0.6rem 0.4rem 0; }
.sidebar-user-text { min-width: 0; }
.sidebar-user-text strong { display: block; font-size: 0.86rem; }
.sidebar-user-text form { margin: 0; }

.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: color-mix(in srgb, var(--accent-teal) 55%, var(--bg-raised));
  color: #F6F6F1; font-weight: 700; font-size: 0.78rem;
}
.avatar-lg { width: 4.8rem; height: 4.8rem; font-size: 1.6rem; }

/* ---- top bar ---- */
.app-topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1rem;
  padding: 0.85rem 2rem; background: var(--bg); border-bottom: 1px solid var(--border);
}
.breadcrumbs { display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; color: var(--text-secondary); min-width: 0; }
.breadcrumbs a { color: var(--text-secondary); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text); }
.crumb-sep { opacity: 0.6; }
.crumb-current { color: var(--text); font-weight: 600; }
.topbar-tools { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }
.topbar-search {
  display: flex; align-items: center; gap: 0.5rem; width: 15rem; padding: 0.45rem 0.8rem;
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg-raised); color: var(--text-secondary);
}
.topbar-search input { border: none; background: none; padding: 0; width: 100%; color: var(--text); font-size: 0.9rem; }
.topbar-search input:disabled { cursor: not-allowed; }
.topbar-bell { display: inline-flex; padding: 0.45rem; background: none; border: none; color: var(--text-secondary); border-radius: 8px; }
.topbar-bell:disabled { cursor: not-allowed; opacity: 0.8; }
@media (max-width: 860px) {
  .app-topbar { padding: 0.7rem 1rem; }
  .topbar-search { width: 2.4rem; padding: 0.45rem; }
  .topbar-search input { display: none; }
}

/* ---- cards, buttons, pills, chips ---- */
body main { max-width: 1280px; }

body .panel, body .card {
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: 12px; padding: 1.35rem 1.5rem;
}
.card > h2:first-child { margin: 0 0 0.8rem; font-size: 1.15rem; }
.card + .card { margin-top: 0; }
body section.card { margin-bottom: 1rem; }
.card-grid section.card, .dash-grid section.card { margin-bottom: 0; }
.card-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 1rem; align-items: stretch; margin-bottom: 1rem; }
.card-grid > div { display: flex; flex-direction: column; gap: 1rem; }
.card-grid .card + .card { margin-top: 0; }
.card-grid > div > .card:last-child { flex: 1; }
@media (max-width: 960px) { .card-grid { grid-template-columns: 1fr; } }

.btn { border-radius: 8px; display: inline-flex; align-items: center; gap: 0.5rem; }
.btn-ghost { color: var(--text); border-color: color-mix(in srgb, var(--text) 38%, var(--border)); }
.btn-ghost:hover { border-color: var(--text); }
.btn-warning { background: var(--orange); color: #1B1306; border-color: transparent; }
.btn-warning:hover { background: color-mix(in srgb, var(--orange) 88%, white); }

.callout {
  display: flex; align-items: center; gap: 0.8rem; padding: 0.9rem 1.1rem; border-radius: 8px; margin: 0.9rem 0;
  border: 1px solid var(--border);
}
.callout-warning { color: var(--orange); background: color-mix(in srgb, var(--orange) 13%, transparent); border-color: color-mix(in srgb, var(--orange) 45%, transparent); }
.callout-ok { color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); border-color: color-mix(in srgb, var(--success) 40%, transparent); }

.status-pill.active { color: var(--success); background: color-mix(in srgb, var(--success) 14%, transparent); border-color: color-mix(in srgb, var(--success) 45%, var(--border)); }

.chip-add { border-style: dashed; background: transparent; color: var(--text); cursor: pointer; font: inherit; }

.more-menu { position: relative; }
.more-menu > summary { list-style: none; cursor: pointer; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-menu-list {
  position: absolute; right: 0; top: calc(100% + 0.4rem); min-width: 13rem; z-index: 20;
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: 10px; padding: 0.4rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}
.more-menu-list a { display: block; padding: 0.5rem 0.7rem; border-radius: 6px; color: var(--text); text-decoration: none; font-size: 0.9rem; }
.more-menu-list a:hover { background: var(--bg-sunken); }

table { border-collapse: collapse; }
body th, body thead th { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); }

/* The slide-in menu's shadow should only show while the menu is open on a phone. */
@media (max-width: 860px) {
  .sidebar { box-shadow: none; }
  body.sidebar-open .sidebar { box-shadow: 0 0 40px rgba(0, 0, 0, 0.3); }
}

/* Filter rows of dropdowns wrap on a phone instead of pushing the page wider. */
.filter-row { flex-wrap: wrap; }
.filter-row select { max-width: 100%; }

@media print { .app-topbar { display: none; } }

/* ---- list pages (candidates, clients): header, tabs, filter bar, rows, pager ---- */
.list-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.list-head h1 { margin: 0 0 0.3rem; }
.list-head p { margin: 0; color: var(--text-secondary); }

.tabs { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tab { padding: 0.55rem 1.1rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-raised); color: var(--text); text-decoration: none; font-size: 0.92rem; }
.tab:hover { border-color: var(--text-secondary); }
.tab.is-active { border-color: var(--accent-teal); color: var(--accent-teal); background: color-mix(in srgb, var(--accent-teal) 12%, transparent); }

.filter-bar { display: flex; align-items: center; gap: 0.6rem; flex-wrap: nowrap; margin-bottom: 1rem; }
@media (max-width: 1100px) { .filter-bar { flex-wrap: wrap; } }
.filter-form { display: contents; }
.search-field { flex: 1 1 10rem; min-width: 0; display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.8rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text-secondary); }
.search-field input { border: none; background: none; padding: 0; width: 100%; color: var(--text); font-size: 0.92rem; }
.search-field input:focus { outline: none; }
.filter-bar select { width: 7.5rem; flex: none; text-overflow: ellipsis; }
.filter-bar-end { display: flex; gap: 0.6rem; margin-left: auto; flex: none; }
.icon-button { padding: 0.55rem 0.7rem; }
.filter-panel { display: flex; flex-direction: column; gap: 0.6rem; padding: 0.6rem; min-width: 14rem; }
.filter-panel label { font-size: 0.8rem; color: var(--text-secondary); }
.filter-panel select { width: 100%; max-width: none; }
.save-view-panel { display: flex; flex-direction: column; gap: 0.6rem; padding: 0.6rem; min-width: 15rem; }
.save-view-panel form { display: flex; flex-direction: column; gap: 0.6rem; margin: 0; }
.more-menu-list.is-left { right: auto; left: 0; }

.filter-summary { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1rem; color: var(--text-secondary); font-size: 0.92rem; }
.filter-chip { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text); }
.filter-chip a { display: inline-flex; color: var(--text-secondary); }
.filter-chip a:hover { color: var(--text); }
.filter-chip .icon { width: 0.8rem; height: 0.8rem; }
.filter-status a { color: var(--accent-teal); }
.saved-views { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-bottom: 1rem; }
.saved-views form { margin: 0; display: inline; }

.person { display: flex; align-items: center; gap: 0.8rem; }
.person .avatar { width: 2.4rem; height: 2.4rem; }
.person-sub { display: block; font-size: 0.82rem; color: var(--text-secondary); }
.row-actions { text-align: right; }
.row-actions .more-menu { display: inline-block; }
.row-actions .btn { padding: 0.35rem 0.6rem; }
.list-table { width: 100%; }
.list-table td, .list-table th { padding: 0.7rem 0.9rem; text-align: left; vertical-align: middle; }
.list-table tbody tr { border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.list-table .select-cell { width: 2.5rem; }

.bulk-toolbar { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }
.bulk-toolbar select { width: auto; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; color: var(--text-secondary); font-size: 0.92rem; }
.pager-buttons { display: flex; gap: 0.5rem; }
.pager-buttons .btn { padding: 0.4rem 0.65rem; }
.pager-buttons .is-disabled { opacity: 0.4; pointer-events: none; }
.pager .icon-flip { transform: rotate(180deg); }

/* A menu entry that has to be a button (it submits a POST) but should look like the links around it. */
.more-menu-list .menu-button { display: block; width: 100%; text-align: left; padding: 0.5rem 0.7rem; border: none; border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: 0.9rem; cursor: pointer; }
.more-menu-list .menu-button:hover { background: var(--bg-sunken); }

/* ---- card header row + small buttons, shared by the detail pages ---- */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.card-head h2 { margin: 0; }
.card-head-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.card-head-actions form { margin: 0; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.88rem; }

/* A row menu that is open must not be clipped by the table's scroll area. */
.table-scroll:has(details[open]) { overflow: visible; }

/* ---- status pills and readiness tiles, shared by the job and candidate pages ---- */
.stage-pill { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.25rem 0.7rem; border-radius: 100px; border: 1px solid var(--border); background: var(--bg-sunken); font-size: 0.85rem; }
.stage-pill .dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--accent-teal); }
.stage-pill.is-warn .dot { background: var(--orange); }
.stage-pill.is-ok .dot { background: var(--success); }
.stage-pill.is-muted .dot { background: var(--text-secondary); }
/* Each tile is four shared rows - title, status pill, action button, note - so the pills, the buttons
   and the notes line up across all four tiles even when a title wraps onto two lines. */
.readiness { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 0; row-gap: 0.5rem; }
@media (max-width: 1100px) { .readiness { grid-template-columns: 1fr 1fr; } .ready-item:nth-child(n+3) { margin-top: 1.1rem; } }
@media (max-width: 640px) { .readiness { grid-template-columns: 1fr; } .ready-item:nth-child(n+2) { margin-top: 1.1rem; } }
.ready-item { grid-row: span 4; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: subgrid; column-gap: 0.9rem; padding: 0 1.1rem; border-left: 1px solid color-mix(in srgb, var(--border) 60%, transparent); min-width: 0; }
.ready-item:first-child { border-left: none; padding-left: 0; }
@media (max-width: 1100px) { .ready-item:nth-child(odd) { border-left: none; padding-left: 0; } }
@media (max-width: 640px) { .ready-item { border-left: none; padding-left: 0; } }
.ready-item > .icon { grid-column: 1; grid-row: 1; width: 2rem; height: 2rem; color: var(--text-secondary); margin-top: 0.1rem; }
.ready-body { grid-column: 2; grid-row: 1 / span 4; min-width: 0; display: grid; grid-template-rows: subgrid; justify-items: start; }
.ready-body > strong { grid-row: 1; font-weight: 500; }
.ready-body > .stage-pill { grid-row: 2; }
.ready-body > :is(.btn, details, form) { grid-row: 3; }
.ready-body > .ready-note { grid-row: 4; }
.ready-note { margin: 0; font-size: 0.82rem; color: var(--text-secondary); overflow-wrap: anywhere; }
.ready-body .more-menu-list { padding: 0.7rem; min-width: 16rem; }
.ready-body .more-menu-list input[type=file] { width: 100%; margin-bottom: 0.6rem; }
.ready-body form { margin: 0; }

/* ---- stat cards (clients and jobs lists) and square avatars ---- */
.stat-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.stat-card { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; background: var(--bg-raised); border: 1px solid var(--border); border-radius: 12px; }
.stat-icon { display: flex; align-items: center; justify-content: center; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: var(--bg-sunken); color: var(--text-secondary); flex: none; }
.stat-icon .icon { width: 1.4rem; height: 1.4rem; }
.stat-dot { width: 0.9rem; height: 0.9rem; border-radius: 50%; background: var(--success); }
.stat-dot.is-prospect { background: var(--accent-teal); }
.stat-number { font-size: 1.7rem; font-weight: 700; line-height: 1.1; }
.stat-caption { color: var(--text-secondary); font-size: 0.92rem; }
@media (max-width: 860px) { .stat-cards { grid-template-columns: 1fr; } }
.avatar-square { border-radius: 10px; }
.count-cell { white-space: nowrap; }
.count-cell .icon { vertical-align: middle; margin-right: 0.4rem; color: var(--text-secondary); }

/* ---- attention rows and item text (dashboards) ---- */
.attention-row { display: flex; align-items: center; gap: 1rem; padding: 0.9rem 0; border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.attention-row .row-body { flex: 1; min-width: 0; }
.attention-row .row-body > a { display: block; text-decoration: none; color: inherit; }
.attention-icon { color: var(--orange); display: flex; }
.attention-icon .icon { width: 1.6rem; height: 1.6rem; }
.attention-row form { margin: 0; }
.item-title { font-weight: 600; font-size: 0.96rem; }
.item-context { font-size: 0.86rem; color: var(--text-secondary); }
.item-amount { font-family: var(--font-mono); font-size: 0.9rem; white-space: nowrap; }
.stat-card.has-warning { border-color: var(--orange); }
.stat-card.has-warning .stat-icon { background: color-mix(in srgb, var(--orange) 18%, transparent); color: var(--orange); }
.dash-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.dash-head h1 { margin: 0 0 0.3rem; }
.dash-head p { margin: 0; color: var(--text-secondary); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 1rem; align-items: stretch; margin-bottom: 1rem; }
.dash-grid > div { display: flex; flex-direction: column; gap: 1rem; }
.dash-grid > div > .card:last-child { flex: 1; }
@media (max-width: 960px) { .dash-grid { grid-template-columns: 1fr; } }
body section.card.flush-bottom { margin-bottom: 0; }
.text-link { color: var(--accent-teal); text-decoration: underline; }

/* ---- request / new-job form: numbered sections, drop zone, side timeline (client request page + staff new job) ---- */
.request-eyebrow { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-secondary); margin: 0 0 0.4rem; }
.request-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 960px) { .request-grid { grid-template-columns: 1fr; } }
body .card.request-card { padding: 0; overflow: hidden; margin-bottom: 0; }
.request-card-body { padding: 1.5rem 1.75rem 0.5rem; }
.request-card-body h2 { margin: 0 0 0.2rem; }
.request-card-body .hint-line { margin: 0 0 1rem; color: var(--text-secondary); font-size: 0.88rem; }
.request-section { border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent); padding: 1.25rem 0 0.4rem; }
.request-section-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; }
.request-section-head h3 { margin: 0; font-size: 1.05rem; }
.step-number { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--bg-sunken); border: 1px solid var(--border); font-size: 0.85rem; font-weight: 600; }
.required-mark { color: var(--orange); margin-left: 0.15rem; }
.request-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .request-pair { grid-template-columns: 1fr; } }
.request-card .field { margin-bottom: 1rem; }
.request-card .errorlist { margin-bottom: 0.4rem; }

.input-prefix { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); overflow: hidden; }
.input-prefix > span { display: flex; align-items: center; padding: 0 0.9rem; background: var(--bg-sunken); border-right: 1px solid var(--border); font-weight: 600; }
body .input-prefix input { border: none; border-radius: 0; flex: 1; min-width: 0; background: transparent; }
.date-wrap { position: relative; }
body .input-prefix input { height: 2.6rem; box-sizing: border-box; }
body .date-wrap input { height: 2.75rem; box-sizing: border-box; }
body .date-wrap input { width: 100%; padding-right: 2.6rem; }
.date-wrap .icon { position: absolute; right: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--text-secondary); pointer-events: none; }
body .date-wrap input::-webkit-calendar-picker-indicator { opacity: 0; position: absolute; right: 0; top: 0; width: 2.8rem; height: 100%; cursor: pointer; }

.dropzone { position: relative; display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; border: 1.5px dashed var(--border); border-radius: 10px; background: var(--bg); cursor: pointer; }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent-teal); background: color-mix(in srgb, var(--accent-teal) 6%, transparent); }
.dropzone .icon { width: 2rem; height: 2rem; color: var(--text-secondary); flex: none; }
.dropzone input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; padding: 0; border: none; }
.dropzone .dz-title { font-size: 0.95rem; }
.dropzone .dz-title .browse { color: var(--accent-teal); text-decoration: underline; }
.dropzone .dz-sub { font-size: 0.78rem; color: var(--text-secondary); margin-top: 0.2rem; }

.request-footer { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; padding: 1rem 1.75rem; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--bg-sunken) 55%, transparent); }
.request-footer .note { display: flex; align-items: center; gap: 0.7rem; flex: 1; min-width: 14rem; color: var(--text-secondary); font-size: 0.86rem; }
.request-footer .note .icon { color: var(--accent-teal); width: 1.4rem; height: 1.4rem; flex: none; }

.next-card h2 { margin: 0 0 1.25rem; }
.timeline { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.timeline li { position: relative; display: flex; gap: 0.9rem; padding-bottom: 1.3rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 0.8rem; top: 2rem; bottom: 0; width: 2px; background: var(--border); }
.timeline .num { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--bg-sunken); border: 1px solid var(--border); font-size: 0.78rem; font-weight: 600; flex: none; }
.timeline .ring { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid var(--border); color: var(--text-secondary); flex: none; }
.timeline .ring .icon { width: 1.2rem; height: 1.2rem; }
.timeline strong { display: block; font-size: 0.95rem; }
.timeline p { margin: 0.15rem 0 0; color: var(--text-secondary); font-size: 0.88rem; }
.control-callout { display: flex; gap: 0.9rem; padding: 1rem 1.1rem; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--accent-teal) 45%, var(--border)); background: color-mix(in srgb, var(--accent-teal) 10%, transparent); }
.control-callout .icon { color: var(--accent-teal); width: 1.7rem; height: 1.7rem; flex: none; }
.control-callout strong { display: block; color: var(--accent-teal); }
.control-callout p { margin: 0.2rem 0 0; font-size: 0.9rem; }
.help-line { border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent); margin-top: 1.25rem; padding-top: 1rem; font-style: italic; color: var(--text-secondary); font-size: 0.86rem; }

/* ---- candidate questionnaire: red required stars, radio pills, check-box grids ---- */
.required-star { color: #E5534B; font-weight: 700; margin-left: 0.15rem; }
.q-legend { color: var(--text-secondary); font-size: 0.88rem; margin: 0 0 1rem; }
.q-card h2 { margin: 0 0 1rem; }
.q-card .q-note { margin: -0.5rem 0 1.1rem; color: var(--text-secondary); font-size: 0.9rem; }
.q-group { font-size: 0.95rem; font-weight: 600; margin: 1.5rem 0 0.75rem; padding-top: 1rem; border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.q-group:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.q-field .q-label { display: block; font-size: 0.88rem; font-weight: 500; margin-bottom: 0.45rem; }
.choice-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.q-field label.choice-pill, .q-field label.choice-check {
  display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; margin: 0;
  font-size: 0.92rem; font-weight: 400; line-height: 1.2;
}
.q-field label.choice-pill { padding: 0.55rem 1.1rem 0.55rem 0.9rem; border: 1px solid var(--border); border-radius: 100px; background: var(--bg); }
.q-field label.choice-pill:hover { border-color: var(--text-secondary); }
.q-field label.choice-pill:has(input:checked) { border-color: var(--accent-teal); background: color-mix(in srgb, var(--accent-teal) 14%, transparent); }
.q-field label.choice-pill:has(input:focus-visible), .q-field label.choice-check:has(input:focus-visible) { outline: 2px solid var(--accent-teal); outline-offset: 2px; }
.q-field label.choice-pill input, .q-field label.choice-check input {
  flex: none; width: 1.05rem; height: 1.05rem; margin: 0; padding: 0; accent-color: var(--accent-teal);
}
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.35rem 1rem; }
.q-field label.choice-check { padding: 0.35rem 0; }
.q-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 640px) { .q-pair { grid-template-columns: 1fr; } }
.ref-block + .ref-block { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.ref-block h3 { font-size: 0.95rem; margin: 0 0 0.75rem; }
.q-actions { display: flex; justify-content: flex-end; margin-top: 0.5rem; }
body .input-prefix .suffix { background: var(--bg-sunken); border-left: 1px solid var(--border); border-right: none; color: var(--text-secondary); font-weight: 400; font-size: 0.85rem; white-space: nowrap; }

/* ---- candidate questionnaire as a step-by-step form ---- */
.q-progress-line { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; color: var(--text-secondary); font-size: 0.9rem; white-space: nowrap; }
.q-progress-bar { flex: 1; height: 0.45rem; border-radius: 100px; background: var(--bg-sunken); overflow: hidden; border: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.q-progress-bar span { display: block; height: 100%; background: var(--accent-teal); border-radius: 100px; }
.q-step-head { display: flex; align-items: center; gap: 1rem; padding-bottom: 1rem; margin-bottom: 1.1rem; border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.q-step-head h2 { margin: 0 0 0.15rem; }
.q-step-head p { margin: 0; color: var(--text-secondary); font-size: 0.9rem; }
.q-step-icon { display: inline-flex; align-items: center; justify-content: center; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: var(--bg-sunken); border: 1px solid var(--border); color: var(--text-secondary); flex: none; }
.q-step-icon .icon { width: 1.4rem; height: 1.4rem; }
.q-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.q-grid .q-wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .q-grid { grid-template-columns: 1fr; } }
.q-side { display: flex; flex-direction: column; gap: 1rem; }
.q-side .card { margin-bottom: 0; }
.q-steps { list-style: none; margin: 0.9rem 0 0; padding: 0; }
.q-step { position: relative; }
.q-step:not(:last-child)::before { content: ""; position: absolute; left: 1.55rem; top: 2.9rem; bottom: -0.3rem; width: 2px; background: var(--border); z-index: 0; }
.q-step.is-complete:not(:last-child)::before { background: var(--accent-teal); }
.q-step a { position: relative; z-index: 1; display: flex; align-items: center; gap: 0.9rem; padding: 0.55rem 0.7rem; border-radius: 10px; text-decoration: none; color: inherit; }
.q-step.is-current a { background: color-mix(in srgb, var(--accent-teal) 14%, transparent); }
.q-step a:hover { background: color-mix(in srgb, var(--accent-teal) 8%, transparent); }
.q-step-num { display: inline-flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 2px solid var(--border); background: var(--bg); font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); flex: none; }
.q-step.is-current .q-step-num, .q-step.is-complete .q-step-num { background: var(--accent-teal); border-color: var(--accent-teal); color: #F6F6F1; }
.q-step-num .icon { width: 1rem; height: 1rem; stroke-width: 2.4; }
.q-step-text strong { display: block; font-size: 0.93rem; font-weight: 600; }
.q-step-text small { display: block; color: var(--accent-teal); font-size: 0.78rem; }
.q-privacy-head { display: flex; gap: 0.9rem; }
.q-privacy-head h2 { margin: 0 0 0.4rem; }
.q-privacy-head p { margin: 0; color: var(--text-secondary); font-size: 0.86rem; }
.q-privacy-icon { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: color-mix(in srgb, var(--accent-teal) 14%, transparent); color: var(--accent-teal); flex: none; }
.q-privacy-foot { display: flex; align-items: center; gap: 0.6rem; margin: 1rem 0 0; padding-top: 0.9rem; border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent); color: var(--text-secondary); font-size: 0.85rem; }
.saved-check { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1.5px solid var(--accent-teal); color: var(--accent-teal); }
.saved-check .icon { width: 0.9rem; height: 0.9rem; stroke-width: 2.4; }
.q-missing { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.q-missing a { color: inherit; text-decoration: underline; }


/* ---- Emails (automations list, send history, sent-email view) ---- */
.stat-icon.is-success { background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--success); }
.stat-icon.is-danger { background: color-mix(in srgb, var(--warning) 18%, transparent); color: var(--warning); }
.mail-tile { display: flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: 8px; background: var(--bg-sunken); color: var(--text-secondary); flex: none; }
.mail-tile .icon { width: 1.1rem; height: 1.1rem; }
.audience-badge { display: inline-block; margin-top: 0.2rem; padding: 0.1rem 0.55rem; border-radius: 6px; font-size: 0.74rem; background: var(--bg-sunken); border: 1px solid var(--border); color: var(--text-secondary); }
.person .audience-badge { display: table; }
.audience-badge.is-client { background: color-mix(in srgb, #4A7BD0 22%, transparent); border-color: color-mix(in srgb, #4A7BD0 55%, transparent); color: #8DB3F2; }
.audience-badge.is-recruiter { background: color-mix(in srgb, var(--orange) 16%, transparent); border-color: color-mix(in srgb, var(--orange) 45%, transparent); color: var(--orange); }
.list-table td.wrap-cell { max-width: 16rem; white-space: normal; color: var(--text-secondary); }
.toggle-form { display: flex; align-items: center; gap: 0.6rem; margin: 0; }
.toggle-label { font-size: 0.86rem; }
.toggle-label.is-off { color: var(--text-secondary); }
.row-actions { white-space: nowrap; }
.row-actions > * { vertical-align: middle; }
.inline-form { display: inline; margin: 0; }
.date-cell { font-family: var(--font-mono); font-size: 0.86rem; color: var(--text-secondary); white-space: nowrap; }
.icon-text { display: inline-flex; align-items: center; gap: 0.6rem; }
.icon-text .icon { width: 1.1rem; height: 1.1rem; color: var(--text-secondary); flex: none; }
.resend-note { display: block; margin-left: 1.7rem; font-size: 0.76rem; color: var(--text-secondary); }
.error-note { display: block; font-size: 0.78rem; color: var(--warning); margin-top: 0.25rem; max-width: 30ch; white-space: normal; }
.row-actions .text-link { margin-right: 0.8rem; }
.date-field { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.7rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text-secondary); flex: none; }
.date-field.is-filtered { border-color: var(--accent-teal); }
.date-field input { border: none; background: none; padding: 0; width: 8.5rem; color: var(--text); font-size: 0.92rem; }
.date-field input:focus { outline: none; }
.segmented { display: inline-flex; flex: none; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.segmented a { padding: 0.55rem 1rem; color: var(--text-secondary); text-decoration: none; font-size: 0.92rem; border-left: 1px solid var(--border); }
.segmented a:first-child { border-left: none; }
.segmented a.is-active { background: var(--accent-teal); color: #0E1412; font-weight: 600; }
.head-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.mail-subject { font-weight: 600; margin: 0 0 1rem; }
.mail-frame { display: block; width: 100%; height: 30rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.mail-plain { margin: 0.8rem 0 0; white-space: pre-wrap; word-break: break-word; font-family: var(--font-mono); font-size: 0.86rem; color: var(--text); }
.detail-summary { cursor: pointer; font-weight: 600; }
.detail-list { margin: 0; display: flex; flex-direction: column; gap: 0.8rem; }
.detail-list > div { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.detail-list dt { color: var(--text-secondary); font-size: 0.88rem; }
.detail-list dd { margin: 0; text-align: right; word-break: break-word; }
.plain-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
@media (max-width: 860px) { .segmented { order: 3; } }
.filter-bar.is-wide select { width: 11rem; }

/* ---- Job ad editor ---- */
.back-link .icon { width: 1rem; height: 1rem; vertical-align: -0.15em; }
.ad-title { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.ad-pill { display: inline-flex; align-items: center; gap: 0.45em; padding: 0.25rem 0.8rem; border-radius: 100px; border: 1px solid color-mix(in srgb, var(--orange) 70%, transparent); color: var(--orange); font-family: var(--font-body); font-size: 0.86rem; font-weight: 500; background: color-mix(in srgb, var(--orange) 10%, transparent); }
.ad-pill .dot { width: 0.55em; height: 0.55em; border-radius: 50%; background: currentColor; }
.ad-pill.is-posted { border-color: color-mix(in srgb, var(--success) 60%, transparent); color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); }
.ad-head-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.6rem; }
.ad-head-buttons { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.saved-line { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-secondary); font-size: 0.9rem; }
body .card.ad-card { margin-bottom: 0; }
.ad-tabs { margin-top: 0.4rem; }
.ad-tabs .tab { font: inherit; font-size: 0.92rem; cursor: pointer; }
.ad-card .field { margin-bottom: 1rem; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.35rem; }
.label-row label { margin: 0; }
.counter { font-size: 0.82rem; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.counter.is-over { color: var(--orange); }
.tag-required, .tag-optional { padding: 0.1rem 0.7rem; border-radius: 100px; font-size: 0.76rem; border: 1px solid var(--border); color: var(--text-secondary); }
.tag-required { color: var(--orange); border-color: color-mix(in srgb, var(--orange) 60%, transparent); background: color-mix(in srgb, var(--orange) 10%, transparent); }
.ad-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 760px) { .ad-two { grid-template-columns: 1fr; } }
.ad-card textarea { resize: vertical; }
.confidential-note { display: flex; align-items: center; gap: 0.9rem; padding: 0.9rem 1.1rem; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--accent-teal) 55%, transparent); background: color-mix(in srgb, var(--accent-teal) 12%, transparent); }
.confidential-note p { margin: 0.1rem 0 0; font-size: 0.9rem; color: var(--text-secondary); }
.confidential-icon { display: flex; color: var(--accent-teal); }
.confidential-icon .icon { width: 1.5rem; height: 1.5rem; }
.ad-preview { padding: 1.25rem 1.4rem; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.ad-preview h3 { margin: 0 0 0.6rem; font-size: 1.25rem; }
.ad-preview h4 { margin: 1.1rem 0 0.3rem; font-size: 0.95rem; }
.ad-preview p { margin: 0; }
.pv-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.pv-empty { color: var(--text-secondary); }
.brief-list { margin: 0; display: flex; flex-direction: column; }
.brief-list > div { display: grid; grid-template-columns: minmax(8.5rem, 0.9fr) 1.4fr; gap: 1rem; align-items: baseline; padding: 0.6rem 0; }
.brief-list dt { display: flex; align-items: center; gap: 0.7rem; color: var(--text-secondary); font-size: 0.92rem; }
.brief-list dt .icon { width: 1.1rem; height: 1.1rem; flex: none; }
.brief-list dd { margin: 0; overflow-wrap: anywhere; }
.brief-link { display: flex; align-items: center; gap: 0.7rem; margin-top: 0.4rem; padding-top: 0.9rem; border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); color: var(--text); text-decoration: none; }
.brief-link span { flex: 1; }
.brief-link .icon { width: 1.1rem; height: 1.1rem; color: var(--text-secondary); }
.pub-status { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; color: var(--text-secondary); margin-top: 0.4rem; }
.pub-note { font-size: 0.9rem; }
.pub-label { margin: 1.1rem 0 0.5rem; color: var(--text-secondary); font-size: 0.92rem; }
.platform-pills { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.platform-pill { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-sunken); font-size: 0.88rem; cursor: pointer; }
.platform-pill input { width: auto; margin: 0; accent-color: var(--accent-teal); }
.brand { display: inline-flex; align-items: center; justify-content: center; width: 1.4rem; height: 1.4rem; font-weight: 700; font-size: 0.85rem; color: #fff; }
.brand-linkedin { background: #0A66C2; border-radius: 4px; }
.brand-facebook { background: #1877F2; border-radius: 50%; font-size: 1rem; }
.brand-icon { display: inline-flex; color: var(--text-secondary); }
.brand-icon .icon { width: 1.3rem; height: 1.3rem; }
.ad-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.ad-checklist li { display: flex; align-items: center; gap: 0.7rem; color: var(--text-secondary); font-size: 0.92rem; }
.check-mark { width: 1.2rem; height: 1.2rem; border-radius: 50%; border: 2px solid var(--border); flex: none; display: inline-flex; align-items: center; justify-content: center; }
.ad-checklist li.is-needed .check-mark { border-color: var(--orange); }
.ad-checklist li.is-done { color: var(--text); }
.ad-checklist li.is-done .check-mark { border-color: var(--success); background: var(--success); }
.ad-checklist li.is-done .check-mark::after { content: ""; width: 0.3rem; height: 0.55rem; border: solid #0E1412; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.pub-hint { margin: 1rem 0 0.8rem; padding-top: 0.9rem; border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); font-size: 0.82rem; color: var(--text-secondary); }
.pub-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.pub-actions .btn { justify-content: center; }
.platform-pills { gap: 0.4rem; flex-wrap: nowrap; }
.platform-pill { padding: 0.45rem 0.55rem; gap: 0.4rem; font-size: 0.84rem; flex: 1 1 auto; justify-content: center; min-width: 0; }
@media (max-width: 480px) { .platform-pills { flex-wrap: wrap; } }
.request-grid.is-stretch { align-items: stretch; }
.request-grid.is-stretch > .q-side > .card:last-child { flex: 1; }

/* ---- Job ad preview: generated social image ---- */
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.image-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 0.4rem; }
.image-head h3 { margin: 0 0 0.15rem; font-size: 1.1rem; }
.image-head p { margin: 0; color: var(--text-secondary); font-size: 0.9rem; }
.image-buttons { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.image-buttons .btn .icon { margin-right: 0.4rem; }
.image-note { margin: 0.5rem 0 1rem; text-align: right; font-size: 0.78rem; color: var(--text-secondary); }
.image-working { margin: 0 0 1rem; padding: 0.7rem 1rem; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--accent-teal) 55%, transparent); background: color-mix(in srgb, var(--accent-teal) 12%, transparent); font-size: 0.92rem; }
.social-pic-frame { max-width: 540px; margin: 0 auto; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg-sunken); }
.social-pic-frame img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; }
.image-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.image-meta { margin: 0 0 0.4rem; font-size: 0.86rem; color: var(--text-secondary); }
.image-included { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-size: 0.88rem; }
.image-foot-actions { display: flex; align-items: center; gap: 0.6rem; }
.image-foot-actions .btn .icon { margin-right: 0.4rem; }
.social-pic-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.3rem; padding: 2.5rem 1.5rem; border: 1.5px dashed var(--border); border-radius: 10px; color: var(--text-secondary); }
.social-pic-empty .icon { width: 2rem; height: 2rem; color: var(--accent-teal); margin-bottom: 0.4rem; }
.social-pic-empty p { margin: 0; max-width: 42ch; }
.social-pic-empty strong { color: var(--text); }
.image-hint { font-size: 0.82rem; }
.social-pic-thumbs { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.social-pic-thumb { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; padding: 0.4rem; border: 1px solid var(--border); border-radius: 8px; font-size: 0.82rem; color: var(--text-secondary); }
.social-pic-thumb.is-selected { border-color: var(--accent-teal); color: var(--accent-teal); }
.social-pic-thumb img { width: 96px; height: 96px; object-fit: cover; border-radius: 4px; }
.social-pic-thumb .btn { padding: 0.25rem 0.6rem; font-size: 0.8rem; }
.ad-tabs button.tab { background: var(--bg-raised); }

/* ---- Integrations page ---- */
.integration-card { max-width: 46rem; }
.integration-status { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin: 0.4rem 0 1rem; color: var(--text-secondary); }
.integration-status strong { color: var(--text); }
.integration-form label { display: block; margin-bottom: 0.35rem; font-weight: 500; }
.key-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.key-row input { flex: 1 1 18rem; min-width: 0; }
.integration-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }
.integration-actions form { margin: 0; }
.integration-rule { border: none; border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); margin: 1.5rem 0; }
.integration-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; margin-bottom: 0.4rem; }
@media (max-width: 640px) { .integration-pair { grid-template-columns: 1fr; } }
.integration-foot { margin: 1.25rem 0 0; font-size: 0.82rem; color: var(--text-secondary); }
.integration-form > .hint { margin: 0.6rem 0 0; font-size: 0.84rem; color: var(--text-secondary); }

/* ---- Client portal: payments, job history, offer request ---- */
.status-dot-pill.is-overdue .dot { background: var(--orange); }
.status-dot-pill.is-overdue { color: var(--orange); }
.fee-note { display: flex; align-items: flex-start; gap: 0.7rem; margin: 0.5rem 0 0; padding: 0.9rem 1rem; border-radius: 10px; background: var(--bg-sunken); color: var(--text-secondary); font-size: 0.9rem; }
.fee-note .icon { width: 1.2rem; height: 1.2rem; flex: none; margin-top: 0.1rem; color: var(--accent-teal); }
.fee-note strong { color: var(--text); }
.candidate-row .candidate-actions { margin-top: 0.4rem; }

/* ---- Candidate portal: offer waiting banner ---- */
.offer-banner { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1.1rem 1.25rem; margin-bottom: 1.25rem; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--success) 55%, transparent); background: color-mix(in srgb, var(--success) 14%, transparent); }
.offer-banner-icon { display: flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 50%; background: color-mix(in srgb, var(--success) 22%, transparent); color: var(--success); flex: none; }
.offer-banner-icon .icon { width: 1.4rem; height: 1.4rem; }
.offer-banner-text { flex: 1; min-width: 14rem; }
.offer-banner-text strong { display: block; color: var(--success); font-size: 1.05rem; margin-bottom: 0.15rem; }
.offer-banner-text p { margin: 0; color: var(--text); }
.offer-banner .btn { background: var(--success); color: #0E1A0B; border-color: transparent; font-weight: 600; }
.offer-banner .btn:hover { background: color-mix(in srgb, var(--success) 88%, white); }

/* ---- Invoice pages (recruiter and client) ---- */
.stat-cards.is-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .stat-cards.is-four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stat-cards.is-four { grid-template-columns: 1fr; } }
.inv-pill { display: inline-flex; align-items: center; gap: 0.45em; padding: 0.25rem 0.8rem; border-radius: 100px; border: 1px solid color-mix(in srgb, var(--orange) 70%, transparent); color: var(--orange); background: color-mix(in srgb, var(--orange) 10%, transparent); font-family: var(--font-body); font-size: 0.86rem; font-weight: 500; }
.inv-pill .dot { width: 0.55em; height: 0.55em; border-radius: 50%; background: currentColor; }
.inv-pill.is-paid { border-color: color-mix(in srgb, var(--success) 60%, transparent); color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); }
.inv-pill.is-overdue { border-color: color-mix(in srgb, var(--warning) 70%, transparent); color: var(--warning); background: color-mix(in srgb, var(--warning) 12%, transparent); }
.inv-dot.is-paid { background: var(--success); }
.inv-dot.is-unpaid { background: var(--orange); }
.inv-dot.is-overdue { background: var(--warning); }
.inv-grid .card { margin-bottom: 0; }
.inv-sheet { padding: 1.6rem 1.8rem; }
.inv-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.4rem; }
.inv-brand { display: flex; align-items: center; gap: 0.9rem; }
.inv-brand-icon { display: flex; align-items: center; justify-content: center; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); flex: none; }
.inv-brand-icon .icon { width: 1.4rem; height: 1.4rem; }
.inv-wordmark { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; }
.inv-wordmark span { color: var(--accent); }
.inv-meta { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.9rem; color: var(--text-secondary); }
.inv-meta strong { color: var(--text); font-size: 1.05rem; }
.inv-meta-label, .inv-label { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-secondary); }
.inv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.6rem; }
.inv-parties > div + div { padding-left: 1.5rem; border-left: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
@media (max-width: 640px) { .inv-parties { grid-template-columns: 1fr; } .inv-parties > div + div { padding-left: 0; border-left: none; } }
.inv-name { font-weight: 700; font-size: 1.15rem; margin: 0.3rem 0 0.1rem; }
.inv-sub { color: var(--text-secondary); }
.inv-table-wrap { overflow-x: auto; margin-bottom: 1.2rem; }
.inv-table { width: 100%; min-width: 0; background: none; border-collapse: collapse; }
.inv-table th { text-align: left; padding: 0.75rem 1rem; background: var(--bg-sunken); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-secondary); font-weight: 500; }
.inv-table th:last-child, .inv-table td:last-child { text-align: right; }
.inv-table td { padding: 1rem; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.inv-muted { color: var(--text-secondary); }
.inv-total { display: flex; align-items: baseline; justify-content: flex-end; gap: 1.6rem; margin: 1rem 0 0.4rem; }
.inv-total span { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-secondary); }
.inv-total strong { font-size: 1.9rem; font-variant-numeric: tabular-nums; }
.inv-vat { display: flex; align-items: center; gap: 0.6rem; margin: 1.2rem 0 0; color: var(--text-secondary); }
.inv-section { margin: 1.4rem 0 0.6rem; padding-top: 1.1rem; border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); font-size: 1.05rem; }
.inv-actions { display: flex; flex-direction: column; gap: 0.6rem; margin: 1rem 0; }
.inv-actions form { margin: 0; }
.inv-actions .btn { width: 100%; justify-content: center; }
.inv-actions .btn .icon, .ad-head-buttons .btn .icon { margin-right: 0.4rem; }
.callout-info { color: var(--text-secondary); background: var(--bg-sunken); }
.inv-due-box { display: flex; align-items: center; gap: 0.9rem; padding: 0.9rem 1rem; margin: 0.8rem 0 0.9rem; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--orange) 55%, transparent); background: color-mix(in srgb, var(--orange) 12%, transparent); color: var(--orange); }
.inv-due-box.is-paid { border-color: color-mix(in srgb, var(--success) 55%, transparent); background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success); }
.inv-due-box.is-overdue { border-color: color-mix(in srgb, var(--warning) 60%, transparent); background: color-mix(in srgb, var(--warning) 13%, transparent); color: var(--warning); }
.inv-due-icon { display: flex; padding-right: 0.9rem; border-right: 1px solid currentColor; }
.inv-due-icon .icon { width: 1.6rem; height: 1.6rem; }
.inv-due-label { display: block; font-size: 0.86rem; }
.inv-due-box strong { font-size: 1.3rem; color: var(--text); }
.pay-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.pay-facts { display: flex; flex-direction: column; gap: 0.7rem; margin: 0.9rem 0 0; padding: 0; }
.pay-facts > div { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.92rem; }
.pay-facts dt { color: var(--text-secondary); }
.pay-facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.inv-grid .callout { margin: 0.2rem 0 0.9rem; }
.inv-grid .callout .icon { width: 1.2rem; height: 1.2rem; flex: none; }
@media (max-width: 960px) { .request-grid.inv-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---- Candidate portal: decline an offer ---- */
.decline-card summary { cursor: pointer; color: var(--text-secondary); }
.decline-card form { margin-top: 1rem; }

/* ---- Notification bell and page ---- */
.notif { position: relative; }
.topbar-bell { position: relative; cursor: pointer; }
.topbar-bell:hover { color: var(--text); background: var(--bg-sunken); }
.notif-badge { position: absolute; top: -0.15rem; right: -0.25rem; min-width: 1.15rem; height: 1.15rem; padding: 0 0.3rem; border-radius: 100px; background: #E5484D; color: #fff; font-size: 0.7rem; font-weight: 700; line-height: 1.15rem; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.notif-badge[hidden] { display: none; }
.notif-panel { position: absolute; right: 0; top: calc(100% + 0.5rem); z-index: 30; width: min(24rem, 92vw); background: var(--bg-raised); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35); overflow: hidden; }
.notif-panel[hidden] { display: none; }
.notif-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--border); }
.notif-panel-head form { margin: 0; }
.notif-link { background: none; border: none; padding: 0; color: var(--accent-teal); cursor: pointer; font: inherit; font-size: 0.85rem; }
.notif-link:hover { text-decoration: underline; }
.notif-list { list-style: none; margin: 0; padding: 0; max-height: 24rem; overflow-y: auto; }
.notif-item a { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.75rem 1rem; text-decoration: none; color: var(--text); border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.notif-item a:hover { background: var(--bg-sunken); }
.notif-item.is-unread a { background: color-mix(in srgb, var(--accent-teal) 9%, transparent); }
.notif-item.is-unread .notif-title { font-weight: 700; }
.notif-title { font-size: 0.92rem; }
.notif-msg { font-size: 0.82rem; color: var(--text-secondary); }
.notif-time { font-size: 0.74rem; color: var(--text-secondary); }
.notif-chip { display: inline-block; margin-right: 0.45rem; padding: 0.05rem 0.45rem; border-radius: 100px; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.03em; color: var(--orange); background: color-mix(in srgb, var(--orange) 15%, transparent); border: 1px solid color-mix(in srgb, var(--orange) 45%, transparent); }
.notif-empty { padding: 1.4rem 1rem; text-align: center; color: var(--text-secondary); }
.notif-all { display: block; padding: 0.7rem 1rem; text-align: center; color: var(--accent-teal); text-decoration: none; font-size: 0.9rem; border-top: 1px solid var(--border); }
.notif-all:hover { background: var(--bg-sunken); }
.notif-page-list { list-style: none; margin: 0; padding: 0; }
.notif-page-item { display: flex; align-items: center; gap: 0.9rem; padding: 0.85rem 0; border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.notif-page-item:last-child { border-bottom: none; }
.notif-page-item form { margin: 0; flex: none; }
.notif-page-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; text-decoration: none; color: var(--text); }
.notif-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; flex: none; background: transparent; }
.notif-page-item.is-unread .notif-dot { background: #E5484D; }
.notif-page-item.is-unread .notif-title { font-weight: 700; }
@media (max-width: 860px) { .notif-panel { position: fixed; left: 4vw; right: 4vw; top: 4rem; width: auto; } }

/* ---- Company & banking, and the invoice's How to pay ---- */
.company-grid { display: grid; gap: 1rem; max-width: 46rem; }
.company-grid .card { margin-bottom: 0; }
.inv-company { margin-top: 0.5rem; font-size: 0.82rem; color: var(--text-secondary); line-height: 1.45; }
.inv-pay { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.inv-pay h3 { margin: 0 0 0.7rem; font-size: 1.05rem; }
.inv-bank { margin: 0; display: grid; gap: 0.5rem; }
.inv-bank > div { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.94rem; }
.inv-bank dt { color: var(--text-secondary); }
.inv-bank dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.inv-note { margin: 0.9rem 0 0; font-size: 0.84rem; color: var(--text-secondary); }
.inv-footer { padding-top: 0.9rem; border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }

/* ---- Admin delete: confirmation dialog ---- */
.more-menu-list .menu-danger { color: var(--warning); }
.confirm-dialog {
  max-width: 30rem; width: calc(100% - 2rem); padding: 1.5rem; border: 1px solid var(--border); border-radius: 14px;
  background: var(--bg-raised); color: var(--text);
}
.confirm-dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
.confirm-dialog h2 { margin: 0 0 0.75rem; font-size: 1.2rem; }
.confirm-dialog p { margin: 0 0 0.6rem; }
.confirm-list { margin: 0 0 1rem; padding-left: 1.2rem; color: var(--text-secondary); font-size: 0.92rem; }
.confirm-list li { margin: 0.2rem 0; }
.confirm-dialog label { display: block; margin: 0.5rem 0 0.4rem; font-size: 0.9rem; }
.confirm-dialog input[type="text"] { width: 100%; box-sizing: border-box; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1.1rem; }

/* "Add it" beside the checklist's application-link item: only while the link is missing from the copy. */
.ad-checklist .check-fix { margin-left: auto; flex: none; white-space: nowrap; padding: 0.15rem 0.6rem; border: 1px solid var(--border); border-radius: 100px; background: transparent; color: var(--accent-teal); font: inherit; font-size: 0.78rem; cursor: pointer; }
.ad-checklist .check-fix:hover { border-color: var(--accent-teal); }
.ad-checklist li.is-done .check-fix { display: none; }
.ad-checklist li:has(.check-fix) { display: flex; align-items: center; gap: 0.5rem; }
