/* ═══════════════════════════════════════════════════════
   WARTUNGSÜBERSICHT – Stylesheet
   Design: Industrial-Professional (dunkelblau / stahlgrau)
   Font: DM Sans + DM Mono
═══════════════════════════════════════════════════════ */

:root {
  --app-height: 100dvh;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --c-bg: #f0f4f8;
  --c-surface: #ffffff;
  --c-sidebar: #0f1e35;
  --c-sidebar-hover: #1a2f4a;
  --c-sidebar-active: #1e3a5f;
  --c-sidebar-text: #94afc8;
  --c-sidebar-text-bright: #e2eaf4;
  --c-sidebar-border: rgba(255,255,255,0.06);
  --c-accent: #3b82f6;
  --c-accent-dark: #2563eb;
  --c-accent-light: #eff6ff;
  --c-text: #1e293b;
  --c-text-muted: #64748b;
  --c-border: #e2e8f0;
  --c-danger: #ef4444;
  --c-danger-light: #fef2f2;
  --c-success: #22c55e;
  --c-warning: #f59e0b;
  --c-excel: #16a34a;
  --c-pdf: #dc2626;
  --c-q-header: #dbeafe;
  --c-q-border: #93c5fd;
  --c-group-bg: #1e3a5f;
  --c-group-text: #e2eaf4;
  --sidebar-width: 240px;
  --topbar-height: 64px;
  --radius: 8px;
  --radius-sm: 5px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.18);
  --font: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'DM Mono', monospace;
  --transition: 0.18s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-text);
  color-scheme: light;
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

/* ─── Utilities ─────────────────────────────────────── */
.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════
   LOGIN
═══════════════════════════════════════════════════════ */
.login-overlay {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #0f1e35 0%, #1a3557 50%, #0f2744 100%);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}

.login-card {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  width: 360px;
  box-shadow: var(--shadow-lg);
}

.login-logo {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 2rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-text);
}

.app-logo {
  display: block;
  flex-shrink: 0;
  object-fit: contain;
  object-position: center;
}

.app-logo-login {
  width: 46px;
  height: 46px;
}

.login-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.login-sub {
  color: var(--c-text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.input-wrap { margin-bottom: 0.75rem; }
.input-wrap input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  outline: none;
}
.input-wrap input:focus { border-color: var(--c-accent); }

.auth-panel {
  display: block;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 3rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--c-text-muted);
  cursor: pointer;
}

.password-toggle:hover {
  background: #f1f5f9;
  color: var(--c-text);
}

