@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #D70A1E;
  --primary-hover: #b80818;
  --primary-light: #fdf2f2;
  --primary-border: #fbcbcb;
  --secondary: #6F6F6F;
  --secondary-light: #F3F4F6;
  --text-dark: #1F2937;
  --text-muted: #4B5563;
  --text-light: #FFFFFF;
  --bg-page: #F9FAFB;
  --bg-card: #FFFFFF;
  --border-color: #E5E7EB;
  --success: #10B981;
  --success-light: #ECFDF5;
  --danger: #EF4444;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.2s ease-in-out;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-page);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* HEADER & NAVBAR */
.header {
  background-color: var(--bg-card);
  border-bottom: 3px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area img {
  height: 50px;
  display: block;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  margin-left: 20px;
  transition: var(--transition);
  font-size: 15px;
}

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

/* HERO SECTION */
.hero {
  background: linear-gradient(135deg, #FFF5F5 0%, #FFFFFF 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 40px 20px;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.2rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 10px;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* CONTAINER */
.container {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
}

/* STEPPER */
.stepper {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
  position: relative;
}

.stepper::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 5%;
  right: 5%;
  height: 3px;
  background-color: var(--border-color);
  z-index: 1;
}

.step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 3px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  margin-bottom: 8px;
  transition: var(--transition);
}

.step-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  transition: var(--transition);
}

.step.active .step-number {
  border-color: var(--primary);
  background-color: var(--primary);
  color: var(--text-light);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.step.active .step-label {
  color: var(--primary);
  font-weight: 600;
}

.step.completed .step-number {
  border-color: var(--success);
  background-color: var(--success);
  color: var(--text-light);
}

.step.completed .step-label {
  color: var(--success);
}

/* CARD / CONTENT WRAPPER */
.card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  padding: 30px;
  margin-bottom: 30px;
  transition: var(--transition);
}

.step-content {
  display: none;
}

.step-content.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* SEARCH & SERVICE CATALOG */
.search-bar-container {
  margin-bottom: 25px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 12px 15px 12px 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--secondary);
  pointer-events: none;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  max-height: 500px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-page);
}

.service-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.service-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.service-card.selected {
  border-color: var(--primary);
  background-color: var(--primary-light);
  box-shadow: 0 0 0 1px var(--primary);
}

.service-name {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--text-dark);
}

.service-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 500;
}

.service-duration {
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.service-price {
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.service-description {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  border-top: 1px dashed var(--border-color);
  padding-top: 10px;
  margin-top: 5px;
  flex-grow: 1;
}

/* CALENDAR & TIME SLOTS */
.calendar-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
}

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

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

.calendar-title {
  font-weight: 700;
  font-size: 18px;
}

.calendar-nav-btn {
  background: none;
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.calendar-nav-btn:hover {
  background-color: var(--secondary-light);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  text-align: center;
}

.calendar-day-header {
  font-weight: 600;
  font-size: 13px;
  color: var(--secondary);
  padding: 10px 0;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
}

.calendar-day:hover:not(.disabled):not(.selected) {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.calendar-day.selected {
  background-color: var(--primary);
  color: var(--text-light);
  border-color: var(--primary);
  font-weight: 600;
}

.calendar-day.disabled {
  background-color: var(--secondary-light);
  color: #D1D5DB;
  border-color: var(--border-color);
  cursor: not-allowed;
}

.slots-container {
  display: flex;
  flex-direction: column;
}

.slots-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 15px;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
  padding: 5px 0;
}

.slot-btn {
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  transition: var(--transition);
}

.slot-btn:hover:not(.selected) {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-light);
}

.slot-btn.selected {
  background-color: var(--primary);
  color: var(--text-light);
  border-color: var(--primary);
}

.no-slots-msg {
  color: var(--secondary);
  font-size: 14px;
  font-style: italic;
  grid-column: 1 / -1;
  padding: 20px 0;
  text-align: center;
}

/* FORM STYLES */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text-dark);
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

/* NAVIGATION BUTTONS */
.button-row {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

.btn {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: inherit;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-light);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: var(--shadow-sm);
}

.btn-primary:disabled {
  background-color: var(--border-color);
  color: #9CA3AF;
  cursor: not-allowed;
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--secondary-light);
}

/* SUCCESS STATE */
.success-state {
  text-align: center;
  padding: 40px 20px;
}

.success-icon {
  width: 70px;
  height: 70px;
  background-color: var(--success-light);
  color: var(--success);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 32px;
  margin: 0 auto 20px;
}

.success-state h2 {
  color: var(--success);
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  margin: 25px 0;
  text-align: left;
}

.summary-table th, .summary-table td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-color);
}

.summary-table th {
  font-weight: 600;
  color: var(--secondary);
  width: 35%;
}

/* FOOTER */
.footer {
  background-color: #1F2937;
  color: #9CA3AF;
  padding: 40px 20px;
  text-align: center;
  margin-top: 60px;
  font-size: 14px;
  border-top: 5px solid var(--primary);
}

.footer a {
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
}

.footer a:hover {
  color: var(--primary);
}

/* ADMIN PANEL STYLES */
.admin-container {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 30px;
  margin-top: 30px;
}

@media (max-width: 768px) {
  .admin-container {
    grid-template-columns: 1fr;
  }
}

