/* ==========================================================================
   MAKAS — Design-System (dunkel, premium)
   Kuaför & Berber Yönetimi
   ========================================================================== */

:root {color-scheme: dark;

  /* Farben */
  --bg: #0b0d10;
  --surface: #14171c;
  --card: #181c22;
  --elevated: #1f242c;
  --elevated-2: #262c35;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);

  --text: #eceef1;
  --muted: #8b95a1;
  --faint: #5b6570;

  --accent: #e0a63c;
  --accent-dark: #c88f2d;
  --accent-soft: rgba(224, 166, 60, 0.14);
  --accent-border: rgba(224, 166, 60, 0.35);

  --danger: #dc2626;
  --danger-dark: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.14);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.14);

  /* Geometrie */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.45), 0 24px 70px rgba(0, 0, 0, 0.5);
  --transition: 0.15s ease;
  --sidebar-w: 252px;}

/* ==========================================================================
   Themen — nur der HINTERGRUND nimmt die Farbe an, Text bleibt neutral
   ========================================================================== */

[data-theme="dark"] {/* Koyu · Altın */
  --bg: #2a1e0a;
  --surface: #342811;
  --card: #3a2d15;
  --elevated: #463717;
  --elevated-2: #54421d;
  --border: rgba(255, 210, 120, 0.12);
  --border-strong: rgba(255, 210, 120, 0.2);
  --text: #f4ecd8;
  --muted: #b6a57e;
  --faint: #83734f;
  --accent: #e0a63c;
  --accent-dark: #c88f2d;
  --accent-soft: rgba(224, 166, 60, 0.14);
  --accent-border: rgba(224, 166, 60, 0.35);}

[data-theme="light"] {/* Açık · Altın */
  color-scheme: light;
  --bg: #f6efdd;
  --surface: #fffdf4;
  --card: #ffffff;
  --elevated: #f1e8cf;
  --elevated-2: #eae0c2;
  --border: rgba(110, 80, 20, 0.12);
  --border-strong: rgba(110, 80, 20, 0.2);
  --text: #2a2010;
  --muted: #7a6b4a;
  --faint: #a29370;
  --accent: #b87a1f;
  --accent-dark: #9a6416;
  --accent-soft: rgba(184, 122, 31, 0.12);
  --accent-border: rgba(184, 122, 31, 0.35);
  --danger: #dc2626;
  --danger-dark: #b91c1c;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --success: #16a34a;
  --success-soft: rgba(22, 163, 74, 0.12);
  --shadow: 0 1px 2px rgba(60,45,10,0.06), 0 8px 24px rgba(60,45,10,0.08);
  --shadow-lg: 0 4px 12px rgba(60,45,10,0.08), 0 20px 60px rgba(60,45,10,0.14);}

[data-theme="dark-blue"] {/* Koyu · Mavi */
  --bg: #0d1b33;
  --surface: #12233f;
  --card: #162a4a;
  --elevated: #1b3258;
  --elevated-2: #223c66;
  --border: rgba(120, 170, 255, 0.12);
  --border-strong: rgba(120, 170, 255, 0.2);
  --text: #e8eef8;
  --muted: #93a7c4;
  --faint: #5f7390;
  --accent: #4f8ef7;
  --accent-dark: #3b74d6;
  --accent-soft: rgba(79, 142, 247, 0.14);
  --accent-border: rgba(79, 142, 247, 0.35);}

[data-theme="dark-green"] {/* Koyu · Yeşil */
  --bg: #0c2014;
  --surface: #112a1a;
  --card: #153321;
  --elevated: #1a3f29;
  --elevated-2: #204c32;
  --border: rgba(120, 230, 160, 0.12);
  --border-strong: rgba(120, 230, 160, 0.2);
  --text: #e6f3ea;
  --muted: #98b5a3;
  --faint: #5f7f6b;
  --accent: #34d399;
  --accent-dark: #10b981;
  --accent-soft: rgba(52, 211, 153, 0.14);
  --accent-border: rgba(52, 211, 153, 0.35);}

[data-theme="dark-rose"] {/* Koyu · Pembe */
  --bg: #290d1a;
  --surface: #331221;
  --card: #3d1629;
  --elevated: #481c31;
  --elevated-2: #542339;
  --border: rgba(255, 130, 180, 0.12);
  --border-strong: rgba(255, 130, 180, 0.2);
  --text: #f6e6ee;
  --muted: #c095ab;
  --faint: #8a5f74;
  --accent: #fb7185;
  --accent-dark: #e11d48;
  --accent-soft: rgba(251, 113, 133, 0.14);
  --accent-border: rgba(251, 113, 133, 0.35);}

[data-theme="light-blue"] {/* Açık · Mavi */
  color-scheme: light;
  --bg: #e7f0fa;
  --surface: #f7fbff;
  --card: #ffffff;
  --elevated: #dbe9f7;
  --elevated-2: #cddff0;
  --border: rgba(30, 80, 140, 0.12);
  --border-strong: rgba(30, 80, 140, 0.2);
  --text: #16243a;
  --muted: #5b718c;
  --faint: #8a9cb0;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --accent-border: rgba(37, 99, 235, 0.35);
  --danger: #dc2626;
  --danger-dark: #b91c1c;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --success: #16a34a;
  --success-soft: rgba(22, 163, 74, 0.12);
  --shadow: 0 1px 2px rgba(20,40,70,0.06), 0 8px 24px rgba(20,40,70,0.08);
  --shadow-lg: 0 4px 12px rgba(20,40,70,0.08), 0 20px 60px rgba(20,40,70,0.14);}

[data-theme="dark-purple"] {/* Koyu · Mor */
  --bg: #1a1230;
  --surface: #241840;
  --card: #2b1d4d;
  --elevated: #342356;
  --elevated-2: #3e2b66;
  --border: rgba(170, 140, 255, 0.12);
  --border-strong: rgba(170, 140, 255, 0.2);
  --text: #efe9fa;
  --muted: #a99cc9;
  --faint: #6f6395;
  --accent: #a78bfa;
  --accent-dark: #8b5cf6;
  --accent-soft: rgba(167, 139, 250, 0.14);
  --accent-border: rgba(167, 139, 250, 0.35);}

[data-theme="dark-black"] {/* Siyah · Altın */
  --bg: #121212;
  --surface: #1a1a1a;
  --card: #1f1f1f;
  --elevated: #262626;
  --elevated-2: #2e2e2e;
  --border: rgba(255, 210, 120, 0.12);
  --border-strong: rgba(255, 210, 120, 0.2);
  --text: #f4ecd8;
  --muted: #a89a7a;
  --faint: #6e6248;
  --accent: #e0a63c;
  --accent-dark: #c88f2d;
  --accent-soft: rgba(224, 166, 60, 0.14);
  --accent-border: rgba(224, 166, 60, 0.35);}

[data-theme="light-rose"] {/* Açık · Pembe */
  color-scheme: light;
  --bg: #fdeef4;
  --surface: #fff7fa;
  --card: #ffffff;
  --elevated: #fbe1ec;
  --elevated-2: #f8d3e2;
  --border: rgba(200, 60, 130, 0.12);
  --border-strong: rgba(200, 60, 130, 0.2);
  --text: #33101f;
  --muted: #8a5a6e;
  --faint: #b58a9a;
  --accent: #ec4899;
  --accent-dark: #db2777;
  --accent-soft: rgba(236, 72, 153, 0.12);
  --accent-border: rgba(236, 72, 153, 0.35);
  --danger: #dc2626;
  --danger-dark: #b91c1c;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --success: #16a34a;
  --success-soft: rgba(22, 163, 74, 0.12);
  --shadow: 0 1px 2px rgba(60,20,40,0.06), 0 8px 24px rgba(60,20,40,0.08);
  --shadow-lg: 0 4px 12px rgba(60,20,40,0.08), 0 20px 60px rgba(60,20,40,0.14);}

