/* SkyBubble – shadcn/ui Theme „neutral“ (gleiche Tokens wie Kamera-KI) */
@font-face{font-family:"Geist";src:url("fonts/Geist-Variable.woff2") format("woff2");font-weight:100 900;font-display:swap}
:root{
  --radius:.625rem;
  --background:oklch(1 0 0);--foreground:oklch(.145 0 0);
  --card:oklch(1 0 0);--card-foreground:oklch(.145 0 0);
  --primary:oklch(.205 0 0);--primary-foreground:oklch(.985 0 0);
  --secondary:oklch(.97 0 0);--secondary-foreground:oklch(.205 0 0);
  --muted:oklch(.97 0 0);--muted-foreground:oklch(.556 0 0);
  --accent:oklch(.97 0 0);--accent-foreground:oklch(.205 0 0);
  --destructive:oklch(.577 .245 27.325);
  --border:oklch(.922 0 0);--input:oklch(.922 0 0);--ring:oklch(.708 0 0);
  --ok:oklch(.696 .17 162.48);--warn:oklch(.769 .188 70.08);
  --sidebar:oklch(.985 0 0);--sidebar-foreground:oklch(.145 0 0);--sidebar-accent:oklch(.97 0 0);--sidebar-border:oklch(.922 0 0);
  --radius-sm:calc(var(--radius) - 4px);--radius-md:calc(var(--radius) - 2px);--radius-lg:var(--radius);--radius-xl:calc(var(--radius) + 4px);
  --shadow-xs:0 1px 2px 0 rgb(0 0 0 / .05);
  --shadow-sm:0 1px 3px 0 rgb(0 0 0 / .1),0 1px 2px -1px rgb(0 0 0 / .1);
  --shadow-lg:0 10px 15px -3px rgb(0 0 0 / .1),0 4px 6px -4px rgb(0 0 0 / .1);
  --ring-50:color-mix(in oklch,var(--ring) 50%,transparent);
  --font-sans:"Geist",ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  color-scheme:light;
}
*,*::before,*::after{box-sizing:border-box;border:0 solid var(--border)}
body{margin:0;background:var(--background);color:var(--foreground);font-family:var(--font-sans);font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased}
h1,h2,h3,p{margin:0}
a{color:inherit}
button,input,select,textarea{font:inherit;color:inherit}
.icon{width:16px;height:16px;flex-shrink:0;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.muted{color:var(--muted-foreground)}
.small{font-size:13px}

/* ---------- Dashboard-Layout (shadcn Sidebar, Variante „inset“) ---------- */
.container{width:100%;max-width:1200px;margin:0 auto}
body.app{background:var(--sidebar)}
.shell{display:flex;min-height:100vh}
.sidebar{width:16rem;flex-shrink:0;display:flex;flex-direction:column;height:100vh;position:sticky;top:0;color:var(--sidebar-foreground);background:var(--sidebar)}
.sidebar-header,.sidebar-footer{padding:8px}
.sidebar-content{flex:1;overflow-y:auto;padding:0 8px}
.sidebar-group{padding:8px 0}
.sidebar-group-label{display:flex;align-items:center;height:32px;padding:0 8px;font-size:12px;font-weight:500;color:color-mix(in oklch,var(--sidebar-foreground) 70%,transparent)}
.sidebar-menu{display:grid;gap:2px}
.sidebar-btn{display:flex;align-items:center;gap:8px;width:100%;height:32px;padding:0 8px;border-radius:var(--radius-md);text-decoration:none;
  font-size:14px;color:var(--sidebar-foreground);background:transparent;cursor:pointer;transition:background .15s;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sidebar-btn:hover{background:var(--sidebar-accent)}
.sidebar-btn[data-active=True]{background:var(--sidebar-accent);font-weight:500}
.sidebar-btn-lg{height:48px;padding:8px}
.brand-logo{display:grid;place-items:center;width:32px;height:32px;flex-shrink:0;border-radius:var(--radius-lg);background:var(--primary);color:var(--primary-foreground)}
.brand-text{display:grid;line-height:1.25;min-width:0}
.brand-text b{font-weight:600}
.brand-text span{font-size:12px;color:var(--muted-foreground);overflow:hidden;text-overflow:ellipsis}
.avatar{display:grid;place-items:center;width:32px;height:32px;flex-shrink:0;border-radius:var(--radius-lg);background:var(--muted);font-size:12px;font-weight:600;border:1px solid var(--border)}
.dropdown{position:relative}
.dropdown summary{list-style:none}
.dropdown summary::-webkit-details-marker{display:none}
.dropdown-content{position:absolute;bottom:calc(100% + 6px);left:0;right:0;z-index:50;padding:4px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--background);box-shadow:var(--shadow-lg)}
.dropdown-label{padding:6px 8px;font-size:13px}
.dropdown-item{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:var(--radius-sm);text-decoration:none;font-size:14px}
.dropdown-item:hover{background:var(--accent)}
.dropdown-sep{height:1px;background:var(--border);margin:4px -4px}
.inset{flex:1;min-width:0;display:flex;flex-direction:column;margin:8px 8px 8px 0;border-radius:var(--radius-xl);background:var(--background);box-shadow:var(--shadow-sm);overflow:hidden}
.inset-header{height:48px;flex-shrink:0;display:flex;align-items:center;gap:8px;padding:0 16px;border-bottom:1px solid var(--border)}
.vsep{width:1px;height:16px;background:var(--border)}
.breadcrumb{display:flex;align-items:center;gap:6px;font-size:14px;color:var(--muted-foreground);min-width:0}
.breadcrumb a{text-decoration:none}
.breadcrumb a:hover{color:var(--foreground)}
.breadcrumb .aktuell{color:var(--foreground);font-weight:500}
.inset-body{flex:1;padding:24px;display:flex;flex-direction:column;gap:24px}
.inset-body>*{width:100%;max-width:1200px;margin-left:auto;margin-right:auto}
.modul-frame{flex:1;width:100%;border:0;display:block;min-height:calc(100vh - 64px)}
@media (min-width:769px){ .shell.zu .sidebar{display:none} .shell.zu .inset{margin-left:8px} }
.backdrop{display:none}
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap}
.page-title{font-size:24px;line-height:32px;font-weight:600;letter-spacing:-.025em}
.page-sub{color:var(--muted-foreground);margin-top:4px}
.back{display:inline-flex;align-items:center;gap:4px;color:var(--muted-foreground);text-decoration:none;font-size:13px;margin-bottom:8px}
.back:hover{color:var(--foreground)}
.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px}
.section-title h2{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600}