.admin-sidebar {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 10px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.admin-nav-item:hover, .admin-nav-item.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.admin-content {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.admin-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.admin-table-container {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th, .admin-table td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

.admin-table th {
  background-color: var(--secondary-light);
  font-weight: 600;
  color: var(--text-muted);
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 9999px;
}

.badge-success {
  background-color: var(--success-light);
  color: var(--success);
}

.badge-danger {
  background-color: #FEE2E2;
  color: var(--danger);
}

/* MODAL */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  width: 90%;
  max-width: 500px;
  padding: 30px;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: modalSlide 0.2s ease-out;
}

@keyframes modalSlide {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 15px;
}

/* ALERT MESSAGES */
.alert {
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
}

.alert-danger {
  background-color: #FEE2E2;
  color: var(--danger);
  border: 1px solid #FCA5A5;
}

.alert-success {
  background-color: var(--success-light);
  color: var(--success);
  border: 1px solid #6EE7B7;
}

/* LOGIN PANEL */
.login-card {
  max-width: 400px;
  margin: 80px auto;
}

/* STAFF CALENDAR STYLING */
.calendar-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 15px;
}

.calendar-nav-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calendar-view-switcher {
  display: flex;
  background-color: var(--secondary-light);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.calendar-view-switcher button {
  border: none;
  background: none;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--secondary);
  transition: var(--transition);
}

.calendar-view-switcher button.active {
  background-color: var(--bg-card);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Month Grid */
.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid var(--border-color);
  border-left: 1px solid var(--border-color);
  background-color: var(--border-color);
  gap: 1px;
}

.calendar-month-grid .calendar-day-header {
  background-color: var(--secondary-light);
  color: var(--secondary);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  padding: 10px;
  text-align: center;
  border: none;
}

.calendar-day-cell {
  background-color: var(--bg-card);
  min-height: 120px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.calendar-day-cell:hover:not(.empty) {
  background-color: #F9FAFB;
}

.calendar-day-cell.empty {
  background-color: #F3F4F6;
  cursor: default;
}

.calendar-day-cell.today {
  background-color: #FFFBEB;
}

.calendar-day-cell.today .day-number {
  background-color: var(--primary);
  color: var(--text-light);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.day-number {
  font-size: 12px;
  font-weight: 600;
  color: var(--secondary);
}

.cell-events-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  overflow: hidden;
}

.calendar-event-pill {
  background-color: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 3px solid var(--primary);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.calendar-event-pill:hover {
  transform: scale(1.02);
  background-color: #E2E8F0;
}

/* Week Grid */
.calendar-week-table {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--bg-card);
  display: flex;
  flex-direction: column;
}

.week-header-row {
  display: flex;
  background-color: var(--secondary-light);
  border-bottom: 1px solid var(--border-color);
}

.week-header-cell {
  flex: 1;
  padding: 12px;
  text-align: center;
  font-weight: 600;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--secondary);
}

.week-header-cell.time-col {
  flex: 0 0 70px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-color);
}

.week-header-cell.today {
  color: var(--primary);
  background-color: var(--primary-light);
}

.week-header-cell:last-child {
  border-right: none;
}

.week-header-cell .day-name {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.week-header-cell .day-date {
  font-size: 16px;
  font-weight: 700;
  margin-top: 2px;
}

.week-body-container {
  max-height: 600px;
  overflow-y: auto;
}

.week-time-row {
  display: flex;
  border-bottom: 1px solid #E5E7EB;
  min-height: 50px;
  position: relative;
}

.week-time-row:last-child {
  border-bottom: none;
}

.week-body-cell {
  flex: 1;
  border-right: 1px solid #E5E7EB;
  position: relative;
  padding: 2px;
}

.week-body-cell:last-child {
  border-right: none;
}

.week-body-cell.time-col {
  flex: 0 0 70px;
  background-color: var(--secondary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 11px;
  color: var(--text-muted);
}

.calendar-week-event-card {
  position: absolute;
  left: 4px;
  right: 4px;
  top: 2px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-left: 4px solid var(--primary);
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 11px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  line-height: 1.2;
}

.calendar-week-event-card .event-title {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-week-event-card .event-time {
  font-size: 10px;
  color: var(--secondary);
  margin-top: 1px;
}

.calendar-week-event-card .event-customer {
  font-weight: 500;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Day View list styling */
.calendar-day-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.day-booking-item-card {
  display: flex;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 15px 20px;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.day-booking-item-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.day-booking-item-card .time-badge {
  background-color: var(--secondary-light);
  color: var(--secondary);
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.booking-main-details {
  flex: 1;
  margin: 0 20px;
}

.booking-main-details .service-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 4px;
}

.booking-main-details .customer-info {
  font-size: 14px;
  color: var(--secondary);
  margin-bottom: 2px;
}

.booking-main-details .customer-notes {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

/* Template List Manager */
.template-list li:hover {
  background-color: var(--secondary-light);
}

.template-list li span:hover {
  color: var(--primary);
  text-decoration: underline;
}

.detail-table tr {
  border-bottom: 1px solid var(--border-color);
}
.detail-table tr:last-child {
  border-bottom: none;
}

/* TAB INHALT SICHTBARKEIT (Blending von inaktiven Tabs) */
.admin-tab-content {
  display: none;
}
.admin-tab-content.active {
  display: block;
  animation: fadeIn 0.25s ease-in-out;
}

