:root {
  --lp-bg: #020617;
  --lp-panel: rgba(15, 23, 42, 0.92);
  --lp-border: rgba(148, 163, 184, 0.25);
  --lp-text: #e2e8f0;
  --lp-muted: #94a3b8;
  --lp-accent-strong: #f86a6a;
  --lp-accent: #f83838;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  color: var(--lp-text);
  background:
    radial-gradient(circle at top right, rgba(255, 68, 68, 0.15), transparent 25%),
    linear-gradient(160deg, #020617 0%, #0f172a 55%, #111827 100%);
}

.landing {
  width: min(96vw, 980px);
  text-align: center;
}

.landing-header {
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--lp-border);
  border-radius: 18px;
  background: var(--lp-panel);
}

.landing-header h1 {
  margin: 0 0 8px;
  font-size: 2.1rem;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.landing-header p {
  margin: 0;
  font-size: 1rem;
  color: var(--lp-muted);
}

.landing-user-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--lp-border);
}

.landing-user-header span {
  color: var(--lp-text);
}

/* Shared user display component (landing + inner pages) */
.user-display-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(248, 56, 56, 0.18);
  border: 1px solid rgba(248, 56, 56, 0.35);
  color: #fca5a5;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.user-display-info {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  line-height: 1.2;
}

.user-display-name {
  color: #f1f5f9;
  font-size: 0.88rem;
  font-weight: 600;
}

.user-display-role {
  color: #64748b;
  font-size: 0.73rem;
  font-weight: 400;
}

.user-display-signout {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 6px;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.user-display-signout:hover {
  border-color: rgba(248, 56, 56, 0.5);
  color: #fca5a5;
  background: rgba(248, 56, 56, 0.08);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.tool-card {
  --tool-accent: var(--lp-accent);
  --tool-accent-border: rgba(248, 56, 56, 0.45);
  --tool-accent-soft: rgba(248, 56, 56, 0.14);
  --tool-accent-text: #fecaca;
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  border-radius: 16px;
  border: 1px solid var(--lp-border);
  background: var(--lp-panel);
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
  text-align: left;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--tool-accent) 60%, transparent);
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.35);
  background: rgba(15, 23, 42, 0.98);
}

.tool-card.sheeter,
.tool-card.jobs,
.tool-card.arrivals,
.tool-card.customers {
  --tool-accent: var(--lp-accent);
  --tool-accent-border: rgba(248, 56, 56, 0.45);
  --tool-accent-soft: rgba(248, 56, 56, 0.14);
  --tool-accent-text: #fecaca;
}

.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 72px;
  margin-bottom: 12px;
  line-height: 1;
}

.tool-icon-image {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.tool-card h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  color: #f8fafc;
}

.tool-card p {
  margin: 0 0 18px;
  font-size: 0.9rem;
  color: var(--lp-muted);
  line-height: 1.55;
  flex: 1;
}

.tool-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid var(--tool-accent-border);
  background: var(--tool-accent-soft);
  color: var(--tool-accent-text);
}

.tool-card.customers {
  cursor: pointer;
}

.customers-modal {
  max-width: 1100px;
}

.customers-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.customers-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.customers-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.customers-toolbar input {
  flex: 1;
  min-width: 220px;
}

.customers-alpha-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.customers-alpha-btn {
  min-width: 40px;
  margin-bottom: 0;
  padding: 6px 10px;
  font-size: 0.82rem;
  line-height: 1;
  border-radius: 8px;
}

.customers-alpha-btn.is-active {
  border-color: rgba(248, 56, 56, 0.65);
  box-shadow: 0 0 0 2px rgba(248, 56, 56, 0.2);
}

.customers-list {
  display: grid;
  gap: 8px;
  max-height: 40vh;
  overflow-y: auto;
  margin-bottom: 12px;
}

.customer-item {
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0;
  background: #0f172a;
  line-height: 1.2;
  overflow: hidden;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.customer-item.is-expanded {
  transform: translateY(-2px);
  border-color: rgba(248, 56, 56, 0.45);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.28);
  background: #111827;
}

.customer-item-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.customer-item-title {
  margin: 0;
  font-size: 0.98rem;
  color: #e2e8f0;
}

.customer-item-details {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition:
    max-height 0.22s ease,
    opacity 0.18s ease,
    transform 0.18s ease,
    margin-top 0.18s ease;
}

.customer-item.is-expanded .customer-item-details {
  max-height: 120px;
  opacity: 1;
  transform: translateY(0);
  margin-top: 8px;
}

.customer-item-meta {
  margin: 0 0 4px;
  color: #94a3b8;
  font-size: 0.78rem;
}

.customer-item-meta:last-child {
  margin-bottom: 0;
}

.customer-item-actions {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  transition:
    max-height 0.22s ease,
    opacity 0.18s ease,
    margin-top 0.18s ease;
}

.customer-item.is-expanded .customer-item-actions {
  max-height: 56px;
  opacity: 1;
  margin-top: 10px;
}

.customer-form {
  border: 1px solid var(--lp-border);
  border-radius: 10px;
  padding: 12px;
  background: rgba(2, 6, 23, 0.35);
}

.customer-form-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.customer-form .field > label {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fca5a5;
}

.required-mark {
  color: var(--lp-accent, #f83838);
}

.customer-address-block {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--lp-border);

.customer-blocking-card {
  margin-top: 14px;
  padding: 14px 14px 10px;
  border: 1px solid var(--lp-border);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.35);
}

.customer-blocking-title {
  text-align: center;
  margin-bottom: 12px;
}
}

.customer-contacts-list {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.customer-contact-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(160px, 1fr) minmax(140px, 1fr) minmax(180px, 1fr) auto;
  align-items: center;
}

.customer-contact-row .theme-btn {
  margin-bottom: 0;
}

.customers-form-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.delete-btn {
  background-color: #dc2626 !important;
  color: white !important;
  border-color: #b91c1c !important;
}

.delete-btn:hover {
  background-color: #b91c1c !important;
  border-color: #991b1b !important;
}

.delete-btn {
  background-color: #dc2626 !important;
  color: white !important;
  border-color: #991b1b !important;
}

.delete-btn:hover {
  background-color: #b91c1c !important;
  border-color: #7f1d1d !important;
}

.confirmation-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.confirmation-modal.auth-modal-hidden {
  display: none;
}

.confirmation-modal-content {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.confirmation-modal-content {
  background: #0f172a;
  color: #e2e8f0;
}

.confirmation-modal-title {
  margin: 0 0 12px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
}

.confirmation-modal-title {
  color: #e2e8f0;
}

.confirmation-modal-message {
  margin: 0 0 20px 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #475569;
}

.confirmation-modal-message {
  color: #cbd5e1;
}

.confirmation-modal-message strong {
  font-weight: 600;
  color: #1e293b;
}

.confirmation-modal-message strong {
  color: #e2e8f0;
}

.confirmation-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.confirmation-modal-actions .theme-btn {
  padding: 8px 16px;
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .customer-contact-row {
    grid-template-columns: 1fr;
  }

  .confirmation-modal-content {
    max-width: 90%;
    padding: 20px;
  }

  .confirmation-modal-actions {
    flex-direction: column;
  }

  .confirmation-modal-actions .theme-btn {
    width: 100%;
  }
}

.footer {
  margin-top: 28px;
  font-size: 0.82rem;
  color: var(--lp-muted);
}

@media (max-width: 640px) {
  body {
    padding: 18px 12px;
  }

  .landing-header h1 {
    font-size: 1.8rem;
  }

  .tool-card {
    padding: 20px 16px;
  }
}
