/* sloppyfix – Asset & Maintenance Management
   Farbpalette: mint #f0fdf4 | forest-green #15803d | emerald #16a34a | red #dc2626 */

:root {
  --fix-dark:    #1a2e1a;
  --fix-mid:     #2d4a2d;
  --fix-mint:    #f0fdf4;
  --fix-forest:  #15803d;
  --fix-emerald: #16a34a;
  --fix-red:     #dc2626;
  --fix-green:   #059669;
  --fix-border:  #bbf7d0;
  --fix-shadow:  0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.08);
  --radius:      12px;

  /* Bootstrap variable overrides */
  --bs-body-bg:            #f0fdf4;
  --bs-body-bg-rgb:        240,253,244;
  --bs-secondary-bg:       #e2f9e8;
  --bs-secondary-bg-rgb:   226,249,232;
  --bs-tertiary-bg:        #d1f5db;
  --bs-tertiary-bg-rgb:    209,245,219;
  --bs-body-color:         #1a2e1a;
  --bs-body-color-rgb:     26,46,26;
  --bs-emphasis-color:     #1a2e1a;
  --bs-border-color:       #bbf7d0;
  --bs-border-color-translucent: rgba(26,46,26,.15);
}

/* ── Layout ── */
body {
  background: var(--fix-mint);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #1a2e1a;
  min-height: 100vh;
}

/* ── Navbar ── */
.navbar {
  background: var(--fix-mint) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  border-bottom: 1px solid var(--fix-border);
}
.navbar-brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .02em;
}
.navbar-brand span {
  color: var(--fix-emerald);
}
.nav-link { color: var(--fix-mid) !important; }
.nav-link:hover, .nav-link.active { color: var(--fix-dark) !important; }
.nav-link.active { font-weight: 600; }
.navbar-toggler { border-color: var(--fix-border); }
.navbar-toggler-icon { filter: invert(0); }

/* ── Cards ── */
.card {
  border: 1px solid var(--fix-border);
  border-radius: var(--radius);
  box-shadow: var(--fix-shadow);
  background: var(--fix-mint);
}
.card-header {
  background: var(--fix-forest);
  color: #fff;
  border-radius: var(--radius) var(--radius) 0 0 !important;
  font-weight: 600;
  padding: .75rem 1.25rem;
  border-bottom: none;
}

/* ── Stat cards (dashboard) ── */
.stat-card {
  border-radius: var(--radius);
  padding: .5rem .75rem;
  box-shadow: var(--fix-shadow);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.stat-card .stat-value { font-size: 1.1rem; font-weight: 700; line-height: 1; }
.stat-card .stat-label { font-size: .7rem; opacity: .85; margin-top: .15rem; }
.stat-card-primary  { background: var(--fix-dark); }
.stat-card-success  { background: var(--fix-green); }
.stat-card-warning  { background: var(--fix-emerald); }
.stat-card-danger   { background: var(--fix-red); }

/* ── Warning badge ── */
.warning-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: #fee2e2;
  color: var(--fix-red);
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: .15rem .5rem;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}
.warning-badge svg { width: 14px; height: 14px; }

