/* İZAN Server pages, on top of the open core's shared layer (web/shared/ui: tokens.css, components.css,
   topbar.css, sheet.css, palette.css; vendored by scripts/vendor-ui.sh). Tokens, the top bar, badges,
   buttons, cards, the form sheet and the palette come from there; this file holds what only the server
   has: the page frame, status dots, extra button kinds, its fields and the sign-in card. IBM Plex comes from
   this server (public/fonts.css): the pages load nothing from another host. */
html,
body {
  margin: 0;
  height: 100%;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
[hidden] {
  display: none !important;
}

/* ——— Status dots (the shared .dot is the shape) ——— */
.dot.working {
  background: var(--working);
}
.dot.waiting {
  background: var(--waiting);
}
.dot.idle {
  background: color-mix(in srgb, var(--idle) 40%, var(--surface));
}
.dot.done {
  background: var(--done);
}
.dot.error {
  background: var(--error);
}

/* ——— Buttons: the server's extra kinds; a button in a row keeps its own width ——— */
.btn.danger {
  color: var(--error);
  border-color: color-mix(in srgb, var(--red) 30%, transparent);
}
.btn.danger.solid {
  background: var(--error);
  border-color: var(--error);
  color: var(--white);
}
.btn.small {
  height: 26px;
  padding: 0 9px;
  font-size: 12px;
}
.row .btn,
.form-row .btn,
.line .btn,
header .btn {
  flex: none;
}

/* ——— Fields ——— */
label.field {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
input[type='text'],
input[type='email'],
input[type='password'],
input[type='number'],
select.input {
  height: 36px;
  padding: 0 10px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 16px; /* iOS zooms into a field under 16 px */
  color: var(--text);
  outline: none;
  min-width: 0;
}
input:focus,
select.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accentsoft);
}
.mono {
  font-family: var(--mono);
}
.muted {
  color: var(--muted);
}
.error-text {
  color: var(--error);
  font-size: 13px;
  min-height: 18px;
}
/* The page links in the shared top bar: no underline; the current page in the accent colour. */
a.badge {
  text-decoration: none;
}
a.badge.on {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
/* The language picker in the sign-in page's top bar. */
.badge select {
  border: 0;
  background: transparent;
  font-size: 12px;
  color: var(--text);
  outline: none;
}

/* ——— Sign-in ——— */
body.signin {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px var(--s4) var(--s5);
  min-height: 100%;
  /* The ground of direction B (web/shared/ui/tokens.css): two soft lights and the dot grid. */
  background-color: var(--surface-0);
  background-image: var(--ground-image);
  background-size: var(--ground-size);
}
#signin-card {
  background: var(--surface-1);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  width: 420px;
  max-width: 100%;
  padding: 26px var(--s5) 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#signin-card h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 650;
}
#signin-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
#signin-card .note {
  font-size: 12px;
  border-top: 1px solid var(--line);
  padding-top: var(--s3);
}
/* SAML is off by license (owner 2026-10-19): a calm amber note above the other ways in. */
#signin-card p.notice {
  padding: var(--s3);
  border-radius: var(--r);
  background: color-mix(in srgb, var(--amber) 10%, transparent);
  color: var(--text);
}
#signin-card .row {
  display: flex;
  justify-content: flex-end;
}
#sso-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
#signin-card .btn.sso {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  font-size: 14px;
  text-decoration: none;
}
#signin-card .or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}
#signin-card .or::before,
#signin-card .or::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--line);
}

/* ——— The landing's type: labels in sentence case, never spaced capitals (owner rule, #90) ——— */
:is(#form, .ui-form) label,
#profile-menu .group {
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
}

/* ——— Phone: a tap target is at least 44 px tall (owner decision 2026-10-22, design review 1) ———
   The controls keep their look; only their height grows on a narrow screen. */
@media (max-width: 759px) {
  .btn,
  .btn.small,
  .btn.sm,
  .badge,
  #user,
  .chips button,
  .segmented > button,
  .day-grid > button,
  .choice,
  input[type='text'],
  input[type='email'],
  input[type='password'],
  input[type='number'],
  input[type='search'],
  input[type='date'],
  input[type='time'],
  input[type='datetime-local'],
  select {
    min-height: 44px;
  }
}

/* ——— Less motion when the person asks for it: no transitions, no animation, no smooth scroll ——— */
@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;
  }
}
