:root {
  --lx-green: #00a651;
  --lx-green-dark: #008f45;
  --lx-bg: #f4f6f8;
  --lx-surface: #ffffff;
  --lx-border: #e2e6ea;
  --lx-text: #1a1d21;
  --lx-muted: #5c6570;
  --lx-sidebar: #1e2936;
  --lx-sidebar-hover: #2a3544;
  --lx-customer-accent: #3b82f6;
  --lx-customer-accent-soft: rgba(59, 130, 246, 0.2);
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  color: var(--lx-text);
  background: linear-gradient(165deg, #e8ecf1 0%, var(--lx-bg) 42%, #eef3ef 100%);
  background-attachment: fixed;
}

body.mode-customer {
  background: linear-gradient(165deg, #e8edf5 0%, #f0f4fa 45%, #f4f7fb 100%);
}

body.mode-admin {
  background: linear-gradient(165deg, #e6ece9 0%, var(--lx-bg) 42%, #eef4f0 100%);
}

.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, #1a2330 0%, var(--lx-sidebar) 55%, #18212e 100%);
  color: #e8eaed;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.06);
}

.sidebar--customer {
  box-shadow: 4px 0 28px rgba(59, 130, 246, 0.08);
  border-right: 3px solid var(--lx-customer-accent-soft);
}

.sidebar--admin {
  border-right: 3px solid rgba(0, 166, 81, 0.45);
  box-shadow: 4px 0 28px rgba(0, 166, 81, 0.1);
}

.sidebar-admin-block {
  margin: 0.35rem 0.5rem 0.75rem;
  padding: 0.5rem 0 0.35rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(0, 166, 81, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sidebar-admin-hint {
  margin: 0 0.85rem 0.5rem;
  font-size: 0.68rem;
  line-height: 1.4;
  color: #8b9aab;
}

.nav-section-admin {
  color: #8fe0b8 !important;
  letter-spacing: 0.08em;
}

.nav-item-admin.active {
  background: rgba(0, 166, 81, 0.2);
  border-left-color: #34d399;
}

.sidebar-role-badge {
  display: inline-block;
  margin-top: 0.45rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #022c1f;
  background: linear-gradient(135deg, #34d399 0%, var(--lx-green) 100%);
  border-radius: 4px;
}

.sidebar-brand-tagline {
  font-size: 0.8rem;
  color: #8b95a5;
  margin-top: 0.35rem;
  display: block;
}

.sidebar-brand {
  padding: 0 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.75rem;
}

.sidebar-brand strong {
  display: block;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}


.nav-section {
  padding: 0.5rem 0.75rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7788;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1.25rem;
  color: #c5ccd6;
  text-decoration: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font: inherit;
}

.nav-item:hover {
  background: var(--lx-sidebar-hover);
  color: #fff;
}

.nav-item.active {
  background: rgba(0, 166, 81, 0.12);
  color: #fff;
  border-left-color: var(--lx-green);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  opacity: 0.85;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--lx-border);
  padding: 0.85rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.main--admin .topbar {
  border-bottom-color: rgba(0, 166, 81, 0.28);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 253, 250, 0.95) 100%);
}

.main--customer .topbar {
  border-bottom-color: rgba(59, 130, 246, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 255, 0.95) 100%);
}

.topbar-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  min-width: 0;
}

.topbar-zone-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lx-green-dark);
  background: rgba(0, 166, 81, 0.12);
  border: 1px solid rgba(0, 166, 81, 0.25);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.topbar h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
}

.btn-upload-shortcut {
  border-color: rgba(0, 166, 81, 0.35);
  color: var(--lx-green-dark);
}

.btn-upload-shortcut:hover {
  background: rgba(0, 166, 81, 0.08);
}

.search {
  flex: 1;
  max-width: 360px;
}

.search input {
  width: 100%;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--lx-border);
  border-radius: 8px;
  font: inherit;
  background: var(--lx-bg);
}

.search input:focus {
  outline: 2px solid rgba(0, 166, 81, 0.25);
  border-color: var(--lx-green);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--lx-green);
  color: #fff;
}

.btn-primary:hover {
  background: var(--lx-green-dark);
}

.btn-ghost {
  background: transparent;
  border-color: var(--lx-border);
  color: var(--lx-text);
}

.btn-ghost:hover {
  background: var(--lx-bg);
}

a.btn {
  text-decoration: none;
  box-sizing: border-box;
}