/* Kennzahlen (SectionCards) */
.stat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}
.stat{gap:12px;padding:20px 0;background:linear-gradient(to top,color-mix(in oklch,var(--muted) 40%,var(--card)),var(--card))}
.stat .card-header{grid-template-columns:1fr auto;align-items:start}
.stat-value{font-size:28px;line-height:1.1;font-weight:600;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.stat-foot{padding:0 24px;font-size:13px;color:var(--muted-foreground)}
.dot.warn{background:var(--warn)}.dot.bad{background:var(--destructive)}

/* Tabs */
.tabs-list{display:inline-flex;width:fit-content;max-width:100%;overflow-x:auto;height:36px;align-items:center;padding:3px;border-radius:var(--radius-lg);background:var(--muted);color:var(--muted-foreground)}
.tabs-trigger{display:inline-flex;align-items:center;gap:6px;height:100%;padding:0 12px;border-radius:var(--radius-md);border:1px solid transparent;
  font-weight:500;text-decoration:none;white-space:nowrap;color:color-mix(in oklch,var(--foreground) 60%,transparent);transition:all .15s}
.tabs-trigger:hover{color:var(--foreground)}
.tabs-trigger[data-active=True]{background:var(--background);color:var(--foreground);box-shadow:var(--shadow-sm)}

/* Button */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:36px;padding:0 16px;border-radius:var(--radius-md);
  font-size:14px;font-weight:500;white-space:nowrap;cursor:pointer;text-decoration:none;border:1px solid transparent;outline:none;
  background:var(--primary);color:var(--primary-foreground);transition:all .15s}
