/* SrgArt · Директорам — базовые токены и каркас (тёмная тема, десктоп 1440).
   Токены взяты из утверждённых макетов (_ref/mockup). Без inline-style и JS. */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: block;
  src: url("./fonts/manrope.ttf") format("truetype");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/ibm-plex-mono-400.ttf") format("truetype");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/ibm-plex-mono-500.ttf") format("truetype");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/ibm-plex-mono-600.ttf") format("truetype");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/ibm-plex-mono-700.ttf") format("truetype");
}

:root {
  color-scheme: dark;
  --background: #0E0F11;
  --surface: #16181B;
  --surface-alt: #1D2024;
  --ink: #ECEDEE;
  --muted: #A3A9B0;
  --accent: #22D3EE;
  --on-accent: #0E0F11;
  --border: #2B2F35;
  --success: #7FC8A9;
  --warning: #D9A55B;
  --danger: #E07A6B;
  --focus: #22D3EE;
  --body: "Manrope";
  --display: "Manrope";
  --mono: "IBM Plex Mono";
  --body-size: 16px;
  --display-size: 44px;
  --heading-size: 31.25px;
  --display-weight: 800;
  --body-weight: 400;
  --leading: 1.6;
  --measure: 64ch;
  --gutter: clamp(20px, 5vw, 64px);
  --section-gap: 80px;
  --item-gap: 24px;
  --padding: 28px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--background);
}

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font: var(--body-weight) var(--body-size)/var(--leading) var(--body), sans-serif;
  overflow-wrap: anywhere;
  font-synthesis: none;
  letter-spacing: 0;
}

p, h1, h2, h3, figure {
  margin: 0;
}

h1, h2, h3 {
  font-family: var(--display), serif;
  font-weight: var(--display-weight);
  letter-spacing: -0.5px;
  text-wrap: balance;
}

h1 {
  font-size: clamp(30px, calc(24.8px + 1.33vw), 44px);
  line-height: 1.15;
  max-width: 30ch;
}

h2 {
  font-size: clamp(26px, calc(24.05px + 0.5vw), 31.25px);
  line-height: 1.2;
  max-width: 30ch;
}

h3 {
  font-size: 20px;
  line-height: 1.3;
}

a {
  color: var(--accent);
}

code, .mono {
  font-family: var(--mono), monospace;
}

/* --- Каркас: боковая навигация --- */

.app-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 44px;
  padding: 32px 24px;
  background: var(--surface);
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.3;
}

.brand-name {
  font-weight: 700;
}

.brand-tagline {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  width: 100%;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  line-height: 1.4;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.nav-link:hover {
  background: var(--surface-alt);
  color: var(--ink);
}

/* Активный пункт: заливка строки + жирный, без боковой полосы (по BASELINE). */
.nav-link[aria-current="page"] {
  background: var(--surface-alt);
  box-shadow: none;
  color: var(--ink);
  font-weight: 700;
}

.sidebar-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.user-name {
  font-size: 14px;
  color: var(--muted);
}

.app-main {
  min-width: 0;
  padding: 32px var(--gutter) 64px;
}

.section {
  margin-top: var(--section-gap);
}

.section:first-child {
  margin-top: 0;
}

.section-lead {
  margin-top: 20px;
  color: var(--muted);
  max-width: var(--measure);
}

.eyebrow {
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 24px;
}

.caption {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/* --- Карточки и списки --- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: var(--padding);
  min-width: 0;
}

.item-list {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stub-card h3 {
  margin-bottom: 12px;
}

/* --- Кнопки --- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  max-width: 100%;
  padding: 12px 22px;
  border: 1px solid var(--muted);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.button:hover {
  border-color: var(--ink);
}

.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.button-primary:hover {
  border-color: var(--accent);
  filter: brightness(1.06);
}

.button-ghost {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  border-color: var(--border);
}

.button-ghost:hover {
  color: var(--ink);
  border-color: var(--muted);
}

/* --- Формы и страница входа --- */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--gutter);
}

.login-card {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.login-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.login-title {
  font-size: 31.25px;
  line-height: 1.2;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.login-form .button {
  align-self: stretch;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field label {
  font-weight: 600;
  font-size: 15px;
}

.field input {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
  min-height: 50px;
}

.field input:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--focus);
}

.field input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.field-hint {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.form-error {
  color: var(--danger);
  font-size: 15px;
  line-height: 1.5;
}

.form-feedback {
  color: var(--accent);
}

.logout-form {
  margin: 0;
}
