:root {
  color-scheme: light;
  --bg: #fff5f7;
  --bg-soft: #fdecef;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --text: #6b2f1a;
  --muted: #8a5a49;
  --primary: #6b2f1a;
  --primary-dark: #4f210f;
  --accent: #2d7a63;
  --border: rgba(31, 36, 48, 0.1);
  --shadow: 0 18px 50px rgba(33, 35, 47, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(107, 47, 26, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(45, 122, 99, 0.11), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 45%, var(--bg-soft) 100%);
  color: var(--text);
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(18, 27, 40, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(18, 27, 40, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.12), transparent 70%);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-shell {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  gap: 18px;
}

.login-card,
.card,
.admin-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.login-card {
  padding: 34px;
}

.login-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.login-link-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(107, 47, 26, 0.08);
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.login-link-button:hover {
  background: rgba(107, 47, 26, 0.14);
  transform: translateY(-1px);
}

.login-card form {
  margin-top: 8px;
}

.login-card-highlight {
  display: grid;
  align-content: start;
  gap: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255, 238, 242, 0.94));
}

.login-benefits {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.8;
}

.login-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(107, 47, 26, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(107, 47, 26, 0.28);
}

.login-card form,
.card {
  display: grid;
  gap: 16px;
}

.card form {
  display: grid;
  gap: 18px;
}

.card form label {
  display: grid;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 0.96rem;
}

.admin-image-previews {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.admin-image-previews img {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(107, 47, 26, 0.12);
}

.card form input[type="text"],
.card form input[type="file"],
.card form select,
.card form textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(107, 47, 26, 0.14);
  padding: 14px 16px;
  font: inherit;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: inset 0 1px 2px rgba(107, 47, 26, 0.06);
}

..card form textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.7;
}

.card form input[disabled] {
  background: #f8f3ef;
  color: var(--muted);
}

.service-options-group {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(107, 47, 26, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
}

.service-options-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.service-options-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.service-option-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(107, 47, 26, 0.12);
  background: rgba(255, 255, 255, 0.96);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.service-option-item:hover {
  transform: translateY(-1px);
  border-color: rgba(107, 47, 26, 0.24);
  box-shadow: 0 10px 20px rgba(107, 47, 26, 0.08);
}

.service-option-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  margin: 0;
}

.service-option-item span {
  color: var(--text);
  font-weight: 700;
}

.card form button {
  width: 100%;
  max-width: 320px;
  justify-self: center;
  padding: 14px 22px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card form input[type="file"] {
  padding: 12px 16px;
}

input,
button,
select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 12px 14px;
  font: inherit;
}

button,
.button,
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  text-decoration: none;
  color: #fff;
  font: inherit;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  background: #c2185b;
}

a.button:hover,
button:hover,
.button:hover {
  opacity: 0.98;
}

button.primary-action,
button.button-primary,
.button-primary,
button.button-secondary,
.button-secondary,
button.button-warning,
.button-warning,
button.button-danger,
.button-danger,
button.button-info,
.button-info,
button.button-light,
.button-light {
  background: #c2185b;
  color: #fff;
}

button.button-light,
.button-light {
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

button[type="submit"],
button.primary-action {
  color: #fff;
}

button:hover {
  opacity: 0.98;
}

.card form button:hover {
  transform: translateY(-1px);
}

.filter-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  padding: 18px;
  border: 1px solid rgba(31, 36, 48, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(43, 108, 176, 0.04);
}

.filter-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
}

.filter-form button {
  width: auto;
  min-height: 48px;
  padding: 0 26px;
  grid-column: span 1;
}

.secondary-action,
button.secondary-action,
.button.secondary-action {
  background: #c2185b;
  color: #fff;
}

.secondary-action:hover,
button.secondary-action:hover,
.button.secondary-action:hover {
  background: #9b1d4f;
}

