/* Wohn365 Design System V2 – UI overlay for existing v1.73 runtime.
 * Visual-only layer: no accounting, permissions, or data-flow changes.
 * Scoped to the authenticated application shell by wohn365.js.
 */
:root { --w365-navy:#0a3158; --w365-navy-deep:#082845; --w365-navy-light:#164c78; --w365-bg:#f1f5f9; --w365-line:#dce5ee; --w365-text:#15324d; --w365-muted:#60758a; --w365-white:#fff; --w365-focus:#287fc0; --w365-radius:14px; }
body.w365-ui-v2 { background:var(--w365-bg); color:var(--w365-text); }
body.w365-ui-v2 div[class*="lg:pl-72"] > header.sticky {
  background:linear-gradient(112deg,var(--w365-navy-deep),var(--w365-navy-light)) !important;
  color:#fff !important; border-bottom-color:#164366 !important;
  box-shadow:0 3px 15px rgba(5,30,51,.13);
}
body.w365-ui-v2 div[class*="lg:pl-72"] > header.sticky :is(svg,span,p) {color:inherit}
body.w365-ui-v2 div[class*="lg:pl-72"] > header.sticky :is(button:not([role="combobox"]),a) {color:#fff}
body.w365-ui-v2 div[class*="lg:pl-72"] > header.sticky :is(button:not([role="combobox"]),a):hover {background:rgba(255,255,255,.14)}
body.w365-ui-v2 div[class*="lg:pl-72"] > header.sticky :is(input,select,[role="combobox"]) {background:#fff !important;color:var(--w365-text) !important;border-color:#c6d7e7 !important}
body.w365-ui-v2 div[class*="lg:pl-72"] > header.sticky input::placeholder {color:#718397 !important}
body.w365-ui-v2 div[class*="lg:pl-72"] > main {background:var(--w365-bg)}
/* Cards: only known card surfaces, never warning colors or status badges. */
body.w365-ui-v2 main :is(section,article,div)[class*="bg-white"][class*="rounded"]:not([role="dialog"]),
body.w365-ui-v2 main [data-slot="card"] {
  border-color:var(--w365-line);
  box-shadow:0 3px 14px rgba(17,50,76,.045);
}
body.w365-ui-v2 main [data-slot="card"] {background:#fff;border-radius:var(--w365-radius)}
body.w365-ui-v2 main :is(h1,h2,h3) {letter-spacing:-.018em}
body.w365-ui-v2 main :is(form,.form,.entry-form) label:not(:has(input[type="checkbox"],input[type="radio"])) {
  color:#294a66;font-size:13px;font-weight:650;line-height:1.5;
}
body.w365-ui-v2 main :is(form,.form,.entry-form) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="file"]),select,textarea,button[role="combobox"]) {
  min-width:0;max-width:100%;box-sizing:border-box;border-color:#b9cbdc;
  border-radius:9px;background-color:#fff;color:var(--w365-text);
  transition:border-color .16s ease,box-shadow .16s ease;
}
body.w365-ui-v2 main :is(form,.form,.entry-form) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="file"]),select,button[role="combobox"]) {min-height:42px}
body.w365-ui-v2 main :is(form,.form,.entry-form) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="file"]),select,textarea,button[role="combobox"]):focus-visible {
  outline:2px solid transparent;border-color:var(--w365-focus);
  box-shadow:0 0 0 3px rgba(40,127,192,.16);
}
body.w365-ui-v2 main :is(form,.form,.entry-form) textarea {min-height:95px;resize:vertical}
/* Existing React/ShadCN two-column form grids gain a consistent gap. */
@media (min-width:768px) {
  body.w365-ui-v2 main :is(form,.form,.entry-form) .grid[class*="sm:grid-cols-2"],
  body.w365-ui-v2 main :is(form,.form,.entry-form) .grid[class*="md:grid-cols-2"],
  body.w365-ui-v2 main form.w365-auto-form-grid {
    column-gap:20px !important;row-gap:18px !important;
  }
  body.w365-ui-v2 main form.w365-auto-form-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  body.w365-ui-v2 main form.w365-auto-form-grid > .w365-field-full {grid-column:1/-1}
}
body.w365-ui-v2 main form.w365-auto-form-grid > * {min-width:0}
body.w365-ui-v2 main button[data-slot="button"]:not([data-variant="ghost"]):not([data-variant="link"]) {border-radius:10px}
body.w365-ui-v2 main :is(button,a,[role="button"]):focus-visible {outline:3px solid rgba(40,127,192,.6);outline-offset:2px}
body.w365-ui-v2 main a[href*="tenant-admin.html"],
body.w365-ui-v2 nav[aria-label="Buchhaltungsbereiche"] a[href*="tenant-admin.html"] {
  display:inline-flex !important;align-items:center;justify-content:center;min-height:40px;
  padding:9px 15px !important;background:#fff;color:var(--w365-navy) !important;
  border:1px solid #c7d7e7 !important;border-radius:10px !important;
  box-shadow:0 1px 2px rgba(6,39,66,.04);font-weight:650;text-decoration:none !important;
  white-space:nowrap;
}
body.w365-ui-v2 main a[href*="tenant-admin.html"]:hover {background:#e9f3fb !important}
body.w365-ui-v2 main button[type="submit"]:not([class*="bg-red"]):not([class*="destructive"]) {font-weight:650}
body.w365-ui-v2 main :is(.panel,.entry-form,.form) {min-width:0}
/* Extension pages using their own cards and form layout. */
body.w365-ui-v2.w365-ui-embedded :is(.panel,.card,.side-panel) {border-color:var(--w365-line);box-shadow:0 3px 14px rgba(17,50,76,.055)}
body.w365-ui-v2.w365-ui-embedded .entry-form {column-gap:20px;row-gap:18px}
body.w365-ui-v2.w365-ui-embedded .form-actions button {border-radius:10px}
@media (max-width:767px) {
  body.w365-ui-v2 main form.w365-auto-form-grid {display:block}
  body.w365-ui-v2 main form.w365-auto-form-grid > *+* {margin-top:14px}
  body.w365-ui-v2.w365-ui-embedded .entry-form {grid-template-columns:minmax(0,1fr)}
  body.w365-ui-v2 div[class*="lg:pl-72"] > header.sticky {padding-left:14px;padding-right:14px}
}
@media (prefers-reduced-motion:reduce) {body.w365-ui-v2 * {scroll-behavior:auto !important;transition-duration:.01ms !important}}