.btn:hover{background:color-mix(in oklch,var(--primary) 90%,transparent)}
.btn:focus-visible{border-color:var(--ring);box-shadow:0 0 0 3px var(--ring-50)}
.btn-outline{background:var(--background);color:var(--foreground);border-color:var(--border);box-shadow:var(--shadow-xs)}
.btn-outline:hover{background:var(--accent)}
.btn-ghost{background:transparent;color:var(--foreground)}
.btn-ghost:hover{background:var(--accent)}
.btn-destructive{background:var(--destructive);color:#fff}
.btn-destructive:hover{background:color-mix(in oklch,var(--destructive) 90%,transparent)}
.btn-sm{height:32px;padding:0 12px}
.btn-icon{width:32px;padding:0}
.btn-block{width:100%}

/* Badge */
.badge{display:inline-flex;align-items:center;gap:6px;border-radius:9999px;border:1px solid transparent;padding:2px 8px;font-size:12px;line-height:16px;font-weight:500;white-space:nowrap}
.badge-secondary{background:var(--secondary);color:var(--secondary-foreground)}
.badge-outline{border-color:var(--border)}
.badge-default{background:var(--primary);color:var(--primary-foreground)}
.badges{display:flex;gap:4px;flex-wrap:wrap}
.dot{width:6px;height:6px;border-radius:9999px;background:var(--muted-foreground)}
.dot.ok{background:var(--ok)}

/* Card */
.card{display:flex;flex-direction:column;gap:24px;border-radius:var(--radius-xl);border:1px solid var(--border);background:var(--card);padding:24px 0;box-shadow:var(--shadow-sm)}
.card-header{display:grid;gap:6px;padding:0 24px}
.card-title{font-weight:600;line-height:1.2}
.card-description{color:var(--muted-foreground)}
.card-content{padding:0 24px;display:grid;gap:20px}
.card-footer{padding:0 24px;display:flex;gap:8px;align-items:center}
.card-footer .spacer{flex:1}

/* Formular */
.form-item{display:grid;gap:8px;align-content:start}
.label{font-size:14px;font-weight:500;line-height:1}
.form-description{font-size:13px;color:var(--muted-foreground)}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.input,.textarea{width:100%;border-radius:var(--radius-md);border:1px solid var(--input);background:transparent;box-shadow:var(--shadow-xs);outline:none;transition:border-color .15s,box-shadow .15s}
.input{height:36px;padding:4px 12px}
.textarea{min-height:64px;padding:8px 12px;resize:vertical}
.input:focus-visible,.textarea:focus-visible{border-color:var(--ring);box-shadow:0 0 0 3px var(--ring-50)}
.input[aria-invalid=true]{border-color:var(--destructive)}
.checkbox{appearance:none;margin:0;width:16px;height:16px;flex-shrink:0;border:1px solid var(--input);border-radius:4px;box-shadow:var(--shadow-xs);cursor:pointer;outline:none;transition:all .15s}
.checkbox:checked{border-color:var(--primary);background:var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat}
.checkbox:focus-visible{border-color:var(--ring);box-shadow:0 0 0 3px var(--ring-50)}
.checkbox:disabled{opacity:.5;cursor:not-allowed}
.check-row{display:flex;gap:12px;align-items:flex-start;cursor:pointer}
.check-row .checkbox{margin-top:1px}
.check-row .txt{display:grid;gap:4px}
.check-list{display:grid;gap:16px}
.check-card{border:1px solid var(--border);border-radius:var(--radius-lg);padding:12px 16px}
.check-card:has(.checkbox:checked){border-color:color-mix(in oklch,var(--primary) 40%,var(--border));background:color-mix(in oklch,var(--muted) 60%,transparent)}
.group-title{display:flex;align-items:center;gap:8px;font-weight:600;font-size:14px}

/* Alert */
.alert{display:grid;grid-template-columns:16px 1fr;gap:2px 12px;align-items:start;border:1px solid var(--border);border-radius:var(--radius-lg);padding:12px 16px;background:var(--card)}
.alert>.icon{transform:translateY(2px)}
.alert-title{font-weight:500}
.alert-description{grid-column:2;color:var(--muted-foreground)}
.alert-destructive{color:var(--destructive)}
.alert-destructive .alert-description{color:color-mix(in oklch,var(--destructive) 90%,transparent)}

/* Tabelle */
.table-wrap{width:100%;overflow-x:auto;border:1px solid var(--border);border-radius:var(--radius-lg)}
table{width:100%;border-collapse:collapse}
thead tr,tbody tr{border-bottom:1px solid var(--border)}
tbody tr:last-child{border-bottom:0}
tbody tr:hover{background:color-mix(in oklch,var(--muted) 50%,transparent)}
th{height:40px;padding:0 12px;text-align:left;font-weight:500;white-space:nowrap}
td{padding:10px 12px;vertical-align:middle}
td.aktion{text-align:right;width:1%;white-space:nowrap}
.zelle-name{font-weight:500}
tr.klickbar{cursor:pointer}

/* Module */
.module-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px}
.modul{text-decoration:none;gap:16px;transition:box-shadow .15s,border-color .15s}
.modul:hover{box-shadow:var(--shadow-lg);border-color:color-mix(in oklch,var(--ring) 60%,var(--border))}
.modul-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:var(--radius-lg);background:var(--muted)}
.modul-icon .icon{width:20px;height:20px}
.modul-link{display:inline-flex;align-items:center;gap:6px;font-weight:500}
.empty{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:48px 24px;border:1px dashed var(--border);border-radius:var(--radius-xl);color:var(--muted-foreground)}
.empty .icon{width:24px;height:24px}
.empty-title{color:var(--foreground);font-weight:500}

/* Login */
.auth{min-height:100vh;display:grid;place-items:center;padding:24px;background:var(--muted)}
.auth .card{width:100%;max-width:380px}
.auth-brand{display:flex;align-items:center;justify-content:center;gap:8px;font-weight:600;font-size:16px;margin-bottom:24px}

/* Dialog (AlertDialog) */
.dialog{border:1px solid var(--border);border-radius:var(--radius-lg);padding:24px;width:min(440px,calc(100% - 32px));box-shadow:var(--shadow-lg);background:var(--background);color:var(--foreground)}
.dialog::backdrop{background:rgb(0 0 0 / .5)}
.dialog h2{font-size:18px;font-weight:600}
.dialog p{color:var(--muted-foreground);margin-top:8px}
.dialog-footer{display:flex;justify-content:flex-end;gap:8px;margin-top:24px}

@media (max-width:768px){
  .nur-mobil{display:inline-flex}
  .sidebar{position:fixed;left:0;top:0;z-index:60;transform:translateX(-100%);transition:transform .2s;box-shadow:var(--shadow-lg)}
  .shell.offen .sidebar{transform:none}
  .shell.offen .backdrop{display:block;position:fixed;inset:0;z-index:55;background:rgb(0 0 0 / .4)}
  .inset{margin:0;border-radius:0}
  .inset-body{padding:16px}
  .hide-sm{display:none}
  .form-grid{grid-template-columns:1fr}
  .page-title{font-size:20px}
}