[data-theme="light-green"] {/* Açık · Yeşil */
  color-scheme: light;
  --bg: #e9f6ee;
  --surface: #f7fcf8;
  --card: #ffffff;
  --elevated: #d9efe0;
  --elevated-2: #cae7d3;
  --border: rgba(20, 130, 70, 0.12);
  --border-strong: rgba(20, 130, 70, 0.2);
  --text: #102a1a;
  --muted: #5a7a66;
  --faint: #8aa694;
  --accent: #10b981;
  --accent-dark: #059669;
  --accent-soft: rgba(16, 185, 129, 0.12);
  --accent-border: rgba(16, 185, 129, 0.35);
  --danger: #dc2626;
  --danger-dark: #b91c1c;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --success: #16a34a;
  --success-soft: rgba(22, 163, 74, 0.12);
  --shadow: 0 1px 2px rgba(20,70,40,0.06), 0 8px 24px rgba(20,70,40,0.08);
  --shadow-lg: 0 4px 12px rgba(20,70,40,0.08), 0 20px 60px rgba(20,70,40,0.14);}

[data-theme="dark-red"] {/* Koyu · Kırmızı */
  --bg: #2a0d0d;
  --surface: #331111;
  --card: #3d1616;
  --elevated: #481c1c;
  --elevated-2: #542323;
  --border: rgba(255, 120, 120, 0.12);
  --border-strong: rgba(255, 120, 120, 0.2);
  --text: #f8e8e8;
  --muted: #c09595;
  --faint: #8a5f5f;
  --accent: #ef4444;
  --accent-dark: #dc2626;
  --accent-soft: rgba(239, 68, 68, 0.14);
  --accent-border: rgba(239, 68, 68, 0.35);}

[data-theme="light-purple"] {/* Açık · Mor */
  color-scheme: light;
  --bg: #f3effd;
  --surface: #faf7ff;
  --card: #ffffff;
  --elevated: #eae2fa;
  --elevated-2: #ddd1f5;
  --border: rgba(120, 80, 200, 0.12);
  --border-strong: rgba(120, 80, 200, 0.2);
  --text: #241538;
  --muted: #6f5f8a;
  --faint: #9c8cb5;
  --accent: #8b5cf6;
  --accent-dark: #7c3aed;
  --accent-soft: rgba(139, 92, 246, 0.12);
  --accent-border: rgba(139, 92, 246, 0.35);
  --danger: #dc2626;
  --danger-dark: #b91c1c;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --success: #16a34a;
  --success-soft: rgba(22, 163, 74, 0.12);
  --shadow: 0 1px 2px rgba(40,25,80,0.06), 0 8px 24px rgba(40,25,80,0.08);
  --shadow-lg: 0 4px 12px rgba(40,25,80,0.08), 0 20px 60px rgba(40,25,80,0.14);}

/* --- Ergänzt: fehlende Paare (dunkel/hell) nach bewährten Paletten (Tailwind/Radix) --- */

[data-theme="dark-teal"] {/* Koyu · Turkuaz */
  --bg: #08231f;
  --surface: #0c2c28;
  --card: #103531;
  --elevated: #14403b;
  --elevated-2: #1a4d47;
  --border: rgba(110, 240, 220, 0.12);
  --border-strong: rgba(110, 240, 220, 0.2);
  --text: #e3f6f2;
  --muted: #93bdb6;
  --faint: #5c8a83;
  --accent: #2dd4bf;
  --accent-dark: #14b8a6;
  --accent-soft: rgba(45, 212, 191, 0.14);
  --accent-border: rgba(45, 212, 191, 0.35);}

[data-theme="light-teal"] {/* Açık · Turkuaz */
  color-scheme: light;
  --bg: #e6f7f4;
  --surface: #f4fdfb;
  --card: #ffffff;
  --elevated: #d7f0ea;
  --elevated-2: #c6e8e0;
  --border: rgba(15, 118, 110, 0.12);
  --border-strong: rgba(15, 118, 110, 0.2);
  --text: #0c2a27;
  --muted: #557b76;
  --faint: #86a8a3;
  --accent: #0d9488;
  --accent-dark: #0f766e;
  --accent-soft: rgba(13, 148, 136, 0.12);
  --accent-border: rgba(13, 148, 136, 0.35);
  --danger: #dc2626;
  --danger-dark: #b91c1c;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --success: #16a34a;
  --success-soft: rgba(22, 163, 74, 0.12);
  --shadow: 0 1px 2px rgba(10,60,55,0.06), 0 8px 24px rgba(10,60,55,0.08);
  --shadow-lg: 0 4px 12px rgba(10,60,55,0.08), 0 20px 60px rgba(10,60,55,0.14);}

[data-theme="dark-coffee"] {/* Koyu · Kahve */
  --bg: #241a12;
  --surface: #2d2117;
  --card: #36281c;
  --elevated: #423222;
  --elevated-2: #4f3c29;
  --border: rgba(235, 200, 160, 0.12);
  --border-strong: rgba(235, 200, 160, 0.2);
  --text: #f3e8dc;
  --muted: #bfa88f;
  --faint: #8a7259;
  --accent: #d4a373;
  --accent-dark: #b9895a;
  --accent-soft: rgba(212, 163, 115, 0.14);
  --accent-border: rgba(212, 163, 115, 0.35);}

[data-theme="light-coffee"] {/* Açık · Kahve */
  color-scheme: light;
  --bg: #f7f1e9;
  --surface: #fffcf7;
  --card: #ffffff;
  --elevated: #efe4d6;
  --elevated-2: #e5d7c4;
  --border: rgba(110, 75, 40, 0.12);
  --border-strong: rgba(110, 75, 40, 0.2);
  --text: #2e2115;
  --muted: #7d6952;
  --faint: #a4917a;
  --accent: #9a6b43;
  --accent-dark: #7d5433;
  --accent-soft: rgba(154, 107, 67, 0.12);
  --accent-border: rgba(154, 107, 67, 0.35);
  --danger: #dc2626;
  --danger-dark: #b91c1c;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --success: #16a34a;
  --success-soft: rgba(22, 163, 74, 0.12);
  --shadow: 0 1px 2px rgba(70,45,20,0.06), 0 8px 24px rgba(70,45,20,0.08);
  --shadow-lg: 0 4px 12px rgba(70,45,20,0.08), 0 20px 60px rgba(70,45,20,0.14);}

[data-theme="light-red"] {/* Açık · Kırmızı */
  color-scheme: light;
  --bg: #fdeeee;
  --surface: #fff8f8;
  --card: #ffffff;
  --elevated: #f9dede;
  --elevated-2: #f3cccc;
  --border: rgba(170, 40, 40, 0.12);
  --border-strong: rgba(170, 40, 40, 0.2);
  --text: #331414;
  --muted: #856060;
  --faint: #b08c8c;
  --accent: #dc2626;
  --accent-dark: #b91c1c;
  --accent-soft: rgba(220, 38, 38, 0.12);
  --accent-border: rgba(220, 38, 38, 0.35);
  --danger: #dc2626;
  --danger-dark: #b91c1c;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --success: #16a34a;
  --success-soft: rgba(22, 163, 74, 0.12);
  --shadow: 0 1px 2px rgba(80,20,20,0.06), 0 8px 24px rgba(80,20,20,0.08);
  --shadow-lg: 0 4px 12px rgba(80,20,20,0.08), 0 20px 60px rgba(80,20,20,0.14);}