.auth-link {
  display: inline-block;
  margin: -0.15rem 0 0.8rem;
  border: none;
  background: transparent;
  color: var(--c-accent-dark);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.auth-divider {
  height: 1px;
  margin: 1rem 0;
  background: var(--c-border);
}

.login-actions {
  display: grid;
  gap: 0.65rem;
}

.login-captcha {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: #f8fafc;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}

.login-captcha label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--c-text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.login-captcha input {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  color: var(--c-text);
  font-family: var(--font);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.login-captcha input:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.login-error {
  color: var(--c-danger);
  font-size: 0.825rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--c-danger-light);
  border-radius: var(--radius-sm);
}

.btn-full { width: 100%; }

/* ═══════════════════════════════════════════════════════
   APP LAYOUT
═══════════════════════════════════════════════════════ */
.app {
  display: flex;
  height: var(--app-height);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

.mobile-menu-btn,
.sidebar-backdrop {
  display: none;
}

/* ─── SIDEBAR ───────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--c-sidebar);
  display: flex;
  flex-direction: column;
  height: var(--app-height);
  min-height: 100vh;
  min-height: 100dvh;
  max-height: var(--app-height);
  overflow: hidden;
  overscroll-behavior: contain;
  padding-bottom: var(--safe-bottom);
  flex-shrink: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.sidebar-header {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--c-sidebar-border);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex; align-items: center; gap: 0.75rem;
}

.app-logo-sidebar {
  width: 34px;
  height: 34px;
}
.sidebar-logo-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--c-sidebar-text-bright);
  line-height: 1.1;
}

.sidebar-section-label {
  padding: 1rem 1rem 0.35rem;
  font-size: 0.675rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-sidebar-text);
  opacity: 0.7;
}

.sidebar-section-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-right: 0.55rem;
}

.sidebar-section-row .sidebar-section-label {
  padding-right: 0.35rem;
}

.sidebar-gear-btn {
  width: 30px;
  height: 30px;
  margin-bottom: 0.18rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--c-sidebar-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}

.sidebar-gear-btn:hover {
  background: var(--c-sidebar-hover);
  color: var(--c-sidebar-text-bright);
}

.employee-list {
  list-style: none;
  padding: 0 0.5rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.employee-list-empty {
  padding: 0.75rem 0.75rem;
  color: var(--c-sidebar-text);
  font-size: 0.825rem;
  font-style: italic;
}

.employee-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--c-sidebar-text);
  font-size: 0.875rem;
  font-weight: 400;
  transition: background var(--transition), color var(--transition);
  user-select: none;
}

.employee-item:hover {
  background: var(--c-sidebar-hover);
  color: var(--c-sidebar-text-bright);
}

.employee-item.active {
  background: var(--c-sidebar-active);
  color: white;
  font-weight: 500;
}

.employee-item .emp-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(59,130,246,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #93c5fd;
  flex-shrink: 0;
}

.employee-item.active .emp-avatar {
  background: rgba(59,130,246,0.5);
  color: white;
}

.sidebar-actions {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-shrink: 0;
}

.btn-sidebar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--c-sidebar-text);
  font-family: var(--font);
  font-size: 0.825rem;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition), color var(--transition);
  width: 100%;
}

.btn-sidebar:hover {
  background: var(--c-sidebar-hover);
  color: var(--c-sidebar-text-bright);
}

.btn-sidebar.active-view {
  background: var(--c-sidebar-active);
  color: white;
}

.btn-sidebar-danger:hover {
  background: rgba(239,68,68,0.15);
  color: #fca5a5;
}

.sidebar-divider {
  height: 1px;
  background: var(--c-sidebar-border);
  margin: 0.75rem 0.5rem;
  flex-shrink: 0;
}

.sidebar-status {
  margin-top: auto;
  padding: 0.875rem 1rem;
  border-top: 1px solid var(--c-sidebar-border);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  flex-shrink: 0;
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-text-muted);
  flex-shrink: 0;
  margin-top: 4px;
  transition: background 0.3s;
}
.status-dot.online { background: var(--c-success); box-shadow: 0 0 6px rgba(34,197,94,0.5); }
.status-dot.offline { background: var(--c-danger); }

.status-info {
  display: flex; flex-direction: column; gap: 0.15rem;
}

#status-text {
  font-size: 0.75rem;
  color: var(--c-sidebar-text);
}

.status-updated {
  font-size: 0.675rem;
  color: var(--c-sidebar-text);
  opacity: 0.6;
}

.status-user {
  color: var(--c-sidebar-text-bright);
  font-size: 0.78rem;
  font-weight: 700;
}

.audit-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  padding: 0.75rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: #f8fafc;
}

.audit-toolbar label {
  color: var(--c-text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.audit-toolbar select {
  min-width: 190px;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--c-text);
  font-family: var(--font);
  outline: none;
}

.audit-toolbar select:focus {
  border-color: var(--c-accent);
}

.audit-log-list {
  display: grid;
  gap: 0.6rem;
  max-height: min(62vh, 560px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.audit-log-row {
  display: grid;
  grid-template-columns: 145px 110px minmax(130px, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding: 0.75rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: #f8fafc;
  font-size: 0.82rem;
}

.audit-log-time,
.audit-log-user {
  color: var(--c-text-muted);
}

.audit-log-action {
  font-weight: 700;
  color: var(--c-text);
}

.audit-log-details {
  grid-column: 1 / -1;
  color: var(--c-text-muted);
  overflow-wrap: anywhere;
}

.audit-log-target {
  margin-bottom: 0.45rem;
  color: var(--c-text);
  font-weight: 700;
}

.audit-change-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.32fr) minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.audit-change-field {
  color: var(--c-text);
  font-weight: 700;
}

.audit-change-values {
  color: var(--c-text-muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

/* ─── MAIN CONTENT ──────────────────────────────────── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: var(--app-height);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

/* ─── TOPBAR ────────────────────────────────────────── */
.topbar {
  height: var(--topbar-height);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  gap: 1rem;
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-width: 0;
}

.topbar h1 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-text);
  white-space: nowrap;
}

.year-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.825rem;
  color: var(--c-text-muted);
}

