:root{
  --bg:#f8fafc;
  --paper:#ffffff;
  --text:#141414;
  --muted:#5a6a7a;
  --line:#e2e8f0;
  --brand:#2b6cb0;
  --brand-2:#3182ce;
  --brand-soft:#ebf8ff;
  --brand-glow:rgba(43,108,176,.08);
  --brand-border:#bee3f8;
  --brand-dark:#1a365d;
  --brand-shadow:rgba(43,108,176,.18);
  --hover-bg:#f7fafc;
  --radius:18px;
  --max:800px;
  --focus:0 0 0 3px rgba(43,108,176,.25);
  --sans:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  --success:#059669;
  --success-soft:#d1fae5;
  --error:#dc2626;
  --error-soft:#fee2e2;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}

body{
  margin:0;
  font-family:var(--sans);
  color:var(--text);
  background:var(--bg);
  line-height:1.6;
  min-height:100vh;
}

/* Layout */
.wrap{max-width:var(--max);margin:0 auto;padding:0 20px 60px}
.content-sections{max-width:var(--max);margin:0 auto;padding:0 20px}

/* Page Header */
.page-header{padding:24px 0;border-bottom:1px solid var(--line);margin-bottom:32px}
.header-content{display:flex;align-items:center;gap:16px}
.header-info{flex:1}
.header-info h1{margin:0;font-size:20px;font-weight:700;color:var(--brand-dark)}
.header-info p{margin:4px 0 0;font-size:14px;color:var(--muted)}

.back-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--muted);
  text-decoration:none;
  font-size:14px;
  font-weight:500;
  padding:8px 12px;
  border-radius:8px;
  transition:all .2s ease;
}
.back-link:hover{background:var(--paper);color:var(--brand)}
.back-link svg{width:16px;height:16px}

/* Doctor Header */
.doctor-header{display:flex;align-items:center;gap:14px;padding:20px 24px;background:var(--paper);border-bottom:1px solid var(--line)}
.doctor-header-photo{width:52px;height:52px;border-radius:50%;object-fit:cover;object-position:top center;border:2px solid var(--brand-soft);flex-shrink:0}
.doctor-header-info h1{margin:0;font-size:17px;font-weight:700;color:var(--brand-dark)}
.doctor-header-info p{margin:3px 0 0;font-size:13px;color:var(--muted)}

