/* Toolset24 — smallpdf-style light theme. White background, teal accent.
   No external fonts or libraries. Mobile-first. */
:root { color-scheme: light; } /* stop phone browsers force-darkening the light design */
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: #111827; background: #fff; line-height: 1.6; }
a { color: #0e7490; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- header: white, one row, sticky ---- */
header.site { background: #fff; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 10; }
header.site .wrap { max-width: 1080px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
header.site a.brand { color: #0e7490; font-size: 1.3rem; font-weight: 800; letter-spacing: .2px; flex-shrink: 0; }
header.site a.brand:hover { text-decoration: none; }
header.site nav.cats { display: none; }
@media (min-width: 640px) {
  header.site nav.cats { display: block; }
  header.site nav.cats a { color: #374151; font-weight: 600; font-size: .95rem; margin-left: 20px; }
  header.site nav.cats a:hover { color: #0e7490; text-decoration: none; }
}
/* mobile: links up in the top row next to the logo (19/11, Alan: "cho lên trên") —
   the language picker shrinks to a short code (VI/EN/…) via the inline script
   in base.html, so logo + 2 links + picker fit on one 390px row */
@media (max-width: 639px) {
  header.site .wrap { gap: 10px; padding: 10px 12px; }
  header.site a.brand { font-size: 1.15rem; }
  header.site nav.cats { display: flex; gap: 14px; }
  header.site nav.cats a { color: #374151; font-weight: 600; font-size: .9rem; white-space: nowrap; }
  header.site nav.cats a:hover { color: #0e7490; text-decoration: none; }
  header.site nav select.lang-picker { max-width: 62px; padding: 4px 4px; font-size: .88rem; }
}
header.site nav select.lang-picker { width: auto; max-width: 150px; flex-shrink: 1; font-size: .92rem; padding: 4px 8px; background: #fff; color: #374151; border: 1px solid #d1d5db; border-radius: 999px; cursor: pointer; }
.back-row { max-width: 1080px; margin: 0 auto; padding: 12px 16px 0; }
.back-row a.back { color: #0e7490; font-size: .95rem; font-weight: 600; }

main.wrap { max-width: 1080px; margin: 0 auto; padding: 32px 16px 64px; }
h1 { font-size: 1.7rem; line-height: 1.25; margin: .2em 0 .4em; }
h2 { font-size: 1.25rem; margin-top: 1.8em; }
.lede { font-size: 1.08rem; color: #4b5563; }

/* ---- hero: centered ---- */
.hero { text-align: center; padding: 16px 0 4px; }
.hero h1 { font-size: 2.1rem; line-height: 1.2; margin: 0 0 10px; }
.hero .lede { font-size: 1.12rem; margin: 0; }
@media (max-width: 639px) { .hero h1 { font-size: 1.7rem; } }

/* ---- tool sections + cards ---- */
.tool-section { margin-top: 44px; }
.tool-section > h2 { text-align: center; font-size: 1.4rem; margin: 0 0 18px; color: #111827; }
.tool-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .tool-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .tool-grid { grid-template-columns: 1fr 1fr 1fr; } }
.tool-card { display: flex; flex-direction: column; position: relative; height: 100%; background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; box-shadow: 0 1px 3px rgba(16,24,40,.06); padding: 20px 20px 48px; color: inherit; }
.tool-card:hover { text-decoration: none; border-color: #0e7490; box-shadow: 0 8px 24px rgba(14,116,144,.14); }
.tool-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--icbg, #ecfeff); color: var(--ic, #0e7490); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; flex-shrink: 0; }
.tool-icon svg { width: 26px; height: 26px; }
.tool-card h2, .tool-card h3 { margin: 0 0 4px; font-size: 1.12rem; color: #111827; }
.tool-card p { margin: 0; color: #6b7280; font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tool-card .arrow { position: absolute; right: 18px; bottom: 14px; color: #0e7490; font-size: 1.25rem; font-weight: 700; line-height: 1; }
/* mobile: compact horizontal rows like Smallpdf mobile (19/11, Alan: "mỗi 1 ô
   của mình to quá") — icon left, text middle, arrow right; the tall stacked
   card is desktop-only */
@media (max-width: 639px) {
  .tool-card { flex-direction: row; align-items: center; gap: 14px; padding: 14px 16px; }
  .tool-icon { margin-bottom: 0; }
  .tool-text { flex: 1; min-width: 0; }
  .tool-card .arrow { position: static; margin-left: auto; flex-shrink: 0; }
}

/* ---- forms / tool pages ---- */
label.field { display: block; font-weight: 600; margin: 18px 0 6px; }
input[type=text], input[type=search], input[type=number], input[type=date], input[type=datetime-local], select { width: 100%; font-size: 1.25rem; padding: 12px 14px; border: 2px solid #cbd5e1; border-radius: 10px; background: #fff; }
input[type=text]:focus, input[type=search]:focus, input[type=number]:focus, input[type=date]:focus, input[type=datetime-local]:focus, select:focus { outline: none; border-color: #0e7490; }
select { font-size: 1.05rem; }
.row { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 640px) { .row { grid-template-columns: 1fr 1fr; } }
.result .rate { font-size: .98rem; color: #4b5563; margin-top: 6px; }
.rate-note { color: #6b7280; font-size: .92rem; margin-top: 10px; }
.clocks { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
@media (min-width: 640px) { .clocks { grid-template-columns: 1fr 1fr; } }
.clock-box { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px 18px; }
.clock-label { font-size: .9rem; color: #6b7280; }
.clock { font-size: 1.5rem; font-weight: 700; color: #0e7490; }
.mode-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.mode-tabs button { background: #fff; color: #0e7490; }
.mode-tabs button.active { background: #0e7490; color: #fff; }
.opts { margin: 12px 0; display: flex; gap: 18px; flex-wrap: wrap; }
.opts label { font-weight: 500; cursor: pointer; }
.result { background: #fff; border: 2px solid #0e7490; border-radius: 12px; padding: 18px; margin-top: 16px; min-height: 76px; }
.result .label { font-size: .85rem; color: #6b7280; text-transform: uppercase; letter-spacing: .04em; }
.result .text { font-size: 1.3rem; font-weight: 600; line-height: 1.4; word-break: break-word; }
.error { display: none; color: #b91c1c; margin-top: 8px; }
button { font-size: 1rem; padding: 10px 18px; border-radius: 10px; border: 1px solid #0e7490; background: #0e7490; color: #fff; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
button.ghost { background: #fff; color: #0e7490; }
.examples { margin-top: 14px; }
.examples button { margin: 0 6px 6px 0; padding: 6px 12px; font-size: .92rem; }
.bank-search { margin: 18px 0 6px; }
.bank-list { display: grid; gap: 12px; margin-top: 16px; }
.bank { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px 18px; }
.bank h3 { margin: 0 0 2px; font-size: 1.1rem; }
.bank .en { color: #6b7280; font-size: .92rem; margin: 0 0 10px; }
.bank .swift { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bank code { font-size: 1.25rem; font-weight: 700; letter-spacing: .06em; background: #ecfeff; border-radius: 8px; padding: 4px 10px; }
.bank .copy { padding: 6px 12px; font-size: .92rem; }
.note { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 12px 16px; margin-top: 20px; font-size: .95rem; }
.note strong { color: #92400e; }
.empty { display: none; color: #6b7280; margin-top: 16px; }

/* ---- footer: minimal, centered ---- */
footer.site { border-top: 1px solid #e5e7eb; background: #fff; text-align: center; }
footer.site .wrap { max-width: 1080px; margin: 0 auto; padding: 20px 16px; font-size: .9rem; color: #6b7280; }
footer.site p { margin: 0; }

ol.rules, ul.tips { padding-left: 22px; }
ol.rules li, ul.tips li { margin-bottom: 4px; }
textarea { width: 100%; min-height: 170px; font-size: 1.05rem; padding: 12px 14px; border: 2px solid #cbd5e1; border-radius: 10px; background: #fff; font-family: inherit; line-height: 1.6; }
textarea:focus { outline: none; border-color: #0e7490; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
@media (min-width: 640px) { .stats { grid-template-columns: 1fr 1fr 1fr; } }
.stat { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px 16px; }
.stat .num { font-size: 1.5rem; font-weight: 700; color: #0e7490; }
.stat .lbl { font-size: .9rem; color: #6b7280; }
.bank .codes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bank .new-prov { color: #6b7280; font-size: .92rem; margin: 0 0 10px; }
.prov-summary { columns: 2; column-gap: 24px; margin-top: 12px; font-size: .95rem; }
@media (min-width: 640px) { .prov-summary { columns: 3; } }
.prov-summary div { break-inside: avoid; margin-bottom: 4px; }
