/* Command product layer on top of the approved design (app.css). */
[hidden] { display: none !important; }
:root { --rv: 0px; }
.shell { min-height: 100vh; }
.side { top: 0; height: 100vh; }
.top { top: 0; }
.portal { min-height: 100vh; }
.form-steps { top: 18px; }

.flash { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; font-size: 13.5px; display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); background: var(--surface); }
.flash.ok { border-left: 4px solid var(--green); }
.flash.err { border-left: 4px solid var(--red); }
.flash svg { width: 18px; height: 18px; flex: none; }
.errors { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; background: var(--red-soft); color: var(--red-ink); font-size: 13px; }
.errors ul { margin: 6px 0 0; padding-left: 18px; }

.page-h { display: flex; align-items: flex-end; gap: 12px; margin: 18px 0 18px; flex-wrap: wrap; }
.page-h h2 { margin: 0; font-size: 22px; font-weight: 800; text-transform: uppercase; letter-spacing: -.005em; }
.page-h p { margin: 2px 0 0; color: var(--ink-3); font-size: 13px; }
.page-h .grow { flex: 1; }

.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.link { cursor: pointer; }
.tbl tr.link:hover td { background: var(--surface-2); }
.tbl .t { font-weight: 600; }
.tbl-wrap { overflow-x: auto; }

.inp, select.inp, textarea.inp { width: 100%; font: inherit; font-size: 13.5px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px; min-height: 40px; }
textarea.inp { min-height: 92px; resize: vertical; }
.inp:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: transparent; }
.inp.err { border-color: var(--red); }
.hint.err { color: var(--red-ink); }
.fld > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.fld em { color: var(--red); font-style: normal; }
.fld i { color: var(--ink-3); font-style: normal; font-weight: 500; }
.inline-form { display: grid; gap: 10px; }
.inline-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--red); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts label { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-2); border-radius: 99px; padding: 6px 12px; font-size: 12.5px; font-weight: 500; cursor: pointer; background: var(--surface); }
.opts input { accent-color: var(--red); margin: 0; }
.opts label:has(input:checked) { border-color: var(--ink); background: var(--surface-3); }
.cat input { position: absolute; opacity: 0; pointer-events: none; }
.cat { position: relative; cursor: pointer; }

.dl { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 8px 16px; font-size: 13px; margin: 0; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.sec-t { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); margin: 18px 0 10px; }
.sec-t:first-child { margin-top: 0; }
.empty { padding: 34px 18px; text-align: center; color: var(--ink-3); font-size: 13.5px; }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.kv { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
.actions-panel form + form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.actions-panel h4 { margin: 0 0 8px; font-size: 13px; }
details.more summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 4px 0; }
.perm-grid th:not(:first-child), .perm-grid td:not(:first-child) { text-align: center; }
.perm-grid input { width: 17px; height: 17px; accent-color: var(--red); }
.perm-grid td small { display: block; color: var(--ink-3); font-size: 11.5px; }
.pagination { display: flex; gap: 6px; margin-top: 14px; font-size: 13px; }
.badge-env { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; background: var(--amber-bg); color: var(--amber); padding: 2px 8px; border-radius: 99px; font-weight: 700; }

/* auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--bg); }
.auth-art { background: #000; color: #fff; position: relative; overflow: hidden; padding: 44px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 380px at 85% 10%, rgba(222, 51, 65, .4), transparent 70%); }
.auth-art > * { position: relative; }
.auth-art img { height: 28px; width: auto; align-self: flex-start; }
.auth-art h1 { font-size: 44px; line-height: 1.02; font-weight: 800; text-transform: uppercase; margin: 0 0 12px; letter-spacing: -.01em; }
.auth-art h1 em { color: var(--red); font-style: normal; }
.auth-art p { color: #b9b9c0; max-width: 420px; margin: 0; }
.auth-form { display: grid; place-items: center; padding: 32px 20px; }
.auth-form .box { width: 100%; max-width: 380px; display: grid; gap: 14px; }
.auth-form h2 { margin: 0; font-size: 24px; font-weight: 800; text-transform: uppercase; }
.auth-form p { margin: 0; color: var(--ink-3); font-size: 13.5px; }
.auth-form .btn { height: 44px; }
.auth-form a { color: var(--red-ink); font-weight: 600; font-size: 13px; }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 28px 22px; min-height: 230px; }
  .auth-art h1 { font-size: 30px; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dd { margin-bottom: 10px; }
  .inline-form .row2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .tbl .hide-sm { display: none; }
  .page-h h2 { font-size: 19px; }
}

@media (max-width: 900px) {
  .side.open { display: flex; position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 60; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
}

/* request wizard */
.wiz { max-width: 980px; margin: 0 auto; padding: 26px 24px 64px; display: grid; gap: 16px; }
.wiz .form-head { margin: 0; }
.wiz-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.wiz-steps li { display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 7px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-3); }
.wiz-steps li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 12px; }
.wiz-steps li.on { color: var(--ink); border-color: var(--ink); }
.wiz-steps li.on span { background: var(--red); color: #fff; }
.wiz-steps li.done span { background: var(--ink); color: var(--surface); }
.svc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.more-svc summary { cursor: pointer; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; margin-top: 14px; color: var(--ink-2); }
.rep-row { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 8px; background: var(--surface-2); }
.rep-row + .rep-row { margin-top: 10px; }
.rep-h { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.repeater { display: grid; gap: 10px; }
.week-editor { display: grid; gap: 6px; }
.wk-row { display: grid; grid-template-columns: 110px 130px auto 130px auto; gap: 10px; align-items: center; font-size: 13px; }
.edit-link { float: right; font-size: 12px; font-weight: 700; color: var(--red-ink); text-transform: uppercase; letter-spacing: .04em; }
[data-review] .dl { margin-bottom: 6px; }
.svc-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.svc-tile { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); transition: border-color .15s, transform .15s; }
.svc-tile:hover { border-color: var(--ink-3); transform: translateY(-2px); }
.svc-tile .ty { width: 40px; height: 40px; }
.svc-tile b { display: block; font-size: 14px; }
.svc-tile span { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
@media (max-width: 900px) { .svc-grid, .svc-tiles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  .svc-grid, .svc-tiles { grid-template-columns: 1fr; }
  .wiz { padding: 18px 14px 48px; }
  .wk-row { grid-template-columns: 1fr 1fr; }
  .wk-row b { grid-column: 1 / -1; }
  .wk-row > span.muted { display: none; }
}

/* Pricing add-on */
.tbl .num { text-align: right; white-space: nowrap; }
.tbl td small { font-size: 12px; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tier { display: inline-block; margin: 2px 6px 2px 0; padding: 2px 8px; border-radius: 999px; background: var(--green-bg); color: var(--green); font-size: 12px; font-weight: 600; white-space: nowrap; }
.switch-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* M1 feedback 09.3: only the box or its words toggle a checkbox, not the empty space beside it */
label.check, .fld.check { width: fit-content; max-width: 100%; justify-self: start; cursor: pointer; }
.opts label { width: auto; }
/* M1 feedback 10.2: prominent success message after submitting */
.submit-ok { text-align: center; padding: 30px 20px 26px; margin-bottom: 22px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); }
.submit-ok-ico { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--green-bg); color: var(--green); margin-bottom: 10px; }
.submit-ok-ico .i, .submit-ok-ico svg { width: 28px; height: 28px; }
.submit-ok h1 { font-size: 26px; margin: 0 0 6px; }
.submit-ok p { margin: 0 0 6px; font-size: 15px; }
.submit-ok small { color: var(--ink-3); }

/* M1 feedback 02: bigger sign-in headline, glow moved to the top right corner */
.auth-art::before { background: radial-gradient(900px 520px at 100% 0%, rgba(222, 51, 65, .5), transparent 70%); }
.auth-art h1 { font-size: clamp(48px, 6.6vw, 124px); line-height: .98; margin-bottom: 22px; }
.auth-art p { font-size: clamp(17px, 1.55vw, 24px); line-height: 1.45; max-width: 620px; }
@media (max-width: 900px) { .auth-art h1 { font-size: 40px; } .auth-art p { font-size: 16px; } }

/* M1 feedback 03.6: same visible Sign out button for staff and clients */
.btn.signout { height: 36px; gap: 6px; }
.p-top .btn.signout { background: transparent; border-color: #333; color: #fff; }
@media (max-width: 700px) { .btn.signout span { display: none; } }

/* M1 feedback 2.0: every other row shaded so data is easy to follow across; brighter rollover (light and dark) */
.tbl tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--ink) 4.5%, transparent); }
.tbl tbody tr.link:hover td, .tbl tbody tr:hover td { background: color-mix(in srgb, var(--ink) 9%, transparent); }
.rows .row:nth-child(even) { background: color-mix(in srgb, var(--ink) 4.5%, transparent); }
.rows .row:hover, .rows .row[data-href]:hover { background: color-mix(in srgb, var(--ink) 9%, transparent); }
.tbl tbody tr:only-child td { background: transparent; }

/* Job category: tags + side panel with service cards */
.cat-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cat-tags { display: contents; }
.drawer-panel.wide { width: min(640px, 100%); }
.drawer-cats { grid-template-columns: 1fr 1fr; }
.drawer-foot { display: flex; gap: 8px; position: sticky; bottom: -20px; background: var(--surface); padding: 12px 0 4px; }
@media (max-width: 560px) { .drawer-cats { grid-template-columns: 1fr; } }

/* Side panel (New Job → new client) */
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer-bg { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--surface); border-left: 1px solid var(--line); padding: 20px 22px; overflow-y: auto; display: grid; align-content: start; gap: 12px; box-shadow: -12px 0 40px rgba(0,0,0,.25); animation: drawer-in .18s ease-out; }
.drawer-h { display: flex; align-items: center; }
.drawer-h h3 { margin: 0; }
@keyframes drawer-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
