/* One button standard for every page (public site, sign-in, portal, owner area). Loaded last on each page.
   Every button 38px (small ones too, so rows always line up), sign-in method choices 44px; 13px text, medium weight, 1px border, 8px corners. */
:root { --btn-h: 38px; --btn-h-sm: 38px; --btn-h-lg: 44px; --btn-fs: 13px; --btn-fs-sm: 13px; --btn-fw: 500; --btn-r: 8px; }
.button, .btn, .locale-button, .lang, .lang-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--btn-h) !important; min-height: var(--btn-h) !important;
  padding-top: 0 !important; padding-bottom: 0 !important;
  font-size: var(--btn-fs) !important; font-weight: var(--btn-fw) !important; line-height: 1.2 !important;
  letter-spacing: .01em !important; text-transform: none; border-width: 1px !important;
  border-radius: var(--btn-r) !important; box-shadow: none !important; white-space: nowrap;
}
.btn.small, .button.small, .lang, .lang-button { height: var(--btn-h-sm) !important; min-height: var(--btn-h-sm) !important; font-size: var(--btn-fs-sm) !important; }
.button.auth-choice { display: grid; justify-content: stretch; text-align: left; height: var(--btn-h-lg) !important; min-height: var(--btn-h-lg) !important; font-size: 14px !important; }
.locale-button { letter-spacing: .04em !important; }
.chat-ctx > summary { height: var(--btn-h) !important; min-height: var(--btn-h) !important; font-size: var(--btn-fs) !important; font-weight: var(--btn-fw) !important; border-radius: var(--btn-r) !important; }
body .topbar-tools > .btn, body .topbar-tools > .lang { height: var(--btn-h) !important; min-height: var(--btn-h) !important; font-size: var(--btn-fs) !important; }
/* Fields that sit in a row with buttons take the same height. */
body[data-mode=admin] .content select, body[data-mode=admin] .content input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=color]):not([type=range]) { height: var(--btn-h); min-height: var(--btn-h); box-sizing: border-box; }

/* One field standard on every page (Nikos, 2026-10-20): text, e-mail, date, number, search and every
   select are the same 38px box with 14px text; text areas share the font, padding, border and radius. */
:is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=color]):not([type=range]):not([type=hidden]),select) {
  height: 38px !important; min-height: 38px !important; box-sizing: border-box !important;
  padding: 0 12px !important; font-size: 14px !important; line-height: 36px !important;
  border-width: 1px !important; border-radius: 8px !important; font-family: inherit;
}
select { padding-right: 32px !important; }
input[type=date], input[type=datetime-local], input[type=time], input[type=month] { line-height: normal !important; }
textarea { box-sizing: border-box !important; padding: 10px 12px !important; font-size: 14px !important; line-height: 1.5 !important; border-width: 1px !important; border-radius: 8px !important; font-family: inherit; }

/* Status lamps in the owner area (Nikos, 2026-10-20): one pill everywhere, 22px, 11px capitals, a coloured dot
   for the tone (green done/active, amber waiting, red closed/failed, blue planned, grey neutral). */
body[data-mode=admin] .badge {
  display: inline-flex !important; align-items: center; gap: 6px; height: 22px !important; min-height: 22px !important;
  padding: 0 9px 0 8px !important; border: 1px solid transparent !important; border-radius: 999px !important;
  font-size: 11px !important; font-weight: 600 !important; line-height: 1 !important; letter-spacing: .04em !important;
  text-transform: uppercase; white-space: nowrap; vertical-align: middle; box-shadow: none !important;
  --lamp: #9aa3ad; background: rgba(154,163,173,.14) !important; color: #c9d1da !important;
}
body[data-mode=admin] .badge::before { content: ""; flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 0 2px color-mix(in srgb, var(--lamp) 22%, transparent); }
body[data-mode=admin] .badge.good { --lamp: #3fb68b; background: rgba(63,182,139,.14) !important; color: #8fdcbf !important; }
body[data-mode=admin] .badge.warn { --lamp: #e0a33a; background: rgba(224,163,58,.15) !important; color: #f0c779 !important; }
body[data-mode=admin] .badge.bad { --lamp: #e2694f; background: rgba(226,105,79,.15) !important; color: #f2a796 !important; }
body[data-mode=admin] .badge.blue { --lamp: #4f9fe0; background: rgba(79,159,224,.15) !important; color: #9fcbf0 !important; }
html[data-theme=light] body[data-mode=admin] .badge { background: #f1f0ec !important; color: #4a4a44 !important; --lamp: #8d8a80; }
html[data-theme=light] body[data-mode=admin] .badge.good { background: #e7f4ee !important; color: #1f5a44 !important; --lamp: #2f9e72; }
html[data-theme=light] body[data-mode=admin] .badge.warn { background: #fbf1df !important; color: #7a5212 !important; --lamp: #d08a17; }
html[data-theme=light] body[data-mode=admin] .badge.bad { background: #fbe8e3 !important; color: #8a3324 !important; --lamp: #d0533a; }
html[data-theme=light] body[data-mode=admin] .badge.blue { background: #e6f0f9 !important; color: #1d4c72 !important; --lamp: #3b88c9; }
/* Tabs and the top-bar link follow the button standard. */
body[data-mode=admin] .tab, body[data-mode=admin] .topbar .text-button { height: var(--btn-h) !important; min-height: var(--btn-h) !important; font-size: var(--btn-fs) !important; font-weight: var(--btn-fw) !important; border-radius: var(--btn-r) !important; padding: 0 14px !important; display: inline-flex; align-items: center; }
body[data-mode=admin] .content summary { font-size: 14px; font-weight: 500; }
/* The top bar is navy in both themes, so its lamp uses the dark colours. */
html body[data-mode=admin] .topbar .badge { background: rgba(255,255,255,.08) !important; color: #d5dbe2 !important; --lamp: #9aa3ad; }
