/* IrriDex unified page design: stable integration layer.
   Deliberately avoids map position, zoom, tile, marker, and canvas dimensions. */
:root {
  --id-radius:4px;
  --id-container-pad:clamp(16px,2.6vw,30px);
  --id-control-height:36px;
  --id-dialog-shadow:0 14px 38px rgba(0,0,0,.22);
  --id-focus:0 0 0 3px rgba(0,120,206,.24);
}
html[data-theme="dark"]{--id-dialog-shadow:0 16px 42px rgba(0,0,0,.48);--id-focus:0 0 0 3px rgba(120,202,255,.30)}
html,html body,html body button,html body select,html body input,html body textarea{font-family:Verdana,Tahoma,Arial,sans-serif!important}

/* The brand is text, not a decorative PNG: one treatment on every page. */
html body .id-wordmark,
html body .wordmark.id-wordmark {
  display:inline-block; width:auto; height:auto; max-width:100%;
  color:#fff!important; background:transparent; font-family:Verdana,Tahoma,Arial,sans-serif!important;
  font-weight:500!important; font-style:normal; text-transform:none;
  line-height:1.12!important; letter-spacing:-.045em;
  text-shadow:1px 2px 3px rgba(0,0,0,.75); white-space:nowrap; text-decoration:none;
}
html body a:has(> .id-wordmark){text-decoration:none!important}
html body a:has(> .id-wordmark):hover .id-wordmark{color:#fff!important;text-shadow:1px 2px 4px #000,0 0 10px rgba(255,255,255,.14)}
html body :is(.top-brand,.logo-home,.notice-header a) > .id-wordmark {font-size:clamp(23px,2.7vw,32px)!important}
html body .top-brand{line-height:normal!important;display:inline-flex;align-items:center;min-width:0}
html body .top-brand > .id-wordmark{font-size:28px!important}
html body .logo-home{display:inline-block;line-height:normal!important;background:#333;border:1px solid #505050;border-radius:var(--id-radius);padding:8px 14px}
html body .logo-home > .id-wordmark{font-size:34px!important}
html body .notice-header > a > .id-wordmark{font-size:27px!important}
html body .site-header .wordmark.id-wordmark {font-size:clamp(38px,4.2vw,50px)!important;letter-spacing:-.048em!important}
html.id-map-page body .brand-block .id-wordmark{font-size:27px!important;margin:0!important;color:#fff!important;line-height:1!important;letter-spacing:-.05em!important}
html.id-map-page body .brand-block > span:not(.id-wordmark){font-size:10px!important;color:#d7e4ef!important;margin-bottom:2px!important}
html.id-map-page body .brand-block{min-width:0;align-items:flex-end}
@media(max-width:650px){html.id-map-page body .brand-block .id-wordmark{font-size:20px!important}html body .top-brand > .id-wordmark{font-size:24px!important}html body .site-header .wordmark.id-wordmark{font-size:36px!important}}

/* Content pages use a centered reading region; map is explicitly excluded. */
html.id-content-page body{background:var(--id-page)!important;color:var(--id-ink)!important}
html.id-content-page body :is(.wrap,.cb-wrap,.page-container,.page-wrap,.main-container){
  margin-left:auto; margin-right:auto; padding-left:var(--id-container-pad)!important;
  padding-right:var(--id-container-pad)!important;
}
html.id-content-page body .container:not(.hero){padding-left:var(--id-container-pad);padding-right:var(--id-container-pad)}
html.id-content-page body .body-content{padding:32px var(--id-container-pad) 40px!important}
html.id-content-page body .info-panel{padding:22px var(--id-container-pad)!important}
html.id-content-page body :is(.card,.notice-card,.notice-body,.panel,.record,.feature,.cb-model,.cb-filter-section,.table-wrap,.review-card,.side-card,.manager-card,.model-card,.stat,.message-link,.open-message,.result,.account-row,.notification,.archive-panel,.custom-panel,.empty){
  border-radius:var(--id-radius)!important;
  border-color:var(--id-line)!important;
}
html.id-content-page body :is(.card,.notice-card,.panel,.record,.feature,.cb-model,.cb-filter-section,.review-card,.side-card,.manager-card,.model-card){box-shadow:var(--id-shadow)!important}
html.id-content-page body :is(.notice-card,.panel,.record,.feature,.cb-model,.cb-filter-section,.review-card,.side-card,.manager-card,.model-card){background:var(--id-paper)!important;color:var(--id-ink)!important}
html.id-content-page body :where(h1,h2,h3,h4,h5,h6){font-family:Verdana,Tahoma,Arial,sans-serif!important;font-weight:500;line-height:1.25;letter-spacing:-.022em}
html.id-content-page body :where(h1){font-size:clamp(26px,2.5vw,34px)}
html.id-content-page body :where(h2){font-size:clamp(21px,2.0vw,27px)}
html.id-content-page body :where(h3){font-size:clamp(17px,1.7vw,22px)}
html.id-content-page body :where(h4){font-size:16px}
html.id-content-page body :where(.muted,.small,.meta,.field-help,.help-text,.section-heading p){color:var(--id-muted)!important}
html.id-content-page body :is(.page-head,.section-heading){margin-block-end:18px}
html.id-content-page body :is(.page-head h1,.section-heading h2){margin-block:0 7px}
html.id-content-page body p,html.id-content-page body li{line-height:1.5}
html.id-content-page body :is(.card,.panel,.feature,.modal-content) :is(h1,h2,h3){color:var(--id-ink)}

/* Homepage remains a full-image hero *inside* its original fixed-width container. */
html.id-home-page body .hero.container{padding:0!important}
html.id-home-page body .hero-copy h1{font-size:clamp(32px,4vw,46px)!important;font-weight:400;line-height:1.15;color:#fff!important}
html.id-home-page body .hero-copy :is(p,.eyebrow){color:#fff!important}
html.id-home-page body .hero-menu h2{font-size:18px!important;font-weight:500;color:#fff!important}
html.id-home-page body .site-header .container{padding-left:15px;padding-right:15px}

/* Inputs, selects, multiline fields and labels across all application panels. */
html body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),select,textarea){
  border:1px solid var(--id-line);border-radius:var(--id-radius)!important;
  background:var(--id-input);color:var(--id-ink);font:inherit;
}
html body :is(input,select,textarea):not([type="checkbox"]):not([type="radio"]):focus-visible{
  border-color:var(--id-blue)!important;box-shadow:var(--id-focus);outline:0!important;
}
html body :is(input,textarea)::placeholder{color:var(--id-placeholder, #777);opacity:1}
html body :is(input,select,textarea):disabled{opacity:.65;cursor:not-allowed}
html body :is(.field-help,.help-text,.form-hint){font-size:12px;color:var(--id-muted)}
html body :is(fieldset,details){border-color:var(--id-line)}
html body :is(.dropdown-menu,.menu-popover,.menu-panel,.select-menu,.tz-menu,.user-search-results,.context-menu,.capture-menu,.language-menu){
  border-radius:var(--id-radius)!important;border:1px solid var(--id-line)!important;
  background:var(--id-paper)!important;color:var(--id-ink)!important;
  box-shadow:0 6px 18px rgba(0,0,0,.15);
}
html body :is(.dropdown-menu,.menu-popover,.menu-panel,.select-menu,.tz-menu,.user-search-results,.context-menu,.capture-menu,.language-menu) :is(a,button,option){font-family:inherit}
html body :is(.dropdown-menu,.menu-popover,.select-menu,.tz-menu,.user-search-results,.context-menu,.capture-menu) :is(a:hover,button:hover){background:var(--id-hover)!important;color:var(--id-link)!important}

/* Consistent buttons: restrict geometry changes to conventional controls.
   Map toolbar and map overlays retain their sizes/positions. */
html body :is(.btn,.button,.primary-btn,.secondary-btn,.btn-primary,.btn-secondary,.btn-outline,.danger-btn,.id-theme-toggle){
  font-family:Verdana,Tahoma,Arial,sans-serif!important;font-size:13px;font-weight:500;
  border-radius:var(--id-radius)!important;box-shadow:none;
  transition:background-color .15s ease,border-color .15s ease,color .15s ease;
}
html body :is(.btn-primary,.primary-btn,.button:not(.secondary):not(.danger),:where(button[type="submit"]:not(.icon-btn):not(.arrow):not(.dot):not(.id-theme-toggle):not(.danger):not(.btn-danger))){
  background:var(--id-blue)!important;border-color:var(--id-blue-hover)!important;color:#fff!important;
}
html body :is(.btn-primary,.primary-btn,.button:not(.secondary):not(.danger),:where(button[type="submit"]:not(.icon-btn):not(.arrow):not(.dot):not(.id-theme-toggle):not(.danger):not(.btn-danger))):hover:not(:disabled){
  background:var(--id-blue-hover)!important;color:#fff!important;
}
html body :is(.btn-outline,.btn-secondary,.secondary-btn,.button.secondary){background:var(--id-control)!important;border:1px solid var(--id-control-border)!important;color:var(--id-control-ink)!important}
html body :is(.btn-outline,.btn-secondary,.secondary-btn,.button.secondary):hover:not(:disabled){background:var(--id-hover)!important;border-color:var(--id-blue)!important;color:var(--id-link)!important}
html body :is(.button.danger,button.danger,.danger-btn,.btn-danger){background:var(--id-danger)!important;color:#fff!important;border-color:var(--id-danger)!important}
html body :is(button,.btn,.button,[role="button"],summary):focus-visible{outline:2px solid var(--id-blue)!important;outline-offset:2px}
html body :is(button,.btn,.button):disabled{cursor:not-allowed;opacity:.56}
html body :is(.btn,.button,.primary-btn,.secondary-btn,.btn-primary,.btn-secondary,.btn-outline) :is(svg,i){color:inherit}
html body .id-theme-toggle{border:1px solid #82919c!important;background:#333!important;color:#fff!important;min-height:32px;white-space:nowrap}
html body .id-theme-toggle:hover{background:var(--id-blue)!important;border-color:var(--id-blue)!important;color:#fff!important}

/* Popup/dialog visual family. No position, width or height changes, so tools still work. */
html body :is(dialog,.modal,.modal-content,.modal-dialog,.popup-dialog,.popup-window,.popover,.drawer,.notice-card,.archive-panel,.tutorial-panel){
  border-color:var(--id-line)!important;border-radius:var(--id-radius)!important;color:var(--id-ink);
}
html body :is(dialog,.modal-content,.popup-dialog,.popup-window,.popover,.drawer,.archive-panel,.tutorial-panel){background:var(--id-paper)!important}
html body :is(dialog,.modal-content,.popup-dialog,.popup-window,.popover){box-shadow:var(--id-dialog-shadow)}
html body dialog::backdrop{background:rgba(0,0,0,.60)}
html body :is(.modal-head,.dialog-title,.panel-heading,.popup-header){border-bottom-color:var(--id-line)!important;color:var(--id-ink)!important}
html body :is(.modal-head,.dialog-title,.panel-heading,.popup-header) :is(h1,h2,h3,h4){font-family:Verdana,Tahoma,Arial,sans-serif!important;font-weight:500;color:var(--id-ink)!important}
html body :is(.modal-close,.close-btn,.close-button,.modal-head .icon-btn){border-radius:var(--id-radius)!important}
html[data-theme="dark"] body :is(.modal,.modal-content,.modal-dialog,.popup-dialog,.popup-window,dialog,.popover,.drawer) :is(h1,h2,h3,h4,label){color:var(--id-ink)!important}
html[data-theme="dark"] body :is(.modal,.modal-content,.modal-dialog,.popup-dialog,.popup-window,dialog,.popover,.drawer) :is(p,.muted,.meta,.hint){color:var(--id-muted)}

/* Table, tab, and boxed navigation treatments for content pages. */
html.id-content-page body :is(.table-wrap,.table-responsive){border-radius:var(--id-radius);overflow-x:auto}
html.id-content-page body :is(table,.table){border-color:var(--id-line)}
html.id-content-page body :is(table,.table) :is(td,th){border-color:var(--id-line)}
html.id-content-page body :is(table,.table) thead th{background:var(--id-panel-soft);color:var(--id-ink)}
html.id-content-page body :is(.nav-tabs,.tabs,.tab-list){border-color:var(--id-line)}
html.id-content-page body :is(.nav-tabs,.tabs,.tab-list) :is(a,button){border-radius:var(--id-radius) var(--id-radius) 0 0}

/* Map-specific polish: never center, pad, scale or constrain the map viewport. */
html.id-map-page body{margin:0!important;padding:0!important}
html.id-map-page body #app{padding:0!important;margin:0!important;max-width:none!important}
html.id-map-page body #map{margin:0!important;padding:0!important;max-width:none!important}
html.id-map-page body :is(.leaflet-popup-content-wrapper,.leaflet-popup-tip){background:var(--id-paper)!important;color:var(--id-ink)!important}
html.id-map-page body .leaflet-popup-content-wrapper{border-radius:var(--id-radius)!important;box-shadow:var(--id-dialog-shadow)}
html.id-map-page body :is(.drawer,.modal,.wizard-form,.capture-menu){border-color:var(--id-line)!important;color:var(--id-ink)!important}
html.id-map-page body :is(.icon-btn,.leaflet-bar a,.leaflet-control-layers-toggle){border-radius:var(--id-radius)!important}
html.id-map-page body :is(.topbar .icon-btn,.topbar .notification-bell){background:var(--id-control);color:var(--id-control-ink);border-color:var(--id-control-border)}
html.id-map-page body :is(.topbar .icon-btn,.topbar .notification-bell):hover{background:var(--id-blue);color:#fff;border-color:var(--id-blue-hover)}
html.id-map-page body .topbar .icon-btn[aria-pressed="true"]{background:var(--id-blue);color:#fff;border-color:var(--id-blue-hover)}
@media(max-width:720px){html.id-content-page body .container:not(.hero){padding-left:16px;padding-right:16px}html.id-content-page body :is(.body-content,.info-panel){padding-left:16px!important;padding-right:16px!important}}
@media(prefers-reduced-motion:reduce){html body :is(.btn,.button,.primary-btn,.secondary-btn,.id-theme-toggle){transition:none!important}}

/* Stronger specificity for destructive form submissions; never paint them blue. */
html body button[type="submit"].danger,html body button[type="submit"].btn-danger,html body button[type="submit"].danger-btn{background:var(--id-danger)!important;border-color:var(--id-danger)!important;color:#fff!important}
html body button[type="submit"].danger:hover,html body button[type="submit"].btn-danger:hover,html body button[type="submit"].danger-btn:hover{background:#941c14!important;border-color:#941c14!important}

/* Standard body-level action sizing without changing map icon or Leaflet buttons. */
html.id-content-page body :is(.btn,.button,.primary-btn,.secondary-btn,.btn-primary,.btn-secondary,.btn-outline):not(.icon-btn){min-height:34px;padding:7px 12px;display:inline-flex;align-items:center;justify-content:center;gap:6px;vertical-align:middle;text-decoration:none}
html.id-map-page body :is(.modal,.drawer,.wizard-form) :is(.btn,.button,.primary-btn,.secondary-btn,.btn-primary,.btn-secondary,.btn-outline):not(.icon-btn){min-height:34px;padding:7px 12px}
/* In particular, danger buttons must never inherit the primary-blue submit rule. */
html.id-content-page body button.button.danger[type="submit"],
html.id-content-page body button.danger[type="submit"],
html.id-map-page body button.button.danger[type="submit"],
html.id-map-page body button.danger[type="submit"]{background:var(--id-danger)!important;border-color:var(--id-danger)!important;color:#fff!important}
html.id-content-page body button.button.danger[type="submit"]:hover,
html.id-content-page body button.danger[type="submit"]:hover,
html.id-map-page body button.button.danger[type="submit"]:hover,
html.id-map-page body button.danger[type="submit"]:hover{background:#941c14!important;border-color:#941c14!important}
