/* ==================================================================
   Приложение конференции — академический стиль
   ================================================================== */

:root {
  --paper: #f6f2e9;
  --paper-deep: #efe8da;
  --card: #fffdf8;
  --ink: #1e2a36;
  --ink-soft: #3c4a58;
  --muted: #6d7783;
  --line: #dcd3c3;
  --line-soft: #e9e2d5;
  --navy: #22384f;
  --navy-2: #2c4a66;
  --burgundy: #7b2f3e;
  --gold: #a8854f;
  --gold-soft: #e3c690;
  --ok: #2f6b4f;
  --ok-bg: #e9f2ec;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(30, 42, 54, 0.05), 0 10px 26px -20px rgba(30, 42, 54, 0.45);
  --nav-h: 64px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 12% -8%, #fffdf7 0%, rgba(255, 253, 247, 0) 52%),
    repeating-linear-gradient(0deg, rgba(34, 56, 79, 0.016) 0 1px, transparent 1px 3px);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: "PT Serif", Georgia, "Times New Roman", serif;
  font-weight: 600;
  color: var(--navy);
  margin: 0;
  line-height: 1.25;
}

p {
  margin: 0 0 10px;
}

a {
  color: var(--navy-2);
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12.5px;
}

.nowrap {
  white-space: nowrap;
}

.link {
  color: var(--burgundy);
  font-size: 13.5px;
  text-decoration: none;
  border-bottom: 1px solid rgba(123, 47, 62, 0.3);
}

/* ------------------------------------------------------------------ */
/* каркас                                                              */
/* ------------------------------------------------------------------ */

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

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 26px 18px calc(18px + env(safe-area-inset-bottom));
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.75), rgba(246, 242, 233, 0.4));
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-emblem {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title {
  font-family: "PT Serif", Georgia, serif;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
}

.brand-sub {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 3px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s;
}

.nav-item:hover {
  background: rgba(34, 56, 79, 0.05);
}

.nav-item.is-active {
  background: #f0e9da;
  color: var(--navy);
  border-left-color: var(--burgundy);
  font-weight: 600;
}

.nav-ico {
  position: relative;
  display: inline-flex;
  color: currentColor;
}

.nav-badge {
  position: absolute;
  top: -7px;
  right: -9px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--burgundy);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
  letter-spacing: 0;
}

.sidebar-foot {
  margin-top: auto;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 253, 248, 0.6);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--navy);
  color: #f3ece0;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-name {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: var(--muted);
}

.view {
  padding: 40px 48px 72px;
  min-width: 0;
}

.page {
  max-width: 1000px;
  margin: 0 auto;
}

