/* wizard — moved out of wizard.php's inline block(s), 2026-10-12. */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* === HEADER === */
.wizard-header {
    background: var(--bg-bar);
    border-bottom: 1px solid var(--border);
    padding: 14px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-1);
}
.wizard-header h1 {
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.wizard-header > div { display: flex; gap: 16px; flex-wrap: wrap; }
.wizard-header a {
    color: var(--text-2);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
.wizard-header a:hover { color: var(--accent-text); }

/* === PROGRESS BAR === */
.progress-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 20px 10px;
    gap: 0;
    max-width: 750px;
    margin: 0 auto;
}
.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    min-width: 70px;
}
.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--text-2);
    transition: all 0.3s;
}
.step-indicator.completed .step-circle {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-fg);
}
.step-indicator.active .step-circle {
    border-color: var(--accent);
    color: var(--accent-text);
    box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / 0.15);
}
.step-label {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-2);
    font-weight: 500;
    text-align: center;
}
.step-indicator.completed .step-label,
.step-indicator.active .step-label {
    color: var(--accent-text);
}
.step-connector {
    flex: 1;
    height: 3px;
    background: var(--surface-3);
    margin: 0 -5px;
    margin-bottom: 20px;
    transition: background 0.3s;
}
.step-connector.completed {
    background: var(--accent);
}

/* === CONTAINER === */
.wizard-container {
    max-width: 750px;
    margin: 20px auto;
    padding: 0 20px 40px;
}

/* === FORM CARD === */
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-2);
}
.form-card h2 {
    color: var(--text);
    margin-bottom: 20px;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.01em;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.section-title {
    color: var(--text);
    font-size: 15px;
    font-weight: 650;
    margin: 26px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.section-title small { color: var(--text-3); font-weight: 400; font-size: 13px; }
.section-title:first-of-type { margin-top: 0; }

/* === FORM ELEMENTS === */
.form-group { margin-bottom: 20px; }
label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
}
label .required { color: var(--danger); }
label small { color: var(--text-3); font-weight: normal; }
input[type="text"], input[type="password"], input[type="email"],
input[type="tel"], input[type="date"], textarea, select {
    width: 100%;
    padding: 11px 13px;
    background: var(--field);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.15);
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
textarea { min-height: 120px; resize: vertical; }
select { cursor: pointer; }
select option { background: var(--field); color: var(--text); }

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* === TABS (Step 1) === */
.auth-tabs {
    display: flex;
    margin-bottom: 25px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-strong);
}
.auth-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    background: var(--surface-2);
    color: var(--text-2);
    border: none;
    font-size: 15px;
    transition: all 0.3s;
}
.auth-tab.active {
    background: var(--accent);
    color: var(--accent-fg);
}
.auth-panel { display: none; }
.auth-panel.active { display: block; }

/* === PHONE FIELDS === */
/* Return-address picker (address book) */
.address-option {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    cursor: pointer;
    line-height: 1.5;
    background: var(--surface);
}
.address-option:has(input:checked) { border-color: var(--accent); background: rgb(var(--accent-rgb) / .06); }
.address-option:hover { border-color: var(--accent); }
.address-option input[type="radio"] { margin-top: 4px; width: auto; }
.address-option small { color: var(--text-2); }
#newAddressFields input, #newAddressFields textarea { margin-bottom: 8px; }

.phone-group { margin-bottom: 10px; position: relative; }
.phone-group input { padding-right: 90px; }
.phone-label {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--text-2);
    background: var(--surface-3);
    padding: 3px 8px;
    border-radius: 10px;
}
.add-phone-btn {
    background: none;
    border: 1.5px dashed var(--border-strong);
    color: var(--text-2);
    padding: 10px;
    border-radius: var(--radius);
    cursor: pointer;
    width: 100%;
    font-size: 14px;
    transition: all 0.3s;
}
.add-phone-btn:hover {
    border-color: var(--accent);
    color: var(--accent-text);
}

/* === UPLOAD === */
.upload-buttons-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 15px;
}
.upload-btn {
    padding: 13px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.upload-btn:hover {
    border-color: var(--accent);
    color: var(--accent-text);
}
.upload-btn .i { color: var(--accent-text); }
.camera-btn .i { color: var(--success); }
.camera-btn:hover { border-color: var(--success); color: var(--success); }

.file-upload-area {
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    background: var(--surface-2);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}
.file-upload-area:hover { border-color: var(--accent); }
.file-upload-area p { color: var(--text-2); }

.file-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 15px;
}
.file-preview-item img, .file-preview-item video {
    width: 100%;
    height: 120px;
    object-fit: cover;
}
.file-preview-name {
    padding: 6px 8px;
    font-size: 11px;
    color: var(--text-2);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.remove-file-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--danger);
    color: #fff;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    font-weight: bold;
    box-shadow: var(--shadow-2);
}
.remove-file-btn:hover { filter: brightness(1.08); }

