/* Портал «АртТеррас»: токены и компоненты по handoff (materials/README.md, «Дизайн-токены»).
   Значения — из прототипа один в один; меняешь — сверяй с ArtTerras Calculator.dc.html. */
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/GolosText-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/GolosText-Medium.ttf') format('truetype'); }
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/GolosText-SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/GolosText-Bold.ttf') format('truetype'); }

:root {
  --primary: #00525C; --primary-hover: #003F47; --link-hover: #003A42;
  --bg: #F2F5F5; --surface: #FFFFFF;
  --text: #17282C; --text-2: #4D5F63; --text-3: #3E5054; --placeholder: #7F8E91;
  --border-card: #DFE5E6; --border-input: #C9D3D5; --border-choice: #D5DDDF; --divider: #E7ECED;
  --head-bg: #F5F8F8; --ring: 0 0 0 3px #D5E7E9;
  --accent-1: #E6F0F1; --accent-2: #E1EEEF; --accent-3: #F1F7F7;
  --yellow: #FBE38E; --yellow-filled: #FDF6D8; --yellow-text: #2A2200; --yellow-btn: #4A3B00;
  --error-bg: #FBE3E0; --error: #C8372D; --error-text: #A3241B;
  --mount-bg: #E7ECF6; --mount: #3B5088;
  --toast: #17282C; --toast-action: #8FD3DB;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 400 14px/1.45 'Golos Text', system-ui, sans-serif; font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--link-hover); }

/* ── шапка ── */
.hdr { position: sticky; top: 0; z-index: 20; height: 60px; background: var(--surface); border-bottom: 1px solid var(--border-card); }
.hdr-in { max-width: 1440px; margin: 0 auto; padding: 0 24px; height: 100%; display: flex; align-items: center; gap: 28px; }
.hdr-logo { display: flex; align-items: center; height: 60px; cursor: pointer; }
.hdr-logo img { height: 30px; display: block; }
.nav { display: flex; height: 60px; gap: 22px; min-width: 0; overflow-x: auto; scrollbar-width: none; }   /* узкий экран */
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: none; }
.nav a { display: flex; align-items: center; font-weight: 500; color: var(--text-3); }
.nav a.on { color: var(--primary); box-shadow: inset 0 -2px 0 var(--primary); }
.hdr-user { margin-left: auto; display: flex; align-items: center; gap: 12px; position: relative; flex: none; }
.hdr-user .who { text-align: right; line-height: 1.25; }
.hdr-user .who b { display: block; font-size: 13px; font-weight: 500; }
.hdr-user .who span { font-size: 12px; color: var(--text-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-2); color: var(--primary); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; border: 0; cursor: pointer; }
.menu { position: absolute; right: 0; top: 46px; background: var(--surface); border: 1px solid var(--border-card); border-radius: 10px; box-shadow: 0 14px 36px rgba(12,38,42,.18); padding: 6px; min-width: 200px; }
.menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 7px; cursor: pointer; }
.menu button:hover { background: var(--accent-3); }

/* ── страница ── */
.page { max-width: 1440px; margin: 0 auto; padding: 24px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.sub { color: var(--text-2); font-size: 14px; margin-top: 4px; }
.card { background: var(--surface); border: 1px solid var(--border-card); border-radius: 12px; }
.empty { padding: 48px 24px; text-align: center; color: var(--text-2); }
.empty b { display: block; color: var(--text); font-size: 16px; font-weight: 600; margin-bottom: 6px; }

/* ── кнопки и поля ── */
.btn { height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--border-input); background: var(--surface); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; font-size: 14px; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.danger { color: var(--error-text); }
.btn:disabled { opacity: .55; cursor: default; }
.btn:focus-visible, .input:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--primary); }
.input { height: 40px; width: 100%; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border-input); background: var(--surface); }
.input::placeholder { color: var(--placeholder); }
label.field { display: block; margin-bottom: 14px; }
label.field span { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 5px; }
.err { background: var(--error-bg); color: var(--error-text); border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; font-size: 13px; }

/* ── вход ── */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login { width: 100%; max-width: 400px; padding: 32px; }
.login img { height: 46px; display: block; margin: 0 auto 22px; }
.login h1 { font-size: 20px; text-align: center; margin-bottom: 20px; }
.login .btn { width: 100%; }

/* ── таблица ── */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--head-bg); padding: 10px 16px; }
.tbl th:first-child { border-top-left-radius: 12px; }
.tbl th:last-child { border-top-right-radius: 12px; }
.tbl td { padding: 14px 16px; border-top: 1px solid var(--divider); vertical-align: middle; }
.tbl tr.off td { color: var(--placeholder); }
.tbl .acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.pill { display: inline-block; height: 24px; line-height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 600; background: #EEF1F2; color: var(--text-3); }
.pill.admin { background: var(--mount-bg); color: var(--mount); }
.muted { color: var(--text-2); font-size: 13px; }

/* ── модальное окно и тост ── */
.overlay { position: fixed; inset: 0; background: rgba(16,32,36,.45); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 50; }
.modal { width: 100%; max-width: 540px; background: var(--surface); border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.25); padding: 24px; }
.modal h2 { font-size: 18px; font-weight: 600; margin: 0 0 14px; }
.modal .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.secret { font: 600 18px/1.4 ui-monospace, 'SFMono-Regular', Menlo, monospace; background: var(--accent-3); border: 1px dashed var(--border-input); border-radius: 8px; padding: 12px; text-align: center; letter-spacing: .04em; user-select: all; }
.chips { display: flex; gap: 8px; }
.chip { height: 32px; padding: 0 14px; border-radius: 16px; border: 1px solid var(--border-input); background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 500; }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.toast { position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); background: var(--toast); color: #fff; border-radius: 10px; padding: 12px 18px; z-index: 60; box-shadow: 0 10px 30px rgba(0,0,0,.25); }

@media (max-width: 720px) {
  .hdr-in { gap: 14px; padding: 0 16px; }
  .hdr-logo img { height: 24px; }
  .nav { gap: 16px; }                /* меню прокручивается внутри шапки, а не вся страница вбок (было 616 px при 390) */
  .hdr-user .who { display: none; }
  .page { padding: 16px; }
  .tbl .hide-sm { display: none; }
}