/* Progress Steps */
.booking-progress{display:flex;justify-content:center;gap:8px;margin-bottom:32px}
.progress-step{display:flex;align-items:center;gap:8px}
.step-number{
  width:32px;height:32px;border-radius:50%;
  background:var(--line);color:var(--muted);
  display:flex;align-items:center;justify-content:center;
  font-size:14px;font-weight:600;transition:all .3s ease;
}
.step-number.active{background:var(--brand);color:#fff;box-shadow:0 0 0 4px var(--brand-soft)}
.step-number.completed{background:var(--success);color:#fff}
.step-label{font-size:14px;color:var(--muted);display:none}
.step-connector{width:40px;height:2px;background:var(--line);margin:0 4px}
.step-connector.completed{background:var(--success)}

/* Booking Container & Screens */
.booking-container{background:var(--paper);border-radius:var(--radius);box-shadow:0 4px 24px rgba(20,20,20,.08);overflow:hidden}
.booking-screen{display:none;padding:32px;animation:fadeIn .3s ease}
.booking-screen.active{display:block}

@keyframes fadeIn{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:translateY(0)}
}

/* Screen Header */
.screen-header{text-align:center;margin-bottom:24px}
.screen-header h2{margin:0 0 6px;font-size:22px;font-weight:700;color:var(--brand-dark)}
.screen-header p{margin:0;font-size:14px;color:var(--muted)}
.screen-icon{
  width:56px;height:56px;
  background:var(--brand-soft);border-radius:14px;
  display:flex;align-items:center;justify-content:center;
  margin:0 auto 16px;
}
.screen-icon svg{width:28px;height:28px;color:var(--brand)}

/* Form Styles */
.booking-form{max-width:440px;margin:0 auto}
.form-row{display:flex;gap:16px;margin-bottom:20px}
.form-field{flex:1;display:flex;flex-direction:column;gap:6px}
.form-field.full{width:100%;margin-bottom:20px}
.form-field label{font-size:14px;font-weight:500;color:var(--text)}
.form-field label .required{color:var(--error)}
.form-field label .optional{color:var(--muted);font-weight:400;font-size:12px}

.form-field input,
.form-field select,
.form-field textarea{
  padding:14px 16px;
  border:2px solid var(--line);
  border-radius:10px;
  font-size:16px;
  font-family:inherit;
  color:var(--text);
  background:#fff;
  transition:all .2s ease;
}
.form-field input::placeholder,
.form-field textarea::placeholder{color:var(--muted)}
.form-field input:hover,
.form-field select:hover,
.form-field textarea:hover{border-color:var(--brand-border)}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus{outline:none;border-color:var(--brand);box-shadow:var(--focus)}
.form-field textarea{resize:vertical;min-height:120px;line-height:1.5}

.input-with-icon{position:relative}
.input-with-icon svg{position:absolute;left:14px;top:50%;transform:translateY(-50%);width:18px;height:18px;color:var(--muted);pointer-events:none}
.input-with-icon input{padding-left:44px}

.field-hint{font-size:13px;color:var(--muted);margin-top:6px}

/* Buttons */
.btn{
  padding:16px 28px;
  font-size:16px;font-weight:600;
  border-radius:10px;
  cursor:pointer;
  transition:all .2s ease;
  border:none;
  font-family:inherit;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
}
.btn svg{width:18px;height:18px}
.btn-primary{
  background:linear-gradient(135deg,var(--brand),var(--brand-2));
  color:#fff;
  box-shadow:0 4px 16px var(--brand-shadow);
  flex:1;
}
.btn-primary:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 8px 24px var(--brand-shadow)}
.btn-primary:disabled{background:var(--line);color:var(--muted);cursor:not-allowed;box-shadow:none;transform:none}
.btn-secondary{background:var(--hover-bg);color:var(--text);border:2px solid var(--line)}
.btn-secondary:hover{background:#fff;border-color:var(--brand-border)}
.btn-full{width:100%}

.btn .btn-spinner{display:none;width:18px;height:18px;animation:spin 1s linear infinite}
.btn.loading .btn-icon,.btn.loading .btn-text{display:none}
.btn.loading .btn-spinner{display:block}

.form-actions{display:flex;gap:12px;margin-top:28px}

/* Meeting Type Selection */
.meeting-type-selection{display:flex;flex-direction:column;gap:16px;margin-bottom:24px}
.meeting-type-btn{
  display:flex;align-items:center;gap:16px;
  width:100%;padding:20px 24px;
  background:#fff;border:2px solid var(--line);border-radius:14px;
  cursor:pointer;text-align:left;font-family:inherit;
  transition:all .2s ease;
}
.meeting-type-btn:hover{border-color:var(--brand);background:var(--brand-soft)}
.meeting-type-btn:hover .meeting-type-btn-arrow{transform:translateX(4px);color:var(--brand)}
.meeting-type-btn-icon{
  width:56px;height:56px;
  background:var(--brand-soft);border-radius:14px;
  display:flex;align-items:center;justify-content:center;flex-shrink:0;
}
.meeting-type-btn-icon svg{width:28px;height:28px;color:var(--brand)}
.meeting-type-btn-content{flex:1}
.meeting-type-btn-title{font-size:18px;font-weight:600;color:var(--brand-dark);margin-bottom:4px}
.meeting-type-btn-desc{font-size:14px;color:var(--muted)}
.meeting-type-btn-arrow{color:var(--muted);transition:all .2s ease;flex-shrink:0}
.meeting-type-btn-arrow svg{width:24px;height:24px}

.meeting-type-note{
  display:flex;align-items:center;gap:10px;
  padding:14px 18px;
  background:var(--hover-bg);border-radius:10px;
  font-size:14px;color:var(--muted);
}
.meeting-type-note svg{width:18px;height:18px;flex-shrink:0;color:var(--brand)}

/* Selected Meeting Type Display */
.selected-meeting-type{
  display:flex;align-items:center;gap:14px;
  padding:14px 18px;
  background:var(--brand-soft);border:2px solid var(--brand-border);border-radius:12px;
  margin-bottom:24px;
}
.selected-meeting-type-icon{
  width:40px;height:40px;
  background:#fff;border-radius:10px;
  display:flex;align-items:center;justify-content:center;flex-shrink:0;
}
.selected-meeting-type-icon svg{width:20px;height:20px;color:var(--brand)}
.selected-meeting-type-text{flex:1;display:flex;flex-direction:column;gap:2px}
.selected-meeting-type-label{font-size:11px;font-weight:600;color:var(--brand);text-transform:uppercase;letter-spacing:.04em}
.selected-meeting-type-value{font-size:15px;font-weight:600;color:var(--brand-dark)}
.selected-meeting-type-change{
  background:none;border:none;
  color:var(--brand);font-size:14px;font-weight:500;
  cursor:pointer;padding:6px 12px;border-radius:6px;
  font-family:inherit;transition:all .2s ease;
}
.selected-meeting-type-change:hover{background:rgba(255,255,255,.6);color:var(--brand-dark)}

/* Date Selection */
.date-header{
  text-align:center;padding:16px 20px;
  background:var(--hover-bg);border-radius:12px;
  margin-bottom:24px;font-weight:600;color:var(--brand-dark);
}
.dates-container{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px;margin-bottom:20px}
.date-card{
  padding:16px;
  border:2px solid var(--line);border-radius:12px;
  background:#fff;cursor:pointer;text-align:center;
  transition:all .2s ease;font-family:inherit;
}
.date-card:hover{border-color:var(--brand);background:var(--brand-soft)}
.date-card .day-name{font-size:13px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.03em;margin-bottom:4px}
.date-card .day-number{font-size:24px;font-weight:700;color:var(--brand-dark);line-height:1.2}
.date-card .month-name{font-size:13px;color:var(--muted);margin-top:2px}
.date-card .slot-count{font-size:12px;color:var(--brand);margin-top:8px;font-weight:500}

/* Time Selection */
.back-to-dates-btn{
  display:inline-flex;align-items:center;gap:8px;
  background:none;border:none;
  color:var(--brand);font-size:14px;font-weight:500;
  cursor:pointer;padding:8px 0;margin-bottom:16px;
  font-family:inherit;transition:color .2s ease;
}
.back-to-dates-btn:hover{color:var(--brand-dark)}
.back-to-dates-btn svg{width:18px;height:18px}

.selected-date-header{
  background:var(--brand-soft);border:2px solid var(--brand-border);border-radius:12px;
  padding:16px 20px;margin-bottom:20px;
  font-weight:600;font-size:16px;color:var(--brand-dark);text-align:center;
}
.times-container{display:flex;flex-wrap:wrap;gap:10px;max-height:300px;overflow-y:auto;padding-right:8px}
.time-slot{
  padding:12px 20px;
  border:2px solid var(--line);border-radius:10px;
  background:#fff;cursor:pointer;
  font-size:15px;font-weight:500;font-family:inherit;color:var(--text);
  transition:all .2s ease;
}
.time-slot:hover{border-color:var(--brand);background:var(--brand-soft);color:var(--brand)}
.time-slot.selected{background:var(--brand);color:#fff;border-color:var(--brand);box-shadow:0 0 0 4px var(--brand-soft)}

/* Loading & Empty States */
.slots-loading{text-align:center;padding:48px 20px}
.spinner{
  width:40px;height:40px;
  border:3px solid var(--line);border-top-color:var(--brand);
  border-radius:50%;margin:0 auto 16px;
  animation:spin .8s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}
.slots-loading p{margin:0;color:var(--muted);font-size:15px}

.no-slots{text-align:center;padding:48px 20px}
.no-slots-icon{
  width:64px;height:64px;
  background:var(--hover-bg);border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  margin:0 auto 16px;
}
.no-slots-icon svg{width:32px;height:32px;color:var(--muted)}
.no-slots h3{margin:0 0 4px;font-size:16px;color:var(--text)}
.no-slots p{margin:0;font-size:14px;color:var(--muted)}

/* Appointment Summary */
.appointment-summary{
  display:flex;align-items:center;gap:16px;
  background:var(--brand-soft);border:2px solid var(--brand-border);border-radius:14px;
  padding:20px;margin-bottom:24px;
}
.summary-icon{
  width:52px;height:52px;
  background:#fff;border-radius:12px;
  display:flex;align-items:center;justify-content:center;flex-shrink:0;
  box-shadow:0 2px 8px rgba(0,0,0,.06);
}
.summary-icon svg{width:26px;height:26px;color:var(--brand)}
.summary-content{flex:1}
.summary-label{font-size:12px;font-weight:600;color:var(--brand);text-transform:uppercase;letter-spacing:.03em;margin-bottom:4px}
.summary-value{font-size:16px;font-weight:600;color:var(--brand-dark)}
.summary-meeting-type{font-size:14px;color:var(--muted);margin-top:2px}
.summary-edit{
  width:40px;height:40px;
  background:#fff;border:2px solid var(--brand-border);border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;transition:all .2s ease;flex-shrink:0;
}
.summary-edit svg{width:18px;height:18px;color:var(--brand)}
.summary-edit:hover{background:var(--brand);border-color:var(--brand)}
.summary-edit:hover svg{color:#fff}

/* Success Screen */
.success-screen{text-align:center;padding:20px 0}
.success-icon{
  width:80px;height:80px;
  background:linear-gradient(135deg,#10b981,var(--success));
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  margin:0 auto 24px;
  box-shadow:0 12px 32px rgba(5,150,105,.3);
  animation:pop .4s cubic-bezier(.16,1,.3,1);
}
@keyframes pop{0%{transform:scale(0)}50%{transform:scale(1.1)}100%{transform:scale(1)}}
.success-icon svg{width:40px;height:40px;color:#fff}
.success-screen h2{margin:0 0 8px;font-size:28px;color:var(--brand-dark)}
.success-subtitle{font-size:16px;color:var(--muted);margin:0 0 32px}

/* Confirmation Card */
.confirmation-card{background:var(--hover-bg);border-radius:14px;padding:8px 0;margin-bottom:24px;text-align:left}
.confirmation-row{display:flex;align-items:flex-start;gap:16px;padding:18px 24px}
.confirmation-row:not(:last-child){border-bottom:1px solid var(--line)}
.confirmation-icon{
  width:44px;height:44px;
  background:#fff;border-radius:10px;
  display:flex;align-items:center;justify-content:center;flex-shrink:0;
  box-shadow:0 2px 8px rgba(0,0,0,.06);
}
.confirmation-icon svg{width:22px;height:22px;color:var(--brand)}
.confirmation-content{flex:1}
.confirmation-label{font-size:12px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.03em;margin-bottom:4px}
.confirmation-value{font-size:15px;font-weight:600;color:var(--text)}
.confirmation-hint{font-size:13px;color:var(--muted);margin-top:4px}
.maps-link{
  display:inline-flex;align-items:center;gap:6px;
  font-size:14px;color:var(--brand);text-decoration:none;
  margin-top:8px;font-weight:500;
}
.maps-link:hover{text-decoration:underline}

/* Manage Actions */
.manage-actions{display:flex;gap:12px;margin-bottom:20px}
.manage-btn{
  flex:1;
  display:flex;align-items:center;justify-content:center;gap:8px;
  padding:14px 20px;border-radius:10px;
  font-size:15px;font-weight:500;text-decoration:none;
  background:var(--hover-bg);color:var(--text);border:2px solid var(--line);
  transition:all .2s ease;
}
.manage-btn svg{width:18px;height:18px}
.manage-btn:hover{background:#fff;border-color:var(--brand-border)}
.manage-btn-danger:hover{background:var(--error-soft);border-color:#fecaca;color:var(--error)}

/* Error Screen */
.error-screen{text-align:center;padding:20px 0}
.error-icon{
  width:80px;height:80px;
  background:linear-gradient(135deg,#f87171,var(--error));
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  margin:0 auto 24px;
  box-shadow:0 12px 32px rgba(220,38,38,.3);
  font-size:40px;font-weight:bold;color:#fff;
}
.error-screen h2{margin:0 0 8px;font-size:24px;color:var(--text)}
.error-screen p{font-size:15px;color:var(--muted);margin:0 0 24px}

/* Testimonial Carousel */
.testimonial-carousel{
  margin:2px auto;padding:24px;
  max-width:var(--max);
  background:var(--paper);border-radius:var(--radius);
  box-shadow:0 4px 16px rgba(20,20,20,.06);
  text-align:center;position:relative;min-height:140px;
}
.testimonial-slide{display:none;animation:fadeIn .5s ease}
.testimonial-slide.active{display:block}
.testimonial-text{font-size:16px;font-style:italic;color:var(--text);line-height:1.7;margin:0 0 12px;max-width:600px;margin-left:auto;margin-right:auto}
.testimonial-author{font-size:14px;color:var(--muted);margin:0;font-style:normal}
.testimonial-dots{display:flex;justify-content:center;gap:8px;margin-top:20px}
.testimonial-dot{
  width:8px;height:8px;border-radius:50%;
  background:var(--line);border:none;cursor:pointer;padding:0;
  transition:all .2s ease;
}
.testimonial-dot.active{background:var(--brand);transform:scale(1.2)}
.testimonial-dot:hover{background:var(--brand-border)}

/* Content Sections */
.section{margin-top:8px}
.section h2{margin:0 0 16px;font-size:24px;font-weight:700;color:var(--brand-dark);letter-spacing:-.3px}
.section p{margin:0 0 16px;font-size:17px;color:var(--text);line-height:1.6}
.section p:last-child{margin-bottom:0}
.section p.emphasis{font-style:italic;color:var(--brand-dark)}
.section-image{width:100%;max-width:100%;height:auto;border-radius:var(--radius);margin:24px auto;display:block;box-shadow:0 8px 24px rgba(20,20,20,.08)}
.divider{border:none;border-top:1px solid var(--line);margin:1.5rem 0}

/* Footer */
.page-footer{margin-top:40px;text-align:center;font-size:13px;color:var(--muted);line-height:1.6}
.page-footer a{color:var(--muted);text-decoration:none}
.page-footer a:hover{text-decoration:underline}

/* Responsive */
@media(min-width:640px){
  .step-label{display:block}
}

@media(max-width:640px){
  .wrap{padding:0 16px 40px}
  .booking-screen{padding:24px 20px}
  .form-row,.form-actions,.manage-actions{flex-direction:column}
  .form-actions{flex-direction:column-reverse}
  .btn{width:100%}
  .form-field.full{margin-bottom:16px}
  .appointment-summary,.sidebar-content{flex-direction:column;text-align:center}
}