[data-theme="light-black"] {/* Açık · Gümüş */
  color-scheme: light;
  --bg: #f5f6f7;
  --surface: #fcfcfd;
  --card: #ffffff;
  --elevated: #eceef1;
  --elevated-2: #e2e5e9;
  --border: rgba(20, 25, 35, 0.1);
  --border-strong: rgba(20, 25, 35, 0.18);
  --text: #14161a;
  --muted: #5f6875;
  --faint: #939ba6;
  --accent: #1f2937;
  --accent-dark: #111827;
  --accent-soft: rgba(31, 41, 55, 0.08);
  --accent-border: rgba(31, 41, 55, 0.28);
  --danger: #dc2626;
  --danger-dark: #b91c1c;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --success: #16a34a;
  --success-soft: rgba(22, 163, 74, 0.12);
  --shadow: 0 1px 2px rgba(15,20,30,0.05), 0 8px 24px rgba(15,20,30,0.07);
  --shadow-lg: 0 4px 12px rgba(15,20,30,0.07), 0 20px 60px rgba(15,20,30,0.12);}

/* Farbauswahl in den Einstellungen */
.theme-field {border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin: 0;}
.theme-field legend {padding: 0 6px; font-size: 12.5px; color: var(--muted); font-weight: 600;}
.theme-picker {display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;}
.theme-swatch {display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 4px; border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; font-size: 12px; color: var(--muted); transition: var(--transition);
  min-width: 0; text-align: center;}
.theme-swatch input {display: none;}
.theme-swatch.active {border-color: var(--accent);
  color: var(--text);
  background: var(--accent-soft);}
.swatch-preview {width: 40px; height: 24px; border-radius: 6px;
  border: 1px solid var(--border-strong);}
.theme-swatch.active .swatch-preview {border-color: var(--accent); border-width: 2px;}
.theme-swatch:has(input:checked) {border-color: var(--accent); color: var(--text); background: var(--accent-soft);}
.theme-swatch:has(input:checked) .swatch-preview {border-color: var(--accent); border-width: 2px;}
.swatch-label {font-weight: 500;}

/* Speichern-Leiste (unten rechts, über alle Einstellungen) */
.save-bar {display: flex; justify-content: flex-end; margin-top: 36px;}
.save-bar .btn {min-width: 140px;}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */
* {box-sizing: border-box;}

html, body {height: 100%;}
/* Handy (mobile-native-Regeln): kein grauer Tipp-Kasten, kein 300-ms-Tipp-Verzug,
   und Pull-to-Refresh klaut nicht das Scrollen. */
html {-webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;}
button, a, [role="button"], input[type="submit"], select, label {touch-action: manipulation;}

body {margin: 0;
  font-family: "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(1200px 560px at 12% -8%, var(--accent-soft), transparent 55%), var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 14.5px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;}

::selection {background: rgba(224, 166, 60, 0.32);}

::-webkit-scrollbar {width: 10px; height: 10px;}
::-webkit-scrollbar-track {background: transparent;}
::-webkit-scrollbar-thumb {background: #2a3038; border-radius: 8px; border: 2px solid var(--bg);}

a {color: var(--accent); text-decoration: none;}

h1, h2, h3 {color: var(--text);}
h1 {font-size: 24px; margin: 0; font-weight: 700; letter-spacing: -0.02em;}
h2 {font-size: 15px; margin: 0 0 14px; font-weight: 700;}
h3 {font-size: 13.5px; margin: 0; font-weight: 600;}

.muted {color: var(--muted);}
.small {font-size: 12.5px;}
.nowrap {white-space: nowrap;}
.num {text-align: right;}

/* --------------------------------------------------------------------------
   App-Shell: Sidebar + Main
   -------------------------------------------------------------------------- */
.app {display: flex; min-height: 100vh; min-height: 100dvh;}

.sidebar {width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;                 /* Fallback */
  height: 100dvh;                /* Handy: Adresszeile ein-/ausblenden schneidet nicht ab */
  z-index: 20;}

.main {flex: 1;
  min-width: 0;
  max-width: 1420px;
  margin: 0 auto;
  padding: 30px 34px 72px;}

.auth-main {width: 100%; min-width: 0;}

/* Brand */
.brand {display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;}
.brand-mark {width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 11px;
  background: linear-gradient(160deg, var(--accent-soft), rgba(224,166,60,0.02));
  border: 1px solid var(--accent-border);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;}
.brand-mark svg {width: 21px; height: 21px;}
.brand-text {display: flex; flex-direction: column; min-width: 0;}
.brand-name {font-size: 18px; font-weight: 800; letter-spacing: 0.08em; color: var(--text); line-height: 1.15;}
.brand-scissors {width: 0.85em; height: 0.85em; vertical-align: -0.14em; color: var(--accent); margin: 0 2px;}
.brand-sub {font-size: 12.5px; color: var(--muted); font-weight: 700;
  max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}

/* Navigation */
.nav {display: flex; flex-direction: column; gap: 3px; padding: 8px 12px; flex: 1; overflow-y: auto;}
.nav a {display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 9px;
  color: var(--muted); font-weight: 500; font-size: 14px;
  transition: background var(--transition), color var(--transition);}
.nav a svg {width: 18px; height: 18px; flex: 0 0 18px;}
.nav a.active {background: var(--elevated-2);
  color: var(--text);
  font-weight: 600;}

/* Sidebar-Fuß */
.sidebar-foot {padding: 14px 14px 16px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 14px;}

.salon-switch {display: flex; flex-direction: column; gap: 6px;}
.salon-switch label {font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--faint);}
.salon-switch select {width: 100%; padding: 9px 11px; font-size: 13.5px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-weight: 500; cursor: pointer;
  transition: border-color var(--transition);}.salon-switch select:focus { border-color: var(--accent-border); }

.user-box {display: flex; align-items: center; gap: 11px;}
.avatar {width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
  border: 1px solid var(--accent-border);}
.user-meta {display: flex; flex-direction: column; min-width: 0; flex: 1;}
.user-name {font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.2;}
.user-role {font-size: 11.5px; color: var(--muted);}
.app-ver {font-size: 11.5px; color: var(--faint); text-align: center; padding: 10px 0 2px; letter-spacing: 0.04em;}
.acc-bar {display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px;}
.acc-bar label {display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted);}
.logout {width: 34px; height: 34px; flex: 0 0 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; color: var(--muted); cursor: pointer;
  transition: background var(--transition), color var(--transition);}
.logout svg {width: 17px; height: 17px;}

/* --------------------------------------------------------------------------
   Flash-Meldungen (Toast)
   -------------------------------------------------------------------------- */
.flashes {position: fixed; top: 20px; right: 20px; z-index: 200;
  display: flex; flex-direction: column; gap: 10px; max-width: 380px;}
.flash {display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 11px;
  font-size: 14px; font-weight: 500;
  background: var(--elevated-2); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  animation: flash-in 0.22s ease;
  transition: opacity 0.35s ease, transform 0.35s ease;}
.flash svg {width: 18px; height: 18px; flex: 0 0 18px;}
.flash.success {border-color: rgba(52, 211, 153, 0.4);}
.flash.earned {font-size: 17px; font-weight: 700; padding: 16px 22px;
  border-color: rgba(224, 166, 60, 0.6); color: var(--accent);}