/* ── Status badges ── */
.status-pending    { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }
.status-ok         { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.status-overdue    { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.status-completed  { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }

/* ── Asset status badges ── */
.asset-status-active         { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.asset-status-inactive       { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }
.asset-status-decommissioned { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── Finding severity badges ── */
.finding-badge-gering   { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.finding-badge-mittel   { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }
.finding-badge-hoch     { background: #ffedd5; color: #9a3412; border: 1px solid #fdba74; }
.finding-badge-kritisch { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── Buttons ── */
.btn-fix {
  background: var(--fix-emerald);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
}
.btn-fix:hover { background: #15803d; color: #fff; }

/* ── Form controls (light mode) ── */
.form-control,
.form-select {
  background-color: #fafffc;
  border-color: var(--fix-border);
}
.form-control:focus,
.form-select:focus {
  background-color: #fafffc;
  border-color: var(--fix-forest);
  box-shadow: 0 0 0 0.2rem rgba(21,128,61,.2);
}

/* ── Table ── */
.table { font-size: .9rem; }
.table thead th {
  background: var(--fix-forest);
  color: #fff;
  font-weight: 600;
  border: none;
  white-space: nowrap;
}
.table tbody tr:hover { background: #e8f8ee; }

/* ── Striped column highlight ── */
.table-striped-col > tbody > tr > td:nth-child(even),
.table-striped-col > tbody > tr > th:nth-child(even) {
  background: rgba(21,128,61,.08);
}

/* ── Login page (glassmorphism) ── */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--fix-dark) 0%, #059669 100%);
}
.login-card {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
  backdrop-filter: blur(12px);
  background: rgba(240,253,244,.85);
}
.login-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--fix-dark);
  text-align: center;
  margin-bottom: .25rem;
}
.login-logo span { color: var(--fix-emerald); }

/* ── Sidebar nav (admin) ── */
.admin-sidebar .nav-link {
  color: var(--fix-mid) !important;
  border-radius: 8px;
  padding: .5rem .75rem;
  margin-bottom: .15rem;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
  background: var(--fix-forest);
  color: #fff !important;
}
.admin-sidebar .nav-link.active { font-weight: 600; }

/* ── Alerts ── */
.alert { border-radius: 10px; border: none; }

/* ── Warning banner ── */
.warning-alert {
  background: #fee2e2;
  border: 2px solid var(--fix-red);
  border-radius: var(--radius);
  color: var(--fix-red);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .stat-card .stat-value { font-size: 1rem; }
  .table { font-size: .8rem; }
}

/* ── Nav user block ── */
.nav-user-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}
.nav-user-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--fix-dark);
}
.nav-user-role {
  font-size: .68rem;
  font-weight: 700;
  padding: .05rem .35rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.role-admin   { background: #fee2e2; color: #991b1b; }
.role-manager { background: #fef3c7; color: #92400e; }
.role-user    { background: #e2e8f0; color: #475569; }
.btn-logout {
  background: none;
  border: 1px solid var(--fix-border);
  color: var(--fix-red);
  border-radius: 6px;
  padding: .2rem .6rem;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.btn-logout:hover {
  background: #fee2e2;
  border-color: var(--fix-red);
}
/* Hide Bootstrap dropdown caret on icon-only nav items */
.nav-no-caret::after { display: none !important; }

/* ── Custom icons ── */
.nav-icon {
  width: 57px; height: 57px;
  object-fit: contain;
  vertical-align: middle;
  mix-blend-mode: multiply;
  opacity: .85;
  flex-shrink: 0;
}
.nav-icon-sm {
  width: 47px; height: 47px;
  object-fit: contain;
  vertical-align: middle;
  mix-blend-mode: multiply;
  opacity: .85;
  flex-shrink: 0;
}
.content-icon {
  object-fit: contain;
  mix-blend-mode: multiply;
}
[data-bs-theme="dark"] .content-icon {
  filter: invert(1);
  mix-blend-mode: screen;
}

/* ── Dark mode – Bootstrap CSS variable overrides ── */
[data-bs-theme="dark"] {
  --bs-body-bg:                   #071a0d;
  --bs-body-bg-rgb:               7,26,13;
  --bs-body-color:                #b0d8c0;
  --bs-body-color-rgb:            176,216,192;
  --bs-secondary-bg:              #0e2a18;
  --bs-secondary-bg-rgb:          14,42,24;
  --bs-tertiary-bg:               #0a2010;
  --bs-tertiary-bg-rgb:           10,32,16;
  --bs-emphasis-color:            #d0efd8;
  --bs-emphasis-color-rgb:        208,239,216;
  --bs-secondary-color:           #608060;
  --bs-secondary-color-rgb:       96,128,96;
  --bs-border-color:              #1e422d;
  --bs-border-color-translucent:  rgba(176,216,192,.15);
  --bs-link-color:                #4ade80;
  --bs-link-color-rgb:            74,222,128;
  --bs-link-hover-color:          #86efac;
  --bs-heading-color:             #c8e8d0;
}

/* ── Dark mode – component overrides ── */
[data-bs-theme="dark"] body {
  background: #071a0d;
  color: #b0d8c0;
}
[data-bs-theme="dark"] .card {
  background: #0e2a18;
  border-color: #1e422d;
}
[data-bs-theme="dark"] .card-header {
  background: #123a20;
  color: #4ade80;
  border-color: #1e422d;
  font-weight: 600;
  letter-spacing: .02em;
}
/* Tables */
[data-bs-theme="dark"] .table {
  color: #b0d8c0;
  --bs-table-bg: transparent;
}
[data-bs-theme="dark"] .table thead th {
  background: #0a301a;
  color: #4ade80;
  border-color: #1e422d;
}
[data-bs-theme="dark"] .table > :not(caption) > * > * {
  border-color: #1e422d;
  background-color: transparent;
}
[data-bs-theme="dark"] .table tbody tr:hover td {
  background: #0e3820 !important;
}
/* Fix table-danger in dark mode */
[data-bs-theme="dark"] .table-danger,
[data-bs-theme="dark"] .table-danger td,
[data-bs-theme="dark"] .table-danger th {
  --bs-table-bg: rgba(220,38,38,.15) !important;
  --bs-table-hover-bg: rgba(220,38,38,.28) !important;
  background-color: rgba(220,38,38,.15) !important;
  color: #b0d8c0 !important;
}
[data-bs-theme="dark"] .table-danger:hover td,
[data-bs-theme="dark"] .table tbody tr.table-danger:hover td {
  background: rgba(220,38,38,.28) !important;
  color: #b0d8c0 !important;
}
[data-bs-theme="dark"] .table-danger a,
[data-bs-theme="dark"] .table-danger td a,
[data-bs-theme="dark"] .table-danger th a {
  color: #b0d8c0 !important;
}
[data-bs-theme="dark"] .table-danger a:hover,
[data-bs-theme="dark"] .table-danger td a:hover {
  color: #d0f4e0 !important;
}
/* Modals */
[data-bs-theme="dark"] .modal-content {
  background: #0e2a18;
  color: #b0d8c0;
  border-color: #1e422d;
}
[data-bs-theme="dark"] .modal-header {
  border-color: #1e422d;
}
/* Forms */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background: #071a0d;
  border-color: #2a553d;
  color: #b0d8c0;
}
[data-bs-theme="dark"] .form-control::placeholder { color: #4a7060; }
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  background: #071a0d;
  color: #d0efd8;
  border-color: #4ade80;
  box-shadow: 0 0 0 0.2rem rgba(74,222,128,.2);
}
[data-bs-theme="dark"] .form-text,
[data-bs-theme="dark"] .form-check-label { color: #608060; }
/* Alerts */
[data-bs-theme="dark"] .alert-info    { background: #0a1e25; color: #7ab0d8; border-color: #1a3a45; }
[data-bs-theme="dark"] .alert-warning { background: #1e1500; color: #c09030; border-color: #3a2a00; }
[data-bs-theme="dark"] .alert-danger  { background: #1e0a0a; color: #c07070; border-color: #3a1515; }
[data-bs-theme="dark"] .alert-success { background: #051a10; color: #50a070; border-color: #0a3020; }
/* Dropdown */
[data-bs-theme="dark"] .dropdown-menu {
  background: #0e2a18;
  border-color: #1e422d;
}
[data-bs-theme="dark"] .dropdown-item { color: #b0d8c0; }
[data-bs-theme="dark"] .dropdown-item:hover { background: #1e422d; color: #d0efd8; }
[data-bs-theme="dark"] .dropdown-divider { border-color: #1e422d; }
/* Footer */
[data-bs-theme="dark"] footer { border-top-color: #1e422d !important; color: #4a7060; }
[data-bs-theme="dark"] footer a { color: #4a7060 !important; }
/* Warning */
[data-bs-theme="dark"] .warning-badge { background: rgba(220,38,38,.25); color: #f87171; border-color: rgba(220,38,38,.4); }
[data-bs-theme="dark"] .warning-alert { background: rgba(220,38,38,.15); border-color: rgba(220,38,38,.4); color: #f87171; }
/* Status badges */
[data-bs-theme="dark"] .status-pending    { background: rgba(120,80,0,.25); color: #b09040; border-color: rgba(120,80,0,.4); }
[data-bs-theme="dark"] .status-ok         { background: rgba(0,80,40,.25);  color: #50a070; border-color: rgba(0,80,40,.4); }
[data-bs-theme="dark"] .status-overdue    { background: rgba(220,38,38,.2); color: #f87171; border-color: rgba(220,38,38,.4); }
[data-bs-theme="dark"] .status-completed  { background: rgba(30,66,45,.5);  color: #5090a0; border-color: rgba(30,66,45,.8); }
/* Asset status badges dark mode */
[data-bs-theme="dark"] .asset-status-active         { background: rgba(0,80,40,.25);  color: #50a070; border-color: rgba(0,80,40,.4); }
[data-bs-theme="dark"] .asset-status-inactive       { background: rgba(30,45,66,.5);  color: #5070a0; border-color: rgba(30,45,66,.8); }
[data-bs-theme="dark"] .asset-status-decommissioned { background: rgba(220,38,38,.2); color: #f87171; border-color: rgba(220,38,38,.4); }
/* Finding severity badges dark mode */
[data-bs-theme="dark"] .finding-badge-gering   { background: rgba(30,64,175,.25); color: #60a5fa; border-color: rgba(30,64,175,.4); }
[data-bs-theme="dark"] .finding-badge-mittel   { background: rgba(120,80,0,.25);  color: #b09040; border-color: rgba(120,80,0,.4); }
[data-bs-theme="dark"] .finding-badge-hoch     { background: rgba(154,52,18,.25); color: #fb923c; border-color: rgba(154,52,18,.4); }
[data-bs-theme="dark"] .finding-badge-kritisch { background: rgba(220,38,38,.2);  color: #f87171; border-color: rgba(220,38,38,.4); }
/* Buttons */
[data-bs-theme="dark"] .btn-outline-secondary { color: #608060; border-color: #2a553d; }
[data-bs-theme="dark"] .btn-outline-secondary:hover { background: #1e422d; color: #b0d8c0; }
[data-bs-theme="dark"] .btn-outline-primary  { color: #4ade80; border-color: #2a6040; }
[data-bs-theme="dark"] .btn-outline-primary:hover { background: #1a422d; color: #86efac; }
[data-bs-theme="dark"] .btn-outline-danger  { color: #f87171; border-color: #4a1a1a; }
[data-bs-theme="dark"] .btn-outline-warning { color: #c09040; border-color: #4a3a10; }
[data-bs-theme="dark"] .btn-outline-success { color: #50a070; border-color: #0a3020; }
/* Text */
[data-bs-theme="dark"] .text-dark   { color: #b0d8c0 !important; }
[data-bs-theme="dark"] .text-body   { color: #b0d8c0 !important; }
[data-bs-theme="dark"] .text-muted  { color: #4a7060 !important; }
[data-bs-theme="dark"] .fw-semibold { color: #c8e8d0 !important; }
/* General link color in dark mode */
[data-bs-theme="dark"] a:not(.btn):not(.nav-link):not(.navbar-brand):not(.dropdown-item):not(.lang-toggle-btn) {
  color: #4ade80;
}
[data-bs-theme="dark"] a:not(.btn):not(.nav-link):not(.navbar-brand):not(.dropdown-item):not(.lang-toggle-btn):hover {
  color: #86efac;
}
[data-bs-theme="dark"] code { color: #16a34a; background: rgba(0,0,0,.3); padding: .1em .3em; border-radius: 4px; }
/* Admin sidebar */
[data-bs-theme="dark"] .admin-sidebar .nav-link { color: #608060 !important; }
[data-bs-theme="dark"] .admin-sidebar .nav-link:hover,
[data-bs-theme="dark"] .admin-sidebar .nav-link.active { background: #1e422d; color: #b0d8c0 !important; }
/* Badge in dark mode */
[data-bs-theme="dark"] .badge.bg-warning { color: #1a1200 !important; }
/* Theme toggle button */
.theme-toggle-btn {
  background: none;
  border: 1px solid var(--fix-border);
  color: var(--fix-mid);
  border-radius: 6px;
  padding: .2rem .5rem;
  font-size: .85rem;
  cursor: pointer;
  transition: all .15s;
}
.theme-toggle-btn:hover {
  background: rgba(26,46,26,.08);
  color: var(--fix-dark);
  border-color: var(--fix-mid);
}
/* Lang toggle */
.lang-toggle-btn {
  background: none;
  border: 1px solid var(--fix-border);
  color: var(--fix-mid);
  border-radius: 6px;
  padding: .2rem .5rem;
  font-size: .8rem;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
}
.lang-toggle-btn:hover {
  background: rgba(26,46,26,.08);
  color: var(--fix-dark);
  border-color: var(--fix-mid);
}
.lang-toggle-btn.active {
  background: rgba(22,163,74,.15);
  border-color: #16a34a;
  color: #16a34a;
}
/* Dark mode: invert nav icons */
[data-bs-theme="dark"] .nav-icon,
[data-bs-theme="dark"] .nav-icon-sm {
  filter: invert(1);
  mix-blend-mode: screen;
}
/* Dark mode navbar */
[data-bs-theme="dark"] .navbar {
  background: #0a200f !important;
  border-bottom-color: #1e422d;
}
[data-bs-theme="dark"] .nav-link { color: #4ade80 !important; }
[data-bs-theme="dark"] .nav-link:hover,
[data-bs-theme="dark"] .nav-link.active { color: #d0f4e0 !important; }
[data-bs-theme="dark"] .theme-toggle-btn {
  border-color: #2a553d; color: #4ade80;
}
[data-bs-theme="dark"] .theme-toggle-btn:hover {
  background: rgba(74,222,128,.1); color: #d0f4e0; border-color: #4ade80;
}
[data-bs-theme="dark"] .lang-toggle-btn {
  border-color: #2a553d; color: #4ade80;
}
[data-bs-theme="dark"] .lang-toggle-btn:hover {
  background: rgba(74,222,128,.1); color: #d0f4e0; border-color: #4ade80;
}
[data-bs-theme="dark"] .lang-toggle-btn.active {
  background: rgba(22,163,74,.2); border-color: #16a34a; color: #16a34a;
}
[data-bs-theme="dark"] .navbar-toggler { border-color: #2a553d; }
[data-bs-theme="dark"] .navbar-toggler-icon { filter: invert(1); }

/* ══════════════════════════════════════════════════════════
   Asset list – card rows (touch-optimized)
   ══════════════════════════════════════════════════════════ */
.vlist { display: flex; flex-direction: column; gap: .5rem; }

.vlist-row {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--fix-border);
  border-radius: var(--radius);
  background: #fafffc;
  overflow: hidden;
  transition: box-shadow .12s, border-color .12s;
  min-height: 72px;
}
.vlist-row:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  border-color: var(--fix-forest);
}

/* Warning row */
.vlist-row-warning {
  border-left: 4px solid var(--fix-red);
  background: #fef8f7;
}

/* ── Status strip (4px left border) ── */
.vlist-status-strip {
  width: 5px;
  flex-shrink: 0;
}
.vlist-row-warning .vlist-status-strip { display: none; }
.vlist-strip-pending    { background: #f59e0b; }
.vlist-strip-ok         { background: var(--fix-green); }
.vlist-strip-overdue    { background: var(--fix-red); }
.vlist-strip-completed  { background: #94a3b8; }

/* ── Clickable main area ── */
.vlist-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 1rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.vlist-body:hover { color: inherit; }

.vlist-info { flex: 1; min-width: 0; }

.vlist-name {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--fix-dark);
}
.vlist-meta {
  font-size: .82rem;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .15rem;
  margin-top: .15rem;
}
.vlist-sep::before {
  content: '\00b7';
  margin: 0 .3rem;
  color: #94a3b8;
}

.vlist-zones {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: .35rem;
}
.vlist-zone-badge {
  display: inline-block;
  padding: .1rem .45rem;
  border-radius: 4px;
  font-size: .7rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}

.vlist-times {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .25rem;
  text-align: right;
}
.vlist-time-label {
  font-size: .8rem;
  color: #64748b;
  white-space: nowrap;
}
.vlist-status-badge {
  border-radius: 6px;
  font-size: .78rem;
  padding: .2rem .6rem;
}
.vlist-presence-warn {
  font-size: .72rem;
  color: var(--fix-red);
  font-weight: 600;
}
.vlist-presence-ok {
  font-size: .72rem;
  color: var(--fix-green);
  font-weight: 600;
}

/* ── Action buttons (large, touch-friendly) ── */
.vlist-actions {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
}
.vlist-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: filter .12s, background .12s;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  min-height: 44px;
}
.vlist-btn:active { filter: brightness(.85); }

.vlist-btn-icon {
  width: 26px;
  height: 26px;
  margin-bottom: .15rem;
}
.vlist-btn-label {
  font-size: .68rem;
  letter-spacing: .02em;
  line-height: 1.2;
  text-align: center;
}

.vlist-btn-checkin {
  background: #dcfce7;
  color: #166534;
}
.vlist-btn-checkin:hover { background: #bbf7d0; }

.vlist-btn-checkout {
  background: #f1f5f9;
  color: #475569;
}
.vlist-btn-checkout:hover { background: #e2e8f0; }

.vlist-btn-done {
  background: transparent;
  color: #94a3b8;
  cursor: default;
  width: 56px;
}

/* ── Full-HD ── */
@media (min-width: 1400px) {
  .vlist-body { padding: .85rem 1.25rem; }
  .vlist-name { font-size: 1.1rem; }
  .vlist-btn { width: 90px; }
  .vlist-btn-icon { width: 28px; height: 28px; }
}

/* ── Tablet / Touch ── */
@media (max-width: 768px) {
  .vlist-body {
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem;
    padding: .65rem .75rem;
  }
  .vlist-times {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
  }
  .vlist-btn { width: 68px; }
  .vlist-btn-icon { width: 24px; height: 24px; }
  .vlist-btn-label { font-size: .62rem; }
}

/* ── Dark mode list ── */
[data-bs-theme="dark"] .vlist-row {
  background: #0e2a18;
  border-color: #1e422d;
}
[data-bs-theme="dark"] .vlist-row:hover {
  border-color: #4ade80;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
[data-bs-theme="dark"] .vlist-row-warning {
  background: rgba(220,38,38,.1);
  border-left-color: var(--fix-red);
}
[data-bs-theme="dark"] .vlist-name { color: #c8e8d0; }
[data-bs-theme="dark"] .vlist-meta { color: #4a7060; }
[data-bs-theme="dark"] .vlist-sep::before { color: #2a553d; }
[data-bs-theme="dark"] .vlist-time-label { color: #4a7060; }
[data-bs-theme="dark"] .vlist-btn-checkin {
  background: rgba(0,80,40,.25);
  color: #50c080;
}
[data-bs-theme="dark"] .vlist-btn-checkin:hover { background: rgba(0,80,40,.4); }
[data-bs-theme="dark"] .vlist-btn-checkout {
  background: rgba(30,66,45,.5);
  color: #4ade80;
}
[data-bs-theme="dark"] .vlist-btn-checkout:hover { background: rgba(30,66,45,.8); }
[data-bs-theme="dark"] .vlist-btn-done { color: #2a553d; }

/* ── Settings page (Chrome-style flat rows) ── */
.settings-section-title {
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--fix-mid);
  margin: 2rem 0 .6rem;
  padding-left: .25rem;
}
.settings-section-title:first-child { margin-top: .5rem; }

.settings-panel {
  border: 1px solid var(--fix-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fafffc;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--fix-border);
  min-height: 56px;
}
.settings-row:last-child { border-bottom: none; }

.settings-row-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background .12s;
}
.settings-row-link:hover {
  background: rgba(21,128,61,.08);
  color: inherit;
}

.settings-row-stacked {
  flex-direction: column;
  align-items: stretch;
  gap: .5rem;
}

.settings-label { flex: 1; min-width: 0; }
.settings-label-main {
  font-size: .92rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--fix-dark);
}
.settings-label-desc {
  font-size: .78rem;
  color: #64748b;
  line-height: 1.35;
  margin-top: .15rem;
}

.settings-control { flex-shrink: 0; }
.settings-control-wide { width: 100%; }

.settings-select {
  min-width: 150px;
  border-radius: 8px;
  font-size: .85rem;
}

.settings-toggle {
  width: 2.8em !important;
  height: 1.5em;
  cursor: pointer;
}

.settings-chevron {
  font-size: 1.4rem;
  font-weight: 300;
  color: #94a3b8;
  line-height: 1;
}

.settings-save-row {
  margin: 1rem 0 1.5rem;
  text-align: right;
}

/* Dark mode settings */
[data-bs-theme="dark"] .settings-panel {
  background: #0e2a18;
  border-color: #1e422d;
}
[data-bs-theme="dark"] .settings-row {
  border-bottom-color: #1e422d;
}
[data-bs-theme="dark"] .settings-row-link:hover {
  background: rgba(74,222,128,.06);
}
[data-bs-theme="dark"] .settings-label-main {
  color: #c8e8d0;
}
[data-bs-theme="dark"] .settings-label-desc {
  color: #4a7060;
}
[data-bs-theme="dark"] .settings-section-title {
  color: #608060;
}
[data-bs-theme="dark"] .settings-chevron {
  color: #4a7060;
}
[data-bs-theme="dark"] .settings-select {
  background: #071a0d;
  border-color: #2a553d;
  color: #b0d8c0;
}

/* Result cards */
.result-granted {
  background: #dcfce7;
  border: 2px solid #16a34a;
  border-radius: 12px;
  color: #166534;
  padding: 1.5rem;
  text-align: center;
}
.result-denied {
  background: #fee2e2;
  border: 2px solid #dc2626;
  border-radius: 12px;
  color: #dc2626;
  padding: 1.5rem;
  text-align: center;
}

/* ═══ Asset Cards ═══ */
.asset-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.1), 0 0 0 1px rgba(0,0,0,.04);
  transition: box-shadow .2s, transform .15s;
  background: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 0;
}
.asset-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
  transform: translateY(-2px);
}
.asset-card-active  { }
.asset-card-inactive { opacity: .5; filter: grayscale(.4); }
.asset-card-inactive:hover { opacity: .85; filter: none; }
.asset-card-decommissioned { opacity: .4; filter: grayscale(.6); }
.asset-card-overdue { box-shadow: 0 2px 10px rgba(0,0,0,.1), 0 0 0 2px var(--fix-red); }

/* Header – Green bar */
.asset-card-header {
  background: linear-gradient(135deg, var(--fix-emerald) 0%, #059669 100%);
  color: #fff;
  padding: 3px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
}
.asset-card-header-title {
  font-size: .5rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.asset-card-header-brand {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: .5rem;
  font-weight: 700;
  opacity: .9;
}
.asset-card-logo {
  width: 14px;
  height: 14px;
  border-radius: 2px;
}

/* Body */
.asset-card-inner {
  display: flex;
  gap: 8px;
  padding: 6px 8px 4px;
  align-items: flex-start;
  flex: 1;
}

/* Photo */
.asset-card-photo {
  flex-shrink: 0;
  width: 48px;
  height: 62px;
}
.asset-card-photo img {
  width: 48px;
  height: 62px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid #d1d5db;
}
.asset-card-nophoto {
  width: 48px;
  height: 62px;
  border-radius: 2px;
  background: #e5e7eb;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .03em;
  border: 1px solid #d1d5db;
}

/* Data */
.asset-card-data {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.asset-card-label {
  font-size: .42rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: .05em;
  line-height: 1;
  margin-top: 1px;
}
.asset-card-label:first-child { margin-top: 0; }
.asset-card-name {
  font-size: .78rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: .02em;
}
.asset-card-type {
  font-size: .68rem;
  font-weight: 600;
  color: #374151;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.asset-card-location {
  font-size: .58rem;
  color: #4b5563;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.asset-card-serial {
  font-size: .6rem;
  font-family: monospace;
  font-weight: 700;
  color: #111827;
  letter-spacing: .03em;
}

/* Tags bar */
.asset-card-tags-bar {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  flex-wrap: wrap;
  border-top: 1px solid #f3f4f6;
}
.asset-card-tags-bar .vlist-zone-badge {
  font-size: .48rem;
  padding: .02rem .25rem;
  border-radius: 2px;
}

/* Maintenance date */
.asset-card-maintenance {
  font-size: .5rem;
  color: #9ca3af;
  padding: 0 8px 2px;
  font-style: italic;
}

/* Status bar */
.asset-card-status {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: .55rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.asset-card-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.asset-card-status-active {
  background: #dcfce7;
  color: #166534;
}
.asset-card-status-active .asset-card-status-dot {
  background: #16a34a;
  box-shadow: 0 0 4px rgba(22,163,74,.5);
}
.asset-card-status-inactive {
  background: #f1f5f9;
  color: #94a3b8;
}
.asset-card-status-inactive .asset-card-status-dot { background: #94a3b8; }
.asset-card-status-decommissioned {
  background: #fee2e2;
  color: #991b1b;
}
.asset-card-status-decommissioned .asset-card-status-dot { background: #dc2626; }

/* Dark mode asset cards */
[data-bs-theme="dark"] .asset-card { background: #111827; }
[data-bs-theme="dark"] .asset-card-header { background: linear-gradient(135deg, #15803d 0%, #065f46 100%); }
[data-bs-theme="dark"] .asset-card-name { color: #e5e7eb; }
[data-bs-theme="dark"] .asset-card-type { color: #d1d5db; }
[data-bs-theme="dark"] .asset-card-serial { color: #e5e7eb; }
[data-bs-theme="dark"] .asset-card-nophoto { background: #1f2937; border-color: #374151; color: #6b7280; }
[data-bs-theme="dark"] .asset-card-photo img { border-color: #374151; }
[data-bs-theme="dark"] .asset-card-tags-bar { border-color: #1f2937; }
[data-bs-theme="dark"] .asset-card-status-active { background: #052e16; color: #6ee7a8; }
[data-bs-theme="dark"] .asset-card-status-inactive { background: #111827; color: #6b7280; }
[data-bs-theme="dark"] .asset-card-status-decommissioned { background: #1e0a0a; color: #f87171; }

/* Footer: status + actions */
.asset-card-footer {
  border-top: 1px solid rgba(0,0,0,.08);
  margin-top: auto;
  background: #f0fdf4;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}
.asset-card-actions {
  display: flex;
  gap: 4px;
  padding: 6px 8px 7px;
  align-items: center;
}
.asset-action-btn {
  border: none;
  border-radius: 5px;
  padding: .3rem .65rem;
  font-size: .68rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
  min-height: 30px;
  display: inline-flex;
  align-items: center;
}
.asset-action-btn:active { transform: scale(.95); }
.asset-action-maintain {
  background: #16a34a;
  color: #fff;
}
.asset-action-maintain:hover { background: #15803d; box-shadow: 0 2px 8px rgba(22,163,74,.4); }
.asset-action-decommission {
  background: #64748b;
  color: #fff;
}
.asset-action-decommission:hover { background: #475569; }

[data-bs-theme="dark"] .asset-action-maintain { background: #16a34a; color: #fff; }
[data-bs-theme="dark"] .asset-action-decommission { background: #475569; color: #fff; }
[data-bs-theme="dark"] .asset-card-footer { border-color: rgba(255,255,255,.06); background: #0a1810; }

@media (max-width: 576px) {
  .asset-card { aspect-ratio: auto; }
  .asset-card-photo { width: 44px; height: 56px; }
  .asset-card-photo img { width: 44px; height: 56px; }
  .asset-card-nophoto { width: 44px; height: 56px; font-size: .8rem; }
  .asset-card-name { font-size: .72rem; }
  .asset-card-inner { padding: 6px; gap: 6px; }
}

/* ══════════════════════════════════════════════════════════
   Maintenance Checklist – touch-optimized large checkboxes
   ══════════════════════════════════════════════════════════ */
.maintenance-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  border: 1px solid var(--fix-border);
  border-radius: var(--radius);
  background: #fafffc;
  min-height: 56px;
  cursor: pointer;
  transition: background .12s, border-color .12s, box-shadow .12s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.checklist-item:hover {
  background: #e8f8ee;
  border-color: var(--fix-forest);
}
.checklist-item:active {
  box-shadow: inset 0 1px 3px rgba(0,0,0,.1);
}

.checklist-item input[type="checkbox"] {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  accent-color: var(--fix-emerald);
  cursor: pointer;
  border-radius: 6px;
  flex-shrink: 0;
}

.checklist-item label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--fix-dark);
  cursor: pointer;
  line-height: 1.4;
  flex: 1;
}

.checklist-item.checked {
  background: #dcfce7;
  border-color: #86efac;
}
.checklist-item.checked label {
  color: #166534;
  text-decoration: line-through;
  text-decoration-color: rgba(22,101,52,.4);
}

.checklist-item .checklist-note {
  font-size: .78rem;
  color: #64748b;
  margin-top: .15rem;
}

/* Touch-friendly: ensure min 44px touch targets */
@media (pointer: coarse) {
  .checklist-item {
    min-height: 56px;
    padding: 1rem 1.1rem;
  }
  .checklist-item input[type="checkbox"] {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
  }
  .checklist-item label {
    font-size: 1.05rem;
  }
  .vlist-btn {
    min-height: 56px;
    width: 80px;
  }
  .btn-fix,
  .asset-action-btn {
    min-height: 44px;
    padding: .5rem 1rem;
  }
}

/* Dark mode checklist */
[data-bs-theme="dark"] .checklist-item {
  background: #0e2a18;
  border-color: #1e422d;
  color: #b0d8c0;
}
[data-bs-theme="dark"] .checklist-item:hover {
  background: #123a20;
  border-color: #4ade80;
}
[data-bs-theme="dark"] .checklist-item label {
  color: #c8e8d0;
}
[data-bs-theme="dark"] .checklist-item.checked {
  background: rgba(0,80,40,.25);
  border-color: rgba(0,80,40,.5);
}
[data-bs-theme="dark"] .checklist-item.checked label {
  color: #50c080;
}
[data-bs-theme="dark"] .checklist-item .checklist-note {
  color: #4a7060;
}

/* ══════════════════════════════════════════════════════════
   QR Label – print-ready styling
   ══════════════════════════════════════════════════════════ */
.qr-label {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding: .75rem;
  border: 2px solid #1a2e1a;
  border-radius: 8px;
  background: #fff;
  text-align: center;
  width: 200px;
}
.qr-label img,
.qr-label svg,
.qr-label canvas {
  width: 150px;
  height: 150px;
}
.qr-label-title {
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #1a2e1a;
}
.qr-label-id {
  font-size: .6rem;
  font-family: monospace;
  font-weight: 700;
  color: #374151;
}
.qr-label-name {
  font-size: .75rem;
  font-weight: 600;
  color: #1a2e1a;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════
   Print styles – QR labels & reports
   ══════════════════════════════════════════════════════════ */
@media print {
  /* Hide non-printable elements */
  .navbar,
  .admin-sidebar,
  .btn-logout,
  .theme-toggle-btn,
  .lang-toggle-btn,
  footer,
  .no-print {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 10pt;
  }

  .card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  .card-header {
    background: #eee !important;
    color: #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* QR labels: grid for label sheets */
  .qr-label-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10mm;
    justify-content: flex-start;
  }
  .qr-label {
    border: 1px solid #000;
    border-radius: 4px;
    break-inside: avoid;
    page-break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Tables */
  .table thead th {
    background: #ddd !important;
    color: #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .table { font-size: 9pt; }

  /* Checklist print */
  .checklist-item {
    border: 1px solid #ccc;
    break-inside: avoid;
  }
  .checklist-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
  }

  /* Asset cards in print */
  .asset-card {
    box-shadow: none !important;
    break-inside: avoid;
  }
  .asset-card-header {
    background: #16a34a !important;
    color: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Finding badges should show color in print */
  .finding-badge-gering,
  .finding-badge-mittel,
  .finding-badge-hoch,
  .finding-badge-kritisch,
  .asset-status-active,
  .asset-status-inactive,
  .asset-status-decommissioned {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