.year-selector select {
  padding: 0.3rem 0.6rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.875rem;
  background: white;
  cursor: pointer;
  outline: none;
  color: var(--c-text);
}

.topbar-search {
  width: min(360px, 34vw);
}

.topbar-search input {
  width: 100%;
  min-height: 34px;
  padding: 0.45rem 0.75rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--c-text);
  font-family: var(--font);
  font-size: 0.84rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.topbar-search input:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  min-width: 0;
}

/* ─── BUTTONS ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  border: none;
  font-family: var(--font);
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--c-accent);
  color: white;
}
.btn-primary:hover { background: var(--c-accent-dark); }

.btn-secondary {
  background: var(--c-bg);
  color: var(--c-text);
  border: 1px solid var(--c-border);
}
.btn-secondary:hover { background: var(--c-border); }

.btn-icon {
  background: var(--c-bg);
  color: var(--c-text);
  border: 1px solid var(--c-border);
}
.btn-icon:hover { background: var(--c-border); }

.btn-small {
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
}

.btn-export { background: #dcfce7; color: var(--c-excel); border: 1px solid #86efac; }
.btn-export:hover { background: #bbf7d0; }

.btn-export-pdf { background: #fee2e2; color: var(--c-pdf); border: 1px solid #fca5a5; }
.btn-export-pdf:hover { background: #fecaca; }

.btn-danger { background: var(--c-danger-light); color: var(--c-danger); border: 1px solid #fca5a5; }
.btn-danger:hover { background: #fecaca; }

/* ─── CONTENT AREA ──────────────────────────────────── */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 1rem;
  color: var(--c-text-muted);
  text-align: center;
}

.empty-state h3 { font-size: 1.1rem; color: var(--c-text); }
.empty-state p { max-width: 320px; font-size: 0.875rem; }

/* ─── PROJECT TABLE ─────────────────────────────────── */
.project-table-wrap {
  background: var(--c-surface);
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

table.project-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.825rem;
}

table.project-table th {
  background: var(--c-text);
  color: white;
  padding: 0.6rem 0.75rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

table.project-table th.quarter-th {
  background: #1e3a5f;
  text-align: center;
}

table.project-table th.previous-toggle-th {
  background: var(--c-text);
  padding: 0.45rem 0.6rem;
  text-align: center;
}

.previous-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  user-select: none;
}

.previous-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.previous-toggle-track {
  position: relative;
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.45);
  transition: background var(--transition);
}

.previous-toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform var(--transition);
}

.previous-toggle input:checked + .previous-toggle-track {
  background: #22c55e;
}

.previous-toggle input:checked + .previous-toggle-track::after {
  transform: translateX(16px);
}

table.project-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--c-border);
  vertical-align: middle;
}

table.project-table tr:last-child td { border-bottom: none; }