.flash.earned svg {color: var(--accent);}
.flash.success svg {color: var(--success);}
.flash.error {border-color: rgba(239, 68, 68, 0.4);}
.flash.error svg {color: var(--danger);}
.flash.info {border-color: rgba(59, 130, 246, 0.45);}
.flash.info svg {color: #3b82f6;}
.flash.hide {opacity: 0; transform: translateY(-10px);}

@keyframes flash-in {from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }}

/* --------------------------------------------------------------------------
   Auth (Login / Setup)
   -------------------------------------------------------------------------- */
.auth-bg {min-height: 100vh;
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(224, 166, 60, 0.09), transparent 60%),
    radial-gradient(900px 500px at 85% 110%, rgba(224, 166, 60, 0.05), transparent 55%),
    var(--bg);}
.auth-wrap {width: 100%; display: flex; justify-content: center;}
.auth-card {width: 100%; max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 36px 34px 32px;
  box-shadow: var(--shadow-lg);}
.auth-card.wide {max-width: 540px;}
.auth-brand {text-align: center; margin-bottom: 26px;}
.auth-brand .brand-mark {margin: 0 auto 14px;}
.auth-brand h1 {font-size: 26px; letter-spacing: 0.01em;}
.auth-brand p {margin: 6px 0 0; font-size: 13.5px;}
.auth-card h2 {margin-top: 4px;}
.auth-card form {display: flex; flex-direction: column; gap: 14px;}

/* --------------------------------------------------------------------------
   Seiten-Kopf
   -------------------------------------------------------------------------- */
.page-head {display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 22px; flex-wrap: wrap;}
.page-head h1 {line-height: 1.2;}
.page-head .sub {margin: 5px 0 0; font-size: 13.5px; font-weight: 700;}

.toolbar {display: flex; align-items: center; gap: 8px;}
.view-toggle {display: flex; background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; padding: 3px; gap: 2px;}
.view-toggle a {padding: 6px 14px; font-size: 13.5px; font-weight: 600;
  color: var(--muted); border-radius: 6px; transition: var(--transition);}
.view-toggle a.active {background: var(--accent); color: #1a1204;}

/* --------------------------------------------------------------------------
   Karten
   -------------------------------------------------------------------------- */
.card {background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;}
.card .card-sub {margin: -6px 0 16px; font-size: 12.5px;}

/* --------------------------------------------------------------------------
   Statistiken
   -------------------------------------------------------------------------- */
.stat-grid {display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px; margin-bottom: 22px;}
.stat {background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; display: flex; align-items: center; gap: 14px;
  transition: border-color var(--transition), transform var(--transition);}
.stat-ic {width: 42px; height: 42px; flex: 0 0 42px; border-radius: 11px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;}
.stat-ic svg {width: 20px; height: 20px;}
.stat-body {display: flex; flex-direction: column; min-width: 0;}
.stat-value {font-size: 24px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.15;}
.stat-label {color: var(--muted); font-size: 12.5px; font-weight: 500;}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 14px; font-weight: 600; line-height: 1;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  font-family: inherit;
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);}
.btn:focus-visible {outline: 2px solid var(--accent); outline-offset: 2px;}
.btn svg {width: 15px; height: 15px;}

.btn.primary {background: linear-gradient(180deg, #e6ad4b, #d9992e);
  color: #1a1204;
  box-shadow: 0 1px 0 rgba(255,255,255,0.14) inset, 0 2px 8px rgba(224,166,60,0.22);}

.btn.ghost {background: var(--surface); color: var(--text); border-color: var(--border-strong);}

.btn.danger {background: var(--danger); color: #fff;}

.btn.small {padding: 5px 11px; font-size: 13px; border-radius: 7px;}
.btn.full {width: 100%;}
.btn svg + span {line-height: 1;}

/* --------------------------------------------------------------------------
   Formulare
   -------------------------------------------------------------------------- */
input, select, textarea {width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);}
input:focus, select:focus, textarea:focus {outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);}
input::placeholder, textarea::placeholder {color: var(--faint);}

input[type="checkbox"], input[type="radio"] {width: auto;}
input[type="checkbox"] {accent-color: var(--accent);
  width: 15px; height: 15px; cursor: pointer;}
input[type="color"] {padding: 3px; height: 38px; width: 52px; cursor: pointer; background: var(--surface);}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {filter: invert(0.7); cursor: pointer;}

label {display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 4px;}
label > input, label > select, label > textarea {margin-top: 5px; font-weight: 400; color: var(--text);}

.form-col {display: flex; flex-direction: column; gap: 13px;}
.form-row {display: flex; gap: 10px; flex-wrap: wrap; align-items: center;}
.form-row input {flex: 1; min-width: 120px;}
.form-row input[type="color"] {flex: 0 0 auto; width: 52px; min-width: 52px;}
.form-row button, .form-row .btn {flex: 0 0 auto;}

.grid-2 {display: grid; grid-template-columns: 1fr 1fr; gap: 13px;}
.grid-3 {display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 13px;}

.search-row {display: flex; gap: 10px; margin-bottom: 16px;}
.search-row input {flex: 1;}

.check {display: flex; align-items: center; gap: 9px; font-weight: 500; color: var(--text); font-size: 14px;}
.check input {width: auto; margin: 0;}

/* --------------------------------------------------------------------------
   Tabellen
   -------------------------------------------------------------------------- */
.table {width: 100%; border-collapse: collapse; font-size: 14px;}
.table th, .table td {text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--border);}
.table th {color: var(--muted); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;}
.table tbody tr {transition: background var(--transition);}
.table tbody tr:last-child td {border-bottom: none;}
.table td.num, .table th.num {text-align: right;}
.table td a {font-weight: 600; color: var(--text);}

/* --------------------------------------------------------------------------
   Pills / Status
   -------------------------------------------------------------------------- */
