:root {
  --bg-main: #050608;
  --bg-panel: #0e1118;
  --bg-panel-soft: #171a22;
  --border-subtle: #252a36;
  --accent: #2f7df4;
  --accent-soft: rgba(47, 125, 244, 0.12);
  --text-main: #f5f7fb;
  --text-muted: #9ea4b6;
  --danger: #ff4b5c;
  --danger-soft: rgba(255, 75, 92, 0.12);
  --success: #3ac47d;
  --success-soft: rgba(58, 196, 125, 0.12);
  --radius-lg: 14px;
  --radius-md: 10px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.7);
  --shadow-subtle: 0 10px 25px rgba(0, 0, 0, 0.5);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #151824 0, #050608 50%, #020308 100%);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: radial-gradient(circle at top left, #22263a 0, #050608 55%);
  border-bottom: 1px solid rgba(60, 80, 125, 0.8);
  padding: 10px 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #ffffff, #e0e6ff 30%, #1f2937 70%, #000);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 0 2px rgba(220, 230, 255, 0.12), 0 10px 26px rgba(0, 0, 0, 0.7);
}

.brand-title {
  font-weight: 700;
  letter-spacing: 0.16em;
  font-size: 12px;
  text-transform: uppercase;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

.nav-tabs {
  display: flex;
  gap: 8px;
  background: rgba(5, 7, 13, 0.9);
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(64, 78, 118, 0.9);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.8);
}

.nav-link {
  font-size: 11px;
  padding: 5px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-link-active {
  background: radial-gradient(circle at 0 0, #4f8dff, #2250c8 50%, #111827 100%);
  color: #f9fbff;
  border-color: rgba(120, 156, 255, 0.9);
}

.content {
  flex: 1;
  max-width: 1180px;
  margin: 18px auto 24px;
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.panel {
  background: linear-gradient(145deg, var(--bg-panel), var(--bg-panel-soft));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(61, 74, 104, 0.9);
  box-shadow: var(--shadow-soft);
  padding: 18px 18px 20px;
}

.panel-form h2,
.panel-list h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
}

.required-note {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 8px;
}

.required {
  color: #f97373;
  margin-left: 4px;
  font-size: 11px;
}

.panel-desc {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.1fr);
  gap: 18px;
}

.form-section {
  background: rgba(8, 10, 18, 0.96);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 16px 14px 14px;
  box-shadow: var(--shadow-subtle);
}

.form-section h3 {
  margin: 0 0 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 10px;
  color: #d5daeb;
}

input,
textarea,
select {
  background: #05070d;
  border-radius: 8px;
  border: 1px solid rgba(83, 99, 138, 0.9);
  padding: 9px 10px;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input::placeholder,
textarea::placeholder {
  color: #6e7488;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(47, 125, 244, 0.6);
  background: #050711;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #9ca3af 50%),
    linear-gradient(135deg, #9ca3af 50%, transparent 50%);
  background-position: calc(100% - 14px) 11px, calc(100% - 9px) 11px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 26px;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.btn-primary {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: radial-gradient(circle at 30% 0, #4f8dff, #2250c8 45%, #0f172a 100%);
  color: #f9fbff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.9);
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.95);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.9);
}

.alert {
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 13px;
  margin-bottom: 14px;
}

.alert-error {
  background: var(--danger-soft);
  border: 1px solid rgba(255, 117, 130, 0.9);
  color: #ffccd2;
}

.alert-success {
  background: var(--success-soft);
  border: 1px solid rgba(118, 228, 166, 0.9);
  color: #c1ffe0;
}

.panel-list {
  margin-top: 4px;
}

.list-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.list-block h2 {
  font-size: 15px;
  margin: 0 0 8px;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 320px;
  overflow: auto;
  border-radius: 10px;
  background: rgba(6, 8, 15, 0.95);
  border: 1px solid rgba(38, 47, 72, 0.95);
}

.list-item {
  padding: 10px 11px;
  border-bottom: 1px solid rgba(29, 33, 48, 0.95);
}

.list-item:last-child {
  border-bottom: none;
}

.list-empty {
  padding: 10px 11px;
  color: var(--text-muted);
  font-size: 13px;
}

.list-title {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.list-meta {
  margin-top: 4px;
  font-size: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
}

.list-notes {
  margin-top: 6px;
  font-size: 12px;
  color: #d1d5e4;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  background: var(--accent-soft);
  color: #d8e4ff;
  border: 1px solid rgba(92, 143, 255, 0.8);
}

.badge-outline {
  background: transparent;
  color: #b8c4ff;
  border: 1px solid rgba(110, 138, 255, 0.9);
}

.field-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.suspect-photo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.suspect-photo-large {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid rgba(148, 163, 255, 0.9);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.95);
  background: linear-gradient(145deg, #020617, #0b1120);
  display: flex;
  align-items: center;
  justify-content: center;
}

.suspect-photo-thumb {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(148, 163, 255, 0.9);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.9);
  background: linear-gradient(145deg, #020617, #0b1120);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #e5e7eb;
}

.suspect-photo-placeholder span {
  transform: translateY(1px);
}

.suspect-photo-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.suspect-photo-label {
  font-size: 12px;
  font-weight: 600;
}

.suspect-photo-text {
  font-size: 11px;
  color: var(--text-muted);
}

.search-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.search-actions {
  display: flex;
  justify-content: flex-end;
}

.table-wrapper {
  margin-top: 10px;
  border-radius: 10px;
  border: 1px solid rgba(37, 44, 68, 0.95);
  background: rgba(5, 7, 13, 0.96);
  overflow: auto;
  box-shadow: var(--shadow-subtle);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 720px;
}

.data-table thead {
  background: rgba(15, 23, 42, 0.98);
}

.data-table th,
.data-table td {
  padding: 7px 9px;
  border-bottom: 1px solid rgba(31, 40, 63, 0.95);
  text-align: left;
}

.data-table th {
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.data-table tbody tr:nth-child(even) {
  background: rgba(10, 12, 18, 0.9);
}

.data-table tbody tr:hover {
  background: rgba(30, 64, 175, 0.35);
}

.table-empty {
  text-align: center;
  color: var(--text-muted);
}

.table-actions {
  white-space: nowrap;
}

.badge-link {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  text-decoration: none;
  background: rgba(59, 130, 246, 0.12);
  color: #bfdbfe;
  border: 1px solid rgba(96, 165, 250, 0.9);
}

.badge-link:hover {
  background: rgba(59, 130, 246, 0.24);
}

.badge-link-danger {
  margin-left: 4px;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(248, 113, 113, 0.9);
  color: #fecaca;
}

.badge-link-danger:hover {
  background: rgba(239, 68, 68, 0.24);
}

.table-subtext {
  font-size: 11px;
  color: var(--text-muted);
}

.badge.status-active {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(52, 211, 153, 0.85);
  color: #bbf7d0;
}

.badge.status-draft {
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.9);
  color: #e5e7eb;
}

.badge.status-served {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(96, 165, 250, 0.95);
  color: #dbeafe;
}

.badge.status-cancelled {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(248, 113, 113, 0.95);
  color: #fee2e2;
}

.footer {
  text-align: center;
  padding: 10px 16px 16px;
  font-size: 11px;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 900px) {
  .content {
    max-width: 100%;
    margin-top: 12px;
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .list-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .panel {
    padding: 14px 12px 16px;
  }

  .search-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .topbar {
    padding-inline: 12px;
  }

  .brand-title {
    font-size: 11px;
  }

  .brand-subtitle {
    font-size: 10px;
  }

  .list {
    max-height: 260px;
  }
}

