.admin-body {
  min-height: 100vh;
  background: #f5f7fa;
  font-family: var(--arabic-font);
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-card {
  display: grid;
  gap: 18px;
  width: min(100%, 440px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.login-card h1,
.admin-hero h1 {
  margin-bottom: 8px;
  font-size: 2rem;
  line-height: 1.1;
}

.login-card p,
.admin-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.hint {
  font-size: 0.84rem;
}

.hidden-field {
  display: none;
}

.notice,
.alert {
  padding: 12px 14px;
  border-radius: var(--radius);
  font-weight: 750;
}

.notice {
  color: #08724f;
  background: #e8f8f2;
}

.alert {
  color: #9f1239;
  background: #fff1f2;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 0 max(24px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.admin-header nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.9rem;
  font-weight: 800;
}

.admin-shell {
  display: grid;
  gap: 20px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 24px 56px;
}

.admin-hero,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
}

.admin-panel {
  overflow: hidden;
}

.admin-panel > .car-editor,
.admin-car-body {
  padding: 18px;
}

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

.admin-action {
  display: grid;
  gap: 8px;
  min-height: 126px;
  align-content: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.admin-action:hover {
  border-color: rgba(229, 35, 47, 0.28);
  box-shadow: 0 14px 34px rgba(22, 30, 46, 0.08);
}

.admin-action strong {
  font-size: 1.08rem;
}

.admin-action span {
  color: var(--muted);
  line-height: 1.5;
}

.reset-action {
  padding: 0;
}

.reset-action button {
  display: grid;
  gap: 8px;
  width: 100%;
  height: 100%;
  min-height: 126px;
  padding: 18px;
  border: 0;
  border-radius: var(--radius);
  color: inherit;
  background: transparent;
  text-align: start;
  font: inherit;
}

.car-editor {
  display: grid;
  gap: 16px;
}

.profile-editor {
  gap: 18px;
}

.editor-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.editor-section-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.editor-section-title > span {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  font-weight: 850;
}

.editor-section-title h3 {
  margin: 0 0 4px;
  font-size: 1.04rem;
}

.editor-section-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.form-grid,
.locale-editors {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.car-editor > fieldset {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.locale-editors {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

fieldset {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

legend {
  padding: 0 6px;
  color: var(--red);
  font-weight: 850;
}

textarea {
  min-height: 96px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
}

.file-picker {
  position: relative;
  align-content: start;
}

.file-picker input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.file-picker span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--red);
  border-radius: var(--radius);
  color: #fff;
  background: var(--red);
  font-size: 0.92rem;
  font-weight: 850;
}

.file-picker small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
  text-transform: none;
}

.photo-preview-panel {
  display: grid;
  gap: 10px;
}

.photo-preview-panel strong,
.selected-photo-panel strong {
  color: #4a4f5b;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.photo-preview-grid,
.selected-photo-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.photo-preview-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.selected-photo-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.selected-photo-panel[hidden] {
  display: none;
}

.selected-photo-item {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.selected-photo-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: calc(var(--radius) - 2px);
  background: var(--soft);
}

.selected-photo-item button {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #fecdd3;
  border-radius: var(--radius);
  color: #be123c;
  background: #fff1f2;
  font-size: 0.78rem;
  font-weight: 850;
}

.selected-photo-item small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: none;
}

.admin-car-list {
  display: grid;
}

.compact-car-list,
.page-list,
.reservation-list {
  display: grid;
}

.compact-car-list article,
.admin-car-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}

.compact-car-list small,
.admin-car-row span {
  color: var(--muted);
  font-weight: 750;
}

.compact-car-list a {
  color: var(--red);
  font-weight: 850;
}

.admin-car-row {
  grid-template-columns: 90px 1fr auto;
}

.admin-car-row img {
  width: 90px;
  height: 62px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--soft);
}

.admin-car-row div {
  display: grid;
  gap: 4px;
}

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

.row-actions form {
  margin: 0;
}

.row-actions button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #fecdd3;
  border-radius: var(--radius);
  color: #be123c;
  background: #fff1f2;
  font-weight: 850;
}

.reservation-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(130px, 0.8fr)) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}

.reservation-row div {
  display: grid;
  gap: 4px;
}

.reservation-row span,
.reservation-row small {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.5;
}

.reservation-row form {
  margin: 0;
}

.reservation-row button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #fecdd3;
  border-radius: var(--radius);
  color: #be123c;
  background: #fff1f2;
  font-weight: 850;
}

.reservation-released {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--radius);
  color: #08724f;
  background: #e8f8f2;
}

.admin-car {
  border-top: 1px solid var(--line);
}

.admin-car summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 850;
}

.admin-car summary small {
  color: var(--muted);
}

.admin-car-body {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.delete-form {
  margin-top: 12px;
}

.delete-form button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #fecdd3;
  border-radius: var(--radius);
  color: #be123c;
  background: #fff1f2;
  font-weight: 850;
}

@media (max-width: 900px) {
  .admin-header,
  .admin-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-actions,
  .form-grid,
  .car-editor > fieldset,
  .locale-editors,
  .photo-preview-grid,
  .selected-photo-grid {
    grid-template-columns: 1fr;
  }

  .compact-car-list article,
  .admin-car-row,
  .reservation-row {
    grid-template-columns: 1fr;
  }

  .admin-car-row img {
    width: 100%;
    height: 180px;
  }
}
