
:root {
  --bg: #020617;
  --bg-soft: #020617;
  --panel: #020617;
  --text: #f9fafb;
  --text-soft: #9ca3af;
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.18);
  --danger: #ef4444;
  --border-subtle: rgba(51, 65, 85, 0.9);
  --input-border: rgba(209, 213, 219, 0.9);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #0f172a, #020617);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

.page-landing,
.page-auth,
.page-dashboard,
.page-public {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.8);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  background: linear-gradient(
      to right,
      rgba(15, 23, 42, 0.97),
      rgba(15, 23, 42, 0.9)
    );
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-dot {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #e5e7eb, #4c6fff);
  box-shadow: 0 0 24px rgba(76, 111, 255, 0.7);
}

.logo-text {
  font-weight: 650;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
}

.topbar-nav a,
.topbar-nav button {
  border-radius: 999px;
  padding: 5px 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
}

.topbar-nav a:hover,
.topbar-nav button:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.6);
  color: var(--text);
}

/* Generic layout */

.main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 16px 40px;
}

.card {
  background: radial-gradient(circle at top left, #020617, #020617);
  border-radius: 22px;
  border: 1px solid var(--border-subtle);
  padding: 18px 18px 18px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.95);
}

.card h1 {
  margin: 0 0 6px 0;
  font-size: 1.45rem;
}

.muted {
  color: var(--text-soft);
  font-size: 0.85rem;
}

/* Forms */

.form-field {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.84rem;
}

.form-field label {
  color: var(--text-soft);
}

.form-field input,
.form-field select,
.form-field textarea {
  border-radius: 10px;
  border: 1px solid var(--input-border);
  padding: 7px 9px;
  font-size: 0.86rem;
  background: #ffffff;
  color: #111827;
}

.form-field textarea {
  min-height: 60px;
  resize: vertical;
}

/* Buttons */

.btn {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 7px 14px;
  font-size: 0.86rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn.primary {
  background: linear-gradient(135deg, #4c6fff, #2563eb);
  border-color: rgba(191, 219, 254, 0.9);
  color: #f9fafb;
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.8);
}

.btn.primary:hover {
  filter: brightness(1.07);
}

.btn.ghost {
  background: #e5e7eb;
  border-color: var(--input-border);
  color: #374151;
}

.btn.ghost:hover {
  background: #d1d5db;
  color: #111827;
}

.btn.text {
  background: transparent;
  border-color: transparent;
  color: var(--text-soft);
  padding-inline: 6px;
}

.btn.text:hover {
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
}

.btn.small {
  padding: 4px 10px;
  font-size: 0.78rem;
}

.btn.danger {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}

.btn.danger:hover {
  background: #fecaca;
}

/* Messages */

.error-message {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #fecaca;
}

.success-message {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #bbf7d0;
}

.hidden {
  display: none !important;
}

/* Dashboard */

.dashboard-main {
  flex: 1;
  padding: 20px 18px 30px;
  max-width: 1120px;
  margin: 0 auto;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 14px;
}

/* Panels */

.panel {
  background: radial-gradient(circle at top left, #020617, #020617);
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  padding: 14px 14px 12px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.95);
}

.panel h2 {
  margin: 0 0 4px 0;
  font-size: 1rem;
}

.info-line {
  font-size: 0.8rem;
  color: var(--text-soft);
}

/* Avatar */

.business-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #e5e7eb, #4c6fff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 650;
  box-shadow: 0 0 24px rgba(76, 111, 255, 0.7);
  background-size: cover;
  background-position: center;
  color: #0f172a;
}

.business-avatar.small {
  width: 34px;
  height: 34px;
  font-size: 0.8rem;
}

.business-avatar.has-image {
  background-color: #e5e7eb;
  background-size: cover;
  background-position: center;
  color: transparent;
}

/* Appointment list */

.hero-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-appt {
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  padding: 8px 9px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  background: #020617;
}

.appt-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.8rem;
}

.appt-title {
  font-size: 0.86rem;
}

.appt-meta {
  font-size: 0.78rem;
}

/* Badges */

.badge {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.7);
}

.badge.free {
  background: rgba(22, 163, 74, 0.18);
  border-color: rgba(34, 197, 94, 0.9);
}

.badge.pending {
  background: rgba(234, 179, 8, 0.18);
  border-color: rgba(234, 179, 8, 0.9);
}

.badge.confirmed {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.9);
}

.badge.declined {
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(248, 113, 113, 0.9);
}

/* Calendar */

.month-calendar {
  margin-top: 6px;
  margin-bottom: 8px;
  background: #020617;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  padding: 8px;
}

.month-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.month-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  font-size: 0.78rem;
}

