/* FratzWFM — Import page. Builds on styles.css tokens; loaded after it. */

.import-hero { padding: 40px 0 24px; position: relative; overflow: hidden; }
.import-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(640px 280px at 92% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
              radial-gradient(640px 300px at 6% 0%, color-mix(in srgb, var(--mark-a) 16%, transparent), transparent 70%);
}
.import-hero .wrap { position: relative; }
.import-hero .eyebrow { margin-bottom: 10px; }
.hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.import-hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.4rem); }
.import-hero .lede { margin-top: 12px; }
.status-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--surface); font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status-chip.on { border-color: var(--accent); color: var(--accent-ink); }
.status-chip.on .status-dot { background: var(--accent); }

.site-nav .nav-import[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
@media (max-width: 420px) { .site-nav .nav-planner .nav-pill { display: none; } }

.import-grid { display: grid; gap: 20px; padding-bottom: 72px; max-width: 1000px; }
.panel { min-width: 0; }
.templates, .step-panel { padding: 22px; display: grid; gap: 16px; }
@media (min-width: 720px) { .templates, .step-panel { padding: 26px 28px; } }
.tpl-head h2 { font-size: 1.35rem; }
.tpl-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.howto { border-top: 1px dashed var(--line-strong); padding-top: 12px; }
.howto summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }
.howto ol { margin: 10px 0 0; padding-left: 1.3em; display: grid; gap: 6px; color: var(--ink-2); font-size: .93rem; }
.howto code { font-family: var(--font-num); font-size: .85em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; white-space: nowrap; }

.step-title { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; display: flex; align-items: center; gap: 10px; }
.step-num { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--brand); color: var(--brand-ink); font: 600 .85rem/1 var(--font-num); flex: none; }
@media (prefers-color-scheme: dark) { .step-num { background: var(--mark-a); color: #0b1a1d; } }

.btn-sm { min-height: 38px; padding: 8px 13px; font-size: .88rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-danger { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, var(--line-strong)); }

.locked-teaser { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1.5px solid var(--accent); border-radius: 12px; padding: 12px 14px; font-size: .9rem; display: grid; gap: 10px; }
.locked-teaser .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.locked-teaser.pulse { animation: pulse .6s ease 2; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 35%, transparent); } }

.dropzone {
  display: grid; justify-items: center; gap: 6px; text-align: center; cursor: pointer;
  padding: 28px 16px; border: 2px dashed var(--line-strong); border-radius: 14px; background: var(--surface-2);
  color: var(--ink-2); transition: border-color .15s, background .15s;
}
.dropzone svg { width: 32px; height: 32px; color: var(--brand-2); }
@media (prefers-color-scheme: dark) { .dropzone svg { color: var(--mark-a); } }
.dropzone:hover, .dropzone.is-over { border-color: var(--focus); background: color-mix(in srgb, var(--focus) 8%, var(--surface-2)); }
.dropzone:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.dz-main { font-weight: 600; color: var(--ink); }
.dz-sub { font-size: .82rem; color: var(--muted); }
.dropzone.is-disabled { cursor: not-allowed; opacity: .6; }
.dropzone.is-disabled:hover { border-color: var(--line-strong); background: var(--surface-2); }

.paste-box summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.paste-box[open] { display: grid; gap: 8px; }
.paste-box textarea {
  width: 100%; min-width: 0; resize: vertical; font: 500 .88rem/1.4 var(--font-num); color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); padding: 10px 12px;
}
.paste-box textarea:disabled { background: var(--surface-2); opacity: .7; }
.paste-box .btn { justify-self: start; }

.load-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand-2); }
.check input:disabled + * , .check:has(input:disabled) { opacity: .6; cursor: not-allowed; }
.load-status { font-size: .9rem; color: var(--good); font-weight: 600; }
.load-status:empty { display: none; }
.load-status.is-bad { color: var(--warn); }
.is-busy .load-status::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
.sheet-field { max-width: 320px; }

