*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --surface-hover: #243044;
  --border: #2d3a4f;
  --text: #e8edf4;
  --text-muted: #8b9cb3;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-text: #ffffff;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.35s ease, border-color 0.35s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.header-auth,
.header-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-badge {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-btn:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.nav-btn.active {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 15%, transparent);
}

/* Sections */
.section {
  display: none;
  padding: 2rem 0 4rem;
}

.section.active {
  display: block;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Hero */
.hero {
  position: relative;
  padding: 5rem 0;
  margin-bottom: 0;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.35);
}

.home-content {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--primary) 10%, var(--surface)) 0%,
    var(--bg) 100%
  );
  padding: 2rem 0 4rem;
  transition: background 0.35s ease;
}

.section:not(#home) {
  background: var(--bg);
  transition: background 0.35s ease;
}

#home.section {
  background: var(--bg);
  transition: background 0.35s ease;
}

.block-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 3rem 0 1.25rem;
  border-left: 4px solid var(--primary);
  padding-left: 0.75rem;
  transition: border-color 0.35s ease;
}

.block-title:first-child {
  margin-top: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero p {
  color: rgba(232, 237, 244, 0.85);
  max-width: 560px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.service-card {
  background: color-mix(in srgb, var(--primary) 5%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.2s, border-color 0.2s, background 0.35s ease;
}

.service-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.service-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.service-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.service-card h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.info-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: background 0.35s ease, border-color 0.35s ease;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.info-item strong {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.info-item span {
  font-size: 0.95rem;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.gallery-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 2px solid color-mix(in srgb, var(--primary) 30%, var(--border));
  transition: transform 0.2s, border-color 0.35s ease;
}

.gallery-grid img:hover {
  transform: scale(1.02);
}

/* Reviews */
.reviews-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.review-card {
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: background 0.35s ease, border-color 0.35s ease;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.stars {
  color: var(--warning);
  letter-spacing: 1px;
}

.review-date {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.review-form-wrap {
  margin-bottom: 1rem;
}

.review-form-wrap h3 {
  margin-bottom: 1rem;
}

.star-rating {
  display: flex;
  gap: 0.25rem;
}

.star-rating .star {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--border);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.star-rating .star.active {
  color: var(--warning);
}

.hint-text {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0.5rem 0;
}

/* Contact & Map */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 280px;
}

/* Form */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
}

/* Time slots */
.time-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.time-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.65rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.time-slot.available:hover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, var(--bg));
}

.time-slot.selected {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 20%, var(--bg));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 35%, transparent);
}

.time-slot.booked {
  opacity: 0.45;
  cursor: not-allowed;
  background: color-mix(in srgb, var(--danger) 8%, var(--bg));
  border-color: color-mix(in srgb, var(--danger) 25%, var(--border));
}

.slot-time {
  font-weight: 600;
  font-size: 0.95rem;
}

.slot-status {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.time-slot.available .slot-status {
  color: var(--success);
}

.time-slot.booked .slot-status {
  color: var(--danger);
}

.time-slot.selected .slot-status {
  color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-text);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--surface-hover);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  filter: brightness(1.1);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 0.85rem 2rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tab {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-text);
}

/* Appointment Cards */
.appointments-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.appointment-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s;
}

.appointment-card:hover {
  border-color: var(--primary);
}

