/* Tin Học 119 – form components (prefix th119-). Theme tokens override these fallbacks. */
.th119-form-wrap{--_blue:var(--th119-blue,#0057D9);--_red:var(--th119-red,#E31E24);--_navy:var(--th119-navy,#0D1B2A);--_ink:var(--th119-ink,#334155);--_muted:var(--th119-muted,#5B6B82);--_line:var(--th119-line,#E2E8F0);--_bg:var(--th119-bg,#F5F7FA);--_surface:var(--th119-surface,#fff);color:var(--_ink)}
.th119-form,.th119-lookup{display:block}
.th119-form__title{margin:0 0 16px;font-size:1.25rem;color:var(--_navy)}
.th119-fieldset{border:0;margin:0 0 24px;padding:0;min-width:0}
.th119-fieldset legend{font-weight:700;color:var(--_navy);font-size:1rem;margin-bottom:12px;padding:0;display:flex;align-items:center;gap:8px}
.th119-fieldset legend::before{content:"";width:4px;height:18px;border-radius:2px;background:var(--_blue)}
.th119-form--buyback .th119-fieldset legend::before{background:var(--_red)}
.th119-grid{display:grid;grid-template-columns:1fr;gap:14px 16px}
@media (min-width:640px){.th119-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.th119-field--full,.th119-field--wide{grid-column:1/-1}}

.th119-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.th119-field[hidden]{display:none}
.th119-field>label,.th119-label{font-weight:600;font-size:.9rem;color:var(--_navy)}
.th119-req{color:var(--_red)}
.th119-opt{font-weight:400;color:var(--_muted);font-size:.8125rem}
.th119-field input:not([type=checkbox]):not([type=file]),.th119-field select,.th119-field textarea,.th119-lookup input{width:100%;min-height:48px;padding:12px 14px;border:1px solid var(--_line);border-radius:10px;background:var(--_surface);color:var(--_navy);font:inherit;font-size:16px;line-height:1.4;box-shadow:none;transition:border-color .15s,box-shadow .15s;margin:0;box-sizing:border-box}
.th119-field textarea{min-height:96px;resize:vertical}
.th119-field input:focus,.th119-field select:focus,.th119-field textarea:focus,.th119-lookup input:focus{outline:0;border-color:var(--_blue);box-shadow:0 0 0 3px color-mix(in srgb,var(--_blue) 20%,transparent)}
.th119-field.is-invalid input,.th119-field.is-invalid select,.th119-field.is-invalid textarea{border-color:var(--_red)}
.th119-error{color:var(--_red);font-size:.8125rem;margin:0}
.th119-help{color:var(--_muted);font-size:.8125rem;margin:0;line-height:1.5}
.th119-checks{display:flex;flex-wrap:wrap;gap:8px}
.th119-check{display:inline-flex;align-items:flex-start;gap:8px;cursor:pointer;font-size:.9rem;line-height:1.45}
.th119-checks .th119-check{padding:10px 12px;border:1px solid var(--_line);border-radius:10px;background:var(--_surface);min-height:44px;align-items:center}
.th119-check input{width:18px;height:18px;margin:2px 0 0;accent-color:var(--_blue);flex:none}
.th119-consent{font-size:.875rem;color:var(--_ink)}
.th119-drop{display:flex;align-items:center;gap:12px;padding:18px;border:1.5px dashed var(--_line);border-radius:12px;background:var(--_bg);cursor:pointer;color:var(--_muted);transition:border-color .15s,background .15s;position:relative}
.th119-drop:hover,.th119-drop.is-drag{border-color:var(--_blue);background:color-mix(in srgb,var(--_blue) 6%,var(--_surface))}
.th119-drop svg{color:var(--_blue);flex:none}
.th119-drop__text strong{color:var(--_navy)}
.th119-drop input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}
.th119-drop:focus-within{outline:2px solid var(--_blue);outline-offset:2px}
.th119-previews{list-style:none;margin:4px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:8px}
.th119-previews:empty{display:none}
.th119-previews li{display:flex;flex-direction:column;gap:4px;font-size:.75rem;color:var(--_muted);min-width:0}
.th119-previews img,.th119-previews__file{width:100%;aspect-ratio:1;object-fit:cover;border-radius:8px;border:1px solid var(--_line);background:var(--_bg);display:grid;place-items:center;font-weight:700;color:var(--_navy)}
.th119-previews__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.th119-form__actions{display:flex;flex-direction:column;gap:10px;align-items:stretch;margin-top:8px}
@media (min-width:640px){.th119-form__actions{flex-direction:row;align-items:center}}
.th119-form__note{margin:0;font-size:.8125rem;color:var(--_muted)}
.th119-progress{height:6px;border-radius:3px;background:var(--_bg);overflow:hidden;margin-top:12px}
.th119-progress__bar{height:100%;width:0;background:var(--_blue);transition:width .2s}
.th119-form__status{margin-top:12px}
.th119-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}
/* Buttons fallback (theme provides full styles) */
.th119-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:12px 22px;border-radius:10px;border:1px solid transparent;font:inherit;font-weight:600;font-size:1rem;line-height:1.2;text-decoration:none;cursor:pointer;transition:background .15s,border-color .15s,color .15s,transform .15s;white-space:nowrap}
.th119-btn--primary{background:var(--_blue,#0057D9);color:#fff}
.th119-btn--primary:hover{background:var(--th119-blue-700,#0046AE);color:#fff}
.th119-btn--accent{background:var(--_red,#E31E24);color:#fff}
.th119-btn--accent:hover{background:var(--th119-red-700,#B9151A);color:#fff}
.th119-btn--ghost{background:transparent;border-color:var(--_line,#E2E8F0);color:var(--_navy,#0D1B2A)}
.th119-btn--sm{min-height:36px;padding:6px 12px;font-size:.875rem}
.th119-btn--lg{min-height:52px;padding:14px 28px}
.th119-btn[disabled]{opacity:.7;cursor:progress}
.th119-btn.is-loading .th119-btn__label::after{content:"";display:inline-block;width:14px;height:14px;margin-left:10px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;vertical-align:-2px;animation:th119-spin .7s linear infinite}
@keyframes th119-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.th119-btn.is-loading .th119-btn__label::after{animation:none}}
/* Alerts */
.th119-alert{padding:12px 16px;border-radius:10px;border:1px solid;font-size:.9375rem;line-height:1.5;margin:0 0 16px}
.th119-alert--success{background:#ECFDF3;border-color:#ABEFC6;color:#05603A}
.th119-alert--error{background:#FEF3F2;border-color:#FECDCA;color:#B42318}
.th119-alert--info{background:var(--th119-blue-50,#EAF2FF);border-color:#C7DBFF;color:#0B3A85}
.th119-alert code{font-weight:700}
/* Success panel */
.th119-success{text-align:center;padding:32px 20px;border:1px solid var(--_line);border-radius:16px;background:var(--_surface);outline:0}
.th119-success__icon{width:64px;height:64px;border-radius:50%;background:#ECFDF3;color:#079455;display:grid;place-items:center;margin:0 auto 12px}
.th119-success h3{margin:0 0 8px;color:var(--_navy);font-size:1.375rem}
.th119-success p{margin:0 auto 16px;max-width:52ch}
.th119-success__code{display:inline-flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px;padding:14px 18px;border-radius:12px;background:var(--_bg);margin-bottom:16px}
.th119-success__code span{color:var(--_muted);font-size:.875rem}
.th119-success__code strong{font-size:1.375rem;letter-spacing:.04em;color:var(--_navy);font-variant-numeric:tabular-nums}
.th119-success__estimate{display:flex;flex-direction:column;gap:4px;margin:0 auto 16px;max-width:420px;padding:14px;border-radius:12px;border:1px solid color-mix(in srgb,var(--_red) 30%,transparent);background:color-mix(in srgb,var(--_red) 5%,var(--_surface))}
.th119-success__estimate strong{font-size:1.25rem;color:var(--_red)}
.th119-success__estimate small{color:var(--_muted)}
/* Lookup */
.th119-lookup__form{display:grid;gap:14px;grid-template-columns:1fr;align-items:end;margin-bottom:10px}
@media (min-width:768px){.th119-lookup__form{grid-template-columns:1fr 1fr auto}.th119-lookup__form--single{grid-template-columns:1fr auto}}
.th119-lookup__result{margin-top:20px;display:grid;gap:16px}
.th119-result{border:1px solid var(--_line);border-radius:14px;padding:20px;background:var(--_surface)}
.th119-result__head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.th119-result__head h3{margin:2px 0 0;font-size:1.25rem;color:var(--_navy)}
.th119-result__eyebrow{font-size:.8125rem;color:var(--_muted);font-weight:600;text-transform:uppercase;letter-spacing:.04em}
.th119-result__meta{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:0}
.th119-result__meta div{background:var(--_bg);border-radius:10px;padding:10px 12px}
.th119-result__meta dt{font-size:.75rem;color:var(--_muted);margin:0 0 2px}
.th119-result__meta dd{margin:0;font-weight:600;color:var(--_navy)}
.th119-result__note{margin:14px 0 0;color:var(--_ink)}
.th119-timeline{list-style:none;margin:18px 0 0;padding:0 0 0 18px;border-left:2px solid var(--_line)}
.th119-timeline li{position:relative;padding:0 0 14px 6px}
.th119-timeline li::before{content:"";position:absolute;left:-25px;top:4px;width:12px;height:12px;border-radius:50%;background:var(--_surface);border:3px solid var(--_blue)}
.th119-timeline li:not(:first-child)::before{border-color:var(--_line)}
.th119-timeline time{display:block;font-size:.8125rem;color:var(--_muted)}
.th119-timeline p{margin:4px 0 0;font-size:.9rem}
/* Badges */
.th119-badge{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;font-size:.8125rem;font-weight:600;background:#EEF2F6;color:#364152;white-space:nowrap}
.th119-badge::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.th119-badge--new{background:#EAF2FF;color:#0046AE}
.th119-badge--reviewing,.th119-badge--pricing,.th119-badge--processing,.th119-badge--w-processing{background:#FFF6E5;color:#B54708}
.th119-badge--contacted,.th119-badge--scheduled{background:#F4F3FF;color:#5925DC}
.th119-badge--agreed,.th119-badge--completed,.th119-badge--w-active{background:#ECFDF3;color:#067647}
.th119-badge--rejected,.th119-badge--w-void{background:#FEF3F2;color:#B42318}
.th119-badge--cancelled,.th119-badge--w-expired{background:#F2F4F7;color:#475467}
/* FAQ */
.th119-faq{display:grid;gap:10px}
.th119-faq__item{border:1px solid var(--th119-line,#E2E8F0);border-radius:12px;background:var(--th119-surface,#fff);overflow:hidden}
.th119-faq__item summary{list-style:none;display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 18px;cursor:pointer;font-weight:600;color:var(--th119-navy,#0D1B2A);min-height:56px}
.th119-faq__item summary::-webkit-details-marker{display:none}
.th119-faq__item summary svg{flex:none;transition:transform .2s;color:var(--th119-blue,#0057D9)}
.th119-faq__item[open] summary svg{transform:rotate(180deg)}
.th119-faq__item summary:focus-visible{outline:2px solid var(--th119-blue,#0057D9);outline-offset:-2px}
.th119-faq__a{padding:0 18px 16px;color:var(--th119-ink,#334155);line-height:1.65}
.th119-faq__a p{margin:0 0 10px}
.th119-faq__a p:last-child{margin:0}
.th119-consent a{text-decoration:underline;text-underline-offset:2px}
.th119-selftest{margin:0 0 16px;padding:14px 16px;border-radius:12px;background:var(--th119-blue-50,#EAF2FF);border:1px solid #C7DBFF}
.th119-selftest__text{margin:10px 0 0;white-space:pre-wrap;font:inherit;font-size:.8125rem;color:var(--_ink);background:#fff;border-radius:8px;padding:10px 12px;max-height:180px;overflow:auto}
.th119-selftest-cta{font-size:.875rem;color:var(--_muted);margin:0 0 16px}
.th119-selftest-cta a{text-decoration:underline;text-underline-offset:2px}