/* === SHIPPING INFO === */
.shipping-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 20px;
    border-left: 4px solid var(--accent);
}
.shipping-card .prefix {
    color: var(--text-2);
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.6;
}
.shipping-address {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
    font-weight: 500;
}
.shipping-phone {
    margin-top: 12px;
    color: var(--accent-text);
    font-size: 15px;
    font-weight: 600;
}
.shipping-tips {
    background: rgb(var(--accent-rgb) / 0.07);
    border: 1px solid rgb(var(--accent-rgb) / 0.2);
    border-radius: var(--radius);
    padding: 18px;
    margin-top: 15px;
}
.shipping-tips h4 {
    color: var(--accent-text);
    margin-bottom: 10px;
    font-size: 14px;
}
.shipping-tips ul {
    list-style: none;
    padding: 0;
}
.shipping-tips li {
    padding: 5px 0;
    color: var(--text-2);
    font-size: 13px;
    padding-left: 20px;
    position: relative;
}
.shipping-tips li::before {
    content: '•';
    position: absolute;
    left: 6px;
    color: var(--accent-text);
}

/* === DELIVERY CHOICE + LOCAL DROP-OFF (step 3) === */
.delivery-choice { display: flex; gap: 12px; margin-top: 15px; }
.delivery-opt {
    flex: 1; background: var(--surface-2); border: 1.5px solid var(--border-strong); border-radius: var(--radius);
    padding: 16px 14px; cursor: pointer; text-align: center; color: var(--text);
    font-family: inherit; transition: border-color .15s, background .15s;
}
.delivery-opt:hover { border-color: rgb(var(--accent-rgb) / 0.4); }
.delivery-opt.active { border-color: var(--accent); background: rgb(var(--accent-rgb) / 0.08); }
.delivery-opt .delivery-ico { font-size: 26px; display: block; margin-bottom: 6px; color: var(--accent-text); }
.delivery-opt .delivery-ico .i { width: 26px; height: 26px; }
.delivery-opt .delivery-title { display: block; font-weight: 600; font-size: 15px; }
.delivery-opt .delivery-sub { display: block; color: var(--text-2); font-size: 12px; margin-top: 4px; }
.contact-btns { display: flex; gap: 12px; margin: 5px 0 20px; flex-wrap: wrap; }
.btn-contact {
    flex: 1; min-width: 180px; text-align: center; padding: 13px 18px; border-radius: var(--radius);
    font-weight: 600; font-size: 15px; text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong);
}
.btn-contact:hover { background: var(--surface-3); }
.btn-call .i { color: var(--info); }
/* WhatsApp keeps its brand colour; dark text reads on that green in both themes. */
.btn-wa, .btn-wa:hover { background: var(--whatsapp); border-color: var(--whatsapp); color: #06291a; }
.office-map {
    width: 100%; height: 260px; border: 1px solid var(--border); border-radius: var(--radius); display: block;
    background: var(--surface-2);
}
.map-directions {
    display: inline-block; margin: 10px 0 5px; color: var(--accent-text);
    font-weight: 600; text-decoration: none; font-size: 14px;
}

/* === STATUS TIMELINE === */
.status-timeline {
    position: relative;
    padding-left: 30px;
}
.status-timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--surface-3);
}
.timeline-item {
    position: relative;
    padding-bottom: 25px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
    position: absolute;
    left: -23px;
    top: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--surface-3);
    border: 2px solid var(--border-strong);
}
.timeline-item.completed .timeline-dot {
    background: var(--success);
    border-color: var(--success);
}
.timeline-item.active .timeline-dot {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 10px rgb(var(--accent-rgb) / 0.5);
}
.timeline-item.active .timeline-dot::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid rgb(var(--accent-rgb) / 0.3);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}
.timeline-title {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}
.timeline-item.completed .timeline-title { color: var(--success); }
.timeline-item.active .timeline-title { color: var(--accent-text); }
.timeline-media { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.timeline-acc {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgb(var(--accent-rgb) / .06);
    border-left: 2px solid var(--accent);
    border-radius: 5px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.7;
}
.timeline-acc .acc-list { list-style: none; margin: 0; padding: 0; }
.timeline-acc .acc-list li { padding: 2px 0; }
.timeline-acc .acc-reason { display: block; color: var(--text-2); font-size: 12px; }
.timeline-acc .acc-state-ok { color: var(--success); }
.timeline-acc .acc-state-short,
.timeline-acc .acc-state-partial,
.timeline-acc .acc-state-retained { color: var(--warning); }
.timeline-acc .acc-state-missing { color: var(--danger); }
.timeline-acc .acc-state-extra { color: var(--info); }
.timeline-acc .acc-state-pending,
.timeline-acc .acc-state-declared { color: var(--text-2); }

.timeline-media-thumb {
    position: relative; display: block; width: 86px; height: 64px;
    border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border-strong);
}
.timeline-media-thumb img, .timeline-media-thumb video {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.timeline-media-play {
    position: absolute; inset: 0; display: flex; align-items: center;
    justify-content: center; color: #fff; font-size: 18px;
    background: rgb(0 0 0 / .35);
}
.timeline-desc {
    color: var(--text-2);
    font-size: 13px;
    margin-top: 3px;
}
.timeline-date {
    color: var(--text-3);
    font-size: 12px;
    margin-top: 2px;
}

/* === REQUEST INFO BOX === */
.request-info {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 20px;
}
.request-info-row {
    display: flex;
    padding: 6px 0;
    font-size: 14px;
}
.request-info-label {
    color: var(--text-2);
    min-width: 140px;
    flex-shrink: 0;
}
.request-info-value { color: var(--text); min-width: 0; overflow-wrap: anywhere; }

/* === BUTTONS === */
/* The wizard has its own shell (no mng.css), so it carries its own buttons —
   same look as the shared .btn: tokens only, readable in both themes. */
.btn {
    padding: 11px 22px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.3;
    transition: background .15s, border-color .15s, box-shadow .15s, filter .15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}
.btn-lg { padding: 14px 30px; font-size: 16.5px; }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 4px 10px; font-size: 12.5px; border-radius: var(--radius-sm); gap: 5px; }
.btn-sm .i { width: 14px; height: 14px; }
.btn-primary {
    background: var(--accent);
    color: var(--accent-fg);
    box-shadow: var(--shadow-1);
}
.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 14px rgb(var(--accent-rgb) / 0.25);
}
.btn-secondary {
    background: var(--surface-2);
    border-color: var(--border-strong);
    color: var(--text);
}
.btn-secondary:hover {
    background: var(--surface-3);
}
/* --accent-fg is white on the light theme and near-black on the dark one, which is
   exactly what keeps text readable on the (lighter, in dark mode) success green. */