.content {
  padding: 1.5rem 1.75rem 2rem;
  flex: 1;
}

/* Reine Admin-Seiten (Kunden / Benutzer / System): leichter grüner Rahmen */
body.mode-admin section.page[data-admin-only].active {
  box-shadow: 0 0 0 1px rgba(0, 166, 81, 0.22);
  border-radius: 12px;
  padding-top: 0.35rem;
  margin-top: -0.15rem;
}

.page {
  display: none;
}

.page.active {
  display: block;
  animation: fade 0.2s ease;
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.kpi {
  background: linear-gradient(145deg, #fff 0%, #fafbfc 100%);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--lx-border);
  box-shadow: var(--shadow);
}

.kpi label {
  display: block;
  font-size: 0.8rem;
  color: var(--lx-muted);
  margin-bottom: 0.35rem;
}

.kpi .value {
  font-size: 1.45rem;
  font-weight: 600;
}

.panel {
  background: var(--lx-surface);
  border-radius: var(--radius);
  border: 1px solid var(--lx-border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-elevated {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), var(--shadow);
  border-color: #d8dde3;
}

.panel-admin-tools {
  margin-bottom: 1.25rem;
  border-color: rgba(0, 166, 81, 0.22);
  background: linear-gradient(180deg, #f8fdf9 0%, var(--lx-surface) 70%);
}

.admin-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
  padding: 0 1.25rem 1.25rem;
}

.admin-tool-card {
  display: block;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  border: 1px solid var(--lx-border);
  background: var(--lx-surface);
  text-decoration: none;
  color: inherit;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
  cursor: pointer;
  font: inherit;
}

.admin-tool-card:hover {
  border-color: rgba(0, 166, 81, 0.45);
  box-shadow: 0 6px 20px rgba(0, 166, 81, 0.1);
  transform: translateY(-1px);
}

.admin-tool-card strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  color: var(--lx-text);
}

.admin-tool-card span {
  font-size: 0.82rem;
  color: var(--lx-muted);
  line-height: 1.45;
}

.admin-users-intro {
  margin: 0 1.25rem 1rem;
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--lx-muted);
  background: var(--lx-bg);
  border-radius: 8px;
  border: 1px solid var(--lx-border);
}

.admin-users-table {
  font-size: 0.9rem;
}

.admin-users-table .select-inline {
  min-width: 8.5rem;
  max-width: 100%;
}

.user-row-actions {
  white-space: normal;
  vertical-align: middle;
}

.user-row-actions .btn {
  margin: 0.15rem 0.15rem 0.15rem 0;
}

.select-inline {
  font: inherit;
  font-size: 0.88rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--lx-border);
  background: var(--lx-surface);
  color: var(--lx-text);
  max-width: 100%;
}

.select-inline:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--lx-bg);
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
  border-radius: 6px;
}

.btn-primary-outline {
  background: transparent;
  border-color: var(--lx-green);
  color: var(--lx-green-dark);
}

.btn-primary-outline:hover {
  background: rgba(0, 166, 81, 0.08);
}

.btn-danger-outline {
  background: transparent;
  border-color: #f87171;
  color: #b91c1c;
}

.btn-danger-outline:hover {
  background: #fef2f2;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--lx-muted);
  max-width: min(280px, 100%);
}

.user-pill-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-pill-role {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
}

.user-pill-role.is-admin {
  background: rgba(0, 166, 81, 0.14);
  color: var(--lx-green-dark);
}

.user-pill-role.is-customer {
  background: var(--lx-bg);
  color: var(--lx-muted);
}

.panel-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--lx-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.75rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--lx-border);
}

th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lx-muted);
  font-weight: 600;
  background: #fafbfc;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: #fafbfc;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-paid {
  background: rgba(0, 166, 81, 0.12);
  color: var(--lx-green-dark);
}

.badge-open {
  background: rgba(234, 179, 8, 0.15);
  color: #a16207;
}

.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--lx-muted);
}

