:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --line-strong: #b7b9bf;
  --primary: #0071e3;
  --primary-hover: #0077ed;
  --olive: #6f8450;
  --olive-hover: #607245;
  --radius: 20px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body.theme-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.45;
  background: var(--bg);
}

.site-wrap {
  flex: 1;
}

.site-header {
  padding: 0.3rem 0 0.5rem;
  border: 0 !important;
  border-bottom: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.site-header-center {
  text-align: center;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none !important;
}

.brand-link:hover {
  color: var(--ink);
  text-decoration: none !important;
}

img.brand-logo {
  width: 80px !important;
  height: 80px !important;
  min-width: 80px;
  max-width: 80px !important;
  max-height: 80px !important;
  flex: 0 0 80px;
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: 16px;
}

.brand-name {
  display: none;
}

.header-title {
  margin: 0.32rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.header-sub {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.header-actions {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.header-actions form {
  margin: 0;
}

.panel-soft {
  padding: 1.4rem clamp(0.35rem, 1.2vw, 0.95rem);
  border-top: 1px solid #e4e4e7;
}

.chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #424245;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.24rem 0.58rem;
  margin: 0 0.35rem 0.35rem 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--ink);
  font-family: inherit;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.form-label {
  color: #3a3a3c;
  font-weight: 600;
  margin-bottom: 0.48rem;
}

.form-control,
.form-select {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}

.form-control:focus,
.form-select:focus {
  border-color: #8fbef2;
  box-shadow: 0 0 0 0.22rem rgba(0, 113, 227, 0.12);
}

input[type="file"] {
  padding: 0.38rem 0.45rem;
}

input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #1d1d1f;
  font-weight: 500;
  letter-spacing: 0;
  padding: 0.42rem 0.8rem;
  margin-right: 0.62rem;
  cursor: pointer;
}

input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover {
  border-color: var(--line-strong);
  background: #fefefe;
}

.btn {
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 0.54rem 1.04rem;
}

.btn-sm {
  padding: 0.4rem 0.82rem;
  font-size: 0.87rem;
}

.btn-main {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
}

.btn-main:hover,
.btn-main:focus {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}

.btn-olive {
  border: 1px solid var(--olive);
  background: var(--olive);
  color: #fff;
}

.btn-olive:hover,
.btn-olive:focus {
  background: var(--olive-hover);
  border-color: var(--olive-hover);
  color: #fff;
}

.btn-soft {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
}

.btn-soft:hover,
.btn-soft:focus {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink);
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 0.86rem;
}

.site-footer a {
  color: #1d1d1f;
  text-decoration: none;
  font-weight: 500;
}

.site-footer a:hover {
  color: #1d1d1f;
  text-decoration: underline;
}

a {
  color: #0066cc;
}

a:hover {
  color: #004f9e;
}

.table {
  --bs-table-bg: transparent;
}

.modal-content {
  border: 1px solid var(--line);
  border-radius: 16px;
}

.cookie-consent {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%) translateY(8px);
  width: min(700px, calc(100% - 24px));
  z-index: 1060;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 26px rgba(17, 20, 29, 0.08);
  padding: 0.65rem 0.8rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.cookie-consent.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.cookie-consent__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
}

.cookie-consent__text {
  margin: 0;
  color: #494952;
  font-size: 0.83rem;
  line-height: 1.35;
}

.cookie-consent__text a {
  color: #1d1d1f;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-consent__btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .site-header {
    padding: 0.25rem 0 0.45rem;
  }

  img.brand-logo {
    width: 64px !important;
    height: 64px !important;
    min-width: 64px;
    max-width: 64px !important;
    max-height: 64px !important;
    flex-basis: 64px;
  }

  .header-title {
    font-size: 0.9rem;
  }

  .panel-soft {
    padding: 1.12rem 0.32rem;
  }

  .cookie-consent {
    width: calc(100% - 18px);
    bottom: 9px;
    border-radius: 12px;
    padding: 0.6rem 0.66rem;
  }

  .cookie-consent__inner {
    gap: 0.58rem;
    align-items: flex-start;
    flex-direction: column;
  }

  .cookie-consent__btn {
    width: 100%;
  }
}