.pill {display: inline-block; color: #fff; font-size: 11.5px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(0,0,0,0.25) inset;}
.pill.small-pill {font-size: 11.5px; padding: 2px 8px; background: var(--elevated-2); color: var(--text);}
.pill.admin {background: var(--accent); color: #1a1204;}

/* --------------------------------------------------------------------------
   Listen
   -------------------------------------------------------------------------- */
.list {list-style: none; margin: 0; padding: 0;}
.list-item {display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 4px; border-bottom: 1px solid var(--border);
  transition: background var(--transition);}
.list-item:last-child {border-bottom: none;}
.list-item.inactive {opacity: 0.5;}
.li-main {display: flex; align-items: center; gap: 11px; flex-wrap: wrap; min-width: 0; flex: 1 1 auto;}
.li-title {font-weight: 600; color: var(--text); font-size: 14.5px;}
/* Aktions-Knöpfe dürfen umbrechen — sonst laufen sie aus dem Kasten und überlappen */
.li-actions {display: flex; align-items: center; gap: 8px; flex: 1 1 auto;
  flex-wrap: wrap; justify-content: flex-end; min-width: 0;}
.li-price {font-weight: 700; color: var(--accent); font-size: 14.5px;}
.li-notes {max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.dot {width: 12px; height: 12px; border-radius: 4px; display: inline-block; flex: 0 0 12px;}

/* --------------------------------------------------------------------------
   Details-Panels
   -------------------------------------------------------------------------- */
.panel {margin: 12px 0;}
.panel > summary {list-style: none; display: inline-block;}
.panel > summary::-webkit-details-marker {display: none;}
.panel > form, .panel > .panel-body {margin-top: 14px;}

.panel-inline {display: inline-block; position: relative;}
.panel-inline > summary {list-style: none;}
.panel-inline > summary::-webkit-details-marker {display: none;}
.panel-inline > form, .panel-inline .panel-body {position: absolute; right: 0; top: 36px; z-index: 40;
  background: var(--elevated-2); border: 1px solid var(--border-strong);
  border-radius: 11px; padding: 15px; width: 290px;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 10px;}

/* --------------------------------------------------------------------------
   Kalender
   -------------------------------------------------------------------------- */
.calendar {padding: 0; overflow: auto;}
.cal-wrap {min-width: 0;}          /* MUSS schrumpfen, sonst wird der Kalender abgeschnitten */
/* ---------- Testzeit-Leiste (oben auf jeder Seite) ---------- */
.trial-bar {display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 12px; padding: 10px 14px; margin: 0 0 16px;
  font-size: 14.5px; color: var(--text);}
.trial-bar.aktiv {background: color-mix(in srgb, var(--accent) 13%, transparent);
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);}
.trial-bar.warn {background: color-mix(in srgb, #dc2626 16%, transparent);
  border-color: color-mix(in srgb, #dc2626 45%, transparent);}
.trial-bar .tb-ic {font-size: 17px; line-height: 1;}
.trial-bar .tb-btn {margin-left: auto; white-space: nowrap; text-decoration: none;
  background: var(--accent); color: #221803; font-weight: 700;
  padding: 9px 14px; border-radius: 10px; min-height: 40px;
  display: inline-flex; align-items: center; touch-action: manipulation;}
.trial-bar .tb-btn:active {transform: scale(.97);}
@media (max-width: 620px) {.trial-bar .tb-btn { margin-left: 0; width: 100%; justify-content: center; }}

/* Demo-Modus: gleiche Leiste, nur neutral (kein „Testzeit"-Ton) */
.demo-bar {background: color-mix(in srgb, var(--text) 8%, transparent);
  border-color: color-mix(in srgb, var(--text) 20%, transparent);}

.cal-head, .cal-body {display: flex;}
.cal-time-col {width: 56px; flex: 0 0 56px; border-right: 1px solid var(--border-strong); border-right-color: color-mix(in srgb, var(--text) 30%, transparent); background: var(--surface);}
.cal-head .cal-time-col {display: flex; align-items: center; justify-content: flex-end; padding-right: 8px;
  border-bottom: 1px solid var(--border-strong);
  border-bottom-color: color-mix(in srgb, var(--text) 30%, transparent);}
.cal-time-head {font-size: 12.5px; font-weight: 700; color: var(--muted);}
.cal-day-head {flex: 1; text-align: center; padding: 11px 4px;
  font-weight: 800; font-size: 14.5px; color: var(--text);
  border-right: 1px solid var(--border-strong);
  border-right-color: color-mix(in srgb, var(--text) 30%, transparent);
  border-bottom: 1px solid var(--border-strong);
  border-bottom-color: color-mix(in srgb, var(--text) 30%, transparent);}
/* Heutiger Tag: deutliche Linie unter dem Datum, damit Kunden sofort sehen,
   wo sie sich befinden — die Farbe allein war zu leise. */
.cal-day-head.today {
  color: var(--accent);
  box-shadow: inset 0 -3px 0 0 var(--accent);
}
.cal-col {flex: 1; position: relative; border-right: 1px solid var(--border-strong); border-right-color: color-mix(in srgb, var(--text) 30%, transparent); background: transparent;}
.cal-col.today {background: rgba(224, 166, 60, 0.06);}
.cal-slot {height: var(--slot, 30px);
  border-bottom: 1px solid var(--border-strong);
  border-bottom-color: color-mix(in srgb, var(--text) 30%, transparent);
  cursor: pointer;
  transition: background var(--transition);}

.cal-time {height: var(--slot, 30px);
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 8px;
  font-size: 12.5px; font-weight: 700; color: var(--muted);
  line-height: 1;}

.cal-event {position: absolute; left: 3px; right: 3px; border-radius: 7px; color: #fff;
  padding: 4px 7px; font-size: 12px; line-height: 1.32; overflow: hidden; cursor: pointer;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 0, 0, 0.15);
  transition: filter var(--transition), transform var(--transition);}
.cal-event.status-cancelled {text-decoration: line-through; opacity: 0.55;}
.ev-time {display: inline; opacity: 0.9; font-size: 11.5px; font-weight: 600; margin-left: 5px;}
.ev-name {display: block; font-weight: 700;}
/* Am Handy ist der Kasten nur ~44 px breit — dort nur die Startzeit zeigen,
   die Dauer steht in der zweiten Zeile ("Saç · 60 dk"). */
@media (max-width: 760px) {
  .ev-end {display: none;}
  .ev-services {font-size: 11px;}
}
.ev-services {display: block; opacity: 0.92;}

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */
.modal-overlay {position: fixed; inset: 0; background: rgba(5, 7, 10, 0.62);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 46px 20px;
  overflow-y: auto;}
.modal-overlay[hidden] {display: none;}
.modal {background: var(--card); border: 1px solid var(--border-strong);
  border-radius: 14px; width: 100%; max-width: 520px;
  padding: 24px; box-shadow: var(--shadow-lg);
  animation: modal-in 0.2s ease;}
@keyframes modal-in {from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }}
.modal-head {display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px;}
.modal-head h2 {margin: 0;}
.close {background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px;
  width: 30px; height: 30px; font-size: 14px; cursor: pointer; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);}
.modal form {display: flex; flex-direction: column; gap: 14px;}

.modal-summary {display: flex; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; padding: 11px 14px; font-size: 13.5px;}
.modal-summary strong {color: var(--accent); font-size: 14.5px;}
.modal-actions {display: flex; justify-content: flex-end; gap: 10px;}
.modal-actions .btn.danger {margin-right: auto;}

.svc-box {border: 1px solid var(--border); border-radius: 9px; padding: 12px 14px; margin: 0;
  display: flex; flex-direction: column; gap: 2px;}
.svc-box legend {padding: 0 6px; font-size: 11.5px; color: var(--muted); font-weight: 600;}
.svc {display: flex; align-items: center; gap: 11px; padding: 7px 0; font-weight: 500; color: var(--text); font-size: 14px;}
.svc + .svc {border-top: 1px solid var(--border);}
.svc input {width: auto; margin: 0;}
.svc-name {flex: 1;}
.svc-price {color: var(--muted); font-size: 12.5px; white-space: nowrap;}

/* --------------------------------------------------------------------------
   Einstellungen
   -------------------------------------------------------------------------- */
.settings-grid {display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px; align-items: stretch;}   /* alle Kästen einer Reihe gleich hoch */
.settings-grid .card {margin-bottom: 0; display: flex; flex-direction: column;}
.settings-grid .card.span-all {grid-column: 1 / -1;}
.theme-field {border: 0; padding: 0; margin: 0;}   /* kein zweiter Rahmen im Kasten */

/* --------------------------------------------------------------------------
   Berichte
   -------------------------------------------------------------------------- */
.report-grid {display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start;}
.report-grid .card {margin-bottom: 0;}
.report-grid .card.span-2 {grid-column: 1 / -1;}

.chart-svg {width: 100%; height: auto; display: block;}
.chart-empty {text-align: center; padding: 36px 16px; color: var(--muted); font-size: 13.5px;}

/* Horizontale Balken */
.hbar-row {display: flex; align-items: center; gap: 12px; padding: 7px 0;}
.hbar-label {flex: 0 0 150px; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.hbar-track {flex: 1; height: 18px; background: var(--surface); border-radius: 6px; overflow: hidden;}
.hbar-fill {height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  min-width: 2px;}
.hbar-value {flex: 0 0 auto; font-size: 12.5px; font-weight: 700; color: var(--text); min-width: 82px; text-align: right;}
.hbar-count {flex: 0 0 auto; font-size: 11.5px; color: var(--muted); width: 34px; text-align: right;}

/* Rangliste */
.rank-row {display: flex; align-items: center; gap: 13px; padding: 9px 0;}
.rank-row + .rank-row {border-top: 1px solid var(--border);}
.rank-num {width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--muted);}
.rank-row:nth-child(1) .rank-num {background: var(--accent-soft); color: var(--accent); border-color: var(--accent-border);}
.rank-main {flex: 1; min-width: 0;}
.rank-name {font-size: 14px; font-weight: 600; color: var(--text);}
.rank-sub {font-size: 12px; color: var(--muted);}
.rank-value {font-size: 13.5px; font-weight: 700; color: var(--accent);}

/* Heatmap */
.heatmap {display: flex; flex-direction: column; gap: 5px;}
.heat-row {display: flex; align-items: center; gap: 8px;}
.heat-label {flex: 0 0 30px; font-size: 11px; color: var(--muted); text-align: right;}
.heat-cells {flex: 1; display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px;}
.heat-cell {aspect-ratio: 1; border-radius: 3px; background: var(--surface);
  transition: transform var(--transition);}
.heat-legend {display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 11.5px; color: var(--muted);}
.heat-legend .heat-cells {grid-template-columns: repeat(5, 18px); flex: 0 0 auto;}

/* Graph */
.graph-wrap {text-align: center;}
.graph-wrap svg {max-width: 100%; height: auto;}
.graph-node-label {fill: var(--muted); font-size: 12px; font-weight: 500;}
.graph-node-title {fill: var(--text); font-weight: 700;}

/* --------------------------------------------------------------------------
   Leere Zustände
   -------------------------------------------------------------------------- */
.empty {text-align: center; padding: 34px 16px; color: var(--muted); font-size: 14px;}
.empty svg {width: 34px; height: 34px; color: var(--faint); margin-bottom: 10px;}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {:root { --sidebar-w: 72px; }
  .brand { justify-content: center; padding: 20px 10px 14px; }
  .brand-text { display: none; }
  .nav { padding: 8px; }
  .nav a { justify-content: center; padding: 11px 0; }
  .nav a span { display: none; }
  .sidebar-foot { padding: 12px 10px; }
  .salon-switch label { display: none; }
  .user-meta { display: none; }
  .user-box { justify-content: center; }
  .report-grid { grid-template-columns: 1fr; }}

@media (max-width: 640px) {.grid-2, .grid-3 { grid-template-columns: 1fr; }
  .main { padding: 20px 16px 56px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }}


/* Editierbares Preis-Feld im Termin-Dialog */
.price-field {display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); font-weight: 600;}
.price-stepper {display: inline-flex; align-items: center;}

/* Kurtarma-Code (Setup) */
.recovery-code {font-size: 22px; font-weight: 800; letter-spacing: 0.08em; font-family: Consolas, ui-monospace, monospace; border: 1px dashed var(--border); border-radius: 10px; padding: 14px 20px; text-align: center; color: var(--accent); margin: 14px 0;}
.price-stepper input {width: 90px; padding: 6px 8px; font-weight: 600; text-align: center;}
.step-btn {width: 30px; height: 33px; border: 1px solid var(--border); background: var(--elevated); color: var(--text); border-radius: 7px; cursor: pointer; font-size: 17px; font-weight: 700; line-height: 1;}

/* Beim Drucken Sidebar ausblenden (Fiş/Kasa) */
@media print {.sidebar, .no-print { display: none !important; }
  .main { margin: 0 !important; }}
.price-field input::-webkit-outer-spin-button,
.price-field input::-webkit-inner-spin-button {-webkit-appearance: none; margin: 0;}
.price-field input[type=number] {-moz-appearance: textfield;}

/* ==========================================================================
   WOW-Effekte — sanfte Einblendung & lebendigere Hover
   ========================================================================== */

/* Karten & Statistiken gleiten beim Laden sanft nach oben (gestaffelt) */
.card, .stat {animation: rise-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;}
.stat:nth-child(1) {animation-delay: 0.02s;}
.stat:nth-child(2) {animation-delay: 0.08s;}
.stat:nth-child(3) {animation-delay: 0.14s;}
.stat:nth-child(4) {animation-delay: 0.2s;}
.stat:nth-child(5) {animation-delay: 0.26s;}
@keyframes rise-in {from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }}

