:root {
  --bg: #06101c;
  --bg-2: #0b1b30;
  --bg-3: #091422;
  --panel: rgba(10, 21, 37, 0.84);
  --panel-strong: rgba(11, 24, 48, 0.96);
  --panel-soft: rgba(23, 42, 71, 0.74);
  --accent: #f3b33d;
  --accent-2: #47d1b4;
  --text: #f5f7fb;
  --muted: #adc1db;
  --border: rgba(255, 255, 255, 0.12);
  --header-bg: rgba(6, 16, 28, 0.7);
  --footer-bg: rgba(8, 17, 31, 0.9);
  --nav-hover: rgba(255, 255, 255, 0.06);
  --panel-gradient: linear-gradient(180deg, rgba(19, 33, 56, 0.94), rgba(10, 18, 33, 0.94));
  --identity-header-bg: linear-gradient(135deg, rgba(71, 209, 180, 0.1), rgba(243, 179, 61, 0.12));
  --input-bg: rgba(255, 255, 255, 0.06);
  --placeholder: rgba(245, 247, 251, 0.45);
  --alert-info-bg: rgba(71, 209, 180, 0.16);
  --alert-warning-bg: rgba(243, 179, 61, 0.18);
  --alert-warning-text: #fff2cf;
  --request-card-bg: rgba(255, 255, 255, 0.03);
  --option-bg: #f5f7fb;
  --option-text: #08111f;
  --option-disabled: #5f6f84;
}

html[data-theme="light"] {
  --bg: #f6f8fc;
  --bg-2: #eaf0f7;
  --bg-3: #dfe7f3;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: rgba(244, 247, 252, 0.98);
  --panel-soft: rgba(235, 241, 250, 0.92);
  --text: #0e1a2b;
  --muted: #4d617c;
  --border: rgba(14, 26, 43, 0.12);
  --header-bg: rgba(255, 255, 255, 0.76);
  --footer-bg: rgba(239, 244, 251, 0.96);
  --nav-hover: rgba(14, 26, 43, 0.06);
  --panel-gradient: linear-gradient(180deg, rgba(248, 250, 255, 0.98), rgba(234, 240, 248, 0.98));
  --identity-header-bg: linear-gradient(135deg, rgba(71, 209, 180, 0.16), rgba(243, 179, 61, 0.18));
  --input-bg: rgba(255, 255, 255, 0.94);
  --placeholder: rgba(57, 73, 97, 0.55);
  --alert-info-bg: rgba(71, 209, 180, 0.2);
  --alert-warning-bg: rgba(243, 179, 61, 0.24);
  --alert-warning-text: #5a3c00;
  --request-card-bg: rgba(255, 255, 255, 0.68);
  --option-bg: #ffffff;
  --option-text: #0e1a2b;
  --option-disabled: #72819a;
}

html {
  font-size: 16px;
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(71, 209, 180, 0.13), transparent 20%),
    radial-gradient(circle at 90% 12%, rgba(243, 179, 61, 0.16), transparent 18%),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 48%, var(--bg-3) 100%);
}

a {
  text-decoration: none;
}

