/* ── Intake / Kiosk Styles ───────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:       #0f172a;
    --bg2:      #1e293b;
    --border:   #334155;
    --text:     #e2e8f0;
    --muted:    #94a3b8;
    --dim:      #64748b;
    --primary:  #0284c7;
    --green:    #16a34a;
    --red:      #dc2626;
    --radius:   12px;
}

html { font-size: 16px; }
body {
    font-family: system-ui, -apple-system, sans-serif;
    background: var(--bg); color: var(--text);
    min-height: 100dvh; overflow-x: hidden;
}

/* ── Wrap ────────────────────────────────────── */
.intake-wrap {
    min-height: 100dvh;
    display: flex; flex-direction: column;
    max-width: 600px; margin: 0 auto;
    padding: 0 1.25rem;
}

/* ── Header ──────────────────────────────────── */
.intake-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.25rem 0; border-bottom: 1px solid var(--border);
}
.intake-logo {
    display: flex; align-items: center; gap: .6rem;
    font-size: 1.1rem; font-weight: 700; color: var(--text);
}
.intake-subtitle { font-size: .8rem; color: var(--muted); }

/* ── Step bar ────────────────────────────────── */
.steps-bar {
    display: flex; align-items: center; margin: 1.5rem 0 .4rem;
}
.step-dot {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg2); border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem; font-weight: 700; color: var(--muted);
    flex-shrink: 0; transition: all .3s;
}
.step-dot.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.step-dot.done   { background: var(--green);   border-color: var(--green);   color: #fff; }
.step-line { flex: 1; height: 2px; background: var(--border); margin: 0 .25rem; }
.steps-labels {
    display: flex; justify-content: space-between;
    font-size: .72rem; color: var(--dim); margin-bottom: 1.5rem;
}

/* ── Body ────────────────────────────────────── */
.intake-body { flex: 1; }

.intake-step { animation: fadeIn .25s ease; }
.intake-step.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.step-title { font-size: 1.3rem; font-weight: 700; margin-bottom: .4rem; }
.step-hint { font-size: .9rem; color: var(--muted); margin-bottom: 1.5rem; }

/* ── Fields ──────────────────────────────────── */
.field-group { margin-bottom: 1.1rem; }
.field-group label {
    display: block; font-size: .82rem; font-weight: 500;
    color: var(--muted); margin-bottom: .35rem;
}
.field-group input,
.field-group textarea,
.field-group select {
    width: 100%; background: var(--bg2); border: 1px solid var(--border);
    color: var(--text); border-radius: 9px; padding: .65rem .9rem;
    font-size: 1rem; font-family: inherit; transition: border-color .2s;
    -webkit-appearance: none; appearance: none;
}
.field-group input:focus,
.field-group textarea:focus,
.field-group select:focus { outline: none; border-color: var(--primary); }
.field-group textarea { resize: vertical; min-height: 100px; }
.field-group select option { background: var(--bg2); }

.field-error {
    background: #450a0a; border: 1px solid var(--red); color: #fca5a5;
    border-radius: 8px; padding: .6rem .9rem; font-size: .85rem; margin-bottom: .75rem;
}

/* ── Buttons ─────────────────────────────────── */
.btn-next {
    width: 100%; background: var(--primary); color: #fff;
    border: none; border-radius: 10px; padding: .9rem;
    font-size: 1.05rem; font-weight: 700; cursor: pointer;
    margin-top: .75rem; transition: background .2s;
}
.btn-next:hover { background: #0369a1; }
.btn-next:active { background: #075985; }
.btn-submit { background: var(--green); }
.btn-submit:hover { background: #15803d; }

.btn-back {
    background: transparent; border: 1px solid var(--border);
    color: var(--muted); border-radius: 10px; padding: .9rem 1.5rem;
    font-size: 1rem; cursor: pointer;
}
.btn-back:hover { color: var(--text); background: var(--bg2); }

.btn-row { display: flex; gap: .75rem; margin-top: .75rem; }
.btn-row .btn-next { flex: 1; margin-top: 0; }

/* ── Disclaimer ──────────────────────────────── */
.disclaimer-box {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem 1.25rem;
    font-size: .85rem; line-height: 1.7; color: var(--muted);
    white-space: pre-wrap; margin-bottom: 1.25rem;
    max-height: 260px; overflow-y: auto;
}

/* ── Signature ───────────────────────────────── */
.sig-block { margin-bottom: 1rem; }
.sig-block label { display: block; font-size: .82rem; font-weight: 500; color: var(--muted); margin-bottom: .5rem; }
.sig-canvas {
    width: 100%; height: 160px; background: var(--bg2);
    border: 2px dashed var(--border); border-radius: 10px;
    display: block; touch-action: none; cursor: crosshair;
}
.sig-canvas.has-sig { border-color: var(--primary); border-style: solid; }
.sig-actions { display: flex; align-items: center; justify-content: space-between; margin-top: .5rem; }
.btn-clear-sig {
    background: none; border: 1px solid var(--border); color: var(--muted);
    border-radius: 6px; padding: .3rem .75rem; font-size: .8rem; cursor: pointer;
}
.btn-clear-sig:hover { color: var(--text); }
.sig-hint { font-size: .75rem; color: var(--dim); }

/* ── Done screen ─────────────────────────────── */
.done-icon {
    width: 72px; height: 72px; border-radius: 50%;
    background: var(--green); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 700; margin: 1.5rem auto 1rem;
}
.job-card {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.25rem; margin: 1.25rem 0;
    text-align: center;
}
.job-card .job-no { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.job-card .job-label { font-size: .85rem; color: var(--muted); margin-top: .25rem; }
.done-note { font-size: .9rem; color: var(--muted); margin-bottom: 1.5rem; text-align: center; }

/* ── Footer ──────────────────────────────────── */
.intake-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 0; border-top: 1px solid var(--border);
    font-size: .78rem; color: var(--dim); margin-top: 1rem;
}

/* ── Trade batch table ───────────────────────── */
.batch-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; font-size: .875rem; }
.batch-table th {
    background: var(--bg2); border-bottom: 1px solid var(--border);
    padding: .5rem .6rem; text-align: left; font-size: .75rem;
    font-weight: 600; color: var(--muted); white-space: nowrap;
}
.batch-table td { padding: .5rem .6rem; border-bottom: 1px solid rgba(255,255,255,.04); }
.batch-table td input, .batch-table td textarea {
    width: 100%; background: var(--bg); border: 1px solid var(--border);
    color: var(--text); border-radius: 6px; padding: .35rem .5rem;
    font-size: .85rem; font-family: inherit;
}
.batch-table td input:focus, .batch-table td textarea:focus {
    outline: none; border-color: var(--primary);
}
.btn-add-row {
    background: none; border: 1px dashed var(--border); color: var(--muted);
    border-radius: 8px; padding: .5rem 1rem; width: 100%;
    font-size: .875rem; cursor: pointer; margin-bottom: 1rem;
}
.btn-add-row:hover { color: var(--text); border-color: var(--primary); }
.btn-remove-row {
    background: none; border: none; color: var(--dim); cursor: pointer; font-size: 1rem; padding: 0 .25rem;
}
.btn-remove-row:hover { color: var(--red); }

/* ── Responsive ──────────────────────────────── */
@media (min-width: 600px) {
    .intake-wrap { padding: 0 2rem; }
    .step-title { font-size: 1.5rem; }
}