table.project-table tr.data-row:hover { background: #f8fafc; }

table.project-table tr.sortable-row {
  transition: background var(--transition), opacity var(--transition), box-shadow var(--transition);
}

table.project-table tr.sortable-row.dragging {
  opacity: 0.55;
}

table.project-table tr.sortable-row.drag-over {
  box-shadow: inset 0 0 0 2px var(--c-accent);
}

table.project-table td.quarter-cell {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.775rem;
  color: var(--c-text-muted);
  min-width: 90px;
}

table.project-table td.quarter-cell.filled {
  color: var(--c-text);
  font-weight: 500;
}

table.project-table td.quarter-cell.clickable {
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

table.project-table td.quarter-cell.clickable:hover {
  background: var(--c-accent-light);
  color: var(--c-accent-dark);
}

table.project-table td.quarter-cell.completed {
  background: #dcfce7 !important;
  color: #15803d;
  font-weight: 700;
}

table.project-table td.quarter-cell.completed:hover {
  background: #bbf7d0 !important;
  color: #166534;
}

table.project-table td.quarter-cell.unavailable {
  color: rgba(148, 163, 184, 0.58);
  font-family: var(--font);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

table.project-table td.quarter-cell.previous-date-cell {
  color: rgba(71, 85, 105, 0.48);
  font-family: var(--font);
  line-height: 1.25;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

table.project-table td.quarter-cell.empty.editable-quarter-cell {
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

table.project-table td.quarter-cell.empty.editable-quarter-cell:hover {
  background: #f8fafc;
}

table.project-table td.quarter-cell.empty.editable-quarter-cell:hover::before {
  color: rgba(37, 99, 235, 0.62);
}

table.project-table td.quarter-cell.previous-date-cell:hover {
  background: #f8fafc;
  color: rgba(37, 99, 235, 0.62);
}

table.project-table td.quarter-cell.previous-date-cell:hover .previous-date-label,
table.project-table td.quarter-cell.previous-date-cell:hover .previous-date-value {
  color: rgba(37, 99, 235, 0.62);
}

.previous-date-label {
  display: block;
  color: rgba(100, 116, 139, 0.45);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.previous-date-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: rgba(71, 85, 105, 0.48);
}

table.project-table td.quarter-cell.empty::before {
  content: '—';
  color: #cbd5e1;
}

/* Gruppenzeile */
tr.group-row td {
  background: var(--c-group-bg);
  color: var(--c-group-text);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
  letter-spacing: 0.02em;
}

/* Zebra-Streifen */
table.project-table tr.data-row:nth-child(even) td:not(.group-row td) {
  background: #fafbfc;
}

table.project-table tr.data-row td.quarter-cell.completed {
  background: #dcfce7 !important;
}

.battery-row.battery-due-yellow .battery-due-cell {
  background: #fef3c7 !important;
  color: #92400e !important;
  font-weight: 700;
}

.battery-row.battery-due-red .battery-due-cell {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  font-weight: 700;
}

table.project-table tr.battery-subitem-row td {
  background: #d7dadd !important;
  border-top: none;
}

.battery-location-line {
  display: block;
  margin-top: 0.2rem;
  padding-left: 1.4rem;
  color: var(--c-text);
  font-weight: 500;
}

tr.battery-subitem-row .battery-location-line {
  margin-top: 0;
}

.td-actions {
  white-space: nowrap;
  text-align: right;
}

.td-actions button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  color: var(--c-text-muted);
  transition: all var(--transition);
}
.td-actions button:hover { background: var(--c-bg); color: var(--c-text); }
.td-actions button.delete-btn:hover { color: var(--c-danger); background: var(--c-danger-light); }
.td-actions button.move-btn:hover,
.td-actions button.drag-handle:hover {
  color: var(--c-accent-dark);
  background: var(--c-accent-light);
}

.td-actions button.drag-handle {
  cursor: grab;
}

.td-actions button.drag-handle:active {
  cursor: grabbing;
}

/* ─── MODALS ────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,30,53,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal {
  background: white;
  border-radius: var(--radius);
  width: 440px;
  max-width: 100%;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.modal-wide { width: 620px; }
.modal-schedule {
  width: min(1280px, 98vw);
  height: min(88vh, 820px);
}

.modal-schedule .modal-body {
  transform: translateZ(0);
  will-change: scroll-position;
}
.modal-time-picker { width: 360px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--c-border);
}

.modal-header h3 { font-size: 1rem; font-weight: 700; }

.modal-close {
  background: none; border: none;
  font-size: 1.1rem; cursor: pointer;
  color: var(--c-text-muted);
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.modal-close:hover { background: var(--c-bg); color: var(--c-text); }

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.modal-body p {
  color: var(--c-text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.danger-hint {
  color: var(--c-danger) !important;
  font-weight: 600;
}

.modal-body > label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--c-text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#employee-name-input {
  width: 100%;
  min-height: 46px;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  background: #f8fafc;
  color: var(--c-text);
  font-family: var(--font);
  font-size: 0.95rem;
  outline: none;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

#employee-name-input:hover {
  background: white;
}

#employee-name-input:focus {
  background: white;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

#employee-name-input::placeholder {
  color: #94a3b8;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--c-border);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* ─── FORM ──────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.form-group:last-child { margin-bottom: 0; }

.form-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input,
.form-group select {
  padding: 0.6rem 0.875rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
  color: var(--c-text);
}
.form-group input:focus { border-color: var(--c-accent); }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

.form-group-full { grid-column: 1 / -1; }

.battery-items-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.battery-items-header label {
  margin: 0;
}

.battery-items-list {
  display: grid;
  gap: 0.5rem;
}

.battery-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 88px 34px;
  gap: 0.5rem;
  align-items: center;
}

.battery-item-remove {
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
}

.battery-item-summary {
  display: grid;
  gap: 0.18rem;
}

.battery-item-summary span {
  display: block;
}

.battery-item-summary small {
  color: var(--c-text-muted);
  font-size: 0.72rem;
}

.quarter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.quarter-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.quarter-item span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--c-accent);
  text-align: center;
}

.settings-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.9rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: #f8fafc;
  cursor: pointer;
}

.settings-toggle strong,
.settings-toggle small {
  display: block;
}

.settings-toggle strong {
  color: var(--c-text);
  font-size: 0.92rem;
}

.settings-toggle small {
  margin-top: 0.15rem;
  color: var(--c-text-muted);
  font-size: 0.78rem;
}

.settings-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.settings-toggle-slider {
  position: relative;
  width: 42px;
  height: 23px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background var(--transition);
}

.settings-toggle-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
}

.settings-toggle input:checked + .settings-toggle-slider {
  background: var(--c-accent);
}

.settings-toggle input:checked + .settings-toggle-slider::after {
  transform: translateX(19px);
}

.schedule-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.85rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: #f8fafc;
}

.schedule-toolbar .form-group {
  min-width: 130px;
  margin-bottom: 0;
}

.schedule-toolbar .btn {
  min-height: 38px;
}

.schedule-autosave {
  margin-left: auto;
  padding: 0.48rem 0.7rem;
  border-radius: var(--radius-sm);
  background: var(--c-accent-light);
  color: var(--c-accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.schedule-list {
  display: grid;
  gap: 0.55rem;
  align-content: start;
  padding-right: 0.15rem;
}

.schedule-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.25fr) minmax(280px, 0.9fr) minmax(220px, 0.9fr) 96px 88px;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: white;
  content-visibility: auto;
  contain-intrinsic-size: 76px;
  contain: layout paint style;
}

.schedule-row-free {
  border-style: dashed;
  background: #fbfdff;
}

.schedule-customer {
  min-width: 0;
}

.schedule-customer strong,
.schedule-customer span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-customer strong {
  color: var(--c-text);
  font-size: 0.9rem;
}

.schedule-title-input {
  width: 100%;
  min-height: 34px;
  padding: 0.42rem 0.55rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--c-text);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  outline: none;
}

.schedule-title-input:focus {
  border-color: var(--c-accent);
}

.schedule-customer span,
.schedule-prev span {
  color: var(--c-text-muted);
  font-size: 0.74rem;
}

.schedule-prev strong {
  display: block;
  color: var(--c-text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.schedule-inputs {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 118px;
  gap: 0.55rem;
}

.schedule-inputs input,
.schedule-notes-input,
.schedule-time-button {
  min-height: 36px;
  padding: 0.5rem 0.62rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  color: var(--c-text);
  font-family: var(--font);
  font-size: 0.84rem;
  outline: none;
}

.schedule-time-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: #ffffff;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.schedule-time-button:hover,
.schedule-time-button:focus,
.schedule-notes-input:focus,
.schedule-inputs input:focus {
  border-color: var(--c-accent);
  background: var(--c-accent-light);
  color: var(--c-accent-dark);
}

.schedule-inputs input.input-error {
  border-color: var(--c-danger);
  background: var(--c-danger-light);
}

.schedule-notes-input {
  width: 100%;
}

.schedule-meta {
  justify-self: end;
  min-width: 96px;
  padding: 0.36rem 0.48rem;
  border-radius: var(--radius-sm);
  background: #eef2ff;
  color: #3730a3;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
}

.schedule-row-actions {
  display: grid;
  gap: 0.35rem;
  min-width: 90px;
}

.schedule-row-actions button {
  min-height: 30px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  color: var(--c-text-muted);
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.schedule-row-actions button:hover {
  border-color: var(--c-accent);
  color: var(--c-accent-dark);
  background: var(--c-accent-light);
}

.schedule-empty {
  padding: 2rem;
  border: 1px dashed var(--c-border);
  border-radius: var(--radius);
  color: var(--c-text-muted);
  text-align: center;
}

.time-picker-display {
  margin: 0 auto 0.8rem;
  width: fit-content;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  background: var(--c-accent-light);
  color: var(--c-accent-dark);
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.15;
}

.time-picker-manual {
  margin: 0 auto 0.85rem;
  max-width: 160px;
}

.time-picker-manual input {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
}

.time-picker-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.time-picker-tabs button {
  min-height: 34px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  color: var(--c-text-muted);
  font-family: var(--font);
  font-weight: 700;
  cursor: pointer;
}

.time-picker-tabs button.active {
  border-color: var(--c-accent);
  background: var(--c-accent);
  color: white;
}

.clock-face {
  position: relative;
  width: 270px;
  height: 270px;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0 18%, #eef6ff 19% 100%);
  border: 1px solid #cfe0f5;
  box-shadow: inset 0 0 0 8px rgba(59, 130, 246, 0.05);
}

.clock-face::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c-accent);
  transform: translate(-50%, -50%);
  z-index: 3;
}

.clock-hand {
  position: absolute;
  left: calc(50% - 1px);
  top: calc(50% - 86px);
  width: 2px;
  height: 86px;
  border-radius: 999px;
  background: var(--c-accent);
  transform-origin: 50% 100%;
  z-index: 2;
}

.clock-number {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--c-text);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transform: translate(calc(-50% + var(--clock-x)), calc(-50% + var(--clock-y)));
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  z-index: 4;
}

.clock-number:hover {
  background: #dbeafe;
  color: var(--c-accent-dark);
}

.clock-number.active {
  background: var(--c-accent);
  color: white;
  box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.16);
}

/* ─── MANAGE EMPLOYEES LIST ─────────────────────────── */
.manage-emp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--c-border);
  gap: 1rem;
}
.manage-emp-row:last-child { border-bottom: none; }

.manage-emp-name {
  font-weight: 500;
  flex: 1;
}

.manage-emp-actions {
  display: flex;
  gap: 0.35rem;
}

/* ─── TOAST ─────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--c-text);
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  z-index: 9999;
  animation: slideIn 0.25s ease;
  max-width: 350px;
}

.toast.success { background: var(--c-success); }
.toast.error { background: var(--c-danger); }
.toast.warning { background: var(--c-warning); }

@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ─── SCROLLBAR ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ─── LOADING SPINNER ───────────────────────────────── */
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  body.sidebar-open {
    overflow: hidden;
  }

  .app {
    display: flex;
    height: var(--app-height);
    min-height: var(--app-height);
    overflow: hidden;
  }

  .mobile-menu-btn {
    display: inline-flex;
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 1200;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: white;
    color: var(--c-text);
    box-shadow: var(--shadow-sm);
  }

  body.sidebar-open .mobile-menu-btn {
    display: none;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: auto;
    z-index: 1100;
    width: min(82vw, 320px);
    height: var(--app-height);
    max-height: var(--app-height);
    padding-bottom: calc(var(--safe-bottom) + 1rem);
    transform: translateX(-100%);
    transition: transform var(--transition);
    box-shadow: var(--shadow-lg);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: var(--app-height);
    z-index: 1050;
    background: rgba(15, 30, 53, 0.45);
  }

  body.sidebar-open .sidebar-backdrop {
    display: block;
  }

  .main-content {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: var(--app-height);
    overflow: hidden;
  }

  .sidebar-status {
    padding-bottom: calc(0.875rem + var(--safe-bottom));
  }

  .topbar {
    height: auto;
    min-height: var(--topbar-height);
    align-items: flex-start;
    flex-direction: column;
    padding: 0.85rem 1rem;
    position: sticky;
    top: 0;
    z-index: 20;
  }

  .topbar-left,
  .topbar-right {
    width: 100%;
  }

  .topbar-left {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.55rem;
    padding-left: 3rem;
  }

  .topbar h1 {
    font-size: 1rem;
    white-space: normal;
  }

  .year-selector {
    width: 100%;
    justify-content: space-between;
  }

  .year-selector select {
    min-width: 96px;
  }

  .topbar-search {
    width: 100%;
  }

  .topbar-search input {
    min-height: 40px;
  }

  .topbar-right {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    max-width: none;
    margin: 0 0 1rem;
  }

  .topbar-right .btn {
    justify-content: center;
    min-height: 42px;
    padding: 0.55rem 0.65rem;
    white-space: normal;
    text-align: center;
  }

  .topbar-right .btn-primary {
    grid-column: 1 / -1;
  }

  .content-area {
    flex: 1;
    min-height: 0;
    padding: 1rem;
    overflow-y: auto;
    max-height: none;
    -webkit-overflow-scrolling: touch;
  }

  .content-area > .topbar-right {
    width: 100%;
  }

  .project-table-wrap {
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
  }

  table.project-table,
  table.project-table tbody,
  table.project-table tr,
  table.project-table td {
    display: block;
    width: 100%;
  }

  table.project-table thead {
    display: none;
  }

  .previous-toggle {
    display: none;
  }

  table.project-table tr.data-row {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 0.85rem;
    overflow: hidden;
  }

  table.project-table tr.data-row:hover {
    background: #f8fafc;
  }

  table.project-table tr.data-row:nth-child(even) td:not(.group-row td) {
    background: #fafbfc;
  }

  table.project-table tr.data-row:nth-child(even) td:first-child,
  table.project-table tr.data-row td:first-child {
    background: var(--c-text) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
  }

  table.project-table td {
    display: grid;
    grid-template-columns: minmax(96px, 38%) minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    min-height: 42px;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--c-border);
  }

  table.project-table td::before {
    content: attr(data-label);
    color: var(--c-text-muted);
    font-family: var(--font);
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
  }

  table.project-table td:first-child {
    display: block;
    background: var(--c-text) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
  }

  table.project-table tr.data-row td:first-child,
  table.project-table tr.data-row td:first-child strong {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
  }

  table.project-table td:first-child::before {
    display: block;
    margin-bottom: 0.15rem;
    color: rgba(255, 255, 255, 0.72);
  }

  table.project-table td.quarter-cell {
    min-width: 0;
    text-align: left;
    font-size: 0.85rem;
  }

  table.project-table td.quarter-cell.empty::before {
    content: attr(data-label);
    color: var(--c-text-muted);
  }

  table.project-table td.quarter-cell.empty::after {
    content: '—';
    color: #cbd5e1;
  }

  table.project-table td.quarter-cell.filled {
    color: var(--c-text);
  }

  table.project-table td.quarter-cell.unavailable {
    color: rgba(148, 163, 184, 0.58);
    font-size: 0.68rem;
  }

  table.project-table td.quarter-cell.previous-date-cell {
    color: rgba(71, 85, 105, 0.5);
  }

  .previous-date-label,
  .previous-date-value {
    display: inline;
  }

  .previous-date-label::after {
    content: ': ';
  }

  table.project-table td.quarter-cell.completed,
  table.project-table tr.data-row td.quarter-cell.completed {
    background: #dcfce7 !important;
    color: #15803d;
  }

  table.project-table tr.data-row:nth-child(even) td.quarter-cell.completed {
    background: #dcfce7 !important;
  }

  table.project-table tr.data-row.battery-due-yellow td.battery-due-cell {
    background: #fef3c7 !important;
    color: #92400e !important;
  }

  table.project-table tr.data-row.battery-due-red td.battery-due-cell {
    background: #fee2e2 !important;
    color: #b91c1c !important;
  }

  .td-actions {
    display: flex !important;
    justify-content: flex-end;
    gap: 0.35rem;
    flex-wrap: wrap;
  }

  .td-actions::before {
    margin-right: auto;
  }

  .td-actions button {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid var(--c-border);
  }

  tr.group-row {
    display: block;
    margin: 1rem 0 0.5rem;
  }

  tr.group-row td {
    display: block;
    background: var(--c-group-bg);
    color: var(--c-group-text);
    border-radius: var(--radius-sm);
  }

  tr.group-row td::before {
    content: none;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 92vh;
    border-radius: 14px 14px 0 0;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .modal-footer {
    flex-direction: column-reverse;
  }

  .modal-footer .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .schedule-toolbar,
  .schedule-row {
    grid-template-columns: 1fr;
  }

  .schedule-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-autosave {
    margin-left: 0;
    text-align: center;
  }

  .schedule-row {
    align-items: stretch;
  }

  .schedule-inputs {
    grid-template-columns: 1fr;
  }

  .schedule-meta {
    justify-self: stretch;
  }

  .form-grid,
  .quarter-grid {
    grid-template-columns: 1fr;
  }

  .battery-item-row {
    grid-template-columns: 1fr;
  }

  .battery-item-remove {
    width: 100%;
  }

  .manage-emp-row {
    align-items: stretch;
    flex-direction: column;
  }

  .manage-emp-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-overlay {
    padding: 1rem;
  }

  .login-card {
    width: min(360px, 100%);
    padding: 1.5rem;
  }

  .toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
  }
}

@media (min-width: 861px) and (max-width: 1500px) {
  .topbar {
    height: auto;
    min-height: var(--topbar-height);
    align-items: flex-start;
    flex-wrap: wrap;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .topbar-left {
    flex: 1 1 100%;
    width: 100%;
    gap: 0.85rem;
  }

  .topbar-search {
    width: min(420px, 42vw);
  }

  .topbar-right {
    flex: 1 1 100%;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding-left: 0;
  }

  .topbar-right .btn {
    min-height: 36px;
  }
}

@media (max-width: 420px) {
  .topbar-right {
    grid-template-columns: 1fr;
  }

  table.project-table td {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .td-actions {
    justify-content: flex-start;
  }
}
