:root { font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #17283c; background: #f4f7fb; }
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.52; }
a { color: #1766b1; text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(1160px, calc(100% - 36px)); margin: auto; }
.masthead { background: #112a46; color: #fff; padding: 16px 0; }
.topbar, nav, .brand, .page-title, .section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { justify-content: flex-start; gap: 10px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; }
.brand small { color: #adc0d5; font-size: 11px; }
.mark { background: #1c81b7; padding: 4px 10px; font-size: 22px; border-radius: 9px; }
nav { flex-wrap: wrap; }
nav a, .linkbutton { color: #e8f1fb; }
main { padding: 28px 0 42px; }
h1 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.5px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 12px; }
p { margin: 6px 0 16px; }
.muted, .hint { color: #64758a; }
.hint { display: block; margin-top: 4px; font-size: 12px; }
.card, .stat { background: #fff; border: 1px solid #e1e7ef; border-radius: 13px; box-shadow: 0 2px 12px #233c5c09; }
.card { padding: 22px; margin-bottom: 22px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.stat { padding: 16px 20px; }
.stat small { display: block; color: #64758a; margin-bottom: 5px; }
.stat strong { font-size: 23px; }
.stat strong.status { font-size: 17px; }
.pill { border-radius: 50px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.pill.active { background: #e7f8ef; color: #1c774b; }
.pill.inactive { background: #edf0f5; color: #68798e; }
.status.success { color: #167e53; }
.status.failed { color: #c54b4b; }
.status.partial { color: #b47a17; }
.status.running { color: #2c6eaa; }
.button, button { font: inherit; cursor: pointer; }
.button { display: inline-block; border: 0; border-radius: 8px; padding: 9px 15px; font-weight: 600; }
.button.primary { background: #1764a4; color: #fff; }
.button.primary:hover { background: #0d4e85; text-decoration: none; }
.linkbutton { background: none; padding: 0; border: 0; }
.linkbutton.destructive { color: #b64d4d; margin-left: 10px; }
.inline { display: inline; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
th { font-size: 12px; color: #66778b; text-transform: uppercase; font-weight: 600; background: #f8fafc; }
th, td { padding: 12px 11px; border-bottom: 1px solid #e9edf3; vertical-align: top; }
tr:last-child td { border-bottom: none; }
.formcard { max-width: 760px; }
label { display: block; margin: 13px 0; font-weight: 600; }
input:not([type=checkbox]), textarea { display: block; font: inherit; border: 1px solid #c9d3df; background: #fff; border-radius: 7px; width: 100%; padding: 9px 10px; margin-top: 5px; color: #17283c; }
input:focus, textarea:focus { outline: 2px solid #78a8d0; outline-offset: 1px; }
.twocol { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; }
.check input { margin-top: 4px; }
.login-card { max-width: 410px; margin: 55px auto; }
.flash { border-radius: 7px; padding: 10px 14px; margin-bottom: 18px; background: #e5f6ed; color: #225f40; }
.flash.error { background: #fdeae9; color: #8b3838; }
.error-text { font: 12px/1.35 ui-monospace, monospace; white-space: pre-wrap; max-width: 350px; margin: 0; }
.footer { padding: 10px 0 32px; color: #728197; font-size: 12px; }
@media(max-width: 850px) { .topbar, .section-title, .page-title { align-items: flex-start; flex-direction: column; } .stats { grid-template-columns: repeat(2, 1fr); } .twocol { grid-template-columns: 1fr; } }
@media(max-width: 480px) { .stats { grid-template-columns: 1fr 1fr; } nav { gap: 11px; } .card { padding: 14px; } }

/* Maccabi URL importer, no JavaScript required. */
.importer { padding: 16px; margin: 0 0 20px; background: #f3f7ff; border: 1px solid #dbe7f5; border-radius: 10px; }
.importer h2 { font-size: 1.12rem; margin: 0 0 8px; }
.importer .button { margin: 8px 0; }
.importer .hint { display: block; margin-top: 6px; }

/* v1.2: schedule selectors and per-search run details. */
select { display: block; font: inherit; border: 1px solid #c9d3df; background: white; border-radius: 7px; width: 100%; padding: 9px 10px; margin-top: 5px; color: #17283c; }
select:focus { outline: 2px solid #78a8d0; outline-offset: 1px; }
summary { cursor: pointer; color: #1766b1; font-weight: 600; white-space: nowrap; }
.nested-results { margin-top: 12px; min-width: 480px; }
.search-detail { margin: 10px 0; border: 1px solid #e6edf5; border-radius: 9px; padding: 12px; background: #f9fbfd; }
.search-detail small { display: inline-block; }
.search-metrics { margin: 7px 0; }
.city-table { margin-top: 8px; font-size: 12px; }
.error-text { overflow-wrap: anywhere; white-space: pre-wrap; }
.status.expired { color: #718096; }
