﻿:root {
  --auth-bg-start: #171717;
  --auth-bg-end: #050505;
  --auth-card-bg: rgba(22, 22, 22, 0.95);
  --auth-border: rgba(214, 48, 49, 0.35);
  --auth-text: #ffffff;
  --auth-muted: rgba(255, 255, 255, 0.8);
  --brand-red: #d63031;
  --brand-red-dark: #b82525;
  --brand-red-soft: rgba(214, 48, 49, 0.18);
  --brand-green-soft: rgba(76, 175, 80, 0.18);
  --brand-green: #69f0ae;
  --brand-error: #ff6b6b;

  --app-bg: #f2f5f9;
  --app-card: #ffffff;
  --app-border: #d7e0ec;
  --app-text: #1f2a37;
  --app-muted: #61738a;
  --app-primary: #123e6a;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Poppins", "Segoe UI", Tahoma, sans-serif;
  line-height: 1.4;
  color: var(--app-text);
  background: radial-gradient(circle at top right, #eff6ff 0%, #f2f5f9 45%, #e8edf4 100%);
}

body.theme-dark {
  --app-bg: #0f1115;
  --app-card: #151a22;
  --app-border: #273142;
  --app-text: #f3f6fb;
  --app-muted: #9aa6b2;
  --app-primary: #7bb1ff;
  background: #0f1115;
  color: var(--app-text);
}

body.theme-dark .card {
  background: var(--app-card);
  border-color: var(--app-border);
  color: var(--app-text);
}

body.theme-dark .card h2 {
  color: #dce6f5;
}

body.theme-dark .topbar h1 {
  color: #f1f5fb;
}

body.theme-dark .topbar p {
  color: var(--app-muted);
}

body.theme-dark .list li {
  background: #11161e;
  border-color: #222c3d;
  color: #e1e8f4;
}

body.theme-dark .btn-small {
  background: #1a2432;
  border-color: #2a374a;
  color: #dbe5f3;
}

body.theme-dark .btn-secondary {
  background: #1b2736;
  border-color: #2a394c;
  color: #e1e9f5;
}

body.theme-dark .btn-danger {
  background: #3b1b1b;
  border-color: #5e2b2b;
  color: #ffb3b3;
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
  background: #11161e;
  border-color: #273142;
  color: #e6eef9;
}

body.theme-dark table th,
body.theme-dark table td {
  border-color: #233046;
}

body.theme-dark .table-wrap {
  border-color: #233046;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page-center {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.loader {
  width: 40px;
  height: 40px;
  border: 4px solid #d5dfeb;
  border-top-color: #0f4c81;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.auth-theme-darkred {
  background: linear-gradient(135deg, var(--auth-bg-start) 0%, var(--auth-bg-end) 100%);
}

.auth-card {
  width: 100%;
  max-width: 470px;
  border-radius: 20px;
  padding: 30px 28px;
}

.auth-card-dark {
  background: var(--auth-card-bg);
  border: 1px solid var(--auth-border);
  box-shadow: 0 14px 34px rgba(214, 48, 49, 0.28);
  color: var(--auth-text);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-row-center {
  justify-content: center;
}

.brand-row h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.subtitle {
  margin: 8px 0 0;
  text-align: center;
  color: var(--auth-muted);
  font-size: 14px;
}

.auth-tabs {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auth-tabs button {
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--auth-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tabs button.active {
  background: linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
  border-color: var(--brand-red);
  color: #ffffff;
}

.oauth-grid {
  margin: 14px 0 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.oauth-section {
  margin-top: 16px;
}

.oauth-section-title {
  margin: 0 0 8px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.68);
  letter-spacing: 0.2px;
}

.btn-oauth {
  height: 42px;
  border-radius: 12px;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-oauth:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-google {
  background: #f7f7f7;
  color: #222;
  border-color: #d8d8d8;
}

.btn-github {
  background: #24292f;
  color: #ffffff;
  border-color: #24292f;
}

.form-stack {
  display: grid;
  gap: 12px;
}

.form-stack label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #394d63;
}

.auth-card-dark .form-stack label {
  color: var(--auth-muted);
}

.auth-card-dark input,
.auth-card-dark select {
  width: 100%;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  padding: 0 12px;
  font: inherit;
}

.auth-card-dark input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.auth-card-dark input:focus,
.auth-card-dark select:focus {
  outline: none;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(214, 48, 49, 0.2);
}

.password-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.password-row input {
  flex: 1;
}

.btn-toggle-password {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-radius: 10px;
  min-width: 72px;
  height: 46px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.password-requirements {
  padding: 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.password-requirements h4 {
  margin: 0 0 8px;
  font-size: 13px;
  color: #fff;
}

.requirement {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin: 5px 0;
}

.requirement.invalid {
  color: rgba(255, 255, 255, 0.67);
}

.requirement.valid {
  color: #8af0b0;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff8f8f;
  box-shadow: 0 0 0 2px rgba(255, 71, 87, 0.18);
}

.requirement.valid .status-dot {
  background: #8af0b0;
  box-shadow: 0 0 0 2px rgba(60, 179, 113, 0.18);
}

.btn-primary,
.btn-secondary,
.btn-danger {
  border-radius: 12px;
  border: 1px solid transparent;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.auth-card-dark .btn-primary {
  background: linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
  color: #fff;
  box-shadow: 0 6px 20px rgba(214, 48, 49, 0.35);
}

.layout .btn-primary,
.card .btn-primary {
  background: #0f4c81;
  border-color: #0f4c81;
  color: #fff;
}

.layout .btn-primary:hover,
.card .btn-primary:hover {
  background: #0c3e69;
}

.auth-card-dark .btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled,
.btn-oauth:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.auth-links {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.auth-links-dark a {
  color: #ff9e9e;
}

.alert {
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
}

.alert-error {
  background: var(--brand-red-soft);
  border: 1px solid rgba(214, 48, 49, 0.45);
  color: var(--brand-error);
}

.alert-success {
  background: var(--brand-green-soft);
  border: 1px solid rgba(76, 175, 80, 0.45);
  color: var(--brand-green);
}

.auth-inline-box {
  margin-top: 12px;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 8px;
  text-align: center;
}

.auth-inline-box p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

.recaptcha-note {
  margin-top: 10px;
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

.layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.topbar h1 {
  margin: 0;
  color: var(--app-primary);
}

.topbar p {
  margin: 3px 0 0;
  color: var(--app-muted);
}

.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.card {
  background: var(--app-card);
  border: 1px solid var(--app-border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}

.card h2 {
  margin: 0 0 12px;
  color: #173f66;
  font-size: 19px;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.card input,
.card select {
  width: 100%;
  height: 42px;
  border: 1px solid #cbd6e5;
  border-radius: 10px;
  padding: 0 12px;
  font: inherit;
  color: #172535;
  background: #fff;
}

.card input:focus,
.card select:focus {
  outline: none;
  border-color: #2f6ea5;
  box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.14);
}

.toolbar {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}

.toolbar p {
  margin: 0;
  color: #5f738a;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  background: #f4f8fd;
  padding: 10px;
  border-bottom: 1px solid #d8e2ee;
  color: #304b66;
}

tbody td {
  padding: 10px;
  border-bottom: 1px solid #ebf0f6;
}

.btn-small {
  border: 1px solid #c6d7ea;
  background: #eef6ff;
  color: #184972;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
}

.btn-small.danger {
  border-color: #efc0c0;
  background: #fff2f2;
  color: #922f2f;
}

.btn-secondary {
  background: #eef5fd;
  border-color: #cadbee;
  color: #18456f;
}

.btn-danger {
  background: #fff1f1;
  border-color: #f0c8c8;
  color: #aa2e2e;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.list li {
  border: 1px solid #e2eaf4;
  background: #fafcff;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
}

.list-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.row-actions {
  display: flex;
  gap: 6px;
}

.notif-item {
  display: grid;
  gap: 4px;
}

.notif-item.unread {
  background: #fff7ea;
  border-left: 3px solid #f4b163;
  padding: 6px 8px;
  border-radius: 8px;
}

.notif-meta {
  font-size: 12px;
  color: var(--app-muted);
  margin-top: 4px;
}

.import-result {
  margin-top: 10px;
}

.import-errors ul {
  margin: 6px 0 0 18px;
}

.btn-small.btn-compare {
  background: #f4f0ff;
  border-color: #d9c8ef;
  color: #4a2c7a;
}

body.theme-dark .notif-item.unread {
  background: #1b1a15;
  border-left-color: #b07a2a;
}

body.theme-dark .btn-small.btn-compare {
  background: #2a1f3a;
  border-color: #3b2a52;
  color: #d9c5ff;
}

.inline-panel {
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed #cdd8e6;
  background: #f7fafc;
  font-size: 13px;
  color: #3b4f66;
  display: grid;
  gap: 8px;
}

.inline-panel.dark {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #eaf2ff;
  color: #1b4d7a;
}

.badge.badge-info {
  background: #eaf2ff;
  color: #1b4d7a;
}

.badge.badge-success {
  background: #e5f7ed;
  color: #1c7a45;
}

.badge.badge-warning {
  background: #fff4dc;
  color: #9a6b00;
}

.badge.badge-danger {
  background: #ffe2e2;
  color: #9d2c2c;
}

.notification-item {
  display: grid;
  gap: 6px;
}

.notification-item h4 {
  margin: 0;
  font-size: 14px;
}

.notification-item p {
  margin: 0;
  font-size: 13px;
  color: #5f738a;
}

.notification-item .notification-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: #6c7f95;
}

.saved-search-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.saved-search-actions .checkbox-row {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: #5e6f84;
}

.compare-panel {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.compare-grid {
  display: grid;
  gap: 8px;
}

.compare-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
}

.compare-item span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
}

.compare-table {
  overflow-x: auto;
}

.compare-table table {
  width: 100%;
  border-collapse: collapse;
}

.compare-table th,
.compare-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 12px;
  text-align: left;
}

.compare-table th {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.stat-card {
  border: 1px solid #d9e4f2;
  border-radius: 12px;
  padding: 14px;
  background: #f7faff;
}

.stat-card h3 {
  margin: 0 0 4px;
  font-size: 14px;
  color: #324a63;
}

.stat-card p {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #0f4c81;
}

.admin-form-grid textarea {
  width: 100%;
  border: 1px solid #cbd6e5;
  border-radius: 10px;
  padding: 10px;
  font: inherit;
}

.link-btn {
  border: none;
  background: transparent;
  color: #0f4c81;
  font: inherit;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.link-btn:hover {
  text-decoration: underline;
}

.runtime-error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1d1d1d 0%, #050505 100%);
  padding: 20px;
}

.runtime-error-card {
  width: 100%;
  max-width: 520px;
  border-radius: 18px;
  background: rgba(23, 23, 23, 0.96);
  border: 1px solid rgba(214, 48, 49, 0.4);
  box-shadow: 0 14px 34px rgba(214, 48, 49, 0.25);
  padding: 24px;
  color: #fff;
  text-align: center;
}

.runtime-error-card h1 {
  margin: 0 0 12px;
  color: #ff7f7f;
}

.runtime-error-card p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.82);
}

@media (max-width: 980px) {
  .filters-grid,
  .grid-2,
  .grid-3,
  .oauth-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-card {
    padding: 24px 20px;
  }
}

.auth-card-animate {
  animation: cardIn 0.42s ease;
}

.auth-mode-panel {
  animation: fadeUp 0.32s ease;
}

.auth-form-animated {
  animation: fadeUp 0.32s ease;
}

.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
  animation: fadeUp 0.32s ease;
}

.search-shell {
  min-height: 100vh;
  background: linear-gradient(160deg, #0c0c0c 0%, #1f1f1f 42%, #0b0b0b 100%);
  color: #f4f4f4;
  padding: 18px;
}

.search-topbar {
  max-width: 1280px;
  margin: 0 auto 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.search-topbar h1 {
  margin: 0;
  font-size: 28px;
  color: #fff;
}

.search-topbar p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.search-hero {
  max-width: 1280px;
  margin: 0 auto 16px;
  padding: 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(214, 48, 49, 0.16), rgba(0, 0, 0, 0.5));
  border: 1px solid rgba(214, 48, 49, 0.35);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.32);
}

.search-hero h2 {
  margin: 0;
  font-size: 24px;
  color: #fff;
}

.search-hero p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.85);
}

.vehicle-type-strip {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.vehicle-chip {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.vehicle-chip:hover {
  transform: translateY(-1px);
}

.vehicle-chip.active {
  background: linear-gradient(135deg, #d63031, #b82525);
  border-color: #d63031;
  color: #fff;
}

.search-line {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.search-text-input {
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.36);
  color: #fff;
  padding: 0 12px;
  font: inherit;
}

.search-text-input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.search-text-input:focus {
  outline: none;
  border-color: #d63031;
  box-shadow: 0 0 0 3px rgba(214, 48, 49, 0.16);
}

.search-content-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
}

.search-sidebar {
  display: grid;
  gap: 12px;
  align-content: start;
}

.search-results {
  display: grid;
  gap: 12px;
  align-content: start;
}

.search-shell .card {
  background: rgba(14, 14, 14, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f5f5f5;
}

.search-shell .card h2 {
  color: #ffffff;
}

.search-shell .card p {
  color: rgba(255, 255, 255, 0.82);
}

.search-shell .card input,
.search-shell .card select {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
}

.search-shell .card input:focus,
.search-shell .card select:focus {
  border-color: #d63031;
  box-shadow: 0 0 0 3px rgba(214, 48, 49, 0.16);
}

.search-shell .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.search-shell .btn-danger {
  background: rgba(214, 48, 49, 0.15);
  border-color: rgba(214, 48, 49, 0.5);
  color: #ffb3b3;
}

.results-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.results-summary h2 {
  margin: 0;
  font-size: 20px;
}

.results-summary p {
  margin: 0;
  font-size: 14px;
}

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 10px;
}

.vehicle-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  animation: fadeUp 0.3s ease;
}

.vehicle-card:hover {
  transform: translateY(-2px);
  border-color: rgba(214, 48, 49, 0.55);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}

.vehicle-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.vehicle-card-head h3 {
  margin: 0;
  font-size: 16px;
}

.vehicle-card-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-width: 54px;
  height: 24px;
  padding: 0 8px;
  background: rgba(214, 48, 49, 0.16);
  border: 1px solid rgba(214, 48, 49, 0.35);
  font-size: 12px;
}

.vehicle-meta {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.vehicle-meta p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.86);
}

.vehicle-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.search-empty-state {
  border: 1px dashed rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

.search-detail-panel {
  animation: fadeUp 0.28s ease;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
}

.detail-grid p {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.88);
}

.fade-up {
  animation: fadeUp 0.35s ease;
}

.ticket-shell {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 2fr);
  gap: 16px;
}

.ticket-list {
  display: grid;
  gap: 12px;
}

.ticket-list-items {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.ticket-list-item {
  border: 1px solid var(--app-border);
  background: var(--app-card);
  border-radius: 12px;
  padding: 10px 12px;
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 2px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ticket-list-item:hover {
  border-color: #9bb6d8;
}

.ticket-list-item.active {
  border-color: #0f4c81;
  box-shadow: 0 0 0 2px rgba(15, 76, 129, 0.15);
}

.ticket-item-title {
  font-weight: 600;
  font-size: 14px;
}

.ticket-item-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--app-muted);
}

.ticket-item-date {
  margin-top: 6px;
  font-size: 11px;
  color: var(--app-muted);
}

.ticket-thread {
  display: grid;
  gap: 12px;
}

.ticket-meta {
  font-size: 13px;
  color: var(--app-muted);
  padding: 6px 10px;
  border: 1px dashed var(--app-border);
  border-radius: 10px;
  background: #f7fafc;
}

.ticket-messages {
  border: 1px solid var(--app-border);
  border-radius: 12px;
  padding: 10px;
  background: var(--app-card);
  max-height: 420px;
  overflow: auto;
  display: grid;
  gap: 10px;
}

.ticket-message {
  border: 1px solid #e2eaf4;
  background: #fafcff;
  border-radius: 10px;
  padding: 8px 10px;
  display: grid;
  gap: 6px;
}

.ticket-message.from-user {
  border-color: #b8d9ff;
  background: #eef6ff;
}

.ticket-message.from-support {
  border-color: #d7e0ec;
  background: #f5f7fb;
}

.ticket-message-meta {
  font-size: 11px;
  color: var(--app-muted);
}

.ticket-message-body {
  font-size: 14px;
  white-space: pre-wrap;
}

.ticket-attachments {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ticket-attachments img {
  width: 120px;
  height: auto;
  border-radius: 8px;
  border: 1px solid #d7e0ec;
}

.ticket-update {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ticket-update label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--app-muted);
}

.ticket-empty {
  font-size: 13px;
  color: var(--app-muted);
  padding: 8px;
}

body.theme-dark .ticket-list-item {
  border-color: #273142;
  background: #11161e;
  color: #e1e8f4;
}

body.theme-dark .ticket-list-item:hover {
  border-color: #3b4c66;
}

body.theme-dark .ticket-list-item.active {
  border-color: #7bb1ff;
  box-shadow: 0 0 0 2px rgba(123, 177, 255, 0.22);
}

body.theme-dark .ticket-meta {
  background: #11161e;
  border-color: #273142;
  color: #9aa6b2;
}

body.theme-dark .ticket-messages {
  background: #11161e;
  border-color: #273142;
}

body.theme-dark .ticket-message {
  border-color: #273142;
  background: #151c26;
}

body.theme-dark .ticket-message.from-user {
  border-color: #2a4b75;
  background: #112033;
}

body.theme-dark .ticket-message.from-support {
  border-color: #2b3647;
  background: #141a22;
}

body.theme-dark .ticket-attachments img {
  border-color: #2b3647;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1080px) {
  .search-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .ticket-shell {
    grid-template-columns: 1fr;
  }

  .ticket-messages {
    max-height: 320px;
  }

  .ticket-list-items {
    max-height: 300px;
  }

  .ticket-update {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .search-shell {
    padding: 12px;
  }

  .search-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-line {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }
}
