:root {
  --radius: 0.875rem;
  --background: #f6f4f9;
  --foreground: #24182e;
  --card: #ffffff;
  --primary: #8b4dff;
  --primary-foreground: #faf8ff;
  --muted-foreground: #6d6478;
  --accent: #f0e9ff;
  --accent-foreground: #4c1d95;
  --destructive: #dc2626;
  --border: #e6e0ee;
  --input: #e6e0ee;
  --ring: rgba(139, 77, 255, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--background);
  color: var(--foreground);
}

main {
  min-height: 100vh;
  padding: 2.5rem 1rem 4rem;
}

.container {
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
}

header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.brand {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--primary);
}

h1 {
  margin: 0.75rem 0 0;
  font-size: clamp(1.875rem, 5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.subtitle {
  margin: 0.75rem auto 0;
  max-width: 22rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

section.card {
  border: 1px solid var(--border);
  border-radius: 1.625rem;
  background: var(--card);
  padding: 1.5rem;
  box-shadow: 0 12px 32px rgba(139, 77, 255, 0.05);
}

@media (min-width: 640px) {
  section.card {
    padding: 2rem;
  }
}

.section-title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
}

.section-title.plain {
  letter-spacing: -0.01em;
  text-transform: none;
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--foreground);
}

.section-body {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.field label,
.field > span {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--input);
  border-radius: 0.9rem;
  background: var(--background);
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 0.875rem;
  color: var(--foreground);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(109, 100, 120, 0.7);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
}

.field.error input,
.field.error textarea {
  border-color: var(--destructive);
}

.error-text {
  margin: 0.375rem 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--destructive);
}

.grid-2 {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.toggle-grid {
  display: grid;
  gap: 0.75rem;
}

.toggle-grid.two {
  grid-template-columns: 1fr 1fr;
}

@media (min-width: 640px) {
  .toggle-grid.services {
    grid-template-columns: 1fr 1fr;
  }
}

.toggle-btn,
.yes-no-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 1.15rem;
  background: var(--background);
  padding: 0.875rem 1rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  color: var(--foreground);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.yes-no-btn {
  justify-content: center;
}

.toggle-btn:hover,
.yes-no-btn:hover {
  border-color: rgba(139, 77, 255, 0.4);
}

.toggle-btn.active,
.yes-no-btn.active {
  border-color: var(--primary);
  background: var(--accent);
  color: var(--accent-foreground);
}

.check-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
  border: 1.5px solid var(--input);
  border-radius: 999px;
  background: var(--card);
}

.toggle-btn.active .check-box {
  border-color: var(--primary);
  background: var(--primary);
}

.check-box svg {
  display: none;
  width: 0.7rem;
  height: 0.7rem;
  stroke: var(--primary-foreground);
  fill: none;
  stroke-width: 2;
}

.toggle-btn.active .check-box svg {
  display: block;
}

.hint {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .photo-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.photo-item,
.photo-add {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 0.75rem;
}

.photo-item {
  border: 1px solid var(--border);
  background: var(--background);
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-remove {
  position: absolute;
  top: 0.375rem;
  right: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

.photo-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  border: 2px dashed var(--input);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.photo-add span {
  font-size: 11px;
  font-weight: 600;
}

.photo-add:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.photo-add input {
  display: none;
}

.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  padding: 1rem 2rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-foreground);
  box-shadow: 0 10px 25px rgba(139, 77, 255, 0.28);
  cursor: pointer;
  transition: opacity 0.15s;
}

.submit-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.footer-note {
  margin: 0;
  padding-bottom: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.form-error {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: #fef2f2;
  color: var(--destructive);
  font-size: 0.875rem;
}

.hidden {
  display: none !important;
}

.success-page {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.success-card {
  width: 100%;
  max-width: 28rem;
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  background: var(--card);
  padding: 2.5rem;
  text-align: center;
  box-shadow: 0 20px 40px rgba(139, 77, 255, 0.08);
}

.success-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto;
  color: var(--primary);
}

.success-card h1 {
  margin-top: 1.5rem;
  font-size: 1.5rem;
}

.success-card p {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.success-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
  border-radius: 999px;
  background: var(--primary);
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-foreground);
  text-decoration: none;
}

.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.admin-login,
.admin-wrap {
  width: 100%;
  max-width: 56rem;
  margin: 2.5rem auto;
  padding: 0 1rem 3rem;
}

.admin-login {
  max-width: 24rem;
}

.admin-card {
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  background: var(--card);
  padding: 2rem;
  box-shadow: 0 12px 32px rgba(139, 77, 255, 0.05);
}

.admin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-head h1 {
  font-size: 1.5rem;
}

.admin-meta {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-table th,
.admin-table td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.admin-table a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.admin-empty {
  margin: 0;
  padding: 2rem 0;
  text-align: center;
  color: var(--muted-foreground);
}

.detail-grid {
  display: grid;
  gap: 1rem;
}

.detail-item dt {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.detail-item dd {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.admin-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.admin-photos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  padding: 0.5rem 1rem;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--foreground);
  text-decoration: none;
  cursor: pointer;
}

.pill {
  display: inline-flex;
  margin: 0.15rem 0.25rem 0.15rem 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-foreground);
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
}