.appointment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.appointment-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.appointment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.appointment-meta span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.appointment-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-beklemede {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.status-tamamlandi {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.status-iptal {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.status-review-pending {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.status-review-approved {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.status-review-rejected {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.gallery-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.gallery-admin-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.gallery-admin-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.gallery-admin-info {
  padding: 0.75rem 1rem 0.5rem;
  font-size: 0.875rem;
}

.gallery-admin-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0 1rem 1rem;
  flex-wrap: wrap;
}

.review-filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.review-admin-summary {
  margin-bottom: 1.25rem;
}

.review-admin-item .admin-item-body {
  flex: 1;
}

.review-admin-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.review-admin-stars {
  margin-bottom: 0.5rem;
}

.review-admin-stars span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.review-admin-comment {
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 0.65rem;
  white-space: pre-wrap;
}

.review-admin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.work-summary {
  background: var(--bg);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.work-summary h4 {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.work-summary p {
  color: var(--text);
  margin-bottom: 0.5rem;
}

.cost-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

.cost-breakdown .cost-total {
  font-weight: 700;
  color: var(--success);
}

.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin-top: 0.75rem;
  border-radius: 8px;
  overflow: hidden;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.card-note {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state p {
  margin-bottom: 1.5rem;
}

.hidden {
  display: none !important;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.modal-lg {
  max-width: 640px;
}

.modal-xl {
  max-width: 900px;
}

.history-summary {
  margin-bottom: 1.25rem;
}

.history-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  padding: 1rem 1.25rem;
  background: color-mix(in srgb, var(--primary) 5%, var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.history-stats strong {
  color: var(--text);
}

.invoice-row {
  margin-bottom: 0.5rem;
}

.invoice-badge {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--success) 15%, var(--surface));
  color: var(--success);
  border: 1px solid color-mix(in srgb, var(--success) 30%, transparent);
}

.invoice-badge.invoice-missing {
  background: color-mix(in srgb, var(--warning) 12%, var(--surface));
  color: var(--warning);
  border-color: color-mix(in srgb, var(--warning) 30%, transparent);
}

.invoice-actions-inline {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.pdf-viewer-wrap {
  width: 100%;
  height: 70vh;
  min-height: 400px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

.pdf-viewer-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 600px) {
  .pdf-viewer-wrap {
    height: 55vh;
    min-height: 280px;
  }
}

/* Admin schedule */
.schedule-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.schedule-date-picker {
  margin-bottom: 0;
  min-width: 180px;
}

.schedule-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.schedule-header {
  margin-bottom: 1rem;
}

.schedule-date-title {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.schedule-table {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.schedule-row {
  display: grid;
  grid-template-columns: 72px 1fr 110px 160px;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.schedule-row:last-child {
  border-bottom: none;
}

.schedule-row.schedule-head {
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.schedule-row.empty {
  background: color-mix(in srgb, var(--bg) 50%, var(--surface));
}

.schedule-row.booked {
  background: var(--surface);
}

.schedule-row.cancelled {
  opacity: 0.55;
}

.schedule-time-col strong {
  font-size: 1rem;
  color: var(--primary);
}

.schedule-info-col {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}

.schedule-name {
  font-weight: 600;
}

.schedule-plate,
.schedule-service {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.slot-empty-label {
  color: var(--success);
  font-size: 0.875rem;
  font-weight: 500;
}

.schedule-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .schedule-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .schedule-row.schedule-head {
    display: none;
  }

  .schedule-time-col {
    font-size: 0.85rem;
    color: var(--text-muted);
  }

  .schedule-time-col strong {
    font-size: 1.1rem;
  }

  .schedule-actions {
    justify-content: flex-start;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.modal-header h3 {
  font-size: 1.15rem;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}

.modal-close:hover {
  color: var(--text);
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

.detail-section {
  margin-bottom: 1.25rem;
}

.detail-section h4 {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.detail-section p {
  font-size: 0.95rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.detail-item {
  background: var(--bg);
  padding: 0.75rem;
  border-radius: 8px;
}

.detail-item label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.detail-item span {
  font-weight: 500;
}

.total-cost {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--success);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 300;
  font-weight: 500;
  animation: slideUp 0.3s ease;
}

.toast.success {
  border-color: var(--success);
}

.toast.error {
  border-color: var(--danger);
}

/* Admin */
.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.admin-form {
  margin-bottom: 1.5rem;
}

.admin-form h3 {
  margin-bottom: 1rem;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.admin-item-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.admin-item-body {
  flex: 1;
  min-width: 0;
}

.admin-item-body p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.admin-item-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 999;
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.2s;
}

/* File upload & previews */
.form-group input[type="file"] {
  padding: 0.5rem;
  font-size: 0.85rem;
}

.image-preview-wrap {
  margin-bottom: 1rem;
}

.image-preview {
  max-width: 100%;
  max-height: 160px;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.image-preview-sm {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.image-preview-md {
  max-width: 200px;
  max-height: 100px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.form-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.form-header-row h3 {
  margin: 0;
}

.settings-block {
  margin-bottom: 1.5rem;
}

.settings-block > label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.upload-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.theme-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.theme-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  padding: 0;
}

.theme-swatch:hover {
  transform: scale(1.1);
}

.theme-swatch.active {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--bg);
}

.theme-swatch[data-theme="white"] {
  border: 2px solid var(--border);
  background: #f1f5f9 !important;
}

address.info-bar {
  font-style: normal;
}

.info-item a {
  color: var(--text);
  text-decoration: none;
}

.info-item a:hover {
  color: var(--primary);
}

/* Responsive */
@media (max-width: 900px) {
  .header-inner {
    position: relative;
  }

  .nav-toggle {
    display: flex;
    order: 3;
    margin-left: auto;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 0.75rem 1.25rem;
    box-shadow: var(--shadow);
  }

  .nav.open {
    display: flex;
  }

  .nav-btn {
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
  }

  .header-auth,
  .header-user {
    order: 2;
  }

  .logo {
    order: 1;
    flex: 1;
  }

  .admin-item {
    flex-wrap: wrap;
  }

  .admin-item-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 3.5rem 0;
  }

  .block-title {
    font-size: 1.25rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .header-inner {
    padding: 0.75rem 1rem;
  }

  .user-badge {
    display: none;
  }

  .gallery-grid img {
    height: 160px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .cost-breakdown {
    flex-direction: column;
    gap: 0.35rem;
  }

  .tabs,
  .admin-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
  }

  .tab {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
