/* =========================================================
   Дизайн-система: поиск судебных дел / заседаний ВС РА
   Направление: светлый минимализм, много воздуха.
   Заголовки — PT Serif (институциональный, «судебный» характер),
   текст и интерфейс — Inter (нейтральный, хорошо читается в таблицах).
   ========================================================= */

:root {
  --navy: #10233f;      /* шапка, футер, активные элементы */
  --navy-2: #17335a;    /* hover для тёмных элементов */
  --blue: #2563a6;      /* ссылки, фокус, акценты */
  --blue-soft: #eaf1fa; /* мягкий акцентный фон */
  --ink: #1c2431;       /* основной текст */
  --muted: #6b7686;     /* вторичный текст */
  --line: #e6ebf2;      /* границы */
  --surface: #ffffff;   /* карточки */
  --background: #f7f9fc;/* фон страницы */

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(16,35,63,.04), 0 16px 40px rgba(16,35,63,.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--ink);
  background: var(--background);
  font: 15px/1.6 "Inter", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 { font-family: "PT Serif", Georgia, serif; font-weight: 700; }

.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

/* ---------- Шапка ---------- */
.header { background: var(--navy); }
.header__inner { min-height: 84px; display: flex; align-items: center; }
.block_logo { flex: 0 0 auto; padding: 12px 20px 12px 0; display: flex; align-items: center; }
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo__mark {
  flex: 0 0 auto;
  height: 46px;
  width: auto;
  object-fit: contain;
}
.logo__text {
  color: #fff;
  font-family: "PT Serif", serif;
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 700;
  white-space: nowrap;
}
.header__avatar { flex: 1; background: transparent !important; }
.nav { display: flex; align-items: center; gap: 4px; overflow-x: auto; }
.nav__link {
  display: flex;
  align-items: center;
  padding: 30px 16px 26px;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  font-size: 13.5px;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.nav__link h3 { margin: 0; font-family: inherit; font-size: inherit; font-weight: 600; }
.nav__link:hover { color: #fff; }
.nav__link.current-item { color: #fff; border-color: #5b9bdc; }

/* ---------- Каркас контента ---------- */
.content { padding: 48px 0 64px; }
.content__inner {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.form_table { display: grid; grid-template-columns: minmax(300px, 340px) minmax(0, 1fr); }
.form_table form {
  padding: 36px 32px;
  border-right: 1px solid var(--line);
  background: #fbfcfe;
}

.content--header_text h4 {
  margin: 0 0 28px;
  font-size: 20px;
  line-height: 1.35;
  color: var(--navy);
}

/* ---------- Переключатель «Дела / Заседания» ---------- */
.page-switcher {
  display: flex;
  gap: 4px;
  margin: 0 0 28px;
  padding: 4px;
  background: var(--blue-soft);
  border-radius: 999px;
}
.page-switcher__link {
  flex: 1;
  padding: 10px 10px;
  border: 0;
  border-radius: 999px;
  text-align: center;
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.page-switcher__link:hover { color: var(--blue); }
.page-switcher__link--active { color: #fff; background: var(--navy); }

/* ---------- Поля формы ---------- */
.block_elements { display: grid; gap: 22px; }
.block__element h2 {
  margin: 0 0 8px;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--muted);
}
.form_select, .form_input_id, .form_input_date_time_id {
  width: 100%;
  height: 44px;
  padding: 10px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.form_select { cursor: pointer; }
.form_select:focus, .form_input_id:focus, .form_input_date_time_id:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37,99,166,.12);
}
.form_select_half { width: calc(50% - 4px); }
.form_select_half + .form_select_half { margin-left: 8px; }
.form_input_date_time_id { width: calc(50% - 6px); }
.form_input_date_time_id + .form_input_date_time_id { margin-left: 12px; }

.btn_div { display: flex; align-items: center; gap: 18px; margin-top: 30px; }
.btn_div .btn {
  min-width: 120px;
  height: 44px;
  padding: 0 20px;
  color: #fff;
  background: var(--navy);
  border: 0;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn_div .btn:hover { background: var(--navy-2); }
.btn_div .btn:active { transform: translateY(1px); }
.show_all a { color: var(--muted); font-weight: 600; text-decoration: none; }
.show_all a:hover { color: var(--blue); text-decoration: underline; }

/* ---------- Результаты поиска ---------- */
.upper_wrapper { min-width: 0; padding: 36px 32px; }
.wrapper-search-tables { min-width: 0; }
.wrapper-search-tables h5 {
  margin: 0 0 20px;
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 13.5px;
  font-weight: 600;
}

.custom_table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: 13.5px;
}
.custom_table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  background: #f3f6fa;
  border-bottom: 1px solid var(--line);
}
.custom_table td { padding: 15px 16px; border-top: 1px solid var(--line); vertical-align: top; color: var(--ink); }
.custom_table tr:hover td { background: var(--blue-soft); }
.custom_table a { color: var(--blue); font-weight: 600; text-decoration: none; }
.custom_table a:hover { text-decoration: underline; }

.pagination_block { margin-top: 24px; }
.pagination { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.pagination a, .pagination span {
  display: inline-block;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--navy);
  text-decoration: none;
  font-size: 13px;
}
.pagination a:hover { border-color: var(--blue); color: var(--blue); }
.pagination__item.active .pagination__link {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* ---------- Футер ---------- */
.footer { color: rgba(255,255,255,.7); background: var(--navy); }
.footer__inner { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 24px 0; background: transparent !important; }
.footer_info_name { display: flex; gap: 8px; flex-wrap: wrap; }
.footer h1 { margin: 0; font-family: "Inter", sans-serif; font-size: 12px; font-weight: 400; }

/* =========================================================
   Карточка дела (detail.html)
   ========================================================= */
.content_details { margin-top: 24px; }
.list_of_case { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: #fff; }
.row_card { display: flex; }
.row_card:not(:first-child) { border-top: 1px solid var(--line); }
.row_card .left { flex: 0 0 260px; background: #f7f9fc; font-size: 13px; font-weight: 600; color: var(--muted); padding: 14px 18px; }
.row_card .right { flex: 1; min-width: 0; font-size: 14px; color: var(--ink); padding: 14px 18px; word-break: break-word; }

.StateHistory_HearingsCase { margin-top: 28px; }
.StateHistory_HearingsCase__title { margin: 0 0 12px; font-size: 17px; color: var(--navy); }
.StateHistory_HearingsCase__table { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); }
.StateHistory_HearingsCase__table table { width: 100%; min-width: 560px; border-collapse: collapse; }
.StateHistory_HearingsCase__table th {
  padding: 12px 16px;
  background: #f3f6fa;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.StateHistory_HearingsCase__table td { padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink); }

.go_back { margin-top: 28px; }

/* =========================================================
   Адаптация
   ========================================================= */
@media (max-width: 900px) {
  .form_table { grid-template-columns: 1fr; }
  .form_table form { border-right: 0; border-bottom: 1px solid var(--line); }
  .custom_table { display: block; overflow-x: auto; white-space: nowrap; }
  .row_card { flex-direction: column; }
  .row_card .left { flex: none; }
}

@media (max-width: 640px) {
  .container, .footer__inner { width: min(100% - 24px, 1180px); }
  .header__inner { min-height: 64px; }
  .block_logo { flex-basis: 60px; padding-right: 12px; }
  .nav__link { padding: 20px 10px 16px; font-size: 12px; }
  .nav__link h3 { font-size: 12px; }
  .content { padding: 20px 0 36px; }
  .form_table form, .upper_wrapper { padding: 22px 18px; }
  .content__inner { border-radius: 14px; }
  .page-switcher { flex-direction: column; border-radius: 14px; }
  .btn_div { justify-content: space-between; }
  .custom_table th, .custom_table td { padding: 10px 12px; }
  .row_card .left, .row_card .right { padding: 12px 14px; }
}