.app-header {
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.navbar {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.navbar-brand {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.navbar-brand,
.nav-link,
.navbar .btn {
  color: var(--text) !important;
}

.navbar .btn-light,
.navbar .btn-light:hover,
.navbar .btn-light:focus,
.navbar .btn-light:active {
  color: #08111f !important;
}

.nav-link {
  padding: 0.65rem 0.9rem !important;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.navbar-brand:hover {
  color: var(--accent) !important;
}

.nav-link:hover {
  background: var(--nav-hover);
  transform: translateY(-1px);
}

.hero-panel,
.content-panel,
.offer-card,
.stat-card,
.identity-nav-panel,
.identity-content-panel {
  border: 1px solid var(--border);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.18);
}

.hero-panel,
.content-panel {
  background: var(--panel);
  backdrop-filter: blur(12px);
  border-radius: 28px;
  padding: 2rem;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 2rem;
  align-items: center;
}

.hero-pill {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(243, 179, 61, 0.18);
  color: #ffd27a;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1.05;
  margin-bottom: 1rem;
}

.hero-copy p,
.section-heading p,
.content-panel p,
.identity-header p {
  color: var(--muted);
}

.hero-stats {
  display: grid;
  gap: 1rem;
}

.stat-card {
  background: var(--panel-soft);
  border-radius: 20px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.stat-card strong {
  font-size: 2rem;
  color: var(--accent);
}

.stat-card.dark {
  background: var(--panel-strong);
}

.offer-card,
.identity-nav-panel,
.identity-content-panel {
  background: var(--panel-gradient);
  border-radius: 24px;
  padding: 1.5rem;
}

.request-card {
  background: var(--request-card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.25rem;
}

.entity-list {
  display: grid;
  gap: 1rem;
}

.entity-list.compact {
  gap: 0.85rem;
}

.admin-search-group {
  display: grid;
  gap: 0.5rem;
}

.admin-table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
  --bs-table-border-color: rgba(255, 255, 255, 0.12);
  margin-bottom: 0;
  table-layout: auto;
}

.admin-table th,
.admin-table td {
  vertical-align: middle;
  white-space: normal;
  word-break: break-word;
  color: var(--text) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  line-height: 1.45;
}

.admin-table th {
  color: #f6f8fc !important;
  font-weight: 700;
  font-size: 0.95rem;
  padding-top: 0.95rem;
  padding-bottom: 0.95rem;
  background: rgba(255, 255, 255, 0.05);
  letter-spacing: 0.01em;
}

.admin-table td {
  color: #ffffff !important;
  font-size: 0.96rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.admin-table tbody tr {
  background: rgba(9, 18, 35, 0.22);
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.07);
}

.admin-table .small,
.admin-table td .text-light-emphasis,
.admin-table .text-light-emphasis {
  color: rgba(245, 247, 251, 0.9) !important;
}

.table-responsive {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(10, 20, 38, 0.24);
}

.admin-filter-panel .form-label,
.admin-filter-panel .form-control,
.admin-filter-panel .form-select {
  color: var(--text) !important;
}

.admin-filter-panel .form-control,
.admin-filter-panel .form-select {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
}

.admin-filter-panel .form-control::placeholder {
  color: rgba(245, 247, 251, 0.78);
}

.admin-filter-panel-note {
  color: rgba(245, 247, 251, 0.9) !important;
}

.offer-card .hero-pill {
  color: #fff4d6;
  background: rgba(186, 143, 69, 0.28);
}

.admin-table .btn {
  font-weight: 600;
}

.organization-row-field {
  min-width: 0;
  color: var(--text) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}

.organization-row-field[readonly],
.organization-row-field:disabled {
  color: rgba(245, 247, 251, 0.96) !important;
  background: rgba(255, 255, 255, 0.1) !important;
  opacity: 1;
  -webkit-text-fill-color: rgba(245, 247, 251, 0.96);
}

.organization-row-field:disabled {
  cursor: not-allowed;
}

.organization-lock-button {
  min-width: 2.6rem;
}

.organization-lock-button span {
  display: inline-block;
  line-height: 1;
}

.admin-table tr.is-editing {
  background: rgba(243, 179, 61, 0.1) !important;
}

.admin-table tr.is-editing .organization-row-field {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(243, 179, 61, 0.45) !important;
}

html[data-theme="light"] .organization-row-field {
  color: #142134 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: rgba(32, 50, 74, 0.16) !important;
}

html[data-theme="light"] .organization-row-field[readonly],
html[data-theme="light"] .organization-row-field:disabled {
  color: #142134 !important;
  background: rgba(234, 240, 248, 0.98) !important;
  -webkit-text-fill-color: #142134;
}

html[data-theme="light"] .admin-table tr.is-editing {
  background: rgba(243, 179, 61, 0.16) !important;
}

html[data-theme="light"] .admin-table tr.is-editing .organization-row-field {
  background: rgba(255, 255, 255, 1) !important;
  border-color: rgba(180, 119, 12, 0.32) !important;
}

html[data-theme="light"] .admin-table th {
  color: #20324a !important;
  background: rgba(32, 50, 74, 0.08);
}

html[data-theme="light"] .admin-table td {
  color: #142134 !important;
}

html[data-theme="light"] .admin-table .small,
html[data-theme="light"] .admin-table .text-light-emphasis,
html[data-theme="light"] .admin-filter-panel-note {
  color: #4d617c !important;
}

html[data-theme="light"] .admin-filter-panel .form-control::placeholder {
  color: rgba(57, 73, 97, 0.6);
}

html[data-theme="light"] .admin-filter-panel .form-control,
html[data-theme="light"] .admin-filter-panel .form-select {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(32, 50, 74, 0.16);
}

html[data-theme="light"] .table-responsive {
  background: rgba(255, 255, 255, 0.92);
}

.entity-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--request-card-bg);
}

.entity-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.entity-copy h3 {
  margin-bottom: 0.35rem;
}

.entity-actions {
  display: grid;
  gap: 0.45rem;
  justify-items: end;
}

.entity-thumb {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  flex: 0 0 auto;
}

.catalog-highlight-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
}

.offer-meta {
  display: inline-block;
  color: #ffd27a;
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.identity-shell {
  display: grid;
  gap: 1.5rem;
}

.identity-header {
  background: var(--identity-header-bg);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 1.8rem 2rem;
}

.identity-header h1 {
  margin-bottom: 0.5rem;
}

.identity-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.identity-nav {
  display: grid;
  gap: 0.65rem;
}

.identity-nav-link {
  color: var(--text);
  display: block;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  border: 1px solid transparent;
  background: var(--request-card-bg);
  transition: all 0.2s ease;
}

.identity-nav-link:hover {
  color: var(--text);
  border-color: rgba(243, 179, 61, 0.35);
  background: rgba(243, 179, 61, 0.08);
}

.identity-nav-link.active {
  background: linear-gradient(135deg, rgba(243, 179, 61, 0.18), rgba(71, 209, 180, 0.12));
  border-color: rgba(243, 179, 61, 0.4);
  color: #fff1cf;
}

.identity-content-panel .row,
.identity-content-panel .col-md-6,
.identity-content-panel .col-md-4,
.identity-content-panel .col-sm-6,
.identity-content-panel .col-sm-9,
.identity-content-panel .col-md-9 {
  color: var(--text);
}

.identity-content-panel hr,
.content-panel hr {
  border-color: var(--border);
  opacity: 1;
}

.identity-content-panel .btn-primary,
.identity-content-panel .btn-danger,
.identity-content-panel .btn,
.btn-warning {
  border: none;
  border-radius: 14px;
  padding: 0.72rem 1.1rem;
}

.identity-content-panel .btn-primary,
.btn-warning {
  background: linear-gradient(135deg, var(--accent), #f7c86d);
  color: #08111f;
}

.identity-content-panel .btn-primary:hover,
.btn-warning:hover {
  color: #08111f;
  filter: brightness(1.04);
}

.identity-content-panel .btn-danger {
  background: linear-gradient(135deg, #ff8c8c, #ff6b7d);
}

.btn-outline-danger {
  color: #ffb4bc;
  border-color: rgba(255, 127, 143, 0.55);
}

.btn-outline-danger:hover {
  color: #08111f;
  background: #ff8c8c;
  border-color: #ff8c8c;
}

.form-control,
.form-select {
  background: var(--input-bg);
  border-color: var(--border);
  color: var(--text);
  border-radius: 16px;
  padding: 0.8rem 0.95rem;
}

.language-select {
  min-width: 4rem;
}

.btn-light {
  color: #08111f !important;
  background: #f3f4f6;
  border-color: #f3f4f6;
}

.btn-light:hover {
  color: #08111f !important;
  background: #ffffff;
  border-color: #ffffff;
}

.form-control::placeholder {
  color: var(--placeholder);
}

.form-select option {
  color: var(--option-text);
  background: var(--option-bg);
}

.form-select option:disabled {
  color: var(--option-disabled);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: #08111f;
  -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.9) inset;
  transition: background-color 5000s ease-in-out 0s;
}

.text-light-emphasis {
  color: rgba(245, 247, 251, 0.68) !important;
}

.form-control:focus,
.form-select:focus,
.btn:focus {
  box-shadow: 0 0 0 0.22rem rgba(243, 179, 61, 0.25);
  border-color: var(--accent);
}

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
}

.alert-info,
.alert-secondary,
.alert-warning,
.alert-danger {
  border: 1px solid var(--border);
  border-radius: 18px;
}

.alert-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: #08111f;
}

.alert-info {
  background: var(--alert-info-bg);
  color: var(--text);
}

.alert-warning {
  background: var(--alert-warning-bg);
  color: var(--alert-warning-text);
}

.alert-danger {
  background: rgba(255, 107, 125, 0.16);
  color: #ffd8de;
  border-color: rgba(255, 107, 125, 0.35);
}

.login-feedback.validation-summary-valid {
  display: none;
}

.login-feedback.validation-summary-errors {
  display: block;
  margin-bottom: 1rem;
}

.login-feedback ul {
  margin: 0;
  padding-left: 1.2rem;
}

.password-field {
  position: relative;
}

.password-field .password-input {
  padding-right: 6.5rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  transform: translateY(-50%);
  min-width: 5rem;
  border: 1px solid rgba(243, 179, 61, 0.45);
  border-radius: 12px;
  background: rgba(243, 179, 61, 0.18);
  color: #ffe3a8;
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.password-toggle:hover {
  background: rgba(243, 179, 61, 0.28);
  color: #fff4d6;
}

html[data-theme="light"] .password-toggle {
  background: rgba(243, 179, 61, 0.2);
  color: #6d4300;
  border-color: rgba(180, 119, 12, 0.28);
}

html[data-theme="light"] .password-toggle:hover {
  background: rgba(243, 179, 61, 0.32);
  color: #4d2d00;
}

.remember-row {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.remember-row .form-check-input {
  margin: 0;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background-color: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  flex: 0 0 auto;
}

.remember-row .form-check-label {
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.page-content {
  flex: 1 0 auto;
}

.footer {
  border-top: 1px solid var(--border);
  background: var(--footer-bg);
  margin-top: auto;
  flex-shrink: 0;
}

html[data-theme="light"] .navbar-brand,
html[data-theme="light"] .nav-link,
html[data-theme="light"] .navbar .btn,
html[data-theme="light"] .footer,
html[data-theme="light"] .footer .link-light,
html[data-theme="light"] .text-light,
html[data-theme="light"] .form-label,
html[data-theme="light"] .form-check-label {
  color: var(--text) !important;
}

html[data-theme="light"] .btn-outline-light {
  color: var(--text) !important;
  border-color: rgba(14, 26, 43, 0.2);
}

html[data-theme="light"] .btn-outline-light:hover,
html[data-theme="light"] .btn-outline-light:focus {
  color: #08111f !important;
  background: rgba(14, 26, 43, 0.08);
  border-color: rgba(14, 26, 43, 0.24);
}

.theme-toggle {
  min-width: 5.5rem;
}

@media (max-width: 991px) {
  .hero-panel,
  .identity-grid {
    grid-template-columns: 1fr;
  }

  .entity-card {
    flex-direction: column;
  }

  .entity-actions {
    width: 100%;
    justify-items: stretch;
  }
}
