:root {
  --winit-primary: #166a9f;
  --winit-primary-dark: #0f4f79;
  --winit-accent: #18bc9c;
  --winit-ink: #243447;
  --winit-muted: #66788a;
  --winit-surface: #ffffff;
  --winit-bg: #f4f7fa;
  --winit-radius: 1rem;
  --winit-shadow: 0 .45rem 1.5rem rgba(20, 45, 70, .09);
}

html { scroll-behavior: smooth; }
body { background-color: var(--winit-bg); color: var(--winit-ink); }
body > main { min-height: calc(100vh - 145px); }
a { color: var(--winit-primary); text-underline-offset: .18em; }
a:hover { color: var(--winit-primary-dark); }

.navbar.bg-dark,
.navbar.navbar-dark,
.app-header.navbar {
  background: linear-gradient(120deg, #102d44, var(--winit-primary)) !important;
  border: 0 !important;
  box-shadow: 0 .2rem .8rem rgba(10, 35, 55, .18);
}
.navbar-brand, .logo { font-weight: 800 !important; letter-spacing: .035em; }
.navbar .btn { border-radius: 999px; }

.card {
  border: 0;
  border-radius: var(--winit-radius);
  box-shadow: var(--winit-shadow);
  overflow: hidden;
}
.card-header { background: #eef5f9; border-bottom: 1px solid #dce7ee; }
.card-footer { background: #f8fbfd; border-top: 1px solid #e0e9ef; }
.btn { border-radius: .7rem; font-weight: 650; }
.btn-primary { background-color: var(--winit-primary); border-color: var(--winit-primary); }
.btn-primary:hover, .btn-primary:focus { background-color: var(--winit-primary-dark); border-color: var(--winit-primary-dark); }
.btn-success { background-color: #10977d; border-color: #10977d; }
.form-control, .form-select { border-radius: .7rem; border-color: #cbd8e1; min-height: 2.75rem; }
.form-control:focus, .form-select:focus { border-color: var(--winit-accent); box-shadow: 0 0 0 .22rem rgba(24, 188, 156, .16); }
.form-label { color: #30485b; font-weight: 650; }
.table-responsive { border-radius: var(--winit-radius); box-shadow: var(--winit-shadow); background: #fff; }
.table { margin-bottom: 0; }
.table thead th { background: #eaf2f7; color: #27475d; border-bottom-width: 1px; white-space: nowrap; }
.alert { border: 0; border-radius: .85rem; box-shadow: 0 .25rem .8rem rgba(20, 45, 70, .05); }

main.container { padding-top: 2.5rem !important; padding-bottom: 3rem !important; }
main.container > h1:first-child, main.container > .d-flex:first-child h1 { color: #173f5a; font-weight: 800; }
main.container > a:first-child:not(.btn) {
  display: inline-flex; align-items: center; padding: .55rem .9rem; margin-bottom: 1rem;
  color: var(--winit-primary); background: #fff; border: 1px solid #cbdce7;
  border-radius: .7rem; font-weight: 650; text-decoration: none;
}

/* Einheitliche Behandlung der migrierten AdminLTE-Seiten. */
.app-wrapper { background: var(--winit-bg) !important; }
.app-sidebar {
  background: linear-gradient(180deg, #12334a, #0e2638) !important;
  color: #e7f3fa !important;
  position: fixed !important;
  top: 0 !important;
  bottom: 0 !important;
  overflow: hidden !important;
}
.app-sidebar .sidebar-wrapper { height: 100vh !important; overflow-y: auto !important; padding: 4.8rem .65rem 1.25rem; scrollbar-width: thin; }
.app-sidebar .sidebar-form, .control-sidebar, .control-sidebar-bg { display: none !important; }
.app-sidebar .nav, .app-sidebar .sidebar-menu { padding: 0 !important; }
.app-sidebar .nav-item { margin: .15rem 0; }
.app-sidebar .nav-link, .app-sidebar .sidebar-menu a {
  display: flex !important; align-items: center; gap: .7rem; width: 100%;
  padding: .68rem .8rem !important; color: #d9eaf4 !important;
  border-radius: .7rem; text-decoration: none !important; background: transparent !important;
}
.app-sidebar .nav-link:hover, .app-sidebar .sidebar-menu a:hover,
.app-sidebar .nav-link.active, .app-sidebar .menu-open > a {
  color: #fff !important; background: rgba(24, 188, 156, .22) !important;
}
.app-sidebar .nav-treeview { padding-left: .55rem !important; }
.app-main, .content-wrapper { background: var(--winit-bg) !important; min-height: 100vh; }
.content-header h1, .app-content-header h1 { color: #173f5a; font-weight: 800; }
.content-wrapper .box, .app-content .box { border: 0 !important; border-radius: var(--winit-radius); box-shadow: var(--winit-shadow); overflow: hidden; }
.box-header { background: #eef5f9; border-bottom: 1px solid #dce7ee; }
.box-footer { background: #f8fbfd; border-top: 1px solid #e0e9ef; }

@media (max-width: 991.98px) {
  .app-sidebar { position: fixed !important; }
  main.container { padding-top: 1.5rem !important; }
  .table-responsive { border-radius: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
