:root{
    --bg:#f5f7fb;
    --bg-soft:#eef3f9;
    --panel:#ffffff;
    --panel-soft:#f8fbff;
    --border:#d9e3f0;
    --border-strong:#c7d6e8;
    --text:#152235;
    --text-soft:#4f627a;
    --muted:#6d8098;
    --primary:#1d4ed8;
    --primary-soft:#e8f0ff;
    --primary-strong:#163ea8;
    --success:#15803d;
    --success-soft:#eaf8ef;
    --danger:#dc2626;
    --warning:#b45309;
    --shadow:0 18px 50px rgba(25, 46, 82, .08);
    --shadow-soft:0 10px 24px rgba(25, 46, 82, .05);
    --radius:20px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
    margin:0;
    font-family:Inter,Segoe UI,Arial,sans-serif;
    background:linear-gradient(180deg,#f9fbfe 0%,#f3f7fc 100%);
    color:var(--text);
}
a{color:var(--primary);text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3,h4,p{margin-top:0}
.muted{color:var(--muted)}
.app-shell{display:grid;grid-template-columns:280px 1fr;min-height:100vh}
.sidebar{
    padding:28px 22px;
    border-right:1px solid var(--border);
    background:rgba(255,255,255,.88);
    backdrop-filter:blur(14px);
    position:sticky;
    top:0;
    height:100vh;
}
.brand{display:flex;align-items:center;gap:12px;margin-bottom:26px}
.brand__mark{
    width:46px;height:46px;border-radius:15px;
    background:linear-gradient(135deg,#1d4ed8,#60a5fa);
    display:grid;place-items:center;font-weight:800;color:#fff;
    box-shadow:0 12px 28px rgba(29,78,216,.25)
}
.brand small{display:block;margin-top:3px;color:var(--muted)}
.sidebar__nav{display:grid;gap:8px}
.sidebar__nav a{
    display:flex;align-items:center;gap:10px;
    padding:13px 14px;border-radius:14px;color:var(--text);
    font-weight:600;border:1px solid transparent;transition:.2s ease
}
.sidebar__nav a:hover{background:var(--panel-soft);border-color:var(--border);text-decoration:none;transform:translateX(2px)}
.main-shell{padding:28px}
.topbar{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:24px}
.topbar h1{margin-bottom:7px;font-size:2rem;letter-spacing:-.03em}
.topbar__actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.content{display:grid;gap:22px}
.panel{
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:22px;
    box-shadow:var(--shadow-soft);
}
.panel--flat{box-shadow:none;background:transparent;padding:0;border:none}
.panel__header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
.panel__header h3{margin:0;font-size:1.1rem}
.stats-grid,.plan-grid,.feature-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.feature-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.stat-card,.metric-card{
    padding:20px;border-radius:18px;background:var(--panel);
    border:1px solid var(--border);box-shadow:var(--shadow-soft)
}
.stat-card span,.metric-card span{display:block;color:var(--muted);margin-bottom:10px;font-weight:600}
.stat-card strong,.metric-card strong{display:block;font-size:1.9rem;letter-spacing:-.03em;margin-bottom:8px}
.content-grid{display:grid;grid-template-columns:2fr 1fr;gap:22px}
.cards-list{display:grid;gap:16px}
.notice-card{
    border:1px solid var(--border);
    border-radius:20px;
    padding:20px;
    background:linear-gradient(180deg,#fff,#fbfdff);
    box-shadow:var(--shadow-soft)
}
.notice-card:hover{border-color:var(--border-strong);box-shadow:var(--shadow)}
.notice-card__header,.notice-card__footer,.meta-row{display:flex;justify-content:space-between;gap:12px;align-items:center}
.notice-card__header{margin-bottom:12px;flex-wrap:wrap}
.notice-card__title{font-size:1.1rem;line-height:1.5;margin-bottom:12px}
.notice-card__title--clamp{
    display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden
}
.notice-card__summary{color:var(--text-soft);font-size:.97rem;line-height:1.6;margin-bottom:16px}
.notice-card__body{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0 18px}
.info-tile{
    background:var(--panel-soft);
    border:1px solid var(--border);
    border-radius:16px;
    padding:14px 15px;
    min-height:78px;
}
.info-tile span{display:block;color:var(--muted);font-size:.84rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;margin-bottom:8px}
.info-tile strong,.info-tile div{font-size:.97rem;line-height:1.45;word-break:break-word}
.badge,.pill,.chip{
    display:inline-flex;align-items:center;padding:8px 11px;border-radius:999px;
    background:var(--primary-soft);color:var(--primary);font-size:.88rem;border:1px solid #cfe0ff;font-weight:700
}
.badge--neutral{background:#f3f6fb;color:var(--text-soft);border-color:var(--border)}
.badge--success{background:var(--success-soft);border-color:#c9ecd4;color:var(--success)}
.chips{display:flex;gap:8px;flex-wrap:wrap}
.countdown{display:grid;gap:4px}
.countdown strong{font-size:1.02rem}
.button{
    appearance:none;border:none;border-radius:14px;padding:12px 16px;
    background:var(--primary);color:white;font-weight:700;cursor:pointer;transition:.2s ease;
    box-shadow:0 10px 24px rgba(29,78,216,.18)
}
.button:hover{filter:brightness(1.03);text-decoration:none;transform:translateY(-1px)}
.button:disabled{opacity:.7;cursor:not-allowed;transform:none}
.button--ghost{background:#fff;border:1px solid var(--border);color:var(--text);box-shadow:none}
.button--ghost:hover{background:var(--panel-soft)}
.button--success{background:linear-gradient(135deg,#16a34a 0%,#15803d 100%);border:1px solid #15803d;color:#fff;box-shadow:0 12px 26px rgba(21,128,61,.22)}
.button--sm{padding:10px 14px;border-radius:12px;font-size:.95rem}
.field{display:grid;gap:8px}
.field span{font-weight:700;color:var(--text-soft)}
.field input,.field select,.field textarea{
    background:#fff;border:1px solid var(--border);border-radius:14px;padding:13px 14px;color:var(--text);width:100%;
    outline:none;transition:.18s ease;box-shadow:inset 0 1px 2px rgba(16,24,40,.02)
}
.field input:focus,.field select:focus,.field textarea:focus{border-color:#8ab2ff;box-shadow:0 0 0 4px rgba(29,78,216,.1)}
.field select[multiple]{min-height:220px;padding:10px 8px;overflow:auto}
.field select[multiple] option{padding:10px 12px;border-radius:10px}
.field__hint{font-size:.84rem;color:var(--muted);line-height:1.5;margin-top:2px}
.field--check{display:flex;align-items:center;gap:10px;padding-top:30px}
.field--check input{width:18px;height:18px;accent-color:var(--primary)}
.stack{display:grid;gap:16px}
.filters-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.filters-grid__actions{display:flex;align-items:end;gap:12px;flex-wrap:wrap}
.flash-stack{display:grid;gap:10px;margin-bottom:16px}
.flash{padding:13px 15px;border-radius:14px;border:1px solid transparent;font-weight:600}
.flash--success{background:rgba(21,128,61,.08);border-color:rgba(21,128,61,.22);color:#0f5a2b}
.flash--error{background:rgba(220,38,38,.08);border-color:rgba(220,38,38,.22);color:#991b1b}
.flash--warning{background:rgba(180,83,9,.08);border-color:rgba(180,83,9,.22);color:#8a4b0f}
.hero{display:grid;gap:22px}
.hero__text{max-width:60ch;color:var(--text-soft);font-size:1.05rem;line-height:1.7}
.hero__actions{display:flex;gap:12px;flex-wrap:wrap}
.guest-shell{display:grid;place-items:center;min-height:100vh;padding:24px;background:linear-gradient(180deg,#f7faff,#eef4fb)}
.guest-shell__main{width:min(1180px,100%)}
.guest-shell__card{
    padding:34px;border-radius:28px;background:rgba(255,255,255,.95);border:1px solid var(--border);box-shadow:var(--shadow)
}
.steps{display:grid;gap:12px;padding-left:18px;color:var(--text-soft);line-height:1.6}
.table-wrap{overflow:auto}
.table{width:100%;border-collapse:collapse;background:#fff;border-radius:18px;overflow:hidden}
.table th,.table td{padding:14px 12px;border-bottom:1px solid #edf2f9;text-align:left;vertical-align:middle}
.table th{font-size:.9rem;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);background:#f8fbff}
.subscription-box{padding:18px;border-radius:16px;background:var(--panel-soft);border:1px solid var(--border)}
.plan-card .price{font-size:2rem;font-weight:800;margin:14px 0;letter-spacing:-.03em}
.plan-card .price small{font-size:1rem;color:var(--muted)}
.topbar-card{
    background:linear-gradient(135deg,#ffffff,#f6faff);
    border:1px solid var(--border);
    border-radius:24px;
    padding:24px;
    box-shadow:var(--shadow-soft)
}
.topbar-card__row{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}
.topbar-card__text{max-width:760px}
.topbar-card__text p{color:var(--text-soft);line-height:1.7;margin:0}
.topbar-card__chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.search-shell{display:grid;gap:14px}
.search-hero{
    display:grid;grid-template-columns:1.7fr .8fr;gap:20px;align-items:stretch
}
.search-hero__main,.search-hero__aside{
    background:linear-gradient(180deg,#fff,#f8fbff);
    border:1px solid var(--border);
    border-radius:24px;
    padding:24px;
    box-shadow:var(--shadow-soft)
}
.search-hero__main h2{font-size:1.7rem;letter-spacing:-.03em;margin-bottom:12px}
.search-hero__main p{margin-bottom:0;color:var(--text-soft);line-height:1.7}
.search-hero__stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:18px}
.search-mini-stat{padding:14px;border-radius:18px;background:#fff;border:1px solid var(--border)}
.search-mini-stat span{display:block;color:var(--muted);font-size:.86rem;font-weight:700;margin-bottom:6px}
.search-mini-stat strong{font-size:1.15rem}
.search-tip-list{display:grid;gap:12px;margin:0;padding:0;list-style:none}
.search-tip-list li{padding:12px 0;border-bottom:1px dashed var(--border);color:var(--text-soft);line-height:1.55}
.search-tip-list li:last-child{border-bottom:none;padding-bottom:0}
.search-filter-card{padding:24px;border-radius:24px}
.search-form-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.search-form-grid .field--wide{grid-column:span 2}
.search-form-grid .field--actions{grid-column:1 / -1;display:flex;justify-content:space-between;gap:16px;align-items:center;flex-wrap:wrap}
.search-helper{display:flex;gap:10px;flex-wrap:wrap}
.search-results-head{display:flex;justify-content:space-between;gap:14px;align-items:center;flex-wrap:wrap}
.search-results-head h3{margin:0}
.result-count{display:flex;gap:8px;align-items:center;color:var(--text-soft);font-weight:700}
.notice-card__topline{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap}
.notice-card__meta{display:flex;gap:8px;flex-wrap:wrap}
.notice-card__footer{padding-top:8px;border-top:1px solid #edf2f9;flex-wrap:wrap}
.notice-card__actions{display:flex;gap:10px;flex-wrap:wrap}
.notice-status{display:inline-flex;align-items:center;gap:8px;color:var(--text-soft);font-weight:700}
.notice-status::before{content:"";width:8px;height:8px;border-radius:50%;background:#22c55e;display:inline-block}
.notice-status--expired::before{background:#ef4444}
.notice-empty{padding:26px;border-radius:22px;border:1px dashed var(--border-strong);background:#fbfdff;text-align:center}
.notice-empty h4{margin-bottom:8px}
.notice-object-preview{padding:14px 16px;border-radius:16px;background:#fbfdff;border:1px solid var(--border);color:var(--text-soft);line-height:1.65}
.inline-form{display:inline-block}
.auth-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:24px;align-items:stretch}
.auth-showcase{
    padding:30px;border-radius:26px;background:linear-gradient(135deg,#edf4ff,#f8fbff);border:1px solid var(--border)
}
.auth-showcase h1{font-size:2rem;letter-spacing:-.04em;margin-bottom:12px}
.auth-showcase p{color:var(--text-soft);line-height:1.7}
.auth-showcase ul{display:grid;gap:12px;padding-left:18px;color:var(--text-soft)}
.auth-card{padding:30px;border-radius:26px;background:#fff;border:1px solid var(--border);box-shadow:var(--shadow-soft)}
.page-section-title{margin-bottom:12px}
.page-section-title p{margin:0;color:var(--text-soft)}
.link-line{display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap}

.modality-picker{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
    padding:14px;
    border:1px solid var(--border);
    border-radius:16px;
    background:#fff;
    max-height:260px;
    overflow:auto;
}
.modality-check{
    display:flex;
    align-items:flex-start;
    gap:10px;
    min-height:48px;
    padding:10px 12px;
    border:1px solid #e7edf7;
    border-radius:14px;
    background:#fbfdff;
    cursor:pointer;
    transition:.18s ease;
}
.modality-check:hover{
    border-color:#c8d8f8;
    background:#f6faff;
}
.modality-check input{
    margin-top:2px;
    width:18px;
    height:18px;
    accent-color:var(--primary);
    flex:0 0 auto;
}
.modality-check span{
    font-weight:600;
    color:var(--text);
    line-height:1.4;
}
.modality-check:has(input:checked),
.modality-check.is-selected{
    border-color:#a9c4ff;
    background:#eef4ff;
    box-shadow:inset 0 0 0 1px rgba(29,78,216,.08);
}
@media (max-width:860px){
    .modality-picker{grid-template-columns:1fr;max-height:none}
}

@media (max-width:1250px){
    .search-form-grid,.filters-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
    .search-hero{grid-template-columns:1fr}
}
@media (max-width:1100px){
    .app-shell{grid-template-columns:1fr}
    .sidebar{position:static;height:auto;border-right:none;border-bottom:1px solid var(--border)}
    .stats-grid,.plan-grid,.feature-grid,.content-grid,.notice-card__body,.search-hero__stats,.auth-grid{grid-template-columns:1fr}
}
@media (max-width:860px){
    .main-shell{padding:18px}
    .search-form-grid,.filters-grid{grid-template-columns:1fr}
    .search-form-grid .field--wide,.search-form-grid .field--actions{grid-column:auto}
    .notice-card__body{grid-template-columns:1fr}
    .topbar-card__row,.topbar,.search-results-head{flex-direction:column;align-items:flex-start}
}

.search-form-pro{gap:18px}
.field--actions--between{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
.table-tag-list{display:flex;gap:8px;flex-wrap:wrap}

.geo-selector{
    display:grid;
    gap:18px;
    padding:22px;
    border-radius:24px;
    background:linear-gradient(180deg,#fbfdff,#f6faff);
    border:1px solid #d8e6f7;
}
.geo-selector__header{
    display:flex;
    justify-content:space-between;
    gap:18px;
    align-items:flex-start;
    flex-wrap:wrap;
}
.geo-selector__header h4{margin:4px 0 6px;font-size:1.12rem;letter-spacing:-.03em}
.geo-summary{display:flex;gap:8px;flex-wrap:wrap}
.state-chip-grid{
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:12px;
}
.state-chip{
    position:relative;
    display:grid;
    gap:4px;
    padding:14px 14px 12px;
    border-radius:18px;
    border:1px solid var(--border);
    background:#fff;
    cursor:pointer;
    transition:.18s ease;
    box-shadow:var(--shadow-xs);
}
.state-chip:hover{transform:translateY(-1px);border-color:#bfd4f3}
.state-chip input{position:absolute;inset:0;opacity:0;cursor:pointer}
.state-chip span{font-size:1rem;font-weight:900;letter-spacing:-.03em;color:var(--text)}
.state-chip small{color:var(--muted);line-height:1.35}
.state-chip.is-selected{border-color:#9dc1ff;background:linear-gradient(180deg,#ffffff,#f2f7ff);box-shadow:0 18px 28px rgba(29,78,216,.08)}
.geo-empty{
    padding:18px 20px;
    border-radius:18px;
    border:1px dashed #c7d6ea;
    background:#fff;
    color:var(--muted);
}
.geo-state-panels{display:grid;gap:16px}
.geo-state-card{
    border:1px solid #d7e5f5;
    border-radius:22px;
    background:#fff;
    padding:20px;
    box-shadow:var(--shadow-xs);
}
.geo-state-card--loading,
.geo-state-card--error{background:linear-gradient(180deg,#ffffff,#f8fbff)}
.geo-state-card__loading,
.geo-state-card__error{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap}
.geo-state-card__header,
.geo-state-card__actions,
.geo-region-card__toolbar,
.geo-state-card__title-row,
.geo-region-card__head{
    display:flex;
    justify-content:space-between;
    gap:12px;
    align-items:flex-start;
    flex-wrap:wrap;
}
.geo-state-card__title-row h4{margin:0;font-size:1.1rem;letter-spacing:-.03em}
.geo-state-card__meta,
.geo-region-card__toolbar-actions{display:flex;gap:8px;flex-wrap:wrap}
.geo-state-card__actions{margin-top:14px}
.geo-region-grid{display:grid;gap:14px;margin-top:16px}
.geo-region-card{
    border:1px solid var(--border);
    border-radius:20px;
    background:linear-gradient(180deg,#ffffff,#fbfdff);
    padding:16px;
}
.geo-region-card.is-muted{opacity:.8;background:#fafcff}
.geo-region-card__head{cursor:pointer}
.geo-region-card__checkbox input{width:18px;height:18px;accent-color:var(--primary);margin-top:3px}
.geo-region-card__title{display:grid;gap:4px;flex:1}
.geo-region-card__title strong{font-size:1rem;letter-spacing:-.02em}
.geo-region-card__title small{color:var(--muted)}
.geo-region-card__body{display:grid;gap:14px;margin-top:16px;padding-top:14px;border-top:1px solid #edf3fb}
.geo-city-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.geo-city-chip{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:10px;
    min-height:48px;
    padding:12px 14px;
    border-radius:16px;
    border:1px solid var(--border);
    background:#fff;
    cursor:pointer;
    transition:.15s ease;
}
.geo-city-chip:hover{border-color:#b9cdf2}
.geo-city-chip input{position:absolute;inset:0;opacity:0;cursor:pointer}
.geo-city-chip span{font-size:.92rem;line-height:1.35;color:var(--text-soft)}
.geo-city-chip.is-selected{background:linear-gradient(180deg,#f7fbff,#eef5ff);border-color:#b6cff7}
.geo-city-chip.is-selected span{color:var(--primary);font-weight:700}

@media (max-width: 1200px){
    .state-chip-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
    .geo-city-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width: 900px){
    .state-chip-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
    .geo-city-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 680px){
    .state-chip-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .geo-city-grid{grid-template-columns:1fr}
    .geo-selector{padding:18px}
}

/* v7 geo selector refinements */
.geo-selector{gap:16px;padding:20px}
.geo-state-panels{gap:14px}
.geo-state-card{padding:18px;border-radius:20px}
.geo-state-card__actions{margin-top:12px}
.geo-state-card__actions .button{padding:8px 12px}
.geo-region-grid{gap:10px;margin-top:14px}
.geo-region-card{padding:12px 14px;border-radius:18px}
.geo-region-card__title strong{font-size:.97rem}
.geo-region-card__title small{font-size:.82rem}
.geo-region-card__body{gap:10px;margin-top:12px;padding-top:12px}
.geo-region-search,
.geo-state-search__row input{
    width:100%;
    min-height:42px;
    border:1px solid var(--border);
    border-radius:14px;
    background:#fff;
    padding:10px 14px;
    font-size:.95rem;
    color:var(--text);
}
.geo-state-search{
    display:grid;
    gap:10px;
    margin-top:12px;
    padding:12px 14px;
    border:1px solid #e5eef9;
    border-radius:18px;
    background:#fbfdff;
}
.geo-state-search__row{display:grid;gap:8px}
.geo-global-results{display:grid;gap:8px}
.geo-global-list{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:8px;
}
.geo-global-item{
    position:relative;
    display:grid;
    gap:2px;
    padding:10px 12px;
    border:1px solid var(--border);
    border-radius:14px;
    background:#fff;
    cursor:pointer;
    transition:.15s ease;
}
.geo-global-item:hover{border-color:#b9cdf2}
.geo-global-item input{position:absolute;inset:0;opacity:0;cursor:pointer}
.geo-global-item__city{font-size:.9rem;font-weight:700;color:var(--text)}
.geo-global-item small{font-size:.76rem;color:var(--muted);line-height:1.3}
.geo-global-item.is-selected{background:linear-gradient(180deg,#f7fbff,#eef5ff);border-color:#b6cff7}
.geo-global-item.is-selected .geo-global-item__city{color:var(--primary)}
.geo-note{font-size:.84rem;color:var(--muted)}
.geo-city-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.geo-city-chip{min-height:40px;padding:9px 12px;border-radius:14px}
.geo-city-chip span{font-size:.84rem;line-height:1.25}
.geo-city-chip[hidden]{display:none !important}
.geo-region-filter-empty{margin-top:-2px}

@media (max-width: 1200px){
    .geo-global-list{grid-template-columns:repeat(3,minmax(0,1fr))}
    .geo-city-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media (max-width: 900px){
    .geo-global-list{grid-template-columns:repeat(2,minmax(0,1fr))}
    .geo-city-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width: 680px){
    .geo-global-list{grid-template-columns:1fr}
    .geo-city-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

.search-hero--simple{grid-template-columns:1fr;padding:0}
.search-hero--simple .search-hero__main{max-width:none;width:100%;padding:22px 28px}


.search-form-grid .field--full{grid-column:1 / -1}
.search-form-grid .field--wide{grid-column:span 2}
.modality-picker{
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
    padding:12px;
    max-height:190px;
}
.modality-check{
    min-height:0;
    align-items:center;
    padding:10px 12px;
}
.modality-check span{
    display:block;
    font-weight:600;
    line-height:1.3;
}
@media (max-width: 1200px){
    .modality-picker{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media (max-width: 900px){
    .search-form-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
    .search-form-grid .field--wide,.search-form-grid .field--full{grid-column:1 / -1}
    .modality-picker{grid-template-columns:repeat(2,minmax(0,1fr));max-height:none}
}
@media (max-width: 640px){
    .search-form-grid{grid-template-columns:1fr}
    .search-form-grid .field--wide,.search-form-grid .field--full{grid-column:1 / -1}
    .modality-picker{grid-template-columns:1fr}
}


.search-hero--simple .search-hero__main h2{margin-bottom:10px}
.search-hero--simple .search-hero__main p{margin-bottom:0}

.search-filter-card--compact{padding:20px}
.search-form-pro--compact{gap:14px}
.search-form-grid--compact{gap:14px}
.field--check-inline{padding-top:34px}

.geo-compact{
    display:grid;
    gap:14px;
    padding:18px;
    border-radius:22px;
    border:1px solid var(--border);
    background:linear-gradient(180deg,#fbfdff,#f7faff);
}
.geo-compact__header{
    display:flex;
    justify-content:space-between;
    gap:12px;
    align-items:flex-start;
    flex-wrap:wrap;
}
.geo-compact__header h4{margin:0 0 4px;font-size:1.05rem}
.geo-compact__header p{margin:0}
.geo-mode-switch{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}
.geo-mode-pill{
    position:relative;
    display:inline-flex;
    align-items:center;
    gap:10px;
    padding:11px 14px;
    border:1px solid var(--border);
    border-radius:14px;
    background:#fff;
    cursor:pointer;
    font-weight:700;
}
.geo-mode-pill input{position:absolute;inset:0;opacity:0;cursor:pointer}
.geo-mode-pill.is-active{border-color:#a9c4ff;background:#eef4ff;color:var(--primary)}
.geo-lists-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
}
.geo-list-card{
    border:1px solid var(--border);
    border-radius:18px;
    background:#fff;
    padding:12px;
    display:grid;
    gap:10px;
    min-height:320px;
}
.geo-list-card__head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}
.geo-filter-input{
    max-width:170px;
    min-height:38px;
    padding:8px 10px;
    border:1px solid var(--border);
    border-radius:12px;
}
.compact-check-list{
    display:grid;
    gap:8px;
    overflow:auto;
    padding-right:4px;
}
.compact-check-list--state,.compact-check-list--region,.compact-check-list--city{max-height:250px}
.compact-check-list--modalities{grid-template-columns:repeat(4,minmax(0,1fr));max-height:180px}
.compact-check-list--radius{max-height:180px}
.compact-check-item{
    position:relative;
    display:flex;
    align-items:flex-start;
    gap:10px;
    padding:9px 11px;
    border:1px solid var(--border);
    border-radius:12px;
    background:#fbfdff;
    cursor:pointer;
}
.compact-check-item input{margin-top:2px;accent-color:var(--primary)}
.compact-check-item span{font-size:.9rem;line-height:1.35;color:var(--text)}
.compact-check-item.is-selected{border-color:#a9c4ff;background:#eef4ff}
.compact-check-item.is-hidden{display:none}
.compact-check-item.is-empty{cursor:default;background:#fff}
.geo-radius-grid{
    display:grid;
    grid-template-columns:1fr 1.6fr .7fr;
    gap:12px;
}
.geo-radius-picked{margin-top:-4px}

@media (max-width:1100px){
  .geo-lists-grid{grid-template-columns:1fr}
}
@media (max-width:900px){
  .compact-check-list--modalities{grid-template-columns:repeat(2,minmax(0,1fr))}
  .geo-radius-grid{grid-template-columns:1fr}
}
@media (max-width:640px){
  .compact-check-list--modalities{grid-template-columns:1fr}
}


.multi-select-list{
    width:100%;
    min-height:240px;
    padding:8px;
    border:1px solid var(--border);
    border-radius:14px;
    background:#fff;
    color:var(--text);
    outline:none;
    overflow:auto;
}
.multi-select-list:focus{border-color:#8ab2ff;box-shadow:0 0 0 4px rgba(29,78,216,.1)}
.multi-select-list option{
    padding:9px 10px;
    border-radius:10px;
    margin:2px 0;
    white-space:normal;
}
.multi-select-list--compact{min-height:180px}
.geo-lists-grid--selects{grid-template-columns:repeat(3,minmax(0,1fr));align-items:start}
.geo-list-card__head--stack{display:grid;gap:8px;align-items:stretch}
.geo-list-card__head--stack strong{display:block}
.geo-list-card__head--stack .geo-filter-input{max-width:none;width:100%}
.js-geo-region-select:disabled,.js-geo-city-select:disabled{background:#f8fafc;color:var(--muted)}
@media (max-width:1100px){.geo-lists-grid--selects{grid-template-columns:1fr}}

/* v15 checklist lists */
.choice-toolbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    flex-wrap:wrap;
}
.choice-toolbar--top{
    margin-bottom:8px;
}
.choice-toolbar__action{
    appearance:none;
    border:1px solid var(--border);
    background:#fff;
    color:var(--text-soft);
    border-radius:12px;
    padding:8px 12px;
    font-weight:700;
    cursor:pointer;
}
.choice-toolbar__action:hover{
    background:#f7faff;
    border-color:#bfd4f3;
}
.choice-panel{
    display:grid;
    gap:10px;
}
.choice-list{
    display:grid;
    gap:8px;
}
.choice-list--scroll{
    max-height:260px;
    overflow:auto;
    padding-right:4px;
}
.choice-list--grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
}
.choice-item{
    display:flex;
    align-items:flex-start;
    gap:10px;
    padding:10px 12px;
    border:1px solid var(--border);
    border-radius:14px;
    background:#fbfdff;
    cursor:pointer;
    transition:.18s ease;
}
.choice-item:hover{
    border-color:#bfd4f3;
    background:#f7fbff;
}
.choice-item input{
    width:18px;
    height:18px;
    accent-color:var(--primary);
    margin-top:2px;
    flex:0 0 auto;
}
.choice-item span{
    color:var(--text);
    font-weight:600;
    line-height:1.35;
}
.choice-item.is-selected{
    border-color:#a9c4ff;
    background:#eef4ff;
}
.choice-item.is-hidden{
    display:none;
}
.choice-empty{
    padding:12px 14px;
    border:1px dashed var(--border);
    border-radius:14px;
    background:#fff;
    color:var(--muted);
    font-size:.92rem;
}
.geo-lists-grid--checks{
    grid-template-columns:repeat(3,minmax(0,1fr));
    align-items:start;
}
.geo-list-card{
    min-height:0;
}
.geo-list-card .choice-list--scroll{
    min-height:220px;
}
.field--wide .choice-list--scroll.choice-list--grid{
    max-width:720px;
}
.js-radius-city-results .choice-item input[type="radio"]{
    accent-color:var(--primary);
}

@media (max-width:1100px){
    .geo-lists-grid--checks{grid-template-columns:1fr;}
}
@media (max-width:900px){
    .choice-list--grid{grid-template-columns:1fr;}
    .field--wide .choice-list--scroll.choice-list--grid{max-width:none;}
}


/* v16 layout adjustments */
.modality-field{
    grid-column:1 / -1;
}
.modality-field .choice-list--scroll.choice-list--grid{
    max-width:none;
    max-height:156px;
    grid-template-columns:repeat(4,minmax(0,1fr));
}
.geo-lists-grid--checks{
    grid-template-columns:repeat(3,minmax(0,1fr));
    align-items:stretch;
}
.geo-list-card{
    display:grid;
    grid-template-rows:auto auto 1fr;
    gap:10px;
    min-height:358px;
}
.geo-list-card .choice-list--scroll{
    min-height:0;
    height:240px;
}
.geo-list-card .geo-filter-input{
    margin:0;
}
@media (max-width:1200px){
    .modality-field .choice-list--scroll.choice-list--grid{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media (max-width:900px){
    .modality-field .choice-list--scroll.choice-list--grid{grid-template-columns:repeat(2,minmax(0,1fr)); max-height:none;}
}
@media (max-width:640px){
    .modality-field .choice-list--scroll.choice-list--grid{grid-template-columns:1fr;}
}

.search-layout{
    display:grid;
    gap:18px;
}

.section-kicker{
    font-size:.9rem;
    color:var(--muted);
    font-weight:700;
    margin-bottom:4px;
}

.territory-block{
    display:grid;
    gap:14px;
    padding:18px;
    border:1px solid var(--border);
    border-radius:20px;
    background:linear-gradient(180deg,#fff,#fbfdff);
}

.territory-block__header{
    display:flex;
    justify-content:space-between;
    gap:16px;
    align-items:flex-start;
    flex-wrap:wrap;
}

.territory-block__label{
    display:block;
    font-weight:800;
    color:var(--text);
    margin-bottom:4px;
}

.territory-block__hint{
    margin:0;
    color:var(--muted);
}

.geo-mode-switch{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

.geo-mode-pill{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:44px;
    padding:0 16px;
    border-radius:14px;
    border:1px solid var(--border);
    background:#fff;
    cursor:pointer;
    font-weight:700;
    color:var(--text);
}

.geo-mode-pill input{
    position:absolute;
    opacity:0;
    pointer-events:none;
}

.geo-mode-pill.is-active{
    border-color:#9dbdff;
    background:var(--primary-soft);
    color:var(--primary);
}

.geo-compact__explain{
    margin-top:-2px;
}

.geo-collapsible-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
}

.geo-dropdown{
    position:relative;
}

.geo-dropdown__toggle{
    width:100%;
    text-align:left;
    border:1px solid var(--border);
    background:#fff;
    border-radius:16px;
    padding:14px 16px;
    cursor:pointer;
    box-shadow:var(--shadow-xs);
}

.geo-dropdown__toggle span{
    display:block;
    font-weight:800;
    color:var(--text);
    margin-bottom:4px;
}

.geo-dropdown__toggle small{
    display:block;
    color:var(--muted);
    line-height:1.45;
}

.geo-dropdown__panel{
    position:absolute;
    z-index:30;
    top:calc(100% + 8px);
    left:0;
    right:0;
    background:#fff;
    border:1px solid var(--border);
    border-radius:18px;
    box-shadow:var(--shadow);
    padding:14px;
}

.geo-dropdown.is-open .geo-dropdown__toggle{
    border-color:#a9c4ff;
    box-shadow:0 0 0 4px rgba(29,78,216,.08);
}

.geo-dropdown__toolbar{
    display:grid;
    grid-template-columns:1fr auto;
    gap:10px;
    margin-bottom:12px;
}

.geo-dropdown__toolbar input{
    width:100%;
    min-height:42px;
    border:1px solid var(--border);
    border-radius:12px;
    padding:10px 12px;
}

.choice-list{
    display:grid;
    gap:8px;
    max-height:280px;
    overflow:auto;
    padding-right:2px;
}

.choice-item{
    display:flex;
    align-items:flex-start;
    gap:10px;
    padding:10px 12px;
    border:1px solid #e7edf7;
    border-radius:14px;
    background:#fbfdff;
    cursor:pointer;
}

.choice-item input{
    margin-top:2px;
    flex:0 0 auto;
}

.choice-item span{
    line-height:1.35;
    color:var(--text);
}

.choice-item.is-selected{
    border-color:#a9c4ff;
    background:#eef4ff;
}

.choice-item.is-hidden{
    display:none !important;
}

.choice-empty{
    padding:14px;
    border:1px dashed var(--border);
    border-radius:14px;
    color:var(--muted);
    background:#fafcff;
}

.geo-radius-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
}

.geo-radius-results{
    display:grid;
    gap:10px;
}

.geo-radius-picked{
    padding:12px 14px;
    border-radius:14px;
    background:#fbfdff;
    border:1px solid var(--border);
    color:var(--text-soft);
}

.status-mode-line{
    display:flex;
    align-items:end;
    gap:14px;
    flex-wrap:wrap;
}

.status-pill{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:46px;
    padding:0 16px;
    border-radius:14px;
    border:1px solid var(--border);
    background:#fff;
    cursor:pointer;
    font-weight:700;
    color:var(--text);
}

.status-pill input{
    position:absolute;
    opacity:0;
    pointer-events:none;
}

.status-pill.is-active{
    background:var(--primary-soft);
    border-color:#9dbdff;
    color:var(--primary);
}

.closed-period-inline{
    min-width:340px;
}

.closed-period-inline__fields{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
}

@media (max-width: 1100px){
    .geo-collapsible-grid,
    .geo-radius-grid{
        grid-template-columns:1fr;
    }
}

@media (max-width: 860px){
    .status-mode-line{
        align-items:stretch;
    }

    .closed-period-inline{
        width:100%;
        min-width:0;
    }

    .closed-period-inline__fields{
        grid-template-columns:1fr;
    }
}
/* v17 search adjustments */
.search-shell{
    gap:18px;
}

.geo-compact__explain{
    margin:2px 0 8px;
}

.geo-collapsible-grid{
    align-items:start;
}

.geo-dropdown{
    display:grid;
    gap:8px;
    align-content:start;
}

.geo-dropdown__toggle{
    position:relative;
    padding-right:42px;
}

.geo-dropdown__toggle::after{
    content:"▾";
    position:absolute;
    right:16px;
    top:50%;
    transform:translateY(-50%);
    color:var(--muted);
    font-size:1rem;
    line-height:1;
}

.geo-dropdown.is-open .geo-dropdown__toggle::after{
    transform:translateY(-50%) rotate(180deg);
}

.geo-dropdown__selected{
    min-height:18px;
    font-size:.78rem;
    line-height:1.45;
    color:var(--muted);
    padding:0 4px;
}

.geo-dropdown__panel{
    max-height:min(420px, 70vh);
    overflow:auto;
}

.geo-radius-results{
    gap:12px;
}

.geo-radius-picked{
    order:2;
    margin-top:0;
}

.js-radius-city-results{
    order:1;
}

.status-mode-line{
    align-items:flex-end;
}

.closed-period-inline[hidden]{
    display:none !important;
}

.closed-period-inline{
    min-width:430px;
}

.closed-period-inline > .field{
    margin:0;
}

.closed-period-inline > .field > span{
    display:block;
    margin-bottom:8px;
    font-weight:700;
    color:var(--text);
}

.closed-period-inline__fields input{
    min-height:46px;
}

@media (max-width:1100px){
    .closed-period-inline{
        width:100%;
        min-width:0;
    }
}

@media (max-width:860px){
    .geo-dropdown__panel{
        position:static;
        top:auto;
        left:auto;
        right:auto;
        margin-top:0;
    }
}


/* ===== Layout refinado ===== */
.main-shell{
    padding:18px 28px 28px;
}
.app-section-header{
    position:sticky;
    top:0;
    z-index:60;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:18px;
    margin-bottom:18px;
    padding:12px 18px;
    border:1px solid rgba(29,78,216,.16);
    border-radius:18px;
    background:linear-gradient(135deg,#1d4ed8 0%, #3b82f6 55%, #60a5fa 100%);
    box-shadow:0 12px 28px rgba(29,78,216,.18);
}
.app-section-header__text h1{
    margin:0 0 4px;
    color:#fff;
    font-size:1.5rem;
    letter-spacing:-.03em;
}
.app-section-header__text p{
    margin:0;
    color:rgba(255,255,255,.92);
    line-height:1.45;
    font-size:.95rem;
}
.app-section-header__actions{justify-content:flex-end}
.badge--header-user{
    background:rgba(255,255,255,.18);
    color:#fff;
    border-color:rgba(255,255,255,.24);
}
.button--header-logout{
    background:#fff;
    border-color:#fff;
}
.app-content-wrap{gap:18px}
.panel--soft{
    background:linear-gradient(180deg,#ffffff,#f8fbff);
    box-shadow:none;
}
.field--tight{gap:10px}
.search-layout-v2{display:grid;gap:16px}
.search-inline-row{
    display:grid;
    grid-template-columns:minmax(0,1.45fr) minmax(360px,.95fr);
    gap:14px;
    align-items:start;
}
.search-main-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(250px,.34fr);
    gap:14px;
    align-items:start;
}
.search-keywords-card,.search-status-card,.modality-compact-card{padding:16px 18px}
.search-keywords-card .field__hint,
.search-status-card .field__hint,
.modality-compact-card .field__hint{margin:0}
.keyword-builder{display:grid;gap:10px}
.keyword-builder__row{
    display:grid;
    grid-template-columns:minmax(0,1fr) 48px;
    gap:10px;
    align-items:center;
}
.button--icon{
    min-width:48px;
    width:48px;
    height:48px;
    padding:0;
    font-size:1.45rem;
    line-height:1;
}
.keyword-builder__chips{display:flex;gap:8px;flex-wrap:wrap;min-height:28px}
.keyword-builder__empty{color:var(--muted);font-size:.88rem}
.keyword-chip{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:8px 10px;
    border-radius:999px;
    background:#eef4ff;
    border:1px solid #cfe0ff;
    color:var(--primary);
    font-size:.88rem;
    font-weight:700;
}
.keyword-chip__remove{
    border:none;
    background:transparent;
    color:inherit;
    font-size:1rem;
    cursor:pointer;
    padding:0;
    line-height:1;
}
.status-mode-line--compact{
    display:grid;
    gap:10px;
}
.status-mode-line--compact .status-pill{
    min-height:48px;
    justify-content:center;
    text-align:center;
}
.closed-period-inline--compact{display:block}
.closed-period-inline--compact .field{
    display:grid;
    gap:8px;
}
.closed-period-inline--compact .field > span{
    text-align:center;
    font-size:.9rem;
}
.closed-period-inline__fields{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
}
.search-actions-row{padding-top:2px}
.search-modality-col{min-width:0}
.modality-compact-card .geo-dropdown__panel{max-height:none}
.choice-list--compact .choice-item,
.js-geo-state-list .choice-item,
.js-geo-region-list .choice-item,
.js-geo-city-list .choice-item{
    padding:8px 10px;
}
.choice-list--compact .choice-item span,
.js-geo-state-list .choice-item span,
.js-geo-region-list .choice-item span,
.js-geo-city-list .choice-item span{
    font-size:.9rem;
    line-height:1.3;
}
.modality-compact-card .geo-dropdown__toggle span{
    font-size:.96rem;
}
.modality-compact-card .geo-dropdown__selected,
.geo-dropdown__selected{
    font-size:.84rem;
    min-height:24px;
}
.geo-dropdown__toggle{padding:12px 14px}
.geo-dropdown__toggle small{font-size:.78rem}
.territory-block{padding:18px 18px 16px}
.geo-collapsible-grid{gap:12px}
.geo-dropdown__panel{margin-top:0}
.choice-list{max-height:280px;overflow:auto}
.page-loading-overlay{
    position:fixed;
    inset:0;
    background:rgba(15,23,42,.28);
    backdrop-filter:blur(2px);
    display:grid;
    place-items:center;
    opacity:0;
    pointer-events:none;
    transition:opacity .18s ease;
    z-index:200;
}
.page-loading-overlay.is-visible{opacity:1;pointer-events:auto}
.page-loading-overlay__dialog{
    width:min(360px, calc(100vw - 32px));
    padding:22px 20px;
    border-radius:22px;
    background:#fff;
    border:1px solid var(--border);
    box-shadow:var(--shadow);
    display:grid;
    justify-items:center;
    gap:10px;
    text-align:center;
}
.page-loading-overlay__dialog strong{font-size:1.05rem}
.page-loading-overlay__dialog span{color:var(--muted);font-size:.92rem}
.page-loading-overlay__spinner{
    width:34px;
    height:34px;
    border-radius:50%;
    border:3px solid #dbe7ff;
    border-top-color:var(--primary);
    animation:spin .8s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

@media (max-width:1180px){
    .search-inline-row,
    .search-main-row{grid-template-columns:1fr}
}
@media (max-width:860px){
    .main-shell{padding:14px}
    .app-section-header{position:sticky;padding:12px 14px;flex-direction:column;align-items:flex-start}
    .closed-period-inline__fields{grid-template-columns:1fr}
}

/* ===== v28 layout + compact search refinements ===== */
.app-shell--modern{
    grid-template-columns:220px 1fr;
    background:#f5f7fb;
}
.sidebar--modern{
    padding:0;
    border-right:1px solid #e5ebf3;
    background:#fff;
    box-shadow:none;
}
.brand--modern{
    min-height:58px;
    padding:16px 18px;
    margin:0;
    border-bottom:1px solid #edf2f7;
}
.brand--modern .brand__mark{
    width:38px;
    height:38px;
    border-radius:12px;
    box-shadow:none;
}
.brand__text strong{font-size:1rem;letter-spacing:-.02em}
.brand__text small{font-size:.8rem}
.sidebar__section-label{
    padding:14px 14px 8px;
    font-size:.68rem;
    font-weight:800;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:#8a97ab;
}
.sidebar__nav--modern{
    gap:0;
    padding:0 10px 12px;
}
.sidebar__nav--modern a{
    justify-content:space-between;
    padding:11px 12px;
    border-radius:12px;
    border:1px solid transparent;
    font-size:.93rem;
    font-weight:700;
    color:#22324a;
}
.sidebar__nav--modern a:hover{
    transform:none;
    background:#f7faff;
    border-color:#e5eefb;
}
.sidebar__nav--modern a.is-active{
    background:#f4f7fd;
    border-color:#e0e8f5;
    color:#16243b;
}
.sidebar__chevron{
    color:#8492a8;
    font-size:1rem;
    line-height:1;
}
.main-shell--modern{
    padding:0 18px 24px;
}
.app-header-modern{
    position:sticky;
    top:0;
    z-index:80;
    min-height:74px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    padding:12px 0;
    margin-bottom:14px;
    background:rgba(245,247,251,.92);
    backdrop-filter:blur(10px);
    border-bottom:1px solid #e5ebf3;
}
.app-header-modern__left{
    display:flex;
    align-items:center;
    min-width:0;
}
.app-header-modern__title-wrap h1{
    margin:0 0 3px;
    font-size:1.2rem;
    letter-spacing:-.03em;
    color:#18263d;
}
.app-header-modern__title-wrap p{
    margin:0;
    color:#758399;
    font-size:.88rem;
    line-height:1.35;
}
.app-header-modern__actions{
    gap:10px;
}
.badge--header-user{
    background:#fff;
    color:#22324a;
    border-color:#dfe8f4;
    box-shadow:none;
}
.button--header-logout{
    min-height:38px;
    padding:0 14px;
    border-radius:12px;
}
.search-filter-card{
    padding:18px;
}
.search-inline-row{
    grid-template-columns:minmax(0,1fr) minmax(300px,.86fr);
    gap:10px;
    align-items:start;
}
.search-keywords-card,
.search-status-card{
    min-height:112px;
    padding:10px 12px;
}
.search-keywords-card .field,
.search-status-card .field{
    height:100%;
}
.search-keywords-card .field > span,
.search-status-card .field > span{
    font-size:.8rem;
}
.keyword-builder{
    gap:7px;
}
.keyword-builder__row{
    grid-template-columns:minmax(0,1fr) 36px;
    gap:6px;
    align-items:start;
}
.keyword-builder__row input{
    width:100%;
    min-width:0;
    min-height:36px;
    padding:8px 11px;
    font-size:.88rem;
}
.button--icon{
    width:36px;
    min-width:36px;
    height:36px;
    border-radius:10px;
}
.keyword-builder__chips{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(138px,1fr));
    gap:6px;
    min-height:44px;
    align-content:start;
}
.keyword-chip{
    width:100%;
    justify-content:space-between;
    min-height:30px;
    padding:5px 9px;
    font-size:.8rem;
}
.keyword-builder__empty{
    grid-column:1 / -1;
    font-size:.8rem;
}
.field--status-compact{
    display:flex;
    flex-direction:column;
    justify-content:flex-start;
    align-items:center;
    gap:8px;
}
.status-mode-line--compact{
    width:100%;
    justify-content:center;
    align-items:center;
    gap:8px;
    margin-top:2px;
}
.status-mode-line--compact .status-pill{
    min-height:36px;
    padding:0 14px;
    min-width:118px;
    border-radius:11px;
    font-size:.84rem;
}
.closed-period-inline--compact{
    width:100%;
    margin:0;
}
.closed-period-inline--compact[hidden]{
    display:none !important;
}
.field--period-inline{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:6px;
}
.field--period-inline > span{
    font-size:.72rem;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:#8a97ab;
}
.closed-period-inline__fields{
    display:grid;
    grid-template-columns:repeat(2,minmax(116px,126px));
    justify-content:center;
    gap:8px;
}
.closed-period-inline__fields input{
    min-height:36px;
    padding:8px 10px;
    font-size:.84rem;
}
.search-main-row{
    grid-template-columns:minmax(0,1fr) 250px;
    gap:12px;
    align-items:stretch;
}
.search-territory-col,
.search-modality-col{
    height:100%;
}
.territory-block,
.modality-compact-card{
    height:100%;
}
.modality-compact-card{
    padding:14px 12px;
}
.modality-compact-card .geo-dropdown{
    gap:6px;
}
.modality-compact-card .geo-dropdown__toggle span{
    font-size:.88rem;
}
.geo-collapsible-grid{
    gap:10px;
}
.geo-dropdown{
    gap:5px;
}
.geo-dropdown__selected{
    min-height:16px;
    font-size:.76rem;
    padding:0 2px;
}
.geo-dropdown__toggle{
    min-height:56px;
    padding:9px 34px 9px 10px;
    border-radius:13px;
}
.geo-dropdown__toggle span{
    margin-bottom:2px;
    font-size:.92rem;
}
.geo-dropdown__toggle small{
    font-size:.72rem;
    line-height:1.28;
}
.geo-dropdown__toggle::after{
    right:12px;
    font-size:1.35rem;
    font-weight:700;
    color:#98a5b8;
}
.choice-list--compact .choice-item,
.js-geo-state-list .choice-item,
.js-geo-region-list .choice-item,
.js-geo-city-list .choice-item{
    padding:6px 8px;
}
.choice-list--compact .choice-item span,
.js-geo-state-list .choice-item span,
.js-geo-region-list .choice-item span,
.js-geo-city-list .choice-item span{
    font-size:.8rem;
}
.territory-block{
    padding:16px 16px 14px;
}
.territory-block__hint{
    font-size:.86rem;
}
.panel__header{
    margin-bottom:12px;
}
.page-loading-overlay__dialog{
    border-radius:18px;
}
@media (max-width: 1180px){
    .search-inline-row,
    .search-main-row{
        grid-template-columns:1fr;
    }
    .search-keywords-card,
    .search-status-card{
        min-height:auto;
    }
}
@media (max-width: 980px){
    .app-shell--modern{
        grid-template-columns:1fr;
    }
    .sidebar--modern{
        position:static;
        height:auto;
        border-right:none;
        border-bottom:1px solid #e5ebf3;
    }
    .app-header-modern{
        padding-top:10px;
    }
}
@media (max-width: 860px){
    .main-shell--modern{
        padding:0 14px 20px;
    }
    .app-header-modern{
        flex-direction:column;
        align-items:flex-start;
    }
    .keyword-builder__chips{
        grid-template-columns:1fr;
    }
    .status-mode-line--compact .status-pill{
        min-width:0;
        flex:1 1 0;
    }
    .closed-period-inline__fields{
        grid-template-columns:1fr;
    }
}


/* v29 search layout refinements */
.search-inline-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(420px,.92fr);
    gap:12px;
    align-items:stretch;
}
.search-keywords-card,
.search-status-card{
    min-height:170px;
    height:100%;
    padding:14px 16px;
}
.search-keywords-card .field,
.search-status-card .field{
    height:100%;
}
.keyword-builder{
    display:grid;
    grid-template-rows:auto 1fr;
    gap:10px;
    min-height:0;
}
.keyword-builder__row{
    display:grid;
    grid-template-columns:minmax(0,1fr) 38px;
    gap:8px;
    align-items:center;
}
.keyword-builder__row input{
    width:100%;
    min-width:0;
}
.keyword-builder__chips{
    align-content:flex-start;
    min-height:60px;
}
.search-status-card .field--status-compact{
    display:flex;
    flex-direction:column;
    justify-content:flex-start;
    align-items:center;
    gap:12px;
}
.status-mode-line--compact{
    width:100%;
    display:flex;
    justify-content:center;
    align-items:center;
    gap:10px;
    flex-wrap:nowrap;
}
.status-mode-line--compact .status-pill{
    min-width:150px;
    justify-content:center;
    text-align:center;
}
.closed-period-inline--compact{
    width:100%;
    max-width:340px;
    margin:0 auto;
}
.closed-period-inline--compact > .field{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:8px;
}
.closed-period-inline--compact > .field > span{
    text-align:center;
    font-size:.86rem;
    text-transform:uppercase;
    letter-spacing:.06em;
}
.closed-period-inline__fields{
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
}
.search-main-row{
    grid-template-columns:minmax(0,1fr) 290px;
    gap:12px;
    align-items:stretch;
}
.search-territory-col .territory-block,
.search-modality-col .modality-direct-card{
    height:100%;
}
.modality-direct-card{
    padding:14px 14px 12px;
}
.modality-direct-card .field{
    height:100%;
    min-height:0;
}
.modality-direct-summary{
    color:var(--muted);
    font-size:.88rem;
    line-height:1.4;
    min-height:36px;
}
.modality-direct-toolbar{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px;
    align-items:center;
}
.modality-direct-list{
    min-height:0;
    height:100%;
    max-height:460px;
    overflow:auto;
    padding-right:4px;
}
.modality-direct-list .choice-item{
    padding:9px 10px;
    font-size:.9rem;
}
.territory-block{
    padding:14px 16px;
}
.geo-dropdown__selected{
    min-height:22px;
    font-size:.84rem;
    margin-bottom:6px;
}
.geo-collapsible-grid{
    gap:10px;
}
.geo-dropdown__toggle{
    padding:10px 36px 10px 12px;
    min-height:44px;
    border-radius:12px;
}
.geo-dropdown__toggle span{
    font-size:1rem;
    font-weight:700;
}
.geo-dropdown__toggle small{
    display:none !important;
}
.geo-dropdown__toggle::after{
    right:12px;
    font-size:18px;
    color:#94a3b8;
    font-weight:900;
}
.geo-dropdown__panel{
    margin-top:6px;
}
.choice-list--compact,
.choice-list{
    gap:8px;
}
@media (max-width: 1180px){
    .search-inline-row,
    .search-main-row{
        grid-template-columns:1fr;
    }
    .modality-direct-list{max-height:280px;}
}

/* v30 compact filter refinements */
.search-inline-row{
    grid-template-columns:minmax(0,1fr) minmax(360px,.82fr);
    gap:10px;
    align-items:stretch;
}
.search-keywords-card,
.search-status-card{
    min-height:128px;
    padding:10px 12px;
    border-radius:18px;
}
.search-keywords-card .field,
.search-status-card .field{
    height:100%;
}
.search-keywords-card .field > span,
.search-status-card .field > span,
.modality-direct-card .field > span,
.territory-block__label{
    font-size:.96rem;
    font-weight:800;
    line-height:1.2;
}
.keyword-builder{
    gap:6px;
}
.keyword-builder__row{
    grid-template-columns:minmax(0,1fr) 34px;
    gap:6px;
    width:100%;
}
.keyword-builder__row input{
    width:100%;
    min-width:0;
}
.keyword-builder__chips{
    min-height:28px;
    gap:6px;
}
.keyword-chip{
    padding:4px 10px;
    font-size:.83rem;
}
.keyword-builder__empty{
    font-size:.84rem;
}
.search-status-card .field--status-compact{
    justify-content:center;
    gap:8px;
}
.status-mode-line--compact{
    width:100%;
    justify-content:center;
    gap:8px;
    flex-wrap:nowrap;
}
.status-mode-line--compact .status-pill{
    min-width:132px;
    padding:0;
}
.status-mode-line--compact .status-pill span{
    width:100%;
    text-align:center;
}
.closed-period-inline--compact{
    width:100%;
    max-width:300px;
    margin:0 auto;
}
.closed-period-inline--compact > .field{
    gap:6px;
}
.closed-period-inline--compact > .field > span{
    font-size:.8rem;
    letter-spacing:.05em;
}
.closed-period-inline__fields{
    grid-template-columns:1fr 1fr;
    gap:6px;
}
.closed-period-inline__fields input{
    min-width:0;
}
.search-main-row{
    grid-template-columns:minmax(0,1fr) 270px;
    gap:10px;
    align-items:stretch;
}
.search-territory-col .territory-block,
.search-modality-col .modality-direct-card{
    height:100%;
}
.territory-block,
.modality-direct-card{
    padding:12px 14px;
    border-radius:18px;
}
.territory-block__header{
    gap:10px;
    margin-bottom:6px;
}
.territory-block__label{
    margin-bottom:2px;
}
.territory-block__hint{
    font-size:.9rem;
    line-height:1.3;
}
.geo-mode-switch{
    gap:8px;
    margin-bottom:8px;
}
.geo-mode-pill span{
    padding:10px 14px;
    font-size:.92rem;
}
.geo-compact__explain{
    margin-bottom:8px;
}
.geo-compact__explain small{
    font-size:.83rem;
    line-height:1.3;
}
.geo-collapsible-grid{
    gap:8px;
}
.geo-dropdown__selected{
    min-height:18px;
    margin-bottom:4px;
    font-size:.82rem;
    line-height:1.25;
}
.geo-dropdown__toggle{
    min-height:38px;
    padding:8px 36px 8px 10px;
    border-radius:10px;
}
.geo-dropdown__toggle span{
    font-size:.95rem;
    font-weight:800;
}
.geo-dropdown__toggle::after{
    right:10px;
    font-size:20px;
    font-weight:900;
}
.geo-dropdown__panel{
    margin-top:5px;
}
.geo-dropdown__toolbar{
    gap:6px;
    margin-bottom:6px;
}
.geo-dropdown__toolbar input,
.modality-direct-toolbar input{
    min-height:36px;
    padding:8px 10px;
}
.choice-list,
.choice-list--compact{
    gap:6px;
    max-height:220px;
}
.choice-item,
.choice-list--compact .choice-item,
.modality-direct-list .choice-item{
    padding:8px 9px;
    min-height:38px;
}
.choice-item span,
.choice-list--compact .choice-item span,
.modality-direct-list .choice-item span{
    font-size:.84rem;
    line-height:1.25;
}
.modality-direct-card .field{
    display:flex;
    flex-direction:column;
    gap:8px;
    height:100%;
}
.modality-direct-summary{
    min-height:18px;
    font-size:.84rem;
    line-height:1.25;
}
.modality-direct-toolbar{
    gap:6px;
}
.modality-direct-list{
    flex:1 1 auto;
    min-height:0;
    max-height:none;
    padding-right:3px;
}
@media (max-width: 1180px){
    .search-inline-row,
    .search-main-row{
        grid-template-columns:1fr;
    }
    .search-keywords-card,
    .search-status-card,
    .territory-block,
    .modality-direct-card{
        min-height:auto;
    }
}


/* v31 compact territory + synced modality card */
.search-main-row{
    align-items:flex-start !important;
}
.search-territory-col .territory-block,
.search-modality-col .modality-direct-card{
    height:auto !important;
    min-height:0 !important;
}
.territory-block{
    padding:10px 12px !important;
}
.territory-block__header{
    margin-bottom:4px !important;
    gap:8px !important;
}
.territory-block__hint{
    font-size:.85rem !important;
    line-height:1.25 !important;
}
.geo-mode-switch{
    gap:6px !important;
    margin-bottom:6px !important;
}
.geo-mode-pill span{
    padding:8px 12px !important;
    font-size:.88rem !important;
}
.geo-compact__explain{
    margin-bottom:6px !important;
}
.geo-compact__explain small{
    font-size:.8rem !important;
    line-height:1.25 !important;
}
.geo-collapsible-grid{
    gap:6px !important;
}
.geo-dropdown__selected{
    min-height:16px !important;
    margin-bottom:3px !important;
    font-size:.8rem !important;
}
.geo-dropdown__toggle{
    min-height:34px !important;
    padding:7px 34px 7px 10px !important;
    border-radius:10px !important;
}
.geo-dropdown__toggle span{
    margin-bottom:0 !important;
    font-size:.88rem !important;
}
.territory-block .geo-dropdown__panel{
    margin-top:4px !important;
}
.search-modality-col .modality-direct-card{
    overflow:hidden;
    display:flex;
    flex-direction:column;
}
.modality-direct-card .field{
    min-height:0;
    height:100%;
}
.modality-direct-summary{
    min-height:16px !important;
    font-size:.8rem !important;
    line-height:1.2 !important;
}
.modality-direct-toolbar{
    gap:6px !important;
}
.modality-direct-toolbar input{
    min-height:32px !important;
    padding:7px 9px !important;
    font-size:.82rem !important;
}
.modality-direct-toolbar .button{
    min-height:32px !important;
    padding:0 10px !important;
    font-size:.8rem !important;
}
.modality-direct-list{
    flex:1 1 auto !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:auto !important;
    padding-right:4px !important;
}
.modality-direct-list .choice-item{
    min-height:34px !important;
    padding:7px 8px !important;
}
.modality-direct-list .choice-item span{
    font-size:.8rem !important;
    line-height:1.2 !important;
}
@media (max-width: 1180px){
    .search-modality-col .modality-direct-card{
        height:auto !important;
    }
}

/* v32 search page compact territory + modalities sync */
.search-shell .search-main-row{
    grid-template-columns:minmax(0,1fr) 290px;
    gap:10px;
    align-items:stretch !important;
}
.search-shell .search-territory-col,
.search-shell .search-modality-col{
    min-height:0;
    display:flex;
}
.search-shell .search-territory-col .territory-block,
.search-shell .search-modality-col .modality-direct-card{
    width:100%;
    height:330px !important;
    min-height:330px !important;
    max-height:330px !important;
    overflow:hidden;
    display:flex;
    flex-direction:column;
}
.search-shell .territory-block{
    padding:10px 12px !important;
}
.search-shell .territory-block__header{
    margin-bottom:6px !important;
    gap:8px !important;
    align-items:flex-start;
}
.search-shell .territory-block__hint{
    margin-top:2px;
    font-size:.82rem !important;
    line-height:1.2 !important;
}
.search-shell .geo-compact{
    flex:1 1 auto;
    min-height:0;
    overflow:auto;
    padding-right:4px;
}
.search-shell .geo-mode-switch{
    gap:6px !important;
    margin-bottom:6px !important;
}
.search-shell .geo-mode-pill{
    flex:1 1 0;
}
.search-shell .geo-mode-pill span{
    width:100%;
    padding:8px 10px !important;
    font-size:.86rem !important;
    text-align:center;
}
.search-shell .geo-compact__explain{
    margin-bottom:6px !important;
}
.search-shell .geo-compact__explain small{
    font-size:.78rem !important;
    line-height:1.2 !important;
}
.search-shell .geo-collapsible-grid,
.search-shell .geo-radius-grid,
.search-shell .geo-radius-results{
    gap:6px !important;
}
.search-shell .geo-dropdown__selected{
    min-height:16px !important;
    margin-bottom:3px !important;
    font-size:.78rem !important;
    line-height:1.2 !important;
}
.search-shell .geo-dropdown__toggle{
    min-height:34px !important;
    padding:7px 32px 7px 10px !important;
}
.search-shell .geo-dropdown__toggle span{
    font-size:.86rem !important;
}
.search-shell .geo-dropdown__panel{
    margin-top:4px !important;
}
.search-shell .geo-dropdown__toolbar,
.search-shell .modality-direct-toolbar{
    gap:6px !important;
}
.search-shell .geo-dropdown__toolbar input,
.search-shell .modality-direct-toolbar input,
.search-shell .geo-radius-grid input,
.search-shell .geo-radius-grid select{
    min-height:34px;
    padding:7px 9px;
    font-size:.82rem;
}
.search-shell .geo-dropdown__toolbar .button,
.search-shell .modality-direct-toolbar .button{
    min-height:34px;
    padding:0 10px;
    font-size:.8rem;
}
.search-shell .choice-list,
.search-shell .choice-list--compact{
    gap:6px;
}
.search-shell .choice-item,
.search-shell .modality-direct-list .choice-item{
    min-height:34px;
    padding:7px 8px !important;
}
.search-shell .choice-item span,
.search-shell .modality-direct-list .choice-item span{
    font-size:.8rem !important;
    line-height:1.2 !important;
}
.search-shell .modality-direct-card{
    padding:10px 12px !important;
}
.search-shell .modality-direct-card .field{
    display:flex;
    flex-direction:column;
    gap:6px;
    min-height:0;
    height:100%;
}
.search-shell .modality-direct-summary{
    min-height:16px !important;
    font-size:.8rem !important;
    line-height:1.2 !important;
}
.search-shell .modality-direct-toolbar{
    grid-template-columns:minmax(0,1fr) auto;
}
.search-shell .modality-direct-list{
    flex:1 1 auto !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:auto !important;
    padding-right:4px !important;
}

@media (max-width: 1180px){
    .search-shell .search-main-row{
        grid-template-columns:1fr;
    }
    .search-shell .search-territory-col .territory-block,
    .search-shell .search-modality-col .modality-direct-card{
        height:auto !important;
        min-height:0 !important;
        max-height:none !important;
    }
    .search-shell .geo-compact,
    .search-shell .modality-direct-list{
        overflow:visible !important;
    }
}

/* v33 search layout compact inline status + overlay territory dropdowns */
.search-inline-row--single{
    display:block !important;
}
.search-inline-row--single > .search-keywords-card--full{
    width:100%;
    padding:12px 14px !important;
}
.search-keywords-inline{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:14px;
    align-items:start;
}
.search-keywords-main{
    min-width:0;
}
.search-keywords-main > span{
    display:block;
    margin-bottom:6px;
}
.search-inline-status{
    align-self:start;
    padding:0 !important;
    background:transparent !important;
    border:none !important;
    box-shadow:none !important;
    min-width:max-content;
}
.search-inline-status .field--status-inline{
    display:flex;
    align-items:flex-start;
    justify-content:flex-end;
    gap:12px;
    padding-top:28px;
}
.search-inline-status .field--status-inline > span{
    display:none !important;
}
.status-mode-line--discreet{
    display:flex !important;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
}
.status-pill--inline{
    position:relative;
    display:inline-flex !important;
    align-items:center;
    gap:8px;
    min-height:auto !important;
    padding:0 !important;
    border:none !important;
    background:transparent !important;
    border-radius:0 !important;
    box-shadow:none !important;
    color:var(--text-soft);
}
.status-pill--inline input{
    position:absolute;
    inset:0;
    opacity:0;
    cursor:pointer;
}
.status-pill__box{
    width:14px;
    height:14px;
    border-radius:4px;
    border:1px solid #c9d4e5;
    background:#fff;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.4);
    flex:0 0 auto;
}
.status-pill__text{
    font-size:.84rem;
    line-height:1.2;
    white-space:nowrap;
}
.status-pill--inline.is-active .status-pill__box{
    border-color:#8fb3ff;
    background:#eef4ff;
    box-shadow:inset 0 0 0 3px #4f7dd7;
}
.status-pill--inline.is-active .status-pill__text{
    color:var(--text);
    font-weight:800;
}
.closed-period-inline--discreet{
    display:block;
    min-width:0 !important;
    margin-left:4px;
}
.closed-period-inline--discreet[hidden]{
    display:none !important;
}
.closed-period-inline--discreet > .field{
    gap:0;
    padding:0;
}
.closed-period-inline--discreet > .field > span{
    display:none !important;
}
.closed-period-inline--discreet .closed-period-inline__fields{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,146px));
    gap:8px;
}
.closed-period-inline--discreet .closed-period-inline__fields input{
    min-width:0;
    min-height:34px;
    padding:7px 10px;
    font-size:.82rem;
}

.search-shell .search-main-row{
    grid-template-columns:minmax(0,1fr) 290px;
    gap:10px;
    align-items:start !important;
}
.search-shell .search-territory-col,
.search-shell .search-modality-col{
    min-height:0;
    display:flex;
    overflow:visible;
}
.search-shell .search-territory-col .territory-block,
.search-shell .search-modality-col .modality-direct-card{
    width:100%;
    height:320px !important;
    min-height:320px !important;
    max-height:320px !important;
}
.search-shell .search-territory-col .territory-block{
    position:relative;
    overflow:visible !important;
    z-index:4;
}
.search-shell .search-modality-col .modality-direct-card{
    overflow:hidden !important;
}
.search-shell .territory-block{
    padding:10px 12px !important;
}
.search-shell .geo-compact{
    overflow:visible !important;
    padding-right:0 !important;
}
.search-shell .geo-mode-switch{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px !important;
    margin-bottom:6px !important;
    align-items:start;
}
.search-shell .geo-mode-pill{
    display:flex !important;
    align-items:center;
    justify-content:center;
    min-height:42px !important;
    max-height:42px;
    padding:0 !important;
    align-self:start;
}
.search-shell .geo-mode-pill span{
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    min-height:40px !important;
    padding:7px 10px !important;
    font-size:.85rem !important;
    line-height:1.15 !important;
    white-space:nowrap;
}
.search-shell .geo-mode-panel[data-mode="hierarchy"]{
    overflow:visible;
}
.search-shell .geo-mode-panel[data-mode="radius"]{
    max-height:214px;
    overflow:auto;
    padding-right:4px;
}
.search-shell .geo-collapsible-grid{
    gap:8px !important;
    overflow:visible;
}
.search-shell .geo-dropdown{
    position:relative;
    overflow:visible;
}
.search-shell .geo-dropdown.is-open{
    z-index:80;
}
.search-shell .geo-dropdown__selected{
    min-height:16px !important;
    margin-bottom:3px !important;
    font-size:.78rem !important;
    line-height:1.2 !important;
}
.search-shell .geo-dropdown__toggle{
    min-height:34px !important;
    padding:7px 32px 7px 10px !important;
}
.search-shell .geo-dropdown__toggle span{
    font-size:.86rem !important;
}
.search-shell .geo-dropdown__panel{
    position:absolute;
    top:calc(100% + 4px);
    left:0;
    right:0;
    margin-top:0 !important;
    max-height:min(330px,60vh) !important;
    overflow:auto !important;
    z-index:90;
}
.search-shell .modality-direct-card{
    padding:10px 12px !important;
}
.search-shell .modality-direct-card .field{
    display:flex;
    flex-direction:column;
    gap:6px;
    min-height:0;
    height:100%;
}
.search-shell .modality-direct-list{
    flex:1 1 auto !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:auto !important;
    padding-right:4px !important;
}

@media (max-width: 1180px){
    .search-keywords-inline{
        grid-template-columns:1fr;
        gap:10px;
    }
    .search-inline-status .field--status-inline{
        padding-top:0;
        justify-content:flex-start;
        flex-wrap:wrap;
    }
    .closed-period-inline--discreet .closed-period-inline__fields{
        grid-template-columns:1fr 1fr;
    }
    .search-shell .search-main-row{
        grid-template-columns:1fr;
    }
    .search-shell .search-territory-col .territory-block,
    .search-shell .search-modality-col .modality-direct-card{
        height:auto !important;
        min-height:0 !important;
        max-height:none !important;
    }
    .search-shell .search-territory-col .territory-block,
    .search-shell .geo-compact,
    .search-shell .geo-mode-panel[data-mode="radius"]{
        overflow:visible !important;
        max-height:none !important;
    }
}

@media (max-width: 860px){
    .status-mode-line--discreet{
        width:100%;
        gap:10px;
    }
    .status-pill__text{
        white-space:normal;
    }
    .closed-period-inline--discreet{
        width:100%;
        margin-left:0;
    }
    .closed-period-inline--discreet .closed-period-inline__fields{
        grid-template-columns:1fr;
    }
    .search-shell .geo-mode-pill span{
        white-space:normal;
    }
}


/* hotfix status inline radios inheriting generic input styles */
.search-inline-status{
    min-width:0;
}
.status-pill--inline input{
    all:unset;
    position:absolute;
    inset:0;
    display:block;
    cursor:pointer;
    opacity:0;
    margin:0;
}
.status-pill--inline input:focus{
    outline:none;
    box-shadow:none;
}
.status-mode-line--discreet{
    justify-content:flex-end;
}

/* hotfix v2: inline status spans were inheriting generic compact span width */
.status-mode-line--discreet .status-pill--inline{
    min-width:auto !important;
}
.status-mode-line--discreet .status-pill--inline .status-pill__box{
    width:14px !important;
    min-width:14px !important;
    max-width:14px !important;
    height:14px !important;
    flex:0 0 14px !important;
    display:block !important;
}
.status-mode-line--discreet .status-pill--inline .status-pill__text{
    width:auto !important;
    min-width:0 !important;
    flex:0 1 auto !important;
    text-align:left !important;
}
.status-mode-line--discreet .status-pill--inline span{
    white-space:nowrap;
}
.search-inline-status .status-mode-line--discreet{
    align-items:center;
}

/* v34 search status above keyword input */
.search-keywords-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    margin-bottom:8px;
}
.search-keywords-title{
    display:block;
    color:var(--text);
    font-weight:800;
    font-size:1rem;
    line-height:1.2;
    padding-top:2px;
}
.search-keywords-card--full .search-keywords-main{
    min-width:0;
}
.search-keywords-card--full .search-inline-status{
    margin-left:auto;
}
.search-keywords-card--full .search-inline-status .field--status-inline{
    padding-top:0 !important;
    justify-content:flex-end;
    flex-wrap:wrap;
}
.search-keywords-card--full .status-mode-line--discreet{
    justify-content:flex-end;
}
.search-keywords-card--full .status-pill--inline{
    display:inline-flex !important;
    align-items:center;
    gap:8px;
    flex-wrap:nowrap;
}
.search-keywords-card--full .status-pill--inline input{
    position:absolute !important;
    width:1px !important;
    height:1px !important;
    margin:-1px !important;
    padding:0 !important;
    border:0 !important;
    overflow:hidden !important;
    clip:rect(0 0 0 0) !important;
    clip-path:inset(50%) !important;
    white-space:nowrap !important;
    opacity:0 !important;
    inset:auto !important;
}
.search-keywords-card--full .status-pill__box,
.search-keywords-card--full .status-pill__text{
    cursor:pointer;
}
.search-keywords-card--full .status-pill--closed{
    gap:8px;
}
.search-keywords-card--full .closed-period-inline--discreet{
    margin-left:0 !important;
    margin-right:2px;
}
.search-keywords-card--full .closed-period-inline--discreet .closed-period-inline__fields{
    grid-template-columns:repeat(2,minmax(0,132px));
}

@media (max-width: 1180px){
    .search-keywords-header{
        flex-direction:column;
        align-items:stretch;
        gap:10px;
    }
    .search-keywords-card--full .search-inline-status{
        margin-left:0;
    }
    .search-keywords-card--full .search-inline-status .field--status-inline,
    .search-keywords-card--full .status-mode-line--discreet{
        justify-content:flex-start;
    }
}

@media (max-width: 860px){
    .search-keywords-card--full .status-pill--closed{
        flex-wrap:wrap;
    }
    .search-keywords-card--full .closed-period-inline--discreet{
        order:2;
        width:100%;
        margin-right:0;
    }
    .search-keywords-card--full .closed-period-inline--discreet .closed-period-inline__fields{
        grid-template-columns:1fr 1fr;
    }
}

/* v35 compact keyword module + territory content recentered */
.search-keywords-card--full{
    padding:8px 12px 10px !important;
    min-height:116px !important;
}
.search-keywords-header{
    align-items:center;
    gap:10px;
    margin-bottom:4px;
}
.search-keywords-title{
    padding-top:0;
    font-size:.98rem;
}
.search-keywords-card--full .search-inline-status{
    min-height:auto !important;
    height:auto !important;
    padding:0 !important;
    margin:0 0 0 auto !important;
    border:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    border-radius:0 !important;
}
.search-keywords-card--full .search-inline-status .field--status-inline{
    min-height:auto !important;
    padding:0 !important;
    gap:6px;
}
.search-keywords-card--full .status-mode-line--discreet{
    gap:12px;
}
.search-keywords-card--full .status-pill--inline{
    gap:6px;
}
.search-keywords-card--full .closed-period-inline--discreet{
    margin-right:4px;
}
.search-keywords-card--full .search-keywords-main{
    margin-top:0;
}
.search-keywords-card--full .keyword-builder{
    gap:6px;
}
.search-keywords-card--full .keyword-builder__row{
    gap:6px;
    align-items:center;
}
.search-keywords-card--full .keyword-builder__row input{
    min-height:36px;
    padding-top:8px;
    padding-bottom:8px;
}
.search-keywords-card--full .keyword-builder__chips{
    min-height:20px;
}
.search-keywords-card--full .keyword-builder__empty{
    font-size:.84rem;
    line-height:1.2;
}

.search-shell .search-territory-col .territory-block{
    padding:10px 15px 10px 9px !important;
}
.search-shell .territory-block__header,
.search-shell .geo-compact,
.search-shell .geo-mode-panel{
    margin-left:0 !important;
}
.search-shell .geo-compact{
    padding-left:2px !important;
    padding-right:0 !important;
}
.search-shell .geo-mode-switch,
.search-shell .geo-compact__explain,
.search-shell .geo-collapsible-grid,
.search-shell .geo-mode-panel[data-mode="radius"]{
    margin-left:0 !important;
}

@media (max-width: 1180px){
    .search-keywords-card--full{
        min-height:auto !important;
    }
    .search-keywords-header{
        align-items:stretch;
        gap:8px;
    }
    .search-keywords-card--full .search-inline-status{
        margin-left:0 !important;
    }
}


/* v36 status row exactly like requested */
.search-keywords-card--full .search-keywords-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}
.search-keywords-card--full .search-inline-status{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    flex:1 1 auto;
    min-width:0;
}
.search-keywords-card--full .search-inline-status .field--status-inline{
    width:auto;
    margin-left:auto;
    justify-content:flex-end;
}
.search-keywords-card--full .status-mode-line--discreet{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:14px;
    flex-wrap:nowrap;
}
.search-keywords-card--full .status-pill--inline{
    display:inline-flex !important;
    align-items:center;
    flex-wrap:nowrap;
}
.search-keywords-card--full .status-pill--closed{
    gap:6px;
}
.search-keywords-card--full .status-pill--closed .status-pill__box{
    order:1;
}
.search-keywords-card--full .status-pill--closed .status-pill__text{
    order:2;
}
.search-keywords-card--full .status-pill--closed .closed-period-inline--discreet{
    order:3;
    margin-left:6px !important;
    margin-right:0 !important;
}
.search-keywords-card--full .closed-period-inline--discreet .closed-period-inline__fields{
    grid-template-columns:repeat(2,minmax(0,118px));
}

@media (max-width: 1180px){
    .search-keywords-card--full .search-keywords-header{
        flex-direction:column;
        align-items:stretch;
    }
    .search-keywords-card--full .search-inline-status,
    .search-keywords-card--full .search-inline-status .field--status-inline,
    .search-keywords-card--full .status-mode-line--discreet{
        justify-content:flex-start;
    }
}

@media (max-width: 860px){
    .search-keywords-card--full .status-mode-line--discreet{
        flex-wrap:wrap;
        row-gap:8px;
    }
    .search-keywords-card--full .status-pill--closed{
        flex-wrap:wrap;
    }
    .search-keywords-card--full .status-pill--closed .closed-period-inline--discreet{
        order:3;
        width:100%;
        margin-left:0 !important;
    }
    .search-keywords-card--full .closed-period-inline--discreet .closed-period-inline__fields{
        grid-template-columns:1fr 1fr;
    }
}


/* v6 status alignment fixed on keyword header */
.search-keywords-card--full .search-inline-status{
    width:min(100%, 640px);
    margin-left:auto;
}
.search-keywords-card--full .search-inline-status .field--status-inline{
    justify-content:flex-start !important;
}
.search-keywords-card--full .status-mode-line--discreet{
    width:100%;
    display:flex;
    align-items:center;
    justify-content:flex-start !important;
    gap:14px;
    flex-wrap:nowrap;
}
.search-keywords-card--full .status-pill--inline{
    flex:0 0 auto;
}
.search-keywords-card--full .closed-period-inline--discreet{
    flex:0 0 290px;
    width:290px;
    min-width:290px;
    margin:0 0 0 2px !important;
}
.search-keywords-card--full .closed-period-inline--discreet[hidden]{
    display:block !important;
    visibility:hidden;
    pointer-events:none;
}
.search-keywords-card--full .closed-period-inline--discreet .closed-period-inline__fields{
    grid-template-columns:repeat(2,minmax(0,141px));
}

@media (max-width: 1180px){
    .search-keywords-card--full .search-inline-status{
        width:100%;
    }
    .search-keywords-card--full .status-mode-line--discreet{
        flex-wrap:wrap;
        gap:10px;
    }
    .search-keywords-card--full .closed-period-inline--discreet,
    .search-keywords-card--full .closed-period-inline--discreet[hidden]{
        flex:1 1 100%;
        width:100%;
        min-width:0;
        visibility:visible;
        pointer-events:auto;
        display:block !important;
    }
    .search-keywords-card--full .closed-period-inline--discreet[hidden]{
        display:none !important;
    }
    .search-keywords-card--full .closed-period-inline--discreet .closed-period-inline__fields{
        grid-template-columns:1fr 1fr;
    }
}

@media (max-width: 760px){
    .search-keywords-card--full .status-mode-line--discreet{
        align-items:flex-start;
    }
    .search-keywords-card--full .closed-period-inline--discreet .closed-period-inline__fields{
        grid-template-columns:1fr;
    }
}

/* v37 compact radius panel to remove inner scrollbar */
.search-shell .geo-mode-panel[data-mode="radius"]{
    max-height:none !important;
    overflow:visible !important;
    padding-right:0 !important;
}
.search-shell .geo-mode-panel[data-mode="radius"] .geo-radius-grid{
    gap:5px !important;
}
.search-shell .geo-mode-panel[data-mode="radius"] .field{
    gap:5px !important;
}
.search-shell .geo-mode-panel[data-mode="radius"] .field > span{
    font-size:.8rem !important;
    line-height:1.1 !important;
}
.search-shell .geo-mode-panel[data-mode="radius"] .geo-radius-grid input,
.search-shell .geo-mode-panel[data-mode="radius"] .geo-radius-grid select{
    min-height:32px !important;
    padding:6px 9px !important;
    font-size:.8rem !important;
}
.search-shell .geo-mode-panel[data-mode="radius"] .geo-radius-results{
    gap:6px !important;
    margin-top:2px !important;
}
.search-shell .geo-mode-panel[data-mode="radius"] .choice-list{
    gap:4px !important;
}
.search-shell .geo-mode-panel[data-mode="radius"] .choice-empty{
    padding:10px 12px !important;
    font-size:.8rem !important;
    line-height:1.2 !important;
}
.search-shell .geo-mode-panel[data-mode="radius"] .geo-radius-picked{
    padding:9px 12px !important;
    font-size:.82rem !important;
    line-height:1.2 !important;
}

/* v38 hide inner territory frame */
.search-shell .geo-compact{
    border:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    border-radius:0 !important;
}

/* v39 search result cards */
.search-results-list{
    gap:18px;
}

.search-result-card{
    position:relative;
    overflow:hidden;
    border-color:#d8e3f2;
    background:
        radial-gradient(circle at top right, rgba(96,165,250,.12), transparent 30%),
        linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}

.search-result-card::before{
    content:"";
    position:absolute;
    inset:0 auto 0 0;
    width:4px;
    background:linear-gradient(180deg,#1d4ed8 0%, #60a5fa 100%);
    opacity:.9;
}

.search-result-card .notice-card__topline,
.search-result-card .notice-card__title,
.search-result-card .search-result-card__summary,
.search-result-card .search-result-card__excerpt,
.search-result-card .search-result-card__highlights,
.search-result-card .search-result-card__body,
.search-result-card .search-result-card__footer{
    position:relative;
    z-index:1;
}

.search-result-card > .notice-card__summary:not(.search-result-card__summary--enhanced),
.search-result-card > .notice-card__body:not(.search-result-card__body){
    display:none;
}

.search-result-card__summary{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    align-items:center;
    margin-bottom:14px;
    color:var(--text-soft);
    font-size:.95rem;
    line-height:1.55;
}

.search-result-card__summary-sep{
    color:#9aa9bd;
}

.search-result-card__excerpt{
    margin:-2px 0 18px;
    color:var(--text-soft);
    line-height:1.65;
    font-size:.95rem;
}

.search-result-card__highlights{
    display:grid;
    grid-template-columns:minmax(0,1.15fr) minmax(240px,.85fr);
    gap:14px;
    margin:0 0 18px;
}

.search-result-card__value-box,
.search-result-card__deadline-box{
    display:grid;
    gap:6px;
    min-height:118px;
    padding:16px 18px;
    border-radius:18px;
    border:1px solid var(--border);
    box-shadow:var(--shadow-soft);
}

.search-result-card__value-box{
    background:linear-gradient(135deg,#eff6ff 0%,#ffffff 100%);
    border-color:#cfe0ff;
}

.search-result-card__deadline-box{
    background:#ffffff;
}

.search-result-card__value-box span,
.search-result-card__deadline-box span{
    font-size:.78rem;
    font-weight:800;
    letter-spacing:.06em;
    text-transform:uppercase;
    color:var(--muted);
}

.search-result-card__value-box strong,
.search-result-card__deadline-box strong{
    font-size:1.35rem;
    line-height:1.2;
    letter-spacing:-.03em;
}

.search-result-card__value-box small,
.search-result-card__deadline-box small{
    color:var(--text-soft);
    line-height:1.45;
}

.search-result-card__deadline-box.is-good{
    background:linear-gradient(135deg,#ecfdf3 0%,#ffffff 100%);
    border-color:#bde7cb;
}

.search-result-card__deadline-box.is-good strong{
    color:var(--success);
}

.search-result-card__deadline-box.is-warning{
    background:linear-gradient(135deg,#fff7ed 0%,#ffffff 100%);
    border-color:#fed7aa;
}

.search-result-card__deadline-box.is-warning strong{
    color:var(--warning);
}

.search-result-card__deadline-box.is-expired{
    background:linear-gradient(135deg,#fef2f2 0%,#ffffff 100%);
    border-color:#fecaca;
}

.search-result-card__deadline-box.is-expired strong{
    color:var(--danger);
}

.search-result-card__deadline-box.is-neutral{
    background:linear-gradient(135deg,#f8fafc 0%,#ffffff 100%);
    border-color:#dbe4ef;
}

.search-result-card__body{
    grid-template-columns:repeat(3,minmax(0,1fr));
    margin:0 0 16px;
}

.search-result-card__body .info-tile{
    background:rgba(255,255,255,.84);
}

.search-result-card__footer{
    margin-top:6px;
}

.search-result-card__footer .button--ghost{
    background:rgba(255,255,255,.92);
}

@media (max-width: 920px){
    .search-result-card__highlights{
        grid-template-columns:1fr;
    }

    .search-result-card__body{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media (max-width: 640px){
    .search-result-card{
        padding:18px;
    }

    .search-result-card__body{
        grid-template-columns:1fr;
    }

    .search-result-card__value-box strong,
    .search-result-card__deadline-box strong{
        font-size:1.18rem;
    }
}

/* v40 trimmed search card density */
.search-result-card{
    padding:16px 16px 12px;
    border-radius:22px;
}

.search-results-list{
    gap:14px;
}

.search-result-card .notice-card__topline{
    margin-bottom:10px;
    gap:10px;
}

.search-result-card .notice-card__meta{
    gap:6px;
}

.search-result-card .button--sm{
    padding:8px 12px;
    font-size:.87rem;
}

.search-result-card .notice-card__title{
    margin-bottom:8px;
    font-size:1.02rem;
    line-height:1.4;
}

.search-result-card .notice-card__title--clamp{
    -webkit-line-clamp:2;
}

.search-result-card__summary{
    gap:8px;
    margin-bottom:9px;
    font-size:.88rem;
}

.search-result-card__excerpt{
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
    margin:0 0 12px;
    font-size:.88rem;
    line-height:1.5;
}

.search-result-card__highlights{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
    margin:0 0 12px;
}

.search-result-card__value-box,
.search-result-card__deadline-box{
    min-height:0;
    padding:12px 14px;
    border-radius:18px;
    gap:4px;
}

.search-result-card__value-box{
    background:linear-gradient(135deg,#eff6ff 0%,#e0ecff 100%);
}

.search-result-card__value-box span,
.search-result-card__deadline-box span{
    font-size:.72rem;
}

.search-result-card__value-box strong,
.search-result-card__deadline-box strong{
    font-size:1.12rem;
}

.search-result-card__value-box small,
.search-result-card__deadline-box small{
    font-size:.78rem;
    line-height:1.35;
}

.search-result-card__body{
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:8px;
    margin:0 0 10px;
}

.search-result-card__body .info-tile{
    min-height:0;
    padding:10px 12px;
    border-radius:14px;
}

.search-result-card__body .info-tile span{
    margin-bottom:5px;
    font-size:.68rem;
}

.search-result-card__footer{
    margin-top:0;
    padding-top:6px;
}

.search-result-card__footer .notice-card__actions{
    width:100%;
    justify-content:flex-start;
    gap:8px;
}

.search-results-pagination{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-top:18px;
    padding-top:14px;
    border-top:1px solid var(--border);
    flex-wrap:wrap;
}

.search-results-pagination__meta{
    color:var(--text-soft);
    font-size:.92rem;
}

@media (max-width: 1280px){
    .search-result-card__body{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }
}

@media (max-width: 920px){
    .search-result-card__body{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media (max-width: 640px){
    .search-result-card{
        padding:16px;
    }

    .search-results-pagination{
        align-items:flex-start;
        flex-direction:column;
    }

    .search-result-card__highlights,
    .search-result-card__body{
        grid-template-columns:1fr;
    }
}
