:root {
  --bg-color: #FAF5F7;
  --card-bg: #FFFFFF;
  --accent-pink: #F8B4C8;
  --accent-pink-dark: #E485A4;
  --accent-crimson: #D81B60; /* Насыщенный малиновый */
  --text-primary: #4A3E44;
  --text-muted: #8E7D87;
  --shadow-soft: 6px 6px 14px rgba(220, 190, 205, 0.4), -6px -6px 14px rgba(255, 255, 255, 0.9);
  --shadow-inset: inset 3px 3px 6px rgba(220, 190, 205, 0.3), inset -3px -3px 6px rgba(255, 255, 255, 0.8);
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  padding: 12px;
}

.app-container {
  width: 100%;
  max-width: 480px;
  padding-bottom: 30px;
}

.studio-header {
  text-align: center;
  position: relative;
  padding: 20px 10px 15px;
}

.lang-switch {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  background: var(--bg-color);
  padding: 4px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-inset);
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
}

.lang-btn.active {
  background: var(--accent-pink);
  color: #fff;
}

.avatar-glow {
  width: 60px;
  height: 60px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: var(--bg-color);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.studio-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.studio-address {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.nav-tabs {
  display: flex;
  justify-content: space-around;
  background: var(--bg-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-inset);
  padding: 6px;
  margin: 15px 0 20px;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  padding: 10px 4px;
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.tab-btn.active {
  background: var(--card-bg);
  color: var(--accent-crimson);
  box-shadow: var(--shadow-soft);
  font-weight: 700;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-soft);
}

.card h2 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.card h3 {
  font-size: 14px;
  color: var(--accent-crimson);
  margin-bottom: 8px;
}

.hint-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.services-list {
  display: flex;
  flex-direction: column;
}

.service-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  margin-bottom: 8px;
  background: var(--bg-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

/* Яркая малиновая заливка при выборе услуги */
.service-item.selected {
  background: linear-gradient(135deg, #E91E63, #C2185B) !important;
  border: 2px solid #AD1457 !important;
  box-shadow: 0 4px 16px rgba(194, 24, 91, 0.4) !important;
  transform: translateY(-2px);
}

.service-item.selected .service-title {
  color: #FFFFFF !important;
  font-weight: 700;
}

.service-item.selected .service-meta {
  color: rgba(255, 255, 255, 0.85) !important;
}

.service-item.selected .service-price {
  color: #FFFFFF !important;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.service-item.selected::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 16px;
  font-weight: 900;
  color: #FFFFFF;
}

.service-info {
  display: flex;
  flex-direction: column;
}

.service-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.service-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.service-price {
  font-weight: 700;
  font-size: 13px;
  color: var(--accent-crimson);
}

.input-group {
  margin-bottom: 12px;
}

.input-group label {
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--text-muted);
}

.soft-input, .soft-input-file {
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: var(--bg-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-inset);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}

.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.slot-pill {
  padding: 11px 0;
  border: none;
  background: var(--bg-color);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: all 0.2s ease;
}

.slot-pill.selected {
  background: var(--accent-crimson) !important;
  color: #fff !important;
  box-shadow: var(--shadow-inset);
}

.slot-pill.disabled {
  background: #EAE3E6;
  color: #B5A8AE;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.6;
}

.file-upload-wrapper {
  margin-top: 6px;
}

.preview-box {
  position: relative;
  display: inline-block;
  margin-top: 10px;
}

.img-thumb {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  border: 2px solid var(--accent-pink);
  display: block;
}

.btn-detach {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-crimson);
  color: #fff;
  border: 2px solid #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.summary-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-soft);
  margin-top: 15px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
}

.soft-button {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s;
}

.primary-btn {
  background: linear-gradient(135deg, #E91E63, #C2185B);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.primary-btn:active {
  transform: scale(0.98);
}

.primary-btn:disabled {
  background: #EAE3E6;
  color: #B5A8AE;
  box-shadow: none;
  cursor: not-allowed;
}

.warning-box {
  background: #FFF1F3;
  color: #D3455B;
  padding: 10px 12px;
  font-size: 12px;
  border-radius: var(--radius-md);
  margin-top: 10px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.portfolio-item {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.portfolio-item img {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.portfolio-item img:active {
  transform: scale(0.97);
}

.clean-price-list {
  list-style: none;
}

.clean-price-list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed #EDE2E7;
  font-size: 13px;
}

/* Модальное окно просмотра фото */
.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 16px;
}

.image-modal.active {
  display: flex;
}

.image-modal img {
  max-width: 95%;
  max-height: 80vh;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  object-fit: contain;
}

.modal-caption {
  color: #fff;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  color: #fff;
  font-size: 20px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}