/* Buttons: leichtes Anheben beim Hover */
.btn {transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition), transform 0.15s ease;}
.btn:active {transform: translateY(0);}

/* Marken-Logo */
.brand-mark {position: relative;}

/* Eigener Bestätigungs-Dialog (statt Browser-confirm mit IP-Adresse) */
.confirm-overlay {position: fixed; inset: 0; z-index: 300;
  background: rgba(5, 7, 10, 0.55);
  display: flex; align-items: center; justify-content: center;
  -webkit-backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);}
.confirm-overlay[hidden] {display: none;}
.confirm-box {background: var(--card); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); padding: 24px 26px;
  max-width: 380px; width: 92%; box-shadow: var(--shadow-lg);
  animation: rise-in 0.2s ease;}
.confirm-box p {margin: 0 0 20px; font-size: 15px; font-weight: 600; line-height: 1.4;}
.confirm-actions {display: flex; gap: 10px; justify-content: flex-end;}

/* ==========================================================================
   Premium-Politur — edler, hochwertiger, weniger "standard"
   ========================================================================== */

/* Atmosphärischer Hintergrund: mehrere sanfte Glows statt flacher Fläche */
body {background:
    radial-gradient(900px 440px at 82% -8%, var(--accent-soft), transparent 60%),
    radial-gradient(760px 400px at -6% 108%, var(--accent-soft), transparent 55%),
    radial-gradient(1500px 780px at 50% -30%, rgba(255,255,255,0.025), transparent 60%),
    var(--bg);
  background-attachment: fixed;}

/* Karten & Statistiken: Glas-Kante, Tiefe, sanftes Schweben */
.card, .stat {background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0) 44%), var(--card);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 30px rgba(0,0,0,0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;}

/* Sidebar: feiner Verlauf statt flacher Fläche */
.sidebar {background: linear-gradient(180deg, var(--surface) 0%, var(--card) 100%);}

/* Navigation: aktiver Punkt dezent akzentuiert (Text bleibt neutral) */
.nav a.active {background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent);}

/* Stat-Icons */
.stat-ic {box-shadow: var(--shadow);}

/* Scrollbar: thematisch + rund */
::-webkit-scrollbar-thumb {background: var(--elevated-2); border: 2px solid var(--bg); border-radius: 8px;}

/* Eingaben: klarer Fokus-Ring (kein farbiger Glow) */
input:focus, select:focus, textarea:focus {box-shadow: 0 0 0 3px var(--accent-soft);}

/* Seiten-Titel: edler */
.page-head h1 {font-weight: 750; letter-spacing: -0.02em;}

/* --- Kennzahlen-Kacheln ------------------------------------------------- */
.kpi-row {display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px;}
.kpi {background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 2px;}
.kpi-v {font-size: 20px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums;}
.kpi-l {font-size: 11.5px; color: var(--muted);}
.kpi-ok {border-color: var(--success);}
.kpi-ok .kpi-v {color: var(--success);}
.kpi-warn {border-color: var(--danger);}
.kpi-warn .kpi-v {color: var(--danger);}

