/* settings.css — Settings tab (settings.js). Prefix st-. Uses app.css tokens when present. */
.st-root {
  --st-red: var(--red, #E3262E);
  --st-ink: var(--ink, #161616);
  --st-muted: var(--muted, #5f6670);
  --st-line: var(--line, #e4e6ea);
  --st-card: var(--card, #fff);
  --st-bg-soft: var(--bg-soft, #f6f7f9);
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 24px;
  align-items: start;
  color: var(--st-ink);
  font-family: inherit;
}
.st-col { display: grid; gap: 24px; min-width: 0; }
@media (max-width: 900px) { .st-root { grid-template-columns: minmax(0, 1fr); gap: 16px; } .st-col { gap: 16px; } }

.st-card {
  background: var(--st-card);
  border: 1px solid var(--st-line);
  border-radius: 14px;
  padding: 22px 24px;
  min-width: 0;
}
@media (max-width: 600px) { .st-card { padding: 16px; } }
.st-card-title { margin: 0 0 16px; font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.st-sub { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--st-line); }
.st-sub-title { margin: 0 0 4px; font-size: 1rem; font-weight: 600; }

.st-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
@media (max-width: 600px) { .st-grid { grid-template-columns: minmax(0, 1fr); } }
.st-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.st-label { font-size: 0.82rem; font-weight: 600; color: var(--st-muted); }
.st-hint { font-size: 0.8rem; color: var(--st-muted); line-height: 1.4; display: block; }
.st-muted { color: var(--st-muted); margin: 0; }

.st-root input[type=text], .st-root input[type=date], .st-root select {
  font: inherit; font-size: 0.95rem;
  padding: 9px 11px; min-height: 40px;
  border: 1px solid var(--st-line); border-radius: 8px;
  background: var(--st-card); color: var(--st-ink);
  width: 100%; box-sizing: border-box; min-width: 0;
}
.st-root input[type=file] { font: inherit; font-size: 0.9rem; max-width: 100%; }
.st-root input:focus-visible, .st-root select:focus-visible, .st-btn:focus-visible {
  outline: 2px solid var(--st-red); outline-offset: 1px;
}
.st-root input:disabled, .st-root select:disabled { background: var(--st-bg-soft); color: var(--st-muted); }

.st-span { margin: 14px 0 0; font-weight: 500; }
.st-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.st-actions .st-field { flex: 1 1 240px; }

.st-btn {
  font: inherit; font-size: 0.92rem; font-weight: 600;
  padding: 9px 16px; min-height: 40px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--st-line); background: var(--st-card); color: var(--st-ink);
}
.st-btn:hover:not(:disabled) { border-color: var(--st-ink); }
.st-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.st-btn-primary { background: var(--st-ink); border-color: var(--st-ink); color: #fff; }
.st-btn-primary:hover:not(:disabled) { background: #000; }
.st-btn-danger { background: var(--st-red); border-color: var(--st-red); color: #fff; }
.st-btn-danger:hover:not(:disabled) { background: #c41d24; border-color: #c41d24; }
.st-btn-ghost { background: transparent; border-color: transparent; color: var(--st-muted); }
.st-btn-ghost:hover:not(:disabled) { color: var(--st-red); border-color: transparent; }

.st-msg { margin: 0; font-size: 0.88rem; }
.st-msg:empty { display: none; }
.st-msg[data-kind=error] { color: var(--st-red); font-weight: 600; }
.st-msg[data-kind=busy] { color: var(--st-muted); }
.st-msg[data-kind=ok] { color: #2E8B57; }

/* non-working ranges */
.st-nw-list { display: grid; gap: 8px; margin-top: 12px; }
.st-nw-row { display: grid; grid-template-columns: 150px auto 150px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.st-nw-dash { color: var(--st-muted); font-size: 0.85rem; }
@media (max-width: 600px) {
  .st-nw-row { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); padding-bottom: 10px; border-bottom: 1px dashed var(--st-line); }
  .st-nw-row input[type=text] { grid-column: 1 / -1; }
  .st-nw-rm { grid-column: 1 / -1; justify-self: start; padding-left: 0; }
}

/* import */
.st-import-out { display: grid; gap: 12px; margin-top: 12px; }
.st-summary { margin: 0; font-weight: 500; }
.st-warn { margin: 0; padding: 10px 14px 10px 30px; background: #fff7e8; border: 1px solid #f1d39b; border-radius: 8px; font-size: 0.86rem; }
.st-warn li + li { margin-top: 4px; }
.st-table-wrap { overflow-x: auto; border: 1px solid var(--st-line); border-radius: 8px; max-height: 420px; overflow-y: auto; }
.st-table { border-collapse: collapse; width: 100%; font-size: 0.84rem; }
.st-table th, .st-table td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--st-line); vertical-align: top; }
.st-table th { position: sticky; top: 0; background: var(--st-bg-soft); font-weight: 600; white-space: nowrap; }
.st-table tr:last-child td { border-bottom: 0; }
.st-td-name { min-width: 220px; }
.st-nowrap { white-space: nowrap; }
.st-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.st-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.st-modes { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.st-modes legend { margin-bottom: 6px; }
.st-radio { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--st-line); border-radius: 8px; cursor: pointer; }
.st-radio:has(input:checked) { border-color: var(--st-ink); }
.st-radio input { margin-top: 3px; accent-color: var(--st-red); }
.st-radio strong { display: block; font-weight: 600; }

/* members */
.st-members { list-style: none; margin: 0 0 12px; padding: 0; }
.st-members li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--st-line); }
.st-member-email { overflow-wrap: anywhere; }
.st-role { color: var(--st-muted); font-size: 0.85rem; text-transform: capitalize; white-space: nowrap; }

/* danger */
.st-danger { border-color: color-mix(in srgb, var(--st-red) 45%, var(--st-line)); }
.st-danger .st-card-title { color: var(--st-red); }
.st-danger p { margin: 0 0 14px; }

/* public holidays */
.st-countries { display: grid; gap: 10px; margin-top: 12px; }
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.st-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 10px; border: 1px solid var(--st-line); border-radius: 999px; background: var(--st-bg-soft); font-size: 0.88rem; }
.st-chip-x { border: 0; background: transparent; color: var(--st-muted); font-size: 1.1rem; line-height: 1; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; }
.st-chip-x:hover { background: var(--st-line); color: var(--st-red); }
.st-cc { font-size: 0.75rem; font-weight: 600; color: var(--st-muted); letter-spacing: 0.03em; white-space: nowrap; }
.st-flag { font-size: 1rem; }
.st-country-add { display: flex; gap: 8px; flex-wrap: wrap; }
.st-country-add input { flex: 1 1 220px; width: auto !important; }
.st-err { color: var(--st-red); }
.st-err:empty { display: none; }
.st-hol-title { margin-top: 20px; }
.st-hol { list-style: none; margin: 8px 0 12px; padding: 0; }
.st-hol-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--st-line); }
.st-hol-names { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.st-hol-worked .st-hol-date, .st-hol-worked .st-hol-names { color: var(--st-muted); text-decoration: line-through; }
.st-inline { display: inline; }
.st-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 0.86rem; white-space: nowrap; cursor: pointer; }
.st-toggle input { width: 18px; height: 18px; accent-color: var(--st-red); }
.st-np-countries { margin-top: 14px; }
@media (max-width: 600px) {
  .st-hol-row { grid-template-columns: minmax(0, 1fr) auto; }
  .st-hol-names { grid-column: 1 / -1; grid-row: 2; }
}
.st-hol-weekend { opacity: 0.55; }

/* calendar sync */
.st-cal { display: grid; gap: 12px; }
.st-cal p { margin: 0; }
.st-cal-link { display: flex; gap: 8px; }
.st-cal-link input { flex: 1 1 auto; font-family: ui-monospace, Consolas, monospace !important; font-size: 0.82rem !important; }
.st-warn-line { padding: 8px 12px; background: #fff7e8; border: 1px solid #f1d39b; border-radius: 8px; font-size: 0.86rem; }
.st-steps { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
a.st-btn { display: inline-flex; align-items: center; text-decoration: none; }
.st-link { font: inherit; font-size: 0.92rem; background: none; border: 0; padding: 0 4px; color: var(--st-ink); text-decoration: underline; cursor: pointer; }
.st-link:hover { color: var(--st-red); }
.st-danger-text:hover:not(:disabled) { color: var(--st-red); }
.st-confirm { padding: 12px 14px; border: 1px solid var(--st-red); border-radius: 8px; background: #fff5f5; }
.st-confirm .st-actions { margin-top: 10px; }
