:root {
  --teal-900: #063e42;
  --teal-800: #094f54;
  --teal-700: #0b5f65;
  --teal-600: #0e7a82;
  --teal-500: #12949d;
  --teal-400: #2db3bc;
  --teal-300: #6dcdd4;
  --teal-200: #a8e1e5;
  --teal-100: #d8f2f4;
  --teal-50: #eef9fa;
  --amber-500: #d4a030;
  --amber-100: #fef3cd;
  --gray-50: #f8fafb;
  --gray-100: #f0f2f4;
  --gray-200: #e2e5e8;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.5;
}

header {
  position: relative;
  background: white;
  color: var(--teal-900);
  padding: .6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  border-bottom: 3px solid var(--teal-700);
}

header img {
  height: 32px;
}

header h1 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--teal-700);
}

header a { color: var(--teal-700); }

.header-actions {
  position: absolute;
  right: 1.5rem;
  display: flex;
  gap: .5rem;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .75rem;
  font-size: .8rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background .15s, color .15s;
  text-decoration: none;
  border: none;
}

.header-btn svg {
  width: 14px;
  height: 14px;
}

.header-btn.primary {
  background: var(--teal-700);
  color: white;
}

.header-btn.primary:hover {
  background: var(--teal-900);
}

.header-btn.ghost {
  background: transparent;
  color: var(--teal-700);
}

.header-btn.ghost:hover {
  background: rgba(0, 128, 128, .08);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  align-items: start;
}

.main-grid {
  grid-template-columns: 1fr 2fr;
}

@media (max-width: 900px) {
  .grid, .main-grid { grid-template-columns: 1fr; }
}

/* Tab bar */
.tab-bar {
  display: flex;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 1.5rem;
  gap: .25rem;
}

.tab-btn {
  padding: .6rem 1.25rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--gray-500);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}

.tab-btn:hover {
  color: var(--teal-700);
}

.tab-btn.active {
  color: var(--teal-700);
  border-bottom-color: var(--teal-700);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 100;
  justify-content: center;
  align-items: center;
}

.modal-overlay.open { display: flex; }

.modal {
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  max-width: 520px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .75rem 1.25rem;
  background: var(--teal-700);
  color: white;
  font-weight: 600;
  font-size: .9rem;
  border-radius: var(--radius) var(--radius) 0 0;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 .25rem;
  line-height: 1;
  opacity: .8;
}

.modal-close:hover { opacity: 1; }

.modal-body { padding: .5rem; }
.modal-body p { font-size: .85rem; color: var(--gray-700); line-height: 1.6; margin-bottom: .75rem; }
.modal-body h4 { font-size: .8rem; font-weight: 700; color: var(--teal-700); letter-spacing: .03em; margin: 1rem 0 .4rem; }
.modal-body h4:first-child { margin-top: 0; }
.modal-body ul { font-size: .85rem; color: var(--gray-700); line-height: 1.6; margin: 0 0 .75rem 1.25rem; }
.modal-body a { color: var(--teal-600); }

.prices-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: .85rem;
  color: var(--teal-700);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prices-link:hover { color: var(--teal-900); }

/* Cards */
.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: .75rem 1.25rem;
  font-weight: 600;
  font-size: .9rem;
  border-bottom: 1px solid var(--gray-200);
}

.card-header.green {
  background: var(--teal-700);
  color: white;
}

.card-header.dark {
  background: var(--teal-900);
  color: white;
}

.card-body { padding: 1rem 1.25rem; }

/* Input rows */
.input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.input-row:last-child { border-bottom: none; }
.input-row.checkbox-row { gap: 0; }

.input-row label {
  font-size: .875rem;
  color: var(--gray-700);
  flex: 1;
}

.input-row label .caption {
  display: block;
  font-size: .7rem;
  color: var(--gray-400);
  font-weight: 400;
  margin-top: .1rem;
  font-style: italic;
}

.input-row label .caption a {
  color: var(--teal-500);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: .1rem;
  cursor: pointer;
}

.checkbox-label > span {
  flex: 1;
}

.checkbox-label input[type="checkbox"] {
  margin: .2rem .2rem 0 0;
  accent-color: var(--teal-700);
}

.camera-row.disabled,
.service-row.disabled {
  opacity: .4;
  pointer-events: none;
}

.info-note {
  font-size: .8rem;
  color: var(--gray-500);
  font-style: italic;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.input-row .desc {
  font-size: .75rem;
  color: var(--gray-500);
}

.input-row select {
  width: 90px;
  padding: .35rem .5rem;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  font-size: .875rem;
  color: var(--gray-800);
  background: var(--gray-50);
  cursor: pointer;
}

.input-row select:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(11,95,101,.15);
}

.input-row input:not([type="checkbox"]) {
  width: 90px;
  text-align: right;
  padding: .35rem .5rem;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  font-size: .875rem;
  color: var(--gray-800);
  background: var(--gray-50);
  transition: border-color .15s;
}

.input-row input:not([type="checkbox"]):focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(65,153,102,.15);
}

.unit {
  font-size: .75rem;
  color: var(--gray-400);
  width: 80px;
  text-align: right;
  margin-left: .5rem;
}

.modal-input {
  width: 80px;
  text-align: right;
  padding: .25rem .4rem;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  font-size: .8rem;
  color: var(--gray-800);
  background: var(--gray-50);
}

.modal-input:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(11,95,101,.15);
}

.full-width { grid-column: 1 / -1; }

footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: .8rem;
  color: var(--gray-500);
}

footer a { color: var(--green-600); }

/* Toast */
.toast {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  padding: .5rem 1.25rem;
  background: white;
  color: var(--gray-800);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  font-size: .85rem;
  font-weight: 500;
  z-index: 200;
  animation: toast-fade 2s ease forwards;
}

.toast.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

@keyframes toast-fade {
  0%   { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  10%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  75%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-8px); }
}

/* Mobile */
@media (max-width: 600px) {
  header {
    flex-wrap: wrap;
  }

  .header-actions {
    position: static;
    width: 100%;
    justify-content: center;
  }

  .container {
    padding: 1rem .75rem;
  }

  .grid {
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .tab-btn {
    padding: .5rem .75rem;
    font-size: .8rem;
  }

  .tab-bar {
    margin-bottom: 1rem;
  }

  .input-row {
    flex-wrap: wrap;
  }

  .input-row label {
    flex: 1 1 100%;
  }

  .input-row input:not([type="checkbox"]),
  .input-row select {
    width: 100%;
  }

  .unit {
    width: auto;
  }

  .card-header {
    padding: .6rem 1rem;
  }

  .card-body {
    padding: .75rem 1rem;
  }

  .modal {
    width: 95%;
    max-height: 90vh;
  }
}
