/* Календарь правил Smart Menu Pricing */

main#app {
  max-width: 1320px; margin: 0 auto;
  padding: 28px 22px 80px;
}
@media (max-width: 700px) {
  main#app { padding: 14px 12px 60px; }
}

.cal-hero {
  background: linear-gradient(135deg, #1B1814 0%, #2A211A 50%, #3D2D1F 100%);
  color: #fff; border-radius: var(--radius-lg);
  padding: 30px 36px;
  margin-bottom: 24px;
}
.cal-hero h1 { font-family: 'Cormorant Garamond', serif; font-size: 34px; }
.cal-hero p { color: rgba(255,255,255,0.7); max-width: 70ch; font-size: 15px; margin-top: 8px; }
@media (max-width: 700px) {
  .cal-hero { padding: 20px 18px; margin-bottom: 14px; border-radius: var(--radius-md); }
  .cal-hero h1 { font-size: 24px; line-height: 1.15; }
  .cal-hero p { font-size: 13px; }
}
.cal-hero .pills { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; font-size: 12px; }
.cal-hero .pills .pill {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 5px 12px; border-radius: 999px;
}

.controls {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
}
@media (max-width: 700px) {
  .controls { grid-template-columns: 1fr; gap: 14px; padding: 14px; margin-bottom: 14px; }
}
.controls label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; font-weight: 600; margin-bottom: 8px;
}
.controls label span:last-child {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--c-primary);
}
.weather-radios { display: flex; gap: 6px; flex-wrap: wrap; }
.weather-radios button {
  padding: 7px 13px; border-radius: 999px;
  background: var(--c-surface-2); color: var(--c-text-2);
  font-size: 13px; font-weight: 600;
  border: 1px solid transparent;
}
.weather-radios button.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* ===== Legend ===== */
.legend-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 24px;
}
@media (max-width: 700px) {
  .legend-card { padding: 14px; margin-bottom: 14px; }
  .legend-grid { grid-template-columns: 1fr; gap: 6px; }
  .legend-item { padding: 8px 10px; }
  .legend-name { font-size: 12px; }
  .legend-effect { font-size: 12px; }
  .legend-cond { font-size: 10px; }
}
.legend-card-title {
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--c-text-3);
  font-weight: 700; margin-bottom: 12px;
}
.legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.legend-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--c-surface-2);
  transition: opacity .15s, filter .15s;
}
.legend-item.inactive { opacity: 0.35; filter: grayscale(1); }
.legend-swatch {
  width: 14px; height: 30px; border-radius: 4px;
  flex-shrink: 0;
}
.legend-name { font-weight: 700; font-size: 13px; }
.legend-effect {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: 13px;
  margin-left: 6px;
}
.legend-effect.discount  { color: var(--c-danger);  }   /* скидка с точки зрения управляющего — минус */
.legend-effect.surcharge { color: var(--c-success); }   /* наценка — плюс к марже */
.legend-cond { font-size: 11px; color: var(--c-text-2); margin-top: 2px; }

/* ===== Calendar grid ===== */
.cal-section {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.cal-section::before {
  content: '← Прокрутите →';
  display: none;
  font-size: 11px; color: var(--c-text-3);
  text-align: center; margin-bottom: 6px;
}
@media (max-width: 700px) {
  .cal-section { padding: 12px; margin-bottom: 14px; }
  .cal-section::before { display: block; }
  .cal-grid { min-width: 540px; grid-template-columns: 44px repeat(7, 1fr); }
  .day-header { padding: 6px 2px; }
  .day-header .day-name { font-size: 11px; }
  .day-header .day-sub { display: none; }
  .hour-label { font-size: 10px; padding: 0 4px; }
  .cal-cell { height: 30px; padding: 1px; gap: 1px; }
  .cal-bar { font-size: 8px; padding: 0 2px; }
}
.cal-grid {
  display: grid;
  grid-template-columns: 56px repeat(7, 1fr);
  gap: 0;
  min-width: 700px;
}
.cal-grid .corner { background: var(--c-surface-2); }
.day-header {
  background: var(--c-surface-2);
  padding: 8px 6px;
  text-align: center;
  font-size: 12px; font-weight: 700;
  border-bottom: 2px solid var(--c-line);
}
.day-header.weekend { color: var(--c-primary); }
.day-header .day-name { display: block; font-size: 13px; }
.day-header .day-sub { display: block; font-size: 10px; color: var(--c-text-3); font-weight: 500; margin-top: 1px; }

.hour-label {
  padding: 0 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--c-text-3);
  display: flex; align-items: center; justify-content: flex-end;
  border-right: 1px solid var(--c-line);
  height: 38px;
}
.cal-cell {
  border-bottom: 1px solid #EFE9DD;
  border-right: 1px solid #EFE9DD;
  height: 38px;
  display: flex; flex-direction: column;
  padding: 2px;
  gap: 2px;
}
.cal-cell.now { background: rgba(201,168,106,0.08); position: relative; }
.cal-cell.now::after {
  content: ''; position: absolute; left: 0; right: 0;
  border-top: 2px solid var(--c-accent);
  pointer-events: none;
}
.cal-bar {
  flex: 1; min-height: 4px;
  border-radius: 3px;
  display: flex; align-items: center;
  padding: 0 4px;
  font-size: 9px; font-weight: 700;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.03em;
  text-shadow: 0 1px 1px rgba(0,0,0,0.18);
  overflow: hidden; white-space: nowrap;
  cursor: help;
  transition: transform .1s;
}
.cal-bar:hover { transform: translateX(2px); filter: brightness(1.1); }
.cal-bar.tiny { font-size: 0; padding: 0; }
.cal-empty {
  flex: 1;
  background: repeating-linear-gradient(45deg, transparent 0 4px, #F3EFE7 4px 5px);
  border-radius: 3px;
}

/* ===== Insights ===== */
.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  .insight-grid { grid-template-columns: 1fr; gap: 10px; margin-bottom: 14px; }
  .insight-card { padding: 16px; }
  .insight-icon { font-size: 22px; }
  .insight-title { font-size: 16px; }
  .insight-text { font-size: 13px; }
}
.insight-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  padding: 22px;
}
.insight-icon { font-size: 30px; margin-bottom: 8px; }
.insight-title { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.insight-text { color: var(--c-text-2); font-size: 14px; line-height: 1.5; }

.cta-card {
  background: linear-gradient(135deg, var(--c-accent-light) 0%, #FFF6E0 100%);
  border: 1px solid var(--c-accent);
  border-radius: var(--radius-md);
  padding: 26px;
  display: flex; align-items: center; gap: 18px;
  flex-wrap: wrap;
}
@media (max-width: 700px) {
  .cta-card { padding: 18px; gap: 12px; }
  .cta-card .cta-icon { font-size: 28px; }
  .cta-card h3 { font-size: 18px; }
  .cta-card .btn { width: 100%; }
}
.cta-card .cta-icon { font-size: 36px; }
.cta-card h3 { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 600; color: var(--c-accent-dark); }
.cta-card p { font-size: 13px; color: var(--c-text-2); margin: 4px 0 0; }
.cta-card .btn { background: var(--c-accent-dark); color: #fff; border-color: var(--c-accent-dark); }
.cta-card .btn:hover { background: #8B6914; }
