/* Portbase IBSW — foundation (split from the approved mockup design system) */

:root {
  color-scheme:light;
  --bg:#f3f5f4;
  --card:#fff;
  --tx:#1f2937;
  --mu:#6b7280;
  --bd:#e3e7e5;
  --ac:#15803d;
  --acs:#e8f5ed;
  --ok:#15803d;
  --wr:#d97706;
  --dn:#dc2626;
  --idle:#eef0f1;
  --idleb:#cfd5d9;
  --act:#16a34a;
  box-sizing:border-box;
  padding-top:env(safe-area-inset-top,0px);
  padding-bottom:env(safe-area-inset-bottom,0px);
}

* {
  box-sizing:border-box;
}

html {
  margin:0;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  background:var(--bg);
  color:var(--tx);
  font-size:14px;
}

body {
  margin:0;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  background:var(--bg);
  color:var(--tx);
  font-size:14px;
}

body {
  min-height:100%;
}

h1 {
  font-size:20px;
  margin:0 0 4px;
}

h2 {
  font-size:15px;
  margin:0 0 8px;
}

label {
  display:block;
  font-size:12px;
  color:var(--mu);
  margin:10px 0 3px;
}

input {
  width:100%;
  padding:8px;
  border:1px solid var(--bd);
  border-radius:8px;
  background:var(--bg);
  color:var(--tx);
  font-size:14px;
}

select {
  width:100%;
  padding:8px;
  border:1px solid var(--bd);
  border-radius:8px;
  background:var(--bg);
  color:var(--tx);
  font-size:14px;
}

textarea {
  width:100%;
  padding:8px;
  border:1px solid var(--bd);
  border-radius:8px;
  background:var(--bg);
  color:var(--tx);
  font-size:14px;
}

.err {
  color:var(--dn);
  font-size:12px;
  margin-top:6px;
}

.toast {
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  bottom:calc(18px + env(safe-area-inset-bottom,0px));
  background:#1b1f24;
  color:#fff;
  padding:9px 16px;
  border-radius:20px;
  font-size:13px;
  z-index:60;
}

.note {
  background:var(--acs);
  color:var(--tx);
  border-radius:8px;
  padding:8px 10px;
  font-size:12px;
  margin-bottom:12px;
}

.rl {
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--mu);
  font-weight:600;
  margin-bottom:6px;
}

h1 {
  font-size:20px;
  margin:0 0 4px;
}

input:focus,
select:focus,
textarea:focus {
  outline:none;
  border-color:var(--ac);
  box-shadow:0 0 0 3px var(--acs);
}

:focus-visible {
  outline: 2px solid var(--ac);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