.boot {
  padding: 60px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ------------------------------------------------------------------ */
/* шапка страницы                                                      */
/* ------------------------------------------------------------------ */

.page-head {
  margin-bottom: 24px;
}

.page-head h1 {
  font-size: clamp(25px, 3.2vw, 32px);
  letter-spacing: -0.01em;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 7px;
}

.sub {
  color: var(--muted);
  margin: 7px 0 0;
  font-size: 14.5px;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.row-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* ------------------------------------------------------------------ */
/* карточки                                                            */
/* ------------------------------------------------------------------ */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.card-head h3 {
  font-size: 17px;
}

.card-body {
  padding: 18px 20px;
}

.empty-card {
  padding: 30px;
}

.empty-card h2 {
  font-size: 21px;
  margin-bottom: 8px;
}

.empty-card .btn {
  margin-top: 8px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.grid-2 > .card {
  margin-bottom: 0;
}

.grid-detail {
  align-items: start;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 3px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
  font-family: inherit;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(168, 133, 79, 0.6);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(180deg, #2b4763, #22384f);
  border-color: #1a2b3d;
  color: #fbf7ee;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 6px -3px rgba(0, 0, 0, 0.45);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #315171, #263f59);
}

.btn-secondary {
  background: #fffdf8;
  border-color: var(--line);
  color: var(--navy);
}

.btn-secondary:hover {
  border-color: #c5b8a2;
  background: #fdf9f1;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-soft);
}

.btn-ghost:hover {
  background: rgba(34, 56, 79, 0.06);
}

.btn-danger {
  background: #fff;
  border-color: #e2c9cd;
  color: var(--burgundy);
}

.btn-danger:hover {
  background: #fbf1f2;
}

.btn-sm {
  padding: 8px 13px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--ink-soft);
  border-radius: 3px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.btn-icon:hover {
  border-color: #c5b8a2;
  color: var(--navy);
}

.btn-icon-danger:hover {
  border-color: #dfb9bf;
  color: var(--burgundy);
  background: #fdf6f6;
}

.btn[disabled] {
  opacity: 0.65;
  cursor: default;
}

/* ------------------------------------------------------------------ */
/* метки                                                               */
/* ------------------------------------------------------------------ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 2px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-gold {
  color: #7a5a22;
  background: #f7eeda;
  border-color: #e8d5ae;
}

.badge-ok {
  color: var(--ok);
  background: var(--ok-bg);
  border-color: #cfe2d5;
}

.badge-soft {
  color: #44566a;
  background: #f3efe5;
  border-color: #e4dccb;
}

.badge-muted {
  color: #6f7780;
  background: #f2efe9;
  border-color: #e3ded4;
}

/* ------------------------------------------------------------------ */
/* главная                                                             */
/* ------------------------------------------------------------------ */

.hero {
  position: relative;
  background: linear-gradient(150deg, #26405b 0%, #1d3145 62%, #223a50 100%);
  color: #f4efe3;
  border: 1px solid #16283a;
  border-radius: var(--radius);
  padding: 26px 28px 24px;
  margin-bottom: 18px;
  overflow: hidden;
  box-shadow: 0 14px 34px -26px rgba(22, 40, 58, 0.9);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(227, 198, 144, 0.22);
  pointer-events: none;
}

.hero-top {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.hero .badge-gold {
  color: #efd8a6;
  background: rgba(227, 198, 144, 0.12);
  border-color: rgba(227, 198, 144, 0.42);
}

.hero .badge-ok {
  color: #cfe7d8;
  background: rgba(47, 107, 79, 0.28);
  border-color: rgba(140, 199, 164, 0.4);
}

.hero-title {
  color: #fbf7ee;
  font-size: clamp(21px, 2.6vw, 27px);
  max-width: 30ch;
  position: relative;
  z-index: 1;
}

.hero-date {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d9dfe6;
  margin: 12px 0 2px;
  font-size: 14.5px;
  position: relative;
  z-index: 1;
}

.hero-place {
  color: #a9b6c3;
  font-size: 13.5px;
  margin: 0;
  position: relative;
  z-index: 1;
}

.hero-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 22px;
  position: relative;
  z-index: 1;
}

.count {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.count-value {
  font-family: "PT Serif", Georgia, serif;
  font-size: 29px;
  color: var(--gold-soft);
  line-height: 1;
}

.count-label {
  font-size: 12px;
  color: #9fadbb;
  letter-spacing: 0.04em;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero .btn-secondary {
  background: rgba(255, 253, 248, 0.1);
  border-color: rgba(255, 253, 248, 0.32);
  color: #f6f1e6;
}

.hero .btn-secondary:hover {
  background: rgba(255, 253, 248, 0.17);
}

.hero .btn-ghost {
  color: #cfd9e2;
}

.hero .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  margin-bottom: 18px;
  background: #fbf5e6;
  border: 1px solid #e6d5b0;
  border-left: 3px solid var(--gold);
  border-radius: 3px;
}

.banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13.5px;
}

.banner-text strong {
  color: #6f5220;
}

.banner-text span {
  color: #7c6a4d;
  font-size: 12.5px;
}

/* список */
.list {
  display: flex;
  flex-direction: column;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 20px;
  border-top: 1px solid var(--line-soft);
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
}

.list-row:first-child {
  border-top: none;
}

.list-row:hover {
  background: #fdfaf3;
}

.list-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.list-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.list-sub {
  font-size: 12.5px;
  color: var(--muted);
}

.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-row.is-unread .list-title::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--burgundy);
  margin-right: 7px;
  vertical-align: middle;
}

.list-side {
  flex: 0 0 auto;
}

.admin-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 18px 20px;
  background: linear-gradient(180deg, #fffdf8, #f9f5ec);
}

.admin-strip h3 {
  font-size: 17px;
}

.admin-strip p {
  margin: 4px 0 0;
  font-size: 13px;
}

.admin-strip-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------------ */
/* формы                                                               */
/* ------------------------------------------------------------------ */

.form-card {
  padding: 4px 22px 22px;
}

.form-section {
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
}

.form-section:last-of-type {
  border-bottom: none;
}

.form-section-title {
  font-size: 14px;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.form-grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
  min-width: 0;
}

.field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.req {
  color: var(--burgundy);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fffefa;
  color: var(--ink);
  font-family: inherit;
  font-size: 14.5px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field textarea {
  resize: vertical;
  min-height: 96px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #a4a9af;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--navy-2);
  box-shadow: 0 0 0 3px rgba(44, 74, 102, 0.1);
  outline: none;
}

.hint {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
}

.form-error {
  margin: 4px 0 14px;
  padding: 10px 12px;
  border: 1px solid #e2c2c7;
  background: #fbf0f1;
  color: #7b2f3e;
  font-size: 13.5px;
  border-radius: 3px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* ------------------------------------------------------------------ */
/* конференции                                                         */
/* ------------------------------------------------------------------ */

.conf-list {
  display: flex;
  flex-direction: column;
}

.conf-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 20px;
  border-top: 1px solid var(--line-soft);
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
}

.conf-card:first-child {
  border-top: none;
}

.conf-card:hover {
  background: #fdfaf3;
}

.conf-list.is-muted .conf-card {
  opacity: 0.72;
}

.conf-date {
  flex: 0 0 54px;
  text-align: center;
  border-right: 1px solid var(--line);
  padding-right: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.conf-day {
  font-family: "PT Serif", Georgia, serif;
  font-size: 23px;
  line-height: 1;
  color: var(--navy);
}

.conf-month {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 3px;
}

.conf-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.conf-title {
  font-family: "PT Serif", Georgia, serif;
  font-size: 16px;
  color: var(--navy);
}

.conf-meta {
  font-size: 12.5px;
  color: var(--muted);
}

.conf-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.conf-arrow {
  color: #b3aa99;
  flex: 0 0 auto;
}

.crumbs {
  display: flex;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--navy);
}

.facts {
  margin: 0;
  padding: 6px 20px 18px;
}

.facts > div {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-soft);
}

.facts > div:last-child {
  border-bottom: none;
}

.facts dt {
  color: var(--muted);
  font-size: 12.5px;
}

.facts dd {
  margin: 0;
  font-size: 14px;
}

.facts-compact > div {
  grid-template-columns: 130px 1fr;
}

.connect {
  padding: 0 20px 20px;
}

.locked {
  padding: 0 20px 20px;
  font-style: italic;
}

.prose {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------------ */
/* уведомления                                                         */
/* ------------------------------------------------------------------ */

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

.note {
  display: flex;
  gap: 12px;
  padding: 15px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.note:hover {
  background: #fdfaf3;
}

.note.is-unread {
  border-left-color: var(--burgundy);
  background: #fffdf7;
}

.note-dot {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
  margin-top: 7px;
}

.note.is-unread .note-dot {
  background: var(--burgundy);
}

.note-body {
  min-width: 0;
}

.note-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 3px;
}

.note-kind {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  font-weight: 600;
}

.note-time {
  font-size: 11.5px;
  color: var(--muted);
}

.note h3 {
  font-size: 15.5px;
  margin-bottom: 3px;
}

.note p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------------ */
/* админка                                                             */
/* ------------------------------------------------------------------ */

.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  overflow-x: auto;
}

.tab {
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.tab:hover {
  color: var(--navy);
}

.tab.is-active {
  color: var(--navy);
  border-bottom-color: var(--burgundy);
}

.admin-list {
  display: flex;
  flex-direction: column;
}

.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-top: 1px solid var(--line-soft);
  flex-wrap: wrap;
}

.admin-row:first-child {
  border-top: none;
}

.admin-row-main {
  min-width: 0;
  flex: 1;
}

.admin-row-title {
  font-family: "PT Serif", Georgia, serif;
  font-size: 15.5px;
  color: var(--navy);
}

.admin-row-meta {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.admin-row-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.admin-row-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
  background: #faf6ee;
}

.filters .field {
  margin-bottom: 0;
}

.field-narrow {
  justify-content: flex-end;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 1080px;
}

.data-table th {
  text-align: left;
  padding: 10px 12px;
  background: #f4efe4;
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

.data-table tbody tr:hover td {
  background: #fdfaf3;
}

.data-table .num {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  width: 40px;
}

.cell-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.cell-wide {
  min-width: 220px;
}

.select-inline {
  font-family: inherit;
  font-size: 12px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fffefa;
  color: var(--ink-soft);
  max-width: 200px;
}

.table-foot {
  padding: 10px 20px;
  border-top: 1px solid var(--line-soft);
  background: #faf6ee;
}

/* ------------------------------------------------------------------ */
/* профиль                                                             */
/* ------------------------------------------------------------------ */

.version {
  text-align: center;
  color: #a8a396;
  font-size: 11.5px;
  margin-top: 26px;
}

/* ------------------------------------------------------------------ */
/* авторизация                                                         */
/* ------------------------------------------------------------------ */

body.is-auth .sidebar {
  display: none;
}

body.is-auth .shell {
  grid-template-columns: 1fr;
}

body.is-auth .view {
  padding: 0;
}

.auth {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  min-height: 100vh;
}

.auth-side {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 52px;
  background: linear-gradient(155deg, #27425e 0%, #1a2c3e 58%, #203649 100%);
  color: #f2ede2;
}

.auth-side::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(227, 198, 144, 0.26);
  pointer-events: none;
}

.auth-emblem {
  margin-bottom: 24px;
  width: 62px;
  height: 62px;
}

.auth-side h1 {
  color: #fbf7ee;
  font-size: clamp(26px, 3.1vw, 38px);
  line-height: 1.17;
  max-width: 18ch;
  margin: 10px 0 14px;
}

.auth-sub {
  color: #c3ceda;
  font-size: 15px;
  max-width: 34ch;
}

.auth-points {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  max-width: 34ch;
}

.auth-points li {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  color: #dde4eb;
}

.auth-points svg {
  color: var(--gold-soft);
  flex: 0 0 auto;
}

.auth-foot {
  margin: 34px 0 0;
  color: #92a2b2;
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

.auth-main {
  display: grid;
  place-items: center;
  padding: 40px 28px;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  padding: 30px 30px 26px;
  margin: 0;
}

.auth-card h2 {
  font-size: 24px;
  margin-bottom: 6px;
}

.auth-card .muted {
  font-size: 13.5px;
  margin-bottom: 20px;
}

.auth-switch {
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
  margin: 18px 0 0;
}

.auth-switch a {
  color: var(--burgundy);
  font-weight: 600;
  text-decoration: none;
}

.auth-hint {
  text-align: center;
  font-size: 11.5px;
  color: #98a0a8;
  margin: 10px 0 0;
}

/* ------------------------------------------------------------------ */
/* тост                                                                */
/* ------------------------------------------------------------------ */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 14px);
  max-width: min(560px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 3px;
  background: var(--navy);
  color: #fbf7ee;
  font-size: 13.5px;
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
  text-align: center;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast-ok {
  background: #2c6049;
}

.toast-error {
  background: #742c3a;
}

/* ------------------------------------------------------------------ */
/* адаптив                                                             */
/* ------------------------------------------------------------------ */

@media (max-width: 980px) {
  .shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    height: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-right: none;
    border-bottom: 1px solid var(--line);
    background: #f6f2e9;
  }

  .brand-emblem {
    width: 38px;
    height: 38px;
  }

  .brand-title {
    font-size: 13.5px;
  }

  .brand-sub {
    display: none;
  }

  .nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    flex-direction: row;
    gap: 0;
    padding: 5px 4px calc(5px + env(safe-area-inset-bottom));
    background: #fffdf8;
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 22px -18px rgba(30, 42, 54, 0.7);
    overflow-x: auto;
  }

  .nav-item {
    flex: 1 0 0;
    flex-direction: column;
    gap: 3px;
    padding: 6px 2px;
    border-left: none;
    border-radius: 0;
    font-size: 10px;
    color: var(--muted);
    min-width: 0;
    text-align: center;
  }

  .nav-item.is-active {
    background: transparent;
    color: var(--burgundy);
    box-shadow: inset 0 2px 0 var(--burgundy);
  }

  .nav-label {
    font-size: 10px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sidebar-foot {
    display: none;
  }

  .view {
    padding: 18px 14px calc(var(--nav-h) + 34px);
  }

  .page-head {
    margin-bottom: 18px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .grid-2 > .card {
    margin-bottom: 0;
  }

  .grid-2 {
    gap: 14px;
    margin-bottom: 16px;
  }

  .hero {
    padding: 22px 20px 20px;
  }

  .hero::after {
    inset: 9px;
  }

  .hero-bottom {
    margin-top: 18px;
  }

  .count-value {
    font-size: 25px;
  }

  .form-grid,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }

  .form-card {
    padding: 0 16px 18px;
  }

  .filters {
    grid-template-columns: 1fr;
    padding: 14px 16px;
  }

  .field-narrow {
    display: none;
  }

  .card-head {
    padding: 13px 16px;
  }

  .card-body {
    padding: 15px 16px;
  }

  .list-row,
  .conf-card,
  .admin-row,
  .note {
    padding-left: 16px;
    padding-right: 16px;
  }

  .facts {
    padding: 4px 16px 14px;
  }

  .facts > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .connect,
  .locked {
    padding-left: 16px;
    padding-right: 16px;
  }

  .tabs {
    margin-bottom: 16px;
  }

  .auth {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }

  .auth-side {
    padding: 30px 22px 26px;
    justify-content: flex-start;
  }

  .auth-side::after {
    inset: 9px;
  }

  .auth-emblem {
    width: 46px;
    height: 46px;
    margin-bottom: 14px;
  }

  .auth-side h1 {
    font-size: 22px;
    max-width: 22ch;
    margin: 6px 0 8px;
  }

  .auth-sub {
    font-size: 13.5px;
  }

  .auth-points,
  .auth-foot {
    display: none;
  }

  .auth-main {
    padding: 20px 14px 40px;
    align-items: start;
  }

  .auth-card {
    padding: 22px 18px 20px;
  }

  .auth-card h2 {
    font-size: 21px;
  }

  .toast {
    bottom: calc(var(--nav-h) + 18px);
  }
}

@media (max-width: 420px) {
  .nav-label {
    font-size: 9.5px;
  }

  .brand-title {
    font-size: 12.5px;
  }

  .hero-title {
    font-size: 19px;
  }

  .conf-card {
    gap: 12px;
  }

  .conf-date {
    flex-basis: 46px;
    padding-right: 9px;
  }

  .conf-day {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