.btn-success {
    background: var(--success);
    color: var(--accent-fg);
    box-shadow: var(--shadow-1);
}
.btn-success:hover {
    filter: brightness(1.07);
    box-shadow: 0 4px 14px rgb(var(--success-rgb) / 0.25);
}
.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* === ALERTS === */
.alert-error, .alert-success, .alert-info {
    padding: 13px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border: 1px solid;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
}
.alert-error .i, .alert-success .i, .alert-info .i { vertical-align: -3px; }
.alert-error   { background: rgb(var(--danger-rgb) / 0.1);  border-color: rgb(var(--danger-rgb) / 0.35); }
.alert-error > .i { color: var(--danger); }
.alert-success { background: rgb(var(--success-rgb) / 0.1); border-color: rgb(var(--success-rgb) / 0.35); }
.alert-success > .i { color: var(--success); }
.alert-info    { background: rgb(var(--accent-rgb) / 0.08); border-color: rgb(var(--accent-rgb) / 0.3); }
.alert-info > .i { color: var(--accent-text); }
.alert-error a, .alert-success a, .alert-info a { color: var(--accent-text); font-weight: 600; }

/* === STATUS BADGE === */
/* Same colours as mng.css's shared .badge-<status> (the wizard does not load mng.css). */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.6;
    background: rgb(var(--ink) / .08);
    color: var(--text-2);
}
.badge-pending { background: rgb(var(--warning-rgb) / .16); color: var(--warning); }
.badge-in_progress { background: rgb(var(--info-rgb) / .15); color: var(--info); }
.badge-completed { background: rgb(var(--success-rgb) / .15); color: var(--success); }
.badge-cancelled { background: rgb(var(--danger-rgb) / .14); color: var(--danger); }
.badge-kept_for_spare { background: rgb(var(--ink) / .08); color: var(--text-2); }
.badge-on_hold { background: rgb(var(--orange-rgb) / .16); color: var(--orange); }
.hold-callout {
    background: rgb(var(--orange-rgb) / 0.08); border: 1px solid rgb(var(--orange-rgb) / 0.35);
    padding: 14px 18px; border-radius: var(--radius); margin: 18px 0;
    color: var(--text); font-size: 14px; line-height: 1.65;
}
.hold-callout strong { color: var(--orange); display: block; margin-bottom: 4px; }
/* Waiting on the customer — they have to act, so it gets the louder colour. */
.hold-callout.needs-you { border-color: rgb(var(--warning-rgb) / 0.5); background: rgb(var(--warning-rgb) / 0.1); }
.hold-callout.needs-you strong { color: var(--warning); }
/* Held step in the timeline: paused, not finished, not idle. */
.timeline-item.on-hold .timeline-dot { background: var(--orange); border-color: var(--orange); }
.timeline-item.on-hold .timeline-title { color: var(--orange); }
.timeline-hold-note { color: var(--orange); font-size: 13px; margin-top: 4px; }