.kv-grid {display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px;}
.kv-l {display: block; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em;}
.kv-v {display: block; font-size: 14px; color: var(--text); white-space: pre-wrap; margin-top: 2px;}

.card-head-row {display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap;}

/* --- Kundenfotos -------------------------------------------------------- */
.photo-grid {display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 6px;}
.photo {margin: 0; display: flex; flex-direction: column; gap: 5px;}
.photo img {width: 100%; height: 110px; object-fit: cover; border-radius: 8px;
             border: 1px solid var(--border); display: block;}
.photo figcaption {font-size: 11.5px; color: var(--muted);}

/* --- WhatsApp-Knopf ----------------------------------------------------- */
.btn.wa {background: #15803d; color: #fff;}

/* --- Lager: kritischer Bestand ------------------------------------------ */
.row-warn td {background: var(--danger-soft);}
.row-ok td {opacity: 0.5;}

/* --- Datum: 3 türkische Listen statt Chrome-Datumsfeld ------------------ */
.date-pick {display: flex; gap: 6px;}
.date-pick select {flex: 1 1 0; min-width: 0;}

/* --- Datei-Auswahl ohne deutsche Browser-Beschriftung ------------------- */
.file-pick {display: inline-flex; align-items: center; gap: 8px; cursor: pointer;}
.file-pick input[type="file"] {display: none;}
.file-pick .fn {max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}

/* --- Leerer Hinweis (z. B. keine Rückgewinnung offen) ------------------- */
.box-hint {border: 1px dashed var(--border-strong); border-radius: 10px;
  padding: 12px 14px; margin-top: 10px; display: flex; flex-direction: column; gap: 4px;}
.box-hint strong {color: var(--text); font-size: 14px;}
.box-hint span {color: var(--muted); font-size: 12.5px; line-height: 1.5;}

/* ==========================================================================
   HANDY / TABLET  (Telefondan kullanım)
   Bis 760px: Seitenleiste wird untere Leiste, Dialoge bildschirmfüllend.
   ========================================================================== */
@media (max-width: 760px) {/* --- untere Navigationsleiste ---------------------------------------- */
  .app { display: block; }
  .sidebar {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    width: 100%; flex: 0 0 auto; height: auto;
    flex-direction: row; border-right: 0;
    border-top: 1px solid var(--border-strong);
    background: var(--surface); z-index: 60;
    padding: 0 0 env(safe-area-inset-bottom, 0);
  }
  .brand, .sidebar-foot { display: none; }
  /* Abmelden in der unteren Leiste sichtbar machen */
  .nav a.nur-handy { display: flex; color: var(--danger, #dc2626); }
  .nav {
    flex-direction: row; flex: 1; overflow-x: auto;
    padding: 5px 6px; gap: 2px; -webkit-overflow-scrolling: touch;
  }
  .nav a {
    flex: 1 0 auto; flex-direction: column; gap: 3px;
    padding: 8px 10px; min-width: 56px; border-radius: 10px;
    font-size: 10.5px; line-height: 1.1; text-align: center;
  }
  .nav a svg { width: 21px; height: 21px; flex: 0 0 21px; }
  .nav a span { display: block; font-size: 10.5px; }

  /* --- Inhalt ----------------------------------------------------------- */
  .main { padding: 14px 12px calc(96px + env(safe-area-inset-bottom, 0)); max-width: 100%; }
  /* Kopfbereich untereinander: sonst ragt ein Knopf aus dem Bild */
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 16px; }
  .page-head .btn, .page-head > a.btn { width: 100%; justify-content: center; }
  .page-head .toolbar { flex-wrap: wrap; }
  .page-head h1 { font-size: 20px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .grid-2, .grid-3, .settings-grid, .report-grid { grid-template-columns: 1fr !important; }
  .card { padding: 14px; }
  .card h2 { font-size: 15px; }

  /* --- Fingerfreundlich ------------------------------------------------- */
  .btn, button, .step-btn { min-height: 42px; }
  .btn.small { min-height: 34px; }
  .pill { padding: 4px 9px; }
  .list-item { padding: 10px 12px; }

  /* --- iOS zoomt bei Eingabefeldern < 16px automatisch hinein ---------- */
  input, select, textarea { font-size: 16px !important; }

  /* --- Dialoge: von unten einfahren, ganze Breite ---------------------- */
  .modal-overlay { padding: 0 !important; align-items: flex-end !important; }
  .modal {
    width: 100% !important; max-width: 100% !important;
    max-height: 94vh; overflow-y: auto;
    border-radius: 16px 16px 0 0 !important;
  }
  .modal-body { max-height: none; }
  .form-row { flex-wrap: wrap; }
  .form-row > * { flex: 1 1 100%; }

  /* --- Breite Tabellen im Kartenrahmen scrollbar statt Seitenbreite ---- */
  .card { overflow-x: auto; }
  .table { min-width: 0; }
  .table th, .table td { padding: 7px 8px; font-size: 12.5px; white-space: nowrap; }}

/* --- QR-/Verbindungsbox in Ayarlar -------------------------------------- */
.lan-box {display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 12px 0 4px;}
.lan-qr {width: 150px; height: 150px; border: 1px solid var(--border-strong); border-radius: 10px; background: #fff; padding: 6px;}
.lan-url {font-family: Consolas, ui-monospace, monospace; font-size: 17px; font-weight: 700;
  color: var(--text); background: var(--surface); border: 1px dashed var(--accent);
  border-radius: 8px; padding: 8px 12px; margin-top: 6px; display: inline-block;
  user-select: all; -webkit-user-select: all;}

/* --- Handy: Kalender darf seitlich scrollen statt abgeschnitten zu werden */
@media (max-width: 760px) {.cal-wrap { min-width: 560px; }                      /* Woche/Monat: schieben */
  .calendar[data-view="day"] .cal-wrap { min-width: 0; } /* Tagesansicht: volle Breite */
  .cal-time-col { width: 46px; flex: 0 0 46px; }
  .cal-time { font-size: 11px; }
  .calendar { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cal-slot { min-height: 34px; }                      /* gut mit dem Finger treffbar */}
/* --------------------------------------------------------------------------
   Hover nur auf Geräten mit Maus (mobile-native): am Handy bleibt der Effekt
   sonst nach dem Tippen "kleben". Inhalt unverändert, nur die Bedingung.
   -------------------------------------------------------------------------- */
@media (hover: hover) and (pointer: fine) {
  ::-webkit-scrollbar-thumb:hover { background: #39404a; }
  a:hover { color: var(--accent-dark); }
  .brand:hover { color: var(--text); }
  .nav a:hover { background: var(--elevated); color: var(--text); }
  .nav a.active:hover { background: var(--elevated-2); color: var(--text); }
  .salon-switch select:hover { border-color: var(--accent-border); }
  .logout:hover { background: var(--danger-soft); color: var(--danger); }
  .view-toggle a:hover { color: var(--text); }
  .view-toggle a.active:hover { color: #1a1204; }
  .stat:hover { border-color: var(--border-strong); }
  .btn.primary:hover { background: linear-gradient(180deg, #d9992e, #c88f2d); color: #1a1204; }
  .btn.ghost:hover { background: var(--elevated); border-color: var(--border-strong); }
  .btn.danger:hover { background: var(--danger-dark); color: #fff; }
  input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
  .table tbody tr:hover { background: var(--elevated); }
  .table td a:hover { color: var(--accent); }
  .list-item:hover { background: var(--elevated); }
  a.li-title:hover { color: var(--accent); }
  .cal-slot:hover { background: rgba(224, 166, 60, 0.07); }
  .cal-event:hover { filter: brightness(1.12); transform: translateY(-1px); }
  .close:hover { background: var(--elevated); color: var(--text); }
  .heat-cell:hover { transform: scale(1.25); }
  .step-btn:hover { background: var(--accent-soft); color: var(--accent); }
  /* Karten-Hover: stärkeres Schweben + Akzent-Ring */
.card:hover, .stat:hover { border-color: var(--border-strong);
  transform: translateY(-3px) scale(1.004);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 18px 50px rgba(0,0,0,0.34), 0 0 0 1px var(--border-strong); }
  .btn:hover { transform: translateY(-1px); }
  .card:hover, .stat:hover { border-color: var(--border-strong);
  transform: translateY(-3px) scale(1.004);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 18px 50px rgba(0,0,0,0.34), 0 0 0 1px var(--border-strong); }
  /* Primär-Button: neutraler Schatten beim Hover */
.btn.primary:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 8px 20px rgba(0,0,0,0.28); }
  .btn.wa:hover { background: #166534; }
}

/* --------------------------------------------------------------------------
   Handy-Regeln nachgetragen (mobile-native)
   -------------------------------------------------------------------------- */
/* iOS/Handy zoomt die Seite, wenn ein Eingabefeld kleiner als 16 px ist */
@media (max-width: 820px) {
  input, select, textarea { font-size: 16px; }
}
/* Zahlen springen beim Aktualisieren nicht mehr */
.num, .v, .big, .tp, td.num, th.num, .sum .v, .kpi .v { font-variant-numeric: tabular-nums; }

/* Wer Bewegung abstellt, bekommt keine */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Handy: Tipp-Flächen mindestens 40 px hoch (Daumen-Test).
   Apple empfiehlt 44, Google 48 — 40 ist der kleinste sichere Wert.
   Gilt NUR am Handy; am PC bleibt alles wie es ist.
   ========================================================================== */
@media (max-width: 820px) {
  .btn, button.btn, a.btn, summary.btn {min-height: 40px; display: inline-flex;
    align-items: center; justify-content: center;}
  .form-row .btn, .row .btn {min-height: 40px;}
  td .btn, .tbl .btn {min-height: 38px;}
  /* die kleine Knopf-Variante hatte Vorrang (34px) — hier mitgezogen */
  .btn.small, summary.btn.small {min-height: 40px; padding: 8px 12px;}
}

/* Meldungen: sanft verschwinden (das Skript entfernt sie nach 3 Sekunden) */
.flash {transition: opacity .35s ease, transform .35s ease;}
.flash.gitti {opacity: 0; transform: translateY(-6px); pointer-events: none;}

/* --- Abmelden: Reiter in der unteren Leiste, nur am Handy sichtbar --- */
.nav a.nur-handy {display: none;}
@media (max-width: 760px) {.nav a.nur-handy {display: flex; color: var(--danger, #dc2626);}}

/* --------------------------------------------------------------------------
   Handy: Klapp-Formulare ("Düzenle") nicht mehr schwebend,
   sondern volle Breite — sonst rutschen sie links aus dem Bild.
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .panel-inline {display: block; width: 100%;}
  .panel-inline > form, .panel-inline .panel-body {
    position: static; right: auto; top: auto; left: auto;
    width: 100%; max-width: 100%; margin-top: 10px;
  }
}
/* 8 Reiter müssen bei 412 px alle sichtbar sein (8 × 48 = 384 px) */
@media (max-width: 430px) {.nav a {min-width: 48px; padding: 8px 6px;}}

/* ==========================================================================
   Kalender am Handy:
   1) Kopfzeile (Datum) und Felder müssen EXAKT gleich breit sein — sonst
      sitzen die senkrechten Linien verschoben (der Datumstext konnte nicht
      mitschrumpfen und machte die Kopfspalten 13 px breiter).
   2) Beide scrollen GEMEINSAM seitwärts, damit kein Tag abgeschnitten wird.
   ========================================================================== */
.cal-wrap {overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;}
.cal-wrap::-webkit-scrollbar {display: none;}
.cal-head > *, .cal-body > * {min-width: 0;}
.cal-head, .cal-body {min-width: 664px;}   /* 7 Tage bleiben lesbar, sonst scrollt es seitwärts */
@media (max-width: 760px) {
  .cal-day-head {padding: 9px 3px; font-size: 12.5px;}
  .cal-time {padding-left: 6px;}
}

/* Zeitspalte bleibt beim Seitwärts-Scrollen am Handy LINKS stehen —
   sonst weiß man beim Tippen nicht mehr, zu welcher Uhrzeit der Kasten gehört.
   (Der Hintergrund ist schon deckend, Termine rutschen darunter durch.) */
.cal-head .cal-time-col, .cal-body .cal-time-col {
  position: sticky; left: 0; z-index: 5;
}
@media (max-width: 760px) {
  .cal-head .cal-time-col, .cal-body .cal-time-col {
    box-shadow: 6px 0 10px -6px rgba(0,0,0,.35);   /* zeigt: hier ist der feste Rand */
  }
}

/* Kalenderbereich MUSS in die Karte passen — sonst wird er beschnitten und
   die Uhrzeit-Spalte verschwindet beim Weiterschrollen. */
.cal-wrap {
  width: 100% !important; max-width: 100% !important; min-width: 0 !important;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.calendar.card {overflow: visible;}     /* nur EIN Bereich scrollt seitwärts */
.cal-day-head, .cal-col {min-width: 0;}
.cal-head, .cal-body {min-width: 664px;}   /* 7 Tage bleiben lesbar */

/* Uhrzeit GENAU auf die Linie setzen (Google-Stil): so endet ein blauer Kasten
   exakt an der Uhrzeit, an der er endet — vorher saß die Beschriftung eine halbe
   Zeile tiefer und alles wirkte "zu kurz". */
.cal-time {align-items: center !important; padding-top: 0 !important; transform: translateY(-50%);}

/* Am Handy ist der Terminkasten nur ~44 px breit: dort nur Name + Leistung,
   die Dauer zeigt die Höhe des Kastens, die Startzeit steht in der Zeile. */
@media (max-width: 760px) {
  .cal-event .ev-time {display: none;}
  .cal-event .ev-services {font-size: 11px;}
}

/* Uhrzeit-Position je Raster (Wunsch des Owners):
   - Stunden-Raster (60 Min und gröber): Uhrzeit MITTIG im Kasten —
     ein einstündiger Termin füllt genau ein Feld, also ist die Mitte richtig.
   - Feines Raster (unter 60 Min): Uhrzeit AUF der Linie —
     sonst wirkt ein 2-Felder-Termin, als würde er zu früh enden. */
.calendar.raster-grob .cal-time {transform: none;}
.calendar.raster-fein .cal-time {transform: translateY(-50%);}

/* Kasten „Hesabımı sil": deutlich als Gefahr erkennbar, aber nicht schreiend */
.danger-card {border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent) !important;
  background: color-mix(in srgb, var(--danger) 5%, var(--card)) !important;}
.danger-card h2 {color: var(--danger);}

/* Innere Formulare einer Listenzeile nicht strecken — sonst steht jeder Knopf
   in einer eigenen Zeile (hochbeinig). Sie bleiben zusammen, wenn Platz ist. */
.list-item form.li-actions {flex: 0 1 auto;}