.empty-state p {
  margin: 0.5rem 0 0;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.settings-hints-block {
  text-align: left;
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
}

.settings-hints-block > p {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.settings-hints-title {
  margin: 0 0 0.5rem !important;
  max-width: none !important;
}

.settings-hints-list {
  margin: 0 0 1.25rem;
  padding-left: 1.2rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--lx-text);
  max-width: none;
}

.settings-hints-list li {
  margin-bottom: 0.4rem;
}

.settings-hints-list a {
  color: var(--lx-green-dark);
  font-weight: 600;
  text-decoration: none;
}

.settings-hints-list a:hover {
  text-decoration: underline;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrap--invoices {
  margin: 0 -0.25rem;
  padding: 0 0.25rem;
}

.invoice-table {
  width: 100%;
  min-width: 720px;
}

.admin-deploy-panel {
  margin-top: 1rem;
}

.admin-deploy-lead {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--lx-muted);
}

.admin-deploy-lead:last-of-type {
  margin-bottom: 0.5rem;
}

.admin-deploy-checklist {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--lx-text);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  padding: 1.25rem;
}

.form-grid .field.full {
  grid-column: 1 / -1;
}

.upload-pdf-hint {
  grid-column: 1 / -1;
  margin: 0 0 0.25rem;
  padding: 0.75rem 1rem;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--lx-muted);
  background: var(--lx-bg);
  border: 1px solid var(--lx-border);
  border-radius: 8px;
}

.upload-pdf-hint code {
  font-size: 0.9em;
}

.form-grid .field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.form-grid .field input,
.form-grid .field select,
.form-grid .field textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--lx-border);
  border-radius: 8px;
  font: inherit;
  background: var(--lx-surface);
}

.form-grid .field input:focus,
.form-grid .field select:focus,
.form-grid .field textarea:focus {
  outline: 2px solid rgba(0, 166, 81, 0.25);
  border-color: var(--lx-green);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.row-actions {
  white-space: nowrap;
}

.link-btn {
  display: inline;
  padding: 0;
  border: none;
  background: none;
  color: var(--lx-green-dark);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-btn:hover {
  color: var(--lx-green);
}

.link-btn.danger {
  color: #b91c1c;
}

.empty-inline {
  text-align: center;
  color: var(--lx-muted);
  padding: 2rem 1rem !important;
}

a.link-btn {
  text-decoration: underline;
}

.page-hero {
  margin-bottom: 1.35rem;
}

.page-hero-title {
  margin: 0 0 0.4rem;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--lx-text);
}

.page-hero-sub {
  margin: 0;
  max-width: 48ch;
  line-height: 1.55;
  color: var(--lx-muted);
  font-size: 0.95rem;
}

.customers-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: 1.25rem;
  align-items: start;
}

.customer-form-panel .panel-header-accent {
  background: linear-gradient(180deg, #f6f8fa 0%, #fff 55%);
  border-bottom: 1px solid var(--lx-border);
}

.panel-eyebrow {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lx-green-dark);
}

.panel-title-inline {
  margin: 0.2rem 0 0;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.panel-header-split {
  align-items: center;
}

.panel-header-trail {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.kpi-warn .value {
  color: #b45309;
}

.kpi-warn label {
  color: #92400e;
}

.admin-system-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 960px) {
  .admin-system-grid {
    grid-template-columns: 1fr;
  }
}

.admin-stat-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0 1.25rem 1rem;
}

.admin-stat-list > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--lx-border);
  font-size: 0.9rem;
}

.admin-stat-list > div:last-child {
  border-bottom: none;
}

.admin-stat-list dt {
  margin: 0;
  font-weight: 500;
  color: var(--lx-muted);
}

.admin-stat-list dd {
  margin: 0;
  font-weight: 600;
  color: var(--lx-text);
  font-variant-numeric: tabular-nums;
}

.admin-system-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1.25rem 1.25rem;
}

.admin-log-panel .panel-header {
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-start;
}

.admin-log-hint {
  font-size: 0.78rem;
  color: var(--lx-muted);
  font-weight: 400;
}

.admin-log-hint code {
  font-size: 0.85em;
}

.admin-log-note {
  margin: 0 1.25rem 0.5rem;
  font-size: 0.82rem;
  color: var(--lx-muted);
  line-height: 1.45;
}

.admin-log-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0 1.25rem 0.65rem;
}

.admin-log-meta {
  font-size: 0.8rem;
  color: var(--lx-muted);
}

.admin-log-pre {
  margin: 0 1.25rem 1.25rem;
  padding: 0.85rem 1rem;
  max-height: 320px;
  overflow: auto;
  font-size: 0.72rem;
  line-height: 1.45;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  background: #1a1f26;
  color: #e2e8f0;
  border-radius: 8px;
  border: 1px solid #2d3748;
  white-space: pre-wrap;
  word-break: break-word;
}

.invoice-assign-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  max-width: 22rem;
}