.month-calendar-dayname {
  text-align: center;
  font-weight: 600;
  color: var(--text-soft);
  padding-bottom: 3px;
}

.month-cell {
  border-radius: 9px;
  padding: 5px 3px;
  text-align: center;
  cursor: pointer;
  color: #e5e7eb;
  background: #020617;
  border: 1px solid var(--border-subtle);
}

.month-cell.today {
  border-color: rgba(59, 130, 246, 0.9);
}

.month-cell.has-appt {
  background: var(--accent-soft);
  border-color: rgba(59, 130, 246, 0.8);
}

.month-cell.selected {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 1px;
}

/* Employee list */

.employee-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.employee-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  padding: 6px 8px;
  font-size: 0.8rem;
}

/* Public page */

.public-main {
  max-width: 720px;
  width: 100%;
}

.public-card {
  background: #020617;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  padding: 14px 14px 16px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.95);
}

.public-header {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

.slot-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  padding: 7px 9px;
  font-size: 0.82rem;
}

.slot-meta {
  display: flex;
  flex-direction: column;
}

/* Modal */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
}

.modal {
  width: 100%;
  max-width: 420px;
  background: #020617;
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.98);
  padding: 14px 14px 12px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1rem;
}

.modal-close {
  border: none;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 1.1rem;
}

.modal-body {
  margin-top: 8px;
}

.modal-footer {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

/* Auth actions */

.auth-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

/* Responsive */

@media (max-width: 880px) {
  .dashboard-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* Simple admin charts */
.simple-chart {
  min-height: 220px;

  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chart-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
}

.chart-label {
  width: 110px;
  flex-shrink: 0;
}

.chart-bar-wrap {
  flex: 1;
  background: var(--card-border);
  border-radius: 999px;
  overflow: hidden;
}

.chart-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--accent, #2563eb);
}

.chart-bar.positive {
  background: #22c55e;
}

.chart-bar.negative {
  background: #ef4444;
}

.chart-bar.neutral {
  background: var(--card-border);
}

.chart-value {
  width: 30px;
  text-align: right;
  flex-shrink: 0;
}

/* Badge for Löschanfragen */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid var(--card-border);
}
.badge.danger {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.5);
}

/* Simple table styling */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th,
.data-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--card-border);
  text-align: left;
}

.data-table th {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--muted-text);
}

.data-table tr:hover {
  background: rgba(148, 163, 184, 0.05);
}


/* Public booking layout: calendar left, slots right */

.booking-layout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-top: 8px;
}

.booking-column {
  flex: 1;
  min-width: 0;
}

/* ensure inner scroll instead of endlos scroll */
.booking-column .slot-list,
.booking-column .month-calendar {
  max-height: 520px;
  overflow: auto;
}

/* stack on small screens */
@media (max-width: 768px) {
  .booking-layout {
    flex-direction: column;
  }
}


.settings-tabs {
  display: inline-flex;
  gap: 8px;
  margin: 4px 0 14px 0;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 999px;
  padding: 4px;
  border: 1px solid rgba(51, 65, 85, 0.9);
}

.settings-tab {
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.settings-tab.active {
  background: rgba(37, 99, 235, 0.18);
  color: #e5edff;
}


.simple-chart canvas {
  width: 100%;
  max-width: 100%;
  height: 220px;
}


.stat-label {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-help {
  font-size: 0.75rem;
  opacity: 0.75;
  cursor: help;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 0 4px;
  line-height: 1.1;
}


.logo-image {
  height: 28px;
  width: auto;
  display: block;
}


.plan-badge-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.plan-badge {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.6);
  background: rgba(15,23,42,0.9);
  color: var(--text-soft);
}

.plan-badge.premium {
  border-color: #22c55e;
  background: rgba(34,197,94,0.12);
  color: #bbf7d0;
}

.panel.locked-panel {
  position: relative;
  opacity: 0.7;
}

.panel.locked-panel .panel-lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: linear-gradient(to bottom, rgba(15,23,42,0.92), rgba(15,23,42,0.96));
  text-align: center;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.panel.locked-panel .panel-lock strong {
  color: #e5e7eb;
}

.panel.locked-panel .panel-lock .btn {
  margin-top: 10px;
}


.billing-card {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 55%),
              radial-gradient(circle at bottom right, rgba(34, 197, 94, 0.12), transparent 55%),
              rgba(15, 23, 42, 0.96);
  padding: 14px 16px;
  margin-top: 6px;
}

