/* ============ Личный кабинет участника ============ */

.cab-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  padding-top: 40px;
  padding-bottom: 80px;
}

/* ---- боковое меню ---- */
.cab-nav {
  position: sticky;
  top: 96px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.cab-user { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.cab-avatar {
  width: 44px; height: 44px; flex: 0 0 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  font-weight: 700; font-size: 17px;
}
.cab-user-text { display: flex; flex-direction: column; min-width: 0; }
.cab-user-text strong { font-size: 15px; line-height: 1.3; }
.cab-user-text small { color: var(--muted); font-size: 12.5px; }

.cab-links { display: flex; flex-direction: column; gap: 3px; }
.cab-links a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--ink); font-size: 15px; text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.cab-links a:hover { background: var(--surface-2); }
.cab-links a.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.cab-badge {
  background: var(--accent-soft); color: var(--ink);
  border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 600;
}
.cab-links a.is-active .cab-badge { background: rgba(0, 122, 64, .12); color: var(--brand); }

.cab-nav-foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.cab-logout { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.cab-logout:hover { color: var(--brand); }
.cab-logout svg { width: 18px; height: 18px; }

/* ---- шапка раздела ---- */
.cab-main { min-width: 0; }
.cab-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin-bottom: 24px;
}
.cab-head h1 { font-size: clamp(24px, 3vw, 30px); margin: 0; line-height: 1.2; }
.cab-head p { color: var(--muted); margin: 8px 0 0; max-width: 620px; }
.cab-head__aside { display: flex; align-items: center; gap: 12px; }
.cab-kicker {
  display: inline-block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 6px;
}

/* ---- сообщения ---- */
.cab-messages { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.cab-msg {
  padding: 12px 16px; border-radius: 12px; font-size: 14.5px;
  background: var(--brand-soft); color: var(--brand); border: 1px solid rgba(0, 122, 64, .18);
}
.cab-msg--error { background: #fdeceb; color: #a3241c; border-color: #f3c9c5; }
.cab-msg--info { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.cab-msg--warning { background: #fff5e5; color: #8a5a00; border-color: #f2dfb8; }

.cab-alert {
  padding: 13px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 14.5px;
  background: #fdeceb; color: #a3241c; border: 1px solid #f3c9c5;
}
.cab-alert--soft { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.cab-alert a { color: var(--brand); text-decoration: underline; }

/* ---- карточки обзора ---- */
.cab-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 26px; }
.cab-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.cab-card__label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cab-card__value { font-size: 26px; line-height: 1.1; }
.cab-card__link { margin-top: auto; font-size: 14.5px; font-weight: 600; color: var(--brand); }

.cab-progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.cab-progress span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.cab-progress--wide { width: 200px; }

.cab-note { font-size: 13.5px; color: var(--muted); margin: 0; }
.cab-note--ok { color: var(--brand); }
.field-hint { font-size: 12.5px; color: var(--muted); }

.cab-flag {
  font-size: 12.5px; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.cab-flag--ok { background: var(--brand-soft); color: var(--brand); border-color: rgba(0, 122, 64, .2); }

/* ---- панели ---- */
.cab-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; margin-bottom: 18px;
}
.cab-panel--hint { background: var(--surface-2); }
.cab-panel--answer { border-color: rgba(0, 122, 64, .35); }
.cab-panel__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 14px;
}
.cab-panel__head h2 { font-size: 18px; margin: 0; }
.cab-panel__head a { font-size: 14px; color: var(--brand); }
.cab-text { font-size: 15px; line-height: 1.65; color: var(--ink); }
.cab-text p { margin: 0 0 12px; }
.cab-amount { font-size: 16px; font-weight: 600; margin: 0 0 12px; }

.cab-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 15px; line-height: 1.55; }
.cab-steps strong { display: block; }

/* ---- список заявлений ---- */
.cab-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cab-list li + li { border-top: 1px solid var(--line); }
.cab-list a {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto;
  gap: 14px; align-items: center; padding: 13px 0;
  color: var(--ink); text-decoration: none; font-size: 15px;
}
.cab-list a:hover .cab-list__subject { color: var(--brand); }
.cab-list__num { color: var(--muted); font-size: 13.5px; }
.cab-list__subject { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cab-list time { color: var(--muted); font-size: 13.5px; white-space: nowrap; }

.cab-status {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: 12.5px; background: var(--surface-2); color: var(--muted); white-space: nowrap;
}
.cab-status--lg { font-size: 13.5px; padding: 5px 14px; }
.cab-status--submitted { background: #eaf3ff; color: #15527f; }
.cab-status--review { background: #fff5e5; color: #8a5a00; }
.cab-status--approved { background: #e6f4ec; color: #0b6b3a; }
.cab-status--rejected { background: #fdeceb; color: #a3241c; }
[data-theme="dark"] .cab-status--submitted { background: #12293c; color: #8fc2e8; }
[data-theme="dark"] .cab-status--review { background: #33290f; color: #e5c07b; }
[data-theme="dark"] .cab-status--approved { background: #10301f; color: #74d3a3; }
[data-theme="dark"] .cab-status--rejected { background: #33191a; color: #ef9a94; }

/* ---- таблица ---- */
.cab-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.cab-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.cab-table th, .cab-table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.cab-table th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.cab-table tr:last-child td { border-bottom: 0; }
.cab-table a { color: var(--ink); text-decoration: none; }
.cab-table a:hover { color: var(--brand); }
.cab-table__num { color: var(--muted); }

/* ---- пустые состояния ---- */
.cab-empty {
  padding: 22px; border: 1px dashed var(--line); border-radius: 12px;
  text-align: left; color: var(--muted); font-size: 14.5px;
}
.cab-empty p { margin: 0 0 14px; }
.cab-empty--big { text-align: center; padding: 48px 24px; }
.cab-empty--big h2 { margin: 0 0 10px; color: var(--ink); }
.cab-empty--big p { max-width: 520px; margin: 0 auto 20px; }

/* ---- формы ---- */
.cab-form { display: flex; flex-direction: column; gap: 18px; }
.cab-form--narrow { max-width: 680px; }
.cab-fieldset {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 22px; margin: 0;
}
.cab-fieldset legend {
  padding: 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); font-weight: 600;
}
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 13px; color: var(--muted); }
.field-input {
  width: 100%; box-sizing: border-box;
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field-input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 122, 64, .13);
}
.field-input--area { resize: vertical; min-height: 120px; }
.field-input--select { appearance: none; background-image: none; }
.field-error { color: #b3261e; font-size: 13px; }
.cab-form-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* ---- вход ---- */
.cab-login { padding: 64px 0 96px; background: var(--surface-2); }
.cab-login__inner {
  display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
  gap: 56px; align-items: center;
}
.cab-login__card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow);
}
.cab-login__card h1 { font-size: 26px; margin: 6px 0 10px; }
.cab-lead { color: var(--muted); font-size: 14.5px; margin: 0 0 22px; }
.cab-login__form { display: flex; flex-direction: column; gap: 16px; }
.cab-login__form .field-input { height: 48px; padding: 12px 14px; }
.cab-login__submit { width: 100%; justify-content: center; padding: 13px; height: 48px; }
.cab-login__foot { margin-top: 18px; font-size: 13.5px; color: var(--muted); }
.cab-login__foot a { color: var(--brand); }
.cab-login__aside h2 { font-size: clamp(20px, 2.2vw, 27px); margin: 0 0 12px; line-height: 1.24; }
.cab-login__aside-lead { margin: 0 0 24px; max-width: 680px; color: var(--muted); font-size: 15px; line-height: 1.6; }

.cab-features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 30px; }
.cab-features li { display: flex; align-items: flex-start; gap: 12px; }
.cab-feature__icon {
  flex: 0 0 38px; width: 38px; height: 38px;
  display: grid; place-items: center; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand);
}
.cab-feature__icon svg { width: 20px; height: 20px; }
.cab-feature__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cab-feature__body strong { font-size: 15px; color: var(--ink); }
.cab-feature__body span { font-size: 14px; line-height: 1.55; color: var(--muted); }

.cab-login__aside-foot {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line);
}

@media (max-width: 1240px) {
  .cab-features { grid-template-columns: 1fr; gap: 16px; }
}

/* ---- адаптив ---- */
@media (max-width: 1024px) {
  .cab-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cab-login__inner { grid-template-columns: 1fr; gap: 32px; }
  .cab-login__aside { order: 2; }
}

@media (max-width: 860px) {
  .cab-shell { grid-template-columns: 1fr; gap: 20px; padding-top: 26px; }
  .cab-nav { position: static; }
  .cab-links { flex-direction: row; flex-wrap: wrap; }
  .cab-links a { flex: 0 0 auto; }
  .cab-nav-foot { margin-top: 12px; padding-top: 12px; }
}

@media (max-width: 640px) {
  .cab-cards { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  .cab-list a { grid-template-columns: 54px minmax(0, 1fr); row-gap: 6px; }
  .cab-list time { grid-column: 2; }
  .cab-head { align-items: flex-start; }
  .cab-login { padding: 32px 0 56px; }
  .cab-login__card { padding: 24px; }
}