@media (max-width: 900px) {
  .filter-form {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  nav,
  .menu,
  .dashboard-hero-meta,
  .filter-form button,
  .admin-header,
  .admin-table td .admin-actions,
  .admin-table th:last-child,
  .admin-table td:last-child {
    display: none !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }

  .filter-form {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .admin-table,
  .admin-table thead,
  .admin-table tbody,
  .admin-table tr,
  .admin-table th,
  .admin-table td {
    color: #000;
  }
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(107, 47, 26, 0.28);
}

.notification-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(107, 47, 26, 0.16);
  background: rgba(107, 47, 26, 0.09);
  color: var(--primary-dark);
  box-shadow: none;
  font-size: 1.1rem;
}

.notification-bell.active {
  background: #ffe1de;
  color: #8b1d1d;
  animation: bellPulse 1.2s ease-in-out infinite;
}

.notification-count {
  position: absolute;
  top: -4px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #eb3d3d;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.notification-count.has-items {
  opacity: 1;
  transform: scale(1);
}

.notification-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(17, 24, 39, 0.95);
  color: #fff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 999;
}

.notification-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes bellPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.button:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
  outline: 3px solid rgba(43, 108, 176, 0.22);
  outline-offset: 2px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px clamp(16px, 3vw, 28px);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(44, 61, 84, 0.08);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
}

.admin-header nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.admin-header a {
  text-decoration: none;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.admin-header a:hover {
  background: rgba(43, 108, 176, 0.12);
  color: var(--primary-dark);
}

.admin-container {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 40px;
}

.admin-page-intro {
  display: grid;
  gap: 10px;
  padding: 22px 24px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(235, 241, 249, 0.94));
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.admin-page-intro h1,
.admin-page-intro h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

.admin-page-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.card {
  padding: 26px;
  border-radius: 24px;
}

.card strong {
  font-size: 2rem;
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 18px;
}

.dashboard-hero h1 {
  margin: 10px 0 8px;
  font-size: clamp(1.8rem, 2.6vw, 3rem);
}

.dashboard-hero-meta {
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(43, 108, 176, 0.10), rgba(43, 108, 176, 0.04));
  border: 1px solid var(--border);
  display: grid;
  gap: 4px;
  min-width: 160px;
}

.dashboard-hero-meta strong {
  font-size: 1.8rem;
  color: var(--primary-dark);
}

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid rgba(44, 61, 84, 0.08);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 32px rgba(33, 35, 47, 0.08);
}

.admin-table th,
.admin-table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(44, 61, 84, 0.08);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  background: rgba(43, 108, 176, 0.08);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.admin-table tbody tr:hover td {
  background: rgba(43, 108, 176, 0.04);
}

.admin-table tbody tr:nth-child(even) td {
  background: rgba(43, 108, 176, 0.02);
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table thead th:first-child {
  border-top-left-radius: 18px;
}

.admin-table thead th:last-child {
  border-top-right-radius: 18px;
}

.admin-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 18px;
}

.admin-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 18px;
}

.admin-table {
  overflow: hidden;
}

.admin-table td .admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-table td .admin-actions form {
  margin: 0;
}

.admin-table a,
.admin-table button {
  color: var(--primary-dark);
  font-weight: 700;
}

.admin-table button {
  width: auto;
  background: #c2185b;
  border: 1px solid transparent;
  box-shadow: none;
  padding: 10px 14px;
  border-radius: 14px;
  color: #fff;
}

.admin-table button:hover {
  background: #9b1d4f;
}

.admin-table td .admin-actions form,
.admin-table td .admin-actions a {
  background: rgba(107, 47, 26, 0.08);
}

.service-list {
  margin: 0;
  padding-left: 16px;
  color: var(--text);
}

.service-list li + li {
  margin-top: 4px;
}

.service-list.compact {
  padding-left: 14px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.metric-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(245, 249, 255, 0.96));
}

.metric-card strong {
  display: block;
  margin-top: 12px;
  font-size: 2rem;
}

.card h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.card {
  padding: 26px;
}

.card p,
.card ul {
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.9rem;
}

.metric-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(107, 47, 26, 0.08);
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card ul {
  margin: 0;
  padding-left: 18px;
}

.card li + li {
  margin-top: 6px;
}

.alert-error {
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: #fee2e2;
  color: #991b1b;
}

@media (max-width: 720px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-page-intro {
    padding: 18px;
  }

  .admin-table,
  .admin-table thead,
  .admin-table tbody,
  .admin-table th,
  .admin-table td,
  .admin-table tr {
    display: block;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table tr {
    border-bottom: 1px solid rgba(44, 61, 84, 0.08);
    padding: 10px 0;
  }

  .admin-table td {
    border-bottom: 0;
    padding: 10px 0;
  }

  .admin-table tr:nth-child(even) td {
    background: transparent;
  }
}