.billing-features {
  margin: 8px 0;
  padding-left: 18px;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.billing-features li {
  margin-bottom: 2px;
}


.data-table select.input {
  padding: 2px 6px;
  font-size: 0.78rem;
}


.landing-benefits {
  margin: 10px 0 4px 0;
  padding-left: 18px;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.landing-benefits li {
  margin-bottom: 3px;
}


.onboarding-list {
  margin: 8px 0 0 0;
  padding-left: 18px;
  font-size: 0.84rem;
  color: var(--text-soft);
}

.onboarding-list li {
  margin-bottom: 3px;
}


.landing-secondary {
  margin-top: 14px;
}

.landing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 8px;
}

.landing-step h3 {
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.landing-step p {
  font-size: 0.82rem;
  color: var(--text-soft);
}

/* Mobile Optimierungen fuer Startseite */
@media (max-width: 640px) {
  .page-landing .main {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 16px 12px 24px;
    gap: 14px;
  }

  .page-landing .card {
    max-width: 100%;
    width: 100%;
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.9);
  }

  .topbar {
    padding: 10px 12px;
  }

  .topbar-left .logo-image {
    height: 28px;
  }

  .landing-grid {
    gap: 10px;
  }

  .landing-step h3 {
    font-size: 0.9rem;
  }

  .landing-step p {
    font-size: 0.8rem;
  }
}

/* Ueberschreibe Landing Layout: von oben nach unten statt breit */
.page-landing .main {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 32px 16px 40px;
  gap: 18px;
}

.page-landing .landing-grid {
  flex-direction: column;
  align-items: stretch;
  max-width: 520px;
  width: 100%;
}

/* Auf grossen Screens Landing etwas schmaler machen */
@media (min-width: 900px) {
  .page-landing .main {
    padding-top: 48px;
  }
}


/* Analytics */
.stats-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.stat{padding:14px;border:1px solid rgba(255,255,255,0.12);border-radius:14px;background:rgba(255,255,255,0.03)}
.stat-label{font-size:12px;opacity:.8}
.stat-value{font-size:22px;font-weight:700;margin-top:6px}
@media (max-width: 720px){.stats-grid{grid-template-columns:1fr}}
.info-box{padding:12px;border-radius:14px;border:1px solid rgba(255,255,255,0.14);background:rgba(255,255,255,0.04)}


/* ========== Mobile Menü Drawer ========== */
.topbar-right{
  display:flex;
  align-items:center;
  gap:10px;
}

.menu-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.18);
  background:rgba(255,255,255,0.06);
  color:#fff;
  cursor:pointer;
}

.menu-drawer-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  display:none;
  z-index:1000;
}

.menu-drawer{
  position:fixed;
  top:0;
  right:0;
  height:100%;
  width:min(340px, 86vw);
  background:rgba(10,16,30,0.92);
  border-left:1px solid rgba(255,255,255,0.10);
  box-shadow:-20px 0 60px rgba(0,0,0,0.35);
  padding:18px;
  transform: translateX(105%);
  transition: transform .22s ease;
  z-index:1001;
}

.menu-drawer.open{ transform: translateX(0); }
.menu-drawer-overlay.open{ display:block; }

.menu-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:14px;
}

.menu-brand{
  display:flex;
  align-items:center;
  gap:10px;
}
.menu-brand img{ width:34px; height:34px; border-radius:10px; }
.menu-brand .name{ font-weight:800; letter-spacing:0.2px; }

.menu-close{
  width:40px;
  height:40px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.18);
  background:rgba(255,255,255,0.06);
  color:#fff;
  cursor:pointer;
}

.menu-links{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:6px;
}

.menu-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  text-decoration:none;
  color:#fff;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.05);
}

.menu-link:hover{ background:rgba(255,255,255,0.08); }

.badge{
  font-size:0.78rem;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.18);
  background:rgba(255,255,255,0.08);
  color:#fff;
}

@media (max-width: 520px){
  .panel{ padding:16px; }
  .topbar{ padding:14px 14px; }
}

.brand-stack{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}
.brand-name{
  font-weight:900;
  font-size:1.05rem;
  letter-spacing:0.2px;
}
.brand-sub{
  font-size:0.78rem;
  color:rgba(255,255,255,0.70);
  margin-top:2px;
}

.month-calendar-header-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.month-calendar-header-row .month-calendar-header{
  flex:1;
  text-align:center;
  font-weight:800;
}

.remember-row{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:8px;
  margin-bottom:12px;
}
.remember-row input{ width:18px; height:18px; }
.remember-row label{ cursor:pointer; user-select:none; }

.landing-container{max-width:980px;margin:0 auto;}

/* Icon buttons (topbar) */
.icon-btn{
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.icon-btn:active{ transform: translateY(1px); }

.clean-list{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:10px; }
.clean-list li{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; border:1px solid rgba(255,255,255,0.12); border-radius:14px; background: rgba(255,255,255,0.04); }
.clean-list .muted{ opacity:0.8; }
