/* ============================================================================
   GLAZOV.STRION - Web/Dashboard. Токены и компоненты взяты буквально из прототипа
   (VisualReferences/prototype/components.html, styles.css) — экран не заводит
   своих цветов, радиусов и отступов, только эти токены (WI-032, «Правила применения»).
   Только то подмножество компонентов, что нужно каркасу входа; остальное добавят
   017/018/028 по мере необходимости, тем же принципом.
   ========================================================================== */

@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/Inter-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../assets/fonts/Inter-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../assets/fonts/Inter-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../assets/fonts/Inter-Bold.woff2") format("woff2");
}

:root {
  --bg:          #f1f4f8;
  --surface:     #ffffff;
  --surface-2:   #f8fafc;
  --surface-3:   #e4e9f0;
  --line:        #e2e8f0;
  --line-strong: #cbd5e1;
  --ink:         #1e293b;
  --ink-2:       #475569;
  --ink-3:       #64748b;

  --accent:      #3d6a99;
  --accent-dark: #2f5680;
  --accent-ink:  #ffffff;

  --risk:        #8a5600;  --risk-bg:     #fbf0dd;
  --norm:        #16704a;

  --fs-xs:  0.75rem;
  --fs-sm:  0.8125rem;
  --fs-md:  0.9375rem;
  --fs-lg:  1.0625rem;
  --fs-xl:  1.25rem;

  --s-1: 0.25rem; --s-2: 0.5rem;  --s-3: 0.75rem;
  --s-4: 1rem;    --s-5: 1.25rem; --s-6: 1.5rem; --s-8: 2rem;

  --r-sm: 6px; --r-md: 8px;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --tap: 44px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: var(--fs-md)/1.45 var(--font);
}
h1, p { margin: 0; }
a { color: var(--accent); }
img { max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.page {
  max-width: 480px;
  margin: 0 auto;
  background: var(--surface);
  min-height: 100vh;
  padding-bottom: var(--s-8);
}
@media (min-width: 560px) {
  .page { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

.brand {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4) 0;
}
.brand__product {
  font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink);
}

.appbar {
  padding: var(--s-2) var(--s-4) var(--s-4);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.appbar__top { display: flex; align-items: center; gap: var(--s-2); min-height: var(--tap); flex-wrap: wrap; }
.appbar h1 { font-size: var(--fs-xl); line-height: 1.2; flex: 1; min-width: 0; overflow-wrap: break-word; }
.appbar__sub { color: var(--ink-2); font-size: var(--fs-sm); margin-top: var(--s-1); }

.section { padding: var(--s-5) var(--s-4) 0; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--s-4);
  margin-bottom: var(--s-3);
}
.card__text { margin-top: var(--s-2); }
.card__text:first-child { margin-top: 0; }

.empty {
  border: 1px dashed var(--line-strong); border-radius: var(--r-md);
  padding: var(--s-4); color: var(--ink-2); font-size: var(--fs-sm);
  background: var(--surface-2);
}
.empty b { display: block; color: var(--ink); font-size: var(--fs-md); margin-bottom: var(--s-1); }

.notice {
  border: 1px solid #ecd7ab; background: var(--risk-bg); color: var(--ink);
  border-radius: var(--r-md); padding: var(--s-3) var(--s-4); font-size: var(--fs-sm);
}
.notice b { color: var(--risk); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--tap); padding: var(--s-2) var(--s-4);
  border-radius: var(--r-md); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink);
  font: 600 var(--fs-md)/1.2 var(--font); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--surface-2); }
.btn:active { background: var(--surface-3); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-dark); }
.btn--block { width: 100%; }
.btn--sm { padding: 0 var(--s-3); font-size: var(--fs-sm); min-height: var(--tap); }

select {
  font: var(--fs-md)/1.4 var(--font); color: var(--ink);
  padding: var(--s-2) var(--s-3); border: 1px solid var(--line-strong); border-radius: var(--r-md);
  background: var(--surface); min-height: var(--tap);
}

.org-switch { display: flex; gap: var(--s-2); align-items: center; margin-top: var(--s-3); flex-wrap: wrap; }
.org-switch select { flex: 1; min-width: 0; }

.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
