:root {
  --bg: #f4f8fc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --accent: #06b6d4;
  --border: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --morning: #3b82f6;
  --afternoon: #f59e0b;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 16px;
}

* { box-sizing: border-box; }

button,
input,
select,
textarea {
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #eef6ff 0%, var(--bg) 240px);
  min-height: 100vh;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-size: 1.2rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.main-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.main-nav a.active,
.main-nav a:hover { color: var(--primary-dark); }

.nav-phone {
  padding: 10px 14px;
  border-radius: 999px;
  background: #ecfeff;
  color: var(--primary-dark) !important;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
}

.hero-stub {
  min-height: calc(100vh - 72px - 80px);
  display: flex;
  align-items: center;
}

.stub-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 48px 0 64px;
}

.stub-lead {
  margin-left: auto;
  margin-right: auto;
}

.stub-card {
  margin: 28px auto 32px;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px dashed var(--border);
  box-shadow: var(--shadow);
}

.stub-note {
  margin: 0;
  font-weight: 600;
  color: var(--muted);
}

.stub-actions {
  justify-content: center;
  flex-wrap: wrap;
}

.stub-footer {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero {
  padding: 56px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e0f2fe;
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  margin: 0 0 16px;
}

.hero-lead {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 54ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 22px;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.2;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 8px 22px rgba(14, 165, 233, 0.35);
}

.btn-outline {
  background: white;
  color: var(--text);
  border: 1.5px solid var(--border);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.btn-outline:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.btn-sm {
  padding: 10px 14px;
  font-size: 0.88rem;
}

.hero-card {
  background: var(--surface);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
}

.hero-stat strong {
  display: block;
  font-size: 2rem;
  color: var(--primary-dark);
}

.hero-stat span { color: var(--muted); }

.section { padding: 56px 0; }
.section-alt { background: white; }

.section-head {
  text-align: center;
  margin-bottom: 32px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.section-head p { color: var(--muted); margin: 0; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.product-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.product-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #fef3c7;
  color: #b45309;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
}

.product-icon { font-size: 2rem; margin-bottom: 12px; }
.product-card h3 { margin: 0 0 8px; }
.product-power { color: var(--muted); margin: 0 0 8px; }
.product-price {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 0 16px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.feature {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg);
}

.feature-icon { font-size: 1.8rem; margin-bottom: 10px; }
.feature h3 { margin: 0 0 8px; }
.feature p { margin: 0; color: var(--muted); line-height: 1.6; }

.site-footer {
  margin-top: 40px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  background: white;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.footer-inner a,
.footer-link-btn {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
}

.footer-link-btn {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

.footer-link-muted {
  color: var(--muted);
}

/* Calendar */
.calendar-page {
  padding: 20px 0 80px;
}

.cal-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  background: #eef2f7;
  padding: 5px;
  border-radius: 16px;
  border: none;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.cal-tab {
  flex: 1;
  min-height: 50px;
  border: none;
  border-radius: 12px;
  background: transparent;
  font-weight: 700;
  font-family: inherit;
  font-size: 0.98rem;
  cursor: pointer;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.cal-tab:hover:not(.active) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.55);
}

.cal-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.cal-tab:active { transform: scale(0.98); }

.quick-dates {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.quick-date-btn {
  flex: 1;
  min-height: 50px;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: white;
  font-weight: 700;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.quick-date-btn:hover:not(:disabled):not(.active) {
  border-color: #bae6fd;
  background: #f0f9ff;
}

.quick-date-btn.active {
  border-color: transparent;
  background: linear-gradient(135deg, #e0f2fe, #cffafe);
  color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.18);
}

.quick-date-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  box-shadow: none;
}

.quick-date-btn:active:not(:disabled) { transform: scale(0.98); }

.phone-lookup {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 16px;
  background: white;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.phone-lookup-label span {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 10px;
  color: var(--text);
}

.phone-lookup-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.phone-lookup-row input {
  flex: 1;
  min-height: 50px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  font: inherit;
  font-size: 1rem;
  background: #f8fafc;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.phone-lookup-row input:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.phone-lookup-row .btn {
  min-height: 50px;
  min-width: 96px;
  padding: 0 20px;
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: 14px;
}

.my-booking-banner {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.my-booking-inner {
  display: grid;
  gap: 4px;
  font-size: 0.92rem;
}

.my-booking-inner strong {
  font-size: 1rem;
  color: #065f46;
}

.btn-cancel-booking {
  margin-top: 8px;
  color: var(--danger);
  border-color: #fecaca;
}

.today-dashboard {
  margin-bottom: 20px;
  padding: 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #eff6ff, #f0fdfa);
  border: 1px solid #bfdbfe;
}

.today-dashboard-inner { display: grid; gap: 12px; }

.today-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.today-head h3 { margin: 0; font-size: 1.1rem; }

.today-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.today-stat {
  font-size: 0.85rem;
  color: var(--muted);
  background: rgba(255,255,255,0.7);
  padding: 4px 10px;
  border-radius: 999px;
}

.today-stat.pending b { color: var(--warning); }
.today-stat.confirmed b { color: var(--success); }

.today-list { display: grid; gap: 10px; }

.today-item {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.today-item-main {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 180px;
}

.today-time { font-size: 0.88rem; color: var(--muted); }
.today-addr { font-size: 0.9rem; }

.today-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.archive-search {
  margin: 12px 0 16px;
}

.archive-search input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font: inherit;
  background: var(--surface);
}

.status-cancelled {
  background: #fee2e2;
  color: #991b1b;
}

.onboarding {
  position: relative;
  margin-bottom: 16px;
  padding: 14px 40px 14px 16px;
  border-radius: 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.onboarding ol { margin: 8px 0 0; padding-left: 20px; }
.onboarding-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--muted);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn-call-sticky { white-space: nowrap; }

.installer-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.vpn-link-box {
  display: block;
  width: 100%;
  margin: 12px 0 8px;
  padding: 14px 16px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--text);
  font: 500 0.82rem/1.45 "Manrope", system-ui, sans-serif;
  text-align: left;
  word-break: break-all;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.vpn-link-box:hover:not(:disabled) {
  border-color: var(--primary);
  background: #eff6ff;
}

.vpn-link-box:disabled {
  opacity: 0.7;
  cursor: wait;
}

.vpn-link-box-copied {
  border-color: var(--success);
  background: #ecfdf5;
}

.vpn-copy-status {
  margin: 0 0 12px;
  color: var(--success);
  font-weight: 700;
  font-size: 0.92rem;
}

.vpn-steps {
  margin: 0 0 12px;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.vpn-steps li + li {
  margin-top: 4px;
}

.selected-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.loading-indicator {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.my-booking-actions {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.my-booking-banner.reschedule-active {
  border-color: #93c5fd;
  background: #eff6ff;
}

.success-dialog { text-align: center; }
.success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #dcfce7;
  color: #166534;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 800;
}

.success-body { text-align: left; margin-bottom: 12px; }
.success-note { color: var(--muted); font-size: 0.92rem; }

.dot.blocked, .dot-blocked { background: #94a3b8; }

.archive-view { margin-top: 0; }

.archive-card h3 { margin: 0 0 8px; }

.archive-date {
  margin: 16px 0 8px;
  font-size: 0.95rem;
  color: var(--muted);
}

.btn-block { width: 100%; }

.btn-lg {
  min-height: 52px;
  font-size: 1.05rem;
  padding: 14px 20px;
}

.period-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.period-head h4 { margin: 0; }

.period-head .period-time {
  margin: 0;
  font-size: 0.85rem;
}

.day-btn-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px 12px;
  width: 100%;
}

.day-num { font-size: 0.95rem; line-height: 1.1; }

.day-count {
  font-size: 0.58rem;
  color: var(--muted);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
}

.day-btn.selected .day-count { color: rgba(255,255,255,0.85); }

.legend-collapsible summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.legend-collapsible summary::-webkit-details-marker { display: none; }

body.modal-open { overflow: hidden; }

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.calendar-header h1 {
  margin: 0 0 6px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.calendar-subtitle { margin: 0; color: var(--muted); }

.installer-badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 12px;
  background: #ede9fe;
  color: #5b21b6;
  font-weight: 700;
  font-size: 0.92rem;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 20px;
  align-items: start;
}

.sidebar-card,
.selected-day-card,
.entries-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.month-nav h2 {
  margin: 0;
  font-size: 1.1rem;
}

.month-nav button {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: white;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.month-nav button:hover {
  border-color: var(--primary);
  background: #f0f9ff;
}

.month-nav button:active { transform: scale(0.95); }

.weekdays,
.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  width: 100%;
}

.days-grid {
  margin-top: 8px;
  min-height: 240px;
}

.weekdays span {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 700;
}

.day-btn {
  min-height: 48px;
  height: auto;
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #f8fafc;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  position: relative;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
}

.day-btn:hover:not(:disabled) { border-color: var(--primary); }
.day-btn.other-month { opacity: 0.35; }
.day-btn.today { box-shadow: inset 0 0 0 2px var(--primary); }
.day-btn.selected {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
}
.day-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.day-dots {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 3px;
}

.day-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: block;
}

.day-dots .dot-free { background: var(--success); }
.day-dots .dot-partial { background: var(--warning); }
.day-dots .dot-full { background: var(--danger); }

.legend { margin-top: 16px; }
.legend h3 { margin: 0 0 12px; font-size: 1rem; }
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot.free { background: var(--success); }
.dot.partial { background: var(--warning); }
.dot.full { background: var(--danger); }
.dot.morning { background: var(--morning); }
.dot.afternoon { background: var(--afternoon); }

.calendar-main {
  display: grid;
  gap: 20px;
}

.hint {
  color: var(--muted);
  margin: 0 0 16px;
  font-size: 0.92rem;
}

.slots-view {
  display: grid;
  gap: 16px;
}

.period-block {
  padding: 16px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
}

.period-block h4 {
  margin: 0;
  font-size: 1.05rem;
}

.period-time {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.period-block[data-period="1"] h4 { color: var(--morning); }
.period-block[data-period="2"] h4 { color: #b45309; }

.slot-card-hidden {
  background: #f1f5f9;
  border-style: solid;
  border-color: #e2e8f0;
}

.slot-card-hidden .slot-name {
  color: var(--muted);
}

.slot-actions,
.entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.address-field {
  position: relative;
}

.field-hint {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

.suggest-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 50;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-height: 220px;
  overflow-y: auto;
}

.suggest-list li button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.4;
}

.suggest-list li button:hover {
  background: #f1f5f9;
}

.entry-badge.time {
  background: #e0f2fe;
  color: #0369a1;
}

.entry-badge.status-pending {
  background: #fef3c7;
  color: #b45309;
}

.entry-badge.status-confirmed {
  background: #dcfce7;
  color: #166534;
}

.entry-badge.status-completed {
  background: #e0e7ff;
  color: #3730a3;
}

.btn-complete {
  border-color: #6366f1;
  color: #4338ca;
}

.slot-units,
.slot-assigned,
.slot-rating {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 4px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
}

.slot-meta-row {
  margin-bottom: 6px;
}

.btn-confirm {
  border-color: #16a34a;
  color: #166534;
}

.my-booking-inner .btn {
  margin-top: 8px;
}

.slot-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.slot-card {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 14px;
  background: #f8fafc;
}

.slot-card.occupied {
  border-style: solid;
  background: white;
}

.slot-card .slot-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 6px;
}

.slot-card .slot-name {
  font-weight: 700;
  margin-bottom: 4px;
}

.slot-card .slot-phone,
.slot-card .slot-address {
  font-size: 0.85rem;
  color: var(--muted);
}

.slot-card button {
  margin-top: 10px;
  width: 100%;
}

.entries-list {
  display: grid;
  gap: 10px;
}

.entry-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
}

.entry-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.entry-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-right: 6px;
}

.entry-badge.client { background: #dcfce7; color: #166534; }
.entry-badge.installer { background: #ede9fe; color: #5b21b6; }
.entry-badge.b1 { background: #dbeafe; color: #1d4ed8; }
.entry-badge.b2 { background: #ede9fe; color: #6d28d9; }

.empty-state {
  color: var(--muted);
  margin: 0;
}

.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.modal-backdrop-static {
  pointer-events: none;
  cursor: default;
}

.modal-dialog {
  position: relative;
  width: min(480px, 100%);
  background: white;
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  background: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
}

.modal-meta {
  color: var(--muted);
  margin: 0 0 16px;
}

.booking-form {
  display: grid;
  gap: 14px;
}

.booking-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

.booking-form input,
.booking-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font: inherit;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.form-error {
  color: var(--danger);
  margin: 0;
  font-size: 0.9rem;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: white;
  padding: 12px 18px;
  border-radius: 12px;
  z-index: 300;
  font-weight: 600;
}

.toast[hidden] { display: none; }

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

  .calendar-sidebar { order: 1; }
  .calendar-main { order: 2; }
}

@media (max-width: 720px) {
  .menu-toggle { display: flex; }

  .main-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    display: none;
  }

  .main-nav.open { display: flex; }

  .header-inner { position: relative; }

  .calendar-header { flex-direction: column; }

  .calendar-header h1 { font-size: 1.5rem; }

  .calendar-subtitle { font-size: 0.88rem; }

  .calendar-page { padding-bottom: 100px; }

  .slot-cards {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 0;
    align-items: flex-end;
  }

  .modal-dialog {
    width: 100%;
    max-width: none;
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    overflow-y: auto;
    padding: 20px 16px 28px;
  }

  .booking-form input,
  .booking-form textarea {
    font-size: 16px;
    min-height: 48px;
  }

  .day-btn {
    min-height: 44px;
  }

  .days-grid {
    min-height: 280px;
    gap: 4px;
  }

  .weekdays span {
    font-size: 0.72rem;
  }

  .sidebar-card {
    padding: 16px;
  }

  .container {
    width: min(1120px, calc(100% - 20px));
  }

  .quick-date-btn {
    font-size: 0.82rem;
    padding: 10px 6px;
  }

  .cal-tab {
    font-size: 0.92rem;
    min-height: 46px;
  }

  .phone-lookup-row .btn {
    min-width: 88px;
    padding: 0 14px;
  }
}
