/* ============================================================
   kormup.ru — стили личного кабинета (вход, регистрация, заказы)
   Используются переменные и .btn/.container/.logo из style.css
   ============================================================ */

.app-body {
  background: var(--cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Шапка ---------- */
.app-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.app-header__inner { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 16px; }
.app-nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.app-nav__link { font-weight: 600; color: var(--ink); font-size: 15px; }
.app-nav__link:hover { color: var(--green-700); }
.app-nav__user { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--green-900); font-family: "Montserrat", sans-serif; }
.app-nav__logout {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; color: var(--green-700); border: 2px solid var(--line);
}
.app-nav__logout:hover { background: #fdecea; color: #b03a2e; border-color: #f0b3ab; }
.app-nav__logout svg { display: block; }

.badge {
  font-family: "Open Sans", sans-serif; font-size: 11.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 50px; letter-spacing: .3px;
}
.badge--manager { background: var(--gold-500); color: #3a2c05; }
.badge--client  { background: #e6f0e6; color: var(--green-700); }

/* ---------- Основной блок ---------- */
.app-main { flex: 1; padding: 36px 0 64px; }

/* ---------- Сообщения ---------- */
.alert { padding: 13px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 15px; border: 1px solid transparent; }
.alert--success { background: #eaf6ea; border-color: #bfe3c0; color: #1e6b24; }
.alert--error   { background: #fdecea; border-color: #f5c6c0; color: #b03a2e; }

/* ---------- Карточка авторизации ---------- */
.auth-card {
  max-width: 440px; margin: 24px auto; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px; box-shadow: var(--shadow);
}
.auth-card__title { font-size: 24px; color: var(--green-900); margin-bottom: 8px; }
.auth-form { margin-top: 18px; }
.auth-switch { text-align: center; margin-top: 18px; font-size: 14.5px; color: var(--muted); }
.auth-switch a { color: var(--gold-600); font-weight: 700; }
.auth-switch a:hover { color: var(--green-700); }

/* ---------- Поля форм ---------- */
.field { display: block; margin-bottom: 15px; }
.field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field i { color: #c0392b; font-style: normal; }
.field input, .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 13px; font-size: 15px; font-family: inherit; color: var(--ink);
  background: #fcfbf6; transition: border-color .2s, box-shadow .2s; resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(224,169,27,.18); background: #fff;
}
.field-row { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- Кабинет ---------- */
.cab-head { margin-bottom: 26px; }
.cab-title { font-size: 26px; color: var(--green-900); }
.cab-grid { display: grid; grid-template-columns: 360px 1fr; gap: 24px; align-items: start; }

.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm);
}
.card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card__title { font-size: 19px; color: var(--green-900); }
.cab-form { position: sticky; top: 92px; }
.counter {
  background: var(--green-700); color: #fff; font-weight: 700; font-size: 13px;
  min-width: 26px; height: 26px; padding: 0 8px; border-radius: 50px;
  display: inline-flex; align-items: center; justify-content: center;
}
.empty { color: var(--muted); padding: 24px 0; text-align: center; }

/* ---------- Таблица заказов ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th, .table td { text-align: left; padding: 12px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-family: "Montserrat", sans-serif; font-size: 12.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.table tbody tr:hover { background: #faf8f0; }
.nowrap { white-space: nowrap; }

/* ---------- Статусы ---------- */
.status { display: inline-block; padding: 4px 11px; border-radius: 50px; font-size: 12.5px; font-weight: 700; }
.status--new        { background: #e7f0fb; color: #1f5fa8; }
.status--processing { background: #fff3d6; color: #9a6a00; }
.status--shipped    { background: #e6eefc; color: #3a4fb0; }
.status--done       { background: #e7f6e8; color: #1e7a27; }
.status--cancelled  { background: #fdecea; color: #b03a2e; }

.status-form { margin: 0; }
.status-select {
  border: 1.5px solid var(--line); border-radius: 50px; padding: 5px 10px;
  font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer; background: #fff;
}
.status-select--new        { color: #1f5fa8; }
.status-select--processing { color: #9a6a00; }
.status-select--shipped    { color: #3a4fb0; }
.status-select--done       { color: #1e7a27; }
.status-select--cancelled  { color: #b03a2e; }

/* ---------- Подвал ---------- */
.app-footer { background: var(--green-900); color: rgba(255,255,255,.8); padding: 20px 0; }
.app-footer .container { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.app-footer a { color: var(--gold-400); }

/* ---------- Адаптив ---------- */
@media (max-width: 860px) {
  .cab-grid { grid-template-columns: 1fr; }
  .cab-form { position: static; }
}
@media (max-width: 480px) {
  .auth-card { padding: 24px; }
  .app-nav { gap: 10px; }
  .app-nav__link { font-size: 14px; }
}