/* === RESPONSIVE === */
@media (max-width: 600px) {
    .wizard-header { padding: 12px 16px; }
    .wizard-header h1 { font-size: 16px; }
    .wizard-container { padding: 0 12px 32px; }
    .btn-lg { padding: 13px 22px; font-size: 16px; }
    .form-card { padding: 20px; }
    .form-grid { grid-template-columns: 1fr; }
    .upload-buttons-group { grid-template-columns: 1fr; }
    .step-indicator { min-width: 50px; }
    .step-circle { width: 32px; height: 32px; font-size: 14px; }
    .step-label { font-size: 9px; }
    .request-info-row { flex-direction: column; gap: 2px; }
    .request-info-label { min-width: unset; }
}
.estimate-box { margin-top:12px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:12px 14px; }
.estimate-title { font-weight:600; color:var(--text); margin-bottom:6px; }
.estimate-table { width:100%; border-collapse:collapse; font-size:14px; }
.estimate-table td { padding:5px 0; border-bottom:1px solid rgb(var(--ink) / 0.08); color:var(--text); }
.estimate-table td.amt { text-align:right; white-space:nowrap; }
.estimate-table tr.total td { border-bottom:none; font-weight:700; color:var(--text); padding-top:8px; }
.estimate-note { font-size:12.5px; color:var(--text-2); margin-top:8px; line-height:1.5; }
.hold-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; align-items:center; }
.hold-actions .btn { margin:0; padding:10px 16px; font-size:14px; min-height:44px; display:inline-flex; align-items:center; }
.btn-approve { background:var(--success); color:var(--accent-fg); }
.btn-approve:hover { filter:brightness(1.07); }
.btn-decline { background:rgb(var(--danger-rgb) / 0.1); color:var(--danger); border:1px solid rgb(var(--danger-rgb) / 0.45); }
.btn-decline:hover { background:rgb(var(--danger-rgb) / 0.16); }
.hold-actions .btn-contact { flex:0 0 auto; min-width:0; }

/* Helpers that used to be inline styles in wizard.php */
.wz-muted { color: var(--text-2); }
.wz-faint { color: var(--text-3); }
.wz-lead { color: var(--text-2); margin-bottom: 18px; font-size: 14px; line-height: 1.6; }
.wz-note { color: var(--text-3); font-size: 13px; margin-top: 12px; line-height: 1.55; }
.wz-center { text-align: center; }
.wz-link { color: var(--accent-text); font-weight: 600; }
.wz-mt { margin-top: 22px; }
.wz-small-hint { display: block; color: var(--text-3); font-size: 12.5px; margin-top: 4px; }
.wz-small-hint a { color: var(--accent-text); }
.wz-readonly { opacity: .85; }
.wz-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-weight: normal; cursor: pointer; color: var(--text); }
.wz-check input { margin-top: 4px; width: auto; accent-color: var(--accent); }
.wz-upload-ico { margin-bottom: 8px; color: var(--text-3); }
.wz-upload-ico .i { width: 34px; height: 34px; }
.wz-upload-lead { font-weight: 600; margin-bottom: 4px; color: var(--text); }
.wz-upload-sub { font-size: 13px; }
.wz-progress-h { color: var(--text); font-size: 15px; font-weight: 650; margin-bottom: 18px; }
.wz-req-id { color: var(--accent-text); }
.wz-inline-actions { display: inline-flex; gap: 6px; margin-left: 8px; vertical-align: middle; flex-wrap: wrap; }
.wz-media-modal { display: none; position: fixed; inset: 0; z-index: 10060; background: rgb(0 0 0 / .88); align-items: center; justify-content: center; }
.wz-media-close { position: absolute; top: 16px; right: 20px; background: none; border: none; color: #fff; font-size: 34px; cursor: pointer; line-height: 1; }
.wz-media-body { max-width: 92vw; max-height: 86vh; }

.wz-chip-row { margin-top: 6px; }
