/* =========================================================
   Public pages: user-form, user-success, user-track, picker
   ========================================================= */

.public-body {
    background: linear-gradient(180deg, #f6f8fb 0%, #ffffff 100%);
    min-height: 100vh;
    padding: 0;
}

.public-shell {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.public-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 0 18px;
    border-bottom: 1px solid #eef2f6;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.public-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.public-brand .brand-mark {
    width: 44px; height: 44px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    display: grid; place-items: center;
    font-weight: 700;
    font-size: 20px;
}
.public-brand .brand-title { font-weight: 700; font-size: 17px; }
.public-brand .brand-sub   { color: #6b7280; font-size: 13px; }

.public-actions { display: flex; gap: 8px; }

.public-main { flex: 1; padding-bottom: 32px; }

.public-footer {
    border-top: 1px solid #eef2f6;
    padding: 18px 0;
    text-align: center;
    color: #9ca3af;
    font-size: 12px;
}
.public-footer .dot { margin: 0 6px; color: #d1d5db; }

/* ============ provider picker ============ */
.provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.provider-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    color: #111827;
    background: white;
    transition: 160ms ease;
    text-decoration: none;
}
.provider-card:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
    text-decoration: none;
}
.provider-avatar {
    width: 44px; height: 44px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    display: grid; place-items: center;
    font-weight: 700; font-size: 18px;
}
.provider-name { flex: 1; font-weight: 600; }
.provider-arrow { color: #9ca3af; font-size: 18px; }

/* ============ form intro ============ */
.form-intro {
    margin-bottom: 20px;
    padding: 0 4px;
}
.form-intro h1 { margin: 0 0 4px; font-size: 26px; }

/* ============ form sections ============ */
.public-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.form-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f3f4f6;
}
.form-section-head h2 { margin: 0; font-size: 16px; }
.step-num {
    width: 28px; height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: grid; place-items: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.req { color: #dc2626; }

/* ============ prefix input (deductible $) ============ */
.prefix-input {
    display: flex;
    align-items: stretch;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
}
.prefix-input:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,0,0,0);
}
.prefix-input .prefix {
    padding: 0 12px;
    display: grid; place-items: center;
    background: #f9fafb;
    color: #6b7280;
    border-right: 1px solid #e5e7eb;
    font-weight: 600;
}
.prefix-input input {
    border: 0;
    flex: 1;
    padding: 9px 12px;
}
.prefix-input input:focus { outline: none; box-shadow: none; }

/* ============ address autocomplete ============ */
.autocomplete-wrap { position: relative; }
.autocomplete-list {
    position: absolute;
    top: calc(100% + 4px); left: 0; right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(15,23,42,.08);
    list-style: none;
    margin: 0; padding: 6px 0;
    max-height: 240px;
    overflow-y: auto;
    z-index: 20;
    display: none;
}
.autocomplete-list.open { display: block; }
.autocomplete-list li {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13.5px;
    border-bottom: 1px solid #f3f4f6;
}
.autocomplete-list li:last-child { border-bottom: 0; }
.autocomplete-list li:hover { background: #f3f4f6; }

/* ============ schedule slots ============ */
.schedule-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 12px;
}
.schedule-slots.disabled {
    opacity: .4;
    pointer-events: none;
}
.schedule-slot {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
    background: #f9fafb;
}
.slot-num {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 13px;
    color: #374151;
}
.schedule-slot input {
    width: 100%;
    margin-bottom: 6px;
}
.schedule-slot input:last-child { margin-bottom: 0; }

@media (max-width: 700px) {
    .schedule-slots { grid-template-columns: 1fr; }
}

/* ============ big checkbox ============ */
.big-chk {
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fafafa;
}
.big-chk input {
    width: 18px; height: 18px;
}
.big-chk:has(input:checked) {
    border-color: var(--primary);
    background: rgba(0,0,0,0.02);
}

/* ============ priority tip chips ============ */
.tip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-top: 4px;
}
.tip-card {
    cursor: pointer;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    background: white;
    transition: 160ms ease;
}
.tip-card input { display: none; }
.tip-card .tip-amt {
    font-weight: 700;
    font-size: 15px;
}
.tip-card:hover { border-color: var(--primary); }
.tip-card.selected {
    border-color: var(--primary);
    background: rgba(0,0,0,0.02);
    box-shadow: 0 0 0 1px var(--primary) inset;
    color: var(--primary);
}

/* ============ priority level cards (color-coded) ============ */
.prio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
    margin-top: 4px;
}
.prio-card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 12px 12px 16px;
    background: #fff;
    transition: 160ms ease;
}
.prio-card input { display: none; }
.prio-card::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
    background: var(--pc, #2563eb);
}
.prio-card .pc-name { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.prio-card .pc-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pc, #2563eb); flex: 0 0 auto; }
.prio-card .pc-desc { font-size: 12px; color: #6b7280; margin-top: 3px; }
.prio-card:hover { border-color: var(--pc, #2563eb); }
.prio-card.selected {
    border-color: var(--pc, #2563eb);
    background: var(--pc-bg, #eff6ff);
    box-shadow: 0 0 0 1px var(--pc, #2563eb) inset;
}
.prio-card .pc-fee { display:inline-block; margin-left:6px; background: var(--pc, #dc2626); color:#fff; font-size:11px; font-weight:800; padding:1px 8px; border-radius:999px; vertical-align:middle; }
.prio-card.c-green  { --pc: #16a34a; --pc-bg: #ecfdf5; }
.prio-card.c-blue   { --pc: #2563eb; --pc-bg: #eff6ff; }
.prio-card.c-yellow { --pc: #ca8a04; --pc-bg: #fefce8; }
.prio-card.c-orange { --pc: #ea580c; --pc-bg: #fff7ed; }
.prio-card.c-red    { --pc: #dc2626; --pc-bg: #fef2f2; }

/* ============ file drop ============ */
.file-drop {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    background: #f9fafb;
    transition: 160ms ease;
}
.file-drop.dragover {
    border-color: var(--primary);
    background: rgba(0,0,0,0.02);
}
.file-drop input[type=file] {
    position: absolute;
    width: 1px; height: 1px;
    opacity: 0;
    overflow: hidden;
}
.file-drop-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px;
    cursor: pointer;
    color: #6b7280;
    text-align: center;
}
.file-drop-label strong { color: var(--primary); }

.file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 16px;
}
.file-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 100px;
    background: white;
    border: 1px solid #e5e7eb;
    font-size: 12px;
}

/* ============ submit button ============ */
.btn-lg { padding: 12px 24px; font-size: 15px; }

/* ============ success page ============ */
.success-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 36px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 6px 18px rgba(15,23,42,.06);
    max-width: 600px;
    margin: 0 auto;
}
.success-card h1 { margin: 12px 0 4px; }
.success-icon {
    width: 88px; height: 88px;
    background: #ecfdf5;
    color: #16a34a;
    border-radius: 50%;
    display: grid; place-items: center;
    margin: 0 auto 8px;
}
.job-number-box {
    background: linear-gradient(135deg, rgba(0,0,0,0.02), rgba(0,0,0,0.04));
    border: 1px dashed var(--primary);
    border-radius: 12px;
    padding: 18px;
    margin: 22px 0;
}
.job-number {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 2px;
    margin: 6px 0 10px;
    color: var(--primary);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.success-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 22px;
    flex-wrap: wrap;
}
.success-card .table-clean {
    margin: 14px 0;
    text-align: left;
}

/* ============ track result ============ */
.track-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Tablet/mobile */
@media (max-width: 700px) {
    .form-section { padding: 18px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-intro h1 { font-size: 22px; }
}