/* mapping */
.map-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
@media (min-width: 720px) { .map-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.map-field label { font-size: .82rem; }
.map-field select { height: 42px; font-size: .88rem; padding: 8px 30px 8px 10px; }
.req { font-weight: 500; font-size: .7rem; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .05em; }
.map-opts { display: grid; gap: 12px 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .map-opts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.map-err { color: var(--warn); font-weight: 600; font-size: .9rem; }
.map-err:empty { display: none; }
.step-actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }

.preview-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.preview { width: 100%; border-collapse: collapse; font-size: .84rem; }
.preview caption { text-align: left; font-weight: 600; font-size: .85rem; color: var(--ink-2); padding: 10px 12px 6px; }
.preview th, .preview td { padding: 6px 10px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.preview thead th { background: var(--surface-2); vertical-align: bottom; }
.ph-name { display: block; font-weight: 600; color: var(--ink); }
.ph-tag { display: inline-block; margin-top: 3px; font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--on-accent); background: var(--accent); padding: 1px 6px; border-radius: 5px; }
.ph-tag.is-none { background: transparent; color: var(--muted); border: 1px dashed var(--line-strong); }
.preview td { font-family: var(--font-num); color: var(--ink); }
.preview .is-ignored { color: var(--muted); }
.preview td.is-bad { color: var(--warn); background: var(--warn-bg); font-weight: 600; }

/* report + plan stats */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; border-left-width: 4px; }
.stat-label { font-size: .75rem; font-weight: 600; color: var(--ink-2); }
.stat-value { font: 600 1.25rem var(--font-num); color: var(--ink); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-note { font-size: .74rem; color: var(--muted); margin-top: 1px; line-height: 1.3; }
.stat.is-good { border-left-color: var(--good); }
.stat.is-bad { border-left-color: var(--warn); }
.stat.is-bad .stat-value { color: var(--warn); }
.stat.is-warn { border-left-color: var(--accent); }
.report-notes { display: grid; gap: 6px; font-size: .9rem; color: var(--ink-2); }
.report-notes:empty { display: none; }
.rejects summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.rejects ul { margin: 8px 0 0; padding: 10px 14px 10px 30px; background: var(--warn-bg); color: var(--warn); border-radius: 10px; font-size: .85rem; display: grid; gap: 3px; max-height: 260px; overflow: auto; }

.plan-opts { display: grid; gap: 14px 18px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .plan-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .queues-field { grid-row: span 2; } }
.plan-opts fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.plan-opts legend { font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.queue-list { display: grid; gap: 6px; max-height: 180px; overflow: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.muted { color: var(--muted); font-size: .8rem; }
input[type="date"] {
  width: 100%; min-width: 0; height: 46px; padding: 10px 12px; font: 500 .95rem var(--font-num); color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
}
.plan-out { display: grid; gap: 14px; }
.plan-note { font-size: .82rem; color: var(--muted); }
.plan-note:empty { display: none; }
.plan-table-wrap { max-height: 420px; overflow: auto; }
.plan-preview thead th { position: sticky; top: 0; z-index: 1; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.plan-preview td, .plan-preview th[scope="row"] { font-family: var(--font-num); }
.plan-preview td:nth-child(2), .plan-preview td:nth-child(3) { text-align: right; }
.bar-col { width: 45%; }
.bar { display: block; height: 10px; border-radius: 0 4px 4px 0; background: var(--brand-2); min-width: 1px; }
@media (prefers-color-scheme: dark) { .bar { background: var(--mark-a); } }
.send-lock { font-size: .88rem; color: var(--ink-2); }
.privacy-note { font-size: .85rem; color: var(--muted); }
.map-field, .queues-field, .plan-opts .field { align-content: start; }
.queue-list { align-content: start; }
.patreon-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 12px; font-size: .9rem; color: var(--ink-2); }
.badge-supporter { display: inline-block; background: var(--accent); color: var(--on-accent); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.patreon-notice { margin-top: 12px; font-size: .92rem; font-weight: 600; color: var(--good); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--good); border-radius: 10px; padding: 10px 14px; max-width: 70ch; }
.patreon-notice.is-bad { color: var(--warn); border-left-color: var(--warn); }
.send-lock .link-btn { font-size: inherit; vertical-align: baseline; }
.patreon-sim-choice { justify-content: flex-start; }