.invoice-assign-cell .select-inline {
  flex: 1;
  min-width: 10rem;
}

.invoice-edit-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 11rem;
  vertical-align: top;
}

.invoice-edit-meta .user-table-input,
.invoice-amount-cell .user-table-input {
  width: 100%;
  min-width: 0;
  max-width: 16rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--lx-border);
  border-radius: 6px;
  font: inherit;
  font-size: 0.88rem;
  background: var(--lx-surface);
}

.invoice-amount-cell {
  vertical-align: top;
  max-width: 10rem;
}

.users-page-toolbar {
  justify-content: flex-end;
}

.users-local-search {
  width: min(220px, 100%);
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--lx-border);
  border-radius: 8px;
  font: inherit;
  font-size: 0.88rem;
  background: var(--lx-surface);
}

.users-local-search:focus {
  outline: 2px solid rgba(0, 166, 81, 0.25);
  border-color: var(--lx-green);
}

.admin-users-table .user-table-input {
  width: 100%;
  min-width: 0;
  max-width: 14rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--lx-border);
  border-radius: 6px;
  font: inherit;
  font-size: 0.86rem;
  background: var(--lx-surface);
}

.admin-users-table .user-field-cell {
  vertical-align: middle;
}

.admin-users-table .user-last-login {
  font-size: 0.86rem;
  color: var(--lx-muted);
  white-space: nowrap;
}

.customer-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--lx-muted);
  background: var(--lx-bg);
  border: 1px solid var(--lx-border);
}

.customer-form-body {
  display: flex;
  flex-direction: column;
}

.form-section {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--lx-border);
}

.form-section:last-of-type {
  border-bottom: none;
}

.form-section-title {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--lx-muted);
}

.customer-form-grid {
  padding: 0;
  margin: 0;
}

.customer-form-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  padding: 1rem 1.25rem 1.2rem;
  margin-top: 0;
  background: linear-gradient(180deg, #fafbfc 0%, #f4f6f8 100%);
  border-top: 1px solid var(--lx-border);
}

.customer-cards-wrap {
  max-height: min(72vh, 680px);
  overflow: auto;
}

.customer-cards {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1rem 1.25rem 1.25rem;
}

.customer-card {
  display: flex;
  align-items: flex-start;
  gap: 0.95rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--lx-border);
  border-radius: 14px;
  background: var(--lx-surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.customer-card:hover {
  border-color: #cfd6dd;
  box-shadow: 0 6px 20px rgba(30, 41, 54, 0.07);
}

.customer-card-avatar {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--lx-green-dark);
  background: linear-gradient(
    145deg,
    rgba(0, 166, 81, 0.16) 0%,
    rgba(0, 166, 81, 0.06) 100%
  );
  border: 1px solid rgba(0, 166, 81, 0.2);
}

.customer-card-body {
  min-width: 0;
  flex: 1;
}

.customer-card-body h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  word-break: break-word;
}

.customer-card-meta {
  margin: 0;
  font-size: 0.84rem;
  color: var(--lx-muted);
  line-height: 1.4;
}

.customer-card-email {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  color: #3d4d5c;
  word-break: break-all;
}

.customer-card-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: stretch;
}

.customer-card .link-btn {
  display: block;
  text-align: center;
  text-decoration: none !important;
  padding: 0.42rem 0.75rem;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--lx-border);
  background: var(--lx-bg);
  color: var(--lx-green-dark);
}

.customer-card .link-btn:hover {
  background: var(--lx-surface);
  border-color: #c5cdd6;
}

.customer-card .link-btn.danger {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff5f5;
}

.customer-card .link-btn.danger:hover {
  background: #fef2f2;
}

.customer-cards-empty {
  text-align: center;
  padding: 2.5rem 1.25rem;
  color: var(--lx-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.customer-cards-empty strong {
  display: block;
  color: var(--lx-text);
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

@media (max-width: 1100px) {
  .customers-grid {
    grid-template-columns: 1fr;
  }

  .customer-list-panel {
    order: -1;
  }

  .customer-cards-wrap {
    max-height: 420px;
  }
}

@media (max-width: 900px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0.75rem;
    gap: 0.25rem;
  }

  .sidebar-brand {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem;
  }

  .nav-section {
    display: none;
  }

  .nav-item {
    padding: 0.45rem 0.75rem;
    border-radius: 6px;
    border-left: none;
    width: auto;
  }

  .nav-item.active {
    border-left: none;
  }
}
