:root {
  color-scheme: light;
  --ink: #17252c;
  --muted: #64757c;
  --line: #dbe4df;
  --mint: #d6efe4;
  --deep-mint: #0e7460;
  --coral: #a13f39;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; color: var(--ink); background: radial-gradient(circle at 92% 0, #e5f4eb, transparent 28rem), #fbfcfa; }
.shell { width: min(760px, calc(100% - 40px)); margin: 0 auto; padding: 84px 0 64px; }
header { max-width: 690px; margin-bottom: 32px; }
.brand { margin: 0 0 8px; color: var(--deep-mint); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(2.3rem, 8vw, 4.7rem); letter-spacing: -.06em; line-height: 1; }
h2 { margin-bottom: 5px; font-size: 1.25rem; letter-spacing: -.03em; }
.lede, .heading p { margin-bottom: 0; color: var(--muted); line-height: 1.55; }
.panel { padding: 30px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255, 255, 255, .94); box-shadow: 0 20px 55px rgba(36, 61, 55, .1); }
.trello-panel { margin-top: 26px; }
.heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.service-state { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; color: var(--muted); background: #fff; font-size: .78rem; font-weight: 750; }
.service-state.good { border-color: #9fd8bf; color: #12654f; background: #edf9f3; }
.service-state.bad { border-color: #e8b8b5; color: var(--coral); background: #fff4f3; }
.dropzone { display: flex; min-height: 220px; padding: 26px; border: 1.5px dashed #9ecbb9; border-radius: 16px; color: var(--deep-mint); background: #f2faf6; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 9px; text-align: center; transition: background .18s, border-color .18s; }
.dropzone:hover, .dropzone.dragging { border-color: var(--deep-mint); background: #e9f7f0; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone strong { max-width: 100%; overflow: hidden; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.dropzone span { color: var(--muted); font-size: .84rem; }
.selection-summary { min-height: 1.25em; margin-top: 10px; color: var(--muted); font-size: .84rem; text-align: center; }
.auto-mode { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 12px 14px; border: 1px solid #c8e1d5; border-radius: 12px; color: var(--ink); background: #f5fbf8; cursor: pointer; }
.auto-mode input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--deep-mint); }
.auto-mode strong, .auto-mode small { display: block; }
.auto-mode strong { font-size: .88rem; }
.auto-mode small { margin-top: 3px; color: var(--muted); font-size: .79rem; line-height: 1.35; }
.queue-list { display: grid; gap: 7px; max-height: 234px; margin: 14px 0 0; padding: 0; overflow-y: auto; list-style: none; }
.queue-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: #fff; font-size: .8rem; }
.queue-file { min-width: 0; overflow: hidden; color: var(--ink); font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.queue-status { flex: 0 0 auto; font-weight: 700; }
.queue-item.processing { border-color: #b6d9ca; background: #f2faf6; }
.queue-item.done { border-color: #a8d8bd; color: #137152; background: #f1faf5; }
.queue-item.error { border-color: #e8b8b5; color: var(--coral); background: #fff7f6; }
button { width: 100%; min-height: 47px; margin-top: 14px; border: 0; border-radius: 11px; color: #fff; background: var(--deep-mint); cursor: pointer; font: inherit; font-size: .95rem; font-weight: 800; }
button:hover:not(:disabled) { background: #075e4e; }
button:disabled { cursor: not-allowed; opacity: .5; }
.trello-form { display: grid; gap: 13px; }
.trello-form label { display: grid; gap: 6px; color: var(--ink); font-size: .86rem; font-weight: 750; }
.trello-form input[type="text"], .trello-form input[type="url"], .trello-form input[type="password"] { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid #bfd1c8; border-radius: 10px; outline: none; color: var(--ink); background: #fff; font: inherit; font-size: .93rem; font-weight: 500; }
.trello-form input:focus { border-color: var(--deep-mint); box-shadow: 0 0 0 3px rgba(14, 116, 96, .12); }
.trello-form small { color: var(--muted); font-size: .75rem; font-weight: 500; line-height: 1.35; }
.trello-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.repair-mode { display: flex !important; align-items: flex-start; grid-template-columns: auto 1fr; gap: 9px !important; padding: 11px 12px; border: 1px solid #c8e1d5; border-radius: 10px; color: var(--muted) !important; background: #f5fbf8; font-size: .8rem !important; font-weight: 600 !important; line-height: 1.4; }
.repair-mode input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--deep-mint); }
.trello-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.trello-actions button { margin-top: 0; }
.trello-actions .secondary { border: 1px solid #9fcfbd; color: #176653; background: #f5fbf8; }
.trello-actions .secondary:hover:not(:disabled) { background: #e8f6ef; }
.trello-actions .danger { border: 1px solid #e8b8b5; color: #9e433d; background: #fff6f5; }
.trello-actions .danger:hover:not(:disabled) { background: #feeae7; }
.trello-progress { margin-top: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdfb; }
.progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: #e4ece7; }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--deep-mint); transition: width .2s ease; }
.trello-counts { margin-top: 11px; color: var(--ink); font-size: .82rem; font-weight: 750; }
.trello-current { min-height: 1.3em; margin: 8px 0 0; color: var(--muted); font-size: .8rem; }
.trello-log { display: grid; gap: 7px; max-height: 190px; margin: 12px 0 0; padding: 0; overflow-y: auto; list-style: none; }
.trello-log li { padding-top: 7px; border-top: 1px solid #e5ece8; color: var(--muted); font-size: .76rem; line-height: 1.35; }
.message { min-height: 1.5em; margin: 15px 0 0; color: var(--muted); font-size: .88rem; }
.message.success { color: #137152; }
.message.error { color: var(--coral); }
.notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 42px; }
.notes strong { display: block; margin-bottom: 5px; font-size: .94rem; }
.notes span { color: var(--muted); font-size: .84rem; line-height: 1.45; }
@media (max-width: 640px) { .shell { width: min(100% - 28px, 600px); padding-top: 48px; } .panel { padding: 22px; } .heading { flex-direction: column; } .trello-columns, .trello-actions { grid-template-columns: 1fr; } .notes { grid-template-columns: 1fr; gap: 16px; } }
