:root {
  --brand: #1e3a8a;
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --success: #16a34a;
  --error: #dc2626;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Public landing page ---------- */
.site-header {
  background: var(--brand);
  color: #fff;
  padding: 28px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.site-header img { height: 48px; }
.site-header h1 { margin: 0; font-size: 1.6rem; }
.site-header .tagline { opacity: .9; margin-top: 4px; font-size: .95rem; }
.hero {
  padding: 48px 24px;
  text-align: center;
}
.hero h2 { font-size: 2rem; margin-bottom: 8px; }
.hero p.sub { color: var(--muted); font-size: 1.1rem; }
.packages {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px 48px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.package-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: left;
}
.package-card h3 { margin-top: 0; }
.package-card .price { font-size: 1.5rem; font-weight: 700; color: var(--brand); }
.package-card .duration { color: var(--muted); font-size: .9rem; }
.site-footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ---------- Login page ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.login-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px;
  width: 100%;
  max-width: 380px;
}
.login-box img.logo { max-height: 56px; display: block; margin: 0 auto 16px; }
.login-box h2 { text-align: center; margin-top: 0; }

/* ---------- Admin shell ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 230px;
  background: #111827;
  color: #d1d5db;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  flex-shrink: 0;
}
.admin-sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 20px;
  border-bottom: 1px solid #1f2937;
  margin-bottom: 12px;
  color: #fff;
  font-weight: 600;
}
.sidebar-logo { height: 28px; width: auto; border-radius: 4px; }
.admin-sidebar nav { display: flex; flex-direction: column; flex: 1; }
.admin-sidebar nav a {
  color: #d1d5db;
  padding: 11px 20px;
}
.admin-sidebar nav a:hover { background: #1f2937; text-decoration: none; color: #fff; }
.sidebar-footer {
  padding: 16px 20px 0;
  border-top: 1px solid #1f2937;
  font-size: .85rem;
}
.sidebar-footer .who { margin-bottom: 6px; color: #9ca3af; }
.admin-main { flex: 1; padding: 28px 32px; max-width: 1100px; }

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; }
.flash-success { background: #dcfce7; color: #166534; }
.flash-error { background: #fee2e2; color: #991b1b; }

h1.page-title { margin-top: 0; }

/* ---------- Forms / cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}
label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: .9rem; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=tel], input[type=color], input[type=file], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}
textarea { resize: vertical; min-height: 80px; }
button, .btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 16px;
}
button:hover, .btn:hover { opacity: .9; text-decoration: none; }
.btn-secondary { background: #6b7280; }
.btn-danger { background: var(--error); }
.btn-sm { padding: 6px 12px; font-size: .85rem; margin-top: 0; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: .95rem; }
th { color: var(--muted); font-weight: 600; font-size: .85rem; text-transform: uppercase; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tabs a {
  padding: 10px 16px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

/* ---------- Big order search ---------- */
.order-search {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  margin-bottom: 28px;
}
.order-search input[type=text] {
  font-size: 2rem;
  text-align: center;
  padding: 20px;
  border-radius: 12px;
  max-width: 480px;
  margin: 0 auto;
}
.order-search button {
  font-size: 1.1rem;
  padding: 14px 32px;
}

/* ---------- Invoice ---------- */
.invoice-header { display: flex; justify-content: space-between; align-items: flex-start; }
.invoice-total {
  font-size: 2.2rem;
  font-weight: 700;
  text-align: right;
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
}
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-in_progress { background: #dbeafe; color: #1e40af; }
.badge-completed { background: #e0e7ff; color: #3730a3; }
.badge-paid { background: #dcfce7; color: #166534; }
.badge-cancelled { background: #f3f4f6; color: #6b7280; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}
.stat-card .num { font-size: 1.6rem; font-weight: 700; }
.stat-card .label { color: var(--muted); font-size: .85rem; }

.row { display: flex; gap: 20px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 220px; }

/* ============================================================
   DETZsoft marketing page
   Structure inspired by field-service SaaS marketing sites
   (photo + floating product-UI hero, alternating feature sections,
   bold CTA band) — own type, color, copy, and photography.
   ============================================================ */
body.marketing {
  --mkt-blue: #2f7fe0;
  --mkt-blue-dark: #1f5fb3;
  --mkt-amber: #e2932a;
  --mkt-cash: #1f9d63;
  --mkt-ink: #16202e;
  --mkt-muted: #5b6b7f;
  --mkt-line: #e6ebf1;
  --mkt-bg-alt: #f5f8fc;
  background: #fff;
  color: var(--mkt-ink);
  font-family: 'Inter', -apple-system, sans-serif;
}
.marketing h1, .marketing h2, .marketing .mkt-brand {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

/* ---- Nav ---- */
.mkt-nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--mkt-line);
}
.mkt-nav-inner {
  max-width: 1160px; margin: 0 auto; padding: 16px 24px;
  display: flex; justify-content: space-between; align-items: center;
}
.mkt-brand { font-weight: 800; font-size: 1.3rem; color: var(--mkt-ink); }
.mkt-brand span { color: var(--mkt-blue); }
.mkt-nav nav { display: flex; align-items: center; gap: 26px; }
.mkt-nav nav a:not(.btn) { color: var(--mkt-muted); font-size: .95rem; font-weight: 500; }
.mkt-nav nav a:not(.btn):hover { color: var(--mkt-ink); text-decoration: none; }

.mkt-cta {
  background: var(--mkt-blue); color: #fff; font-weight: 700;
  border-radius: 999px; padding: 13px 28px; font-size: 1rem;
}
.mkt-cta:hover { background: var(--mkt-blue-dark); opacity: 1; }
.mkt-cta-sm { margin-top: 0; padding: 9px 20px; font-size: .9rem; }
.mkt-link-cta {
  font-weight: 600; color: var(--mkt-ink); display: inline-flex;
  align-items: center; margin-left: 8px;
}

/* ---- Hero ---- */
.mkt-hero { padding: 70px 24px 90px; }
.mkt-hero-grid {
  max-width: 1160px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
}
.mkt-hero-copy h1 {
  font-size: 2.7rem; font-weight: 800; line-height: 1.18;
  margin: 0 0 22px; letter-spacing: -.5px;
}
.mkt-hero-copy .mkt-sub {
  font-size: 1.12rem; line-height: 1.65; color: var(--mkt-muted); margin: 0 0 30px;
  max-width: 480px;
}
.mkt-hero-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.mkt-hero-media { position: relative; }
.mkt-hero-photo {
  width: 100%; aspect-ratio: 900/980; object-fit: cover;
  border-radius: 20px;
}
.mkt-ui-card {
  background: #fff; border-radius: 14px;
  box-shadow: 0 20px 45px -12px rgba(22,32,46,.28);
  border: 1px solid var(--mkt-line); overflow: hidden;
}
.mkt-ui-card-float {
  position: absolute; left: -8%; bottom: -8%; width: 78%;
}
.mkt-ui-card-head {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-bottom: 1px solid var(--mkt-line); background: var(--mkt-bg-alt);
}
.mkt-ui-dot { width: 8px; height: 8px; border-radius: 50%; }
.mkt-ui-dot-a { background: #f0605c; }
.mkt-ui-dot-b { background: #f4b942; }
.mkt-ui-dot-c { background: #37c15e; }
.mkt-ui-card-title { margin-left: 6px; font-size: .8rem; font-weight: 600; color: var(--mkt-muted); }
.mkt-ui-card-body { padding: 16px; }
.mkt-ui-row { display: flex; justify-content: space-between; font-size: .85rem; padding: 5px 0; font-weight: 600; }
.mkt-ui-row-muted { color: var(--mkt-muted); font-weight: 500; }
.mkt-ui-total {
  display: flex; justify-content: space-between; font-weight: 700;
  border-top: 1px solid var(--mkt-line); margin-top: 8px; padding-top: 8px;
}
.mkt-ui-badge {
  display: inline-block; margin-top: 10px; padding: 3px 12px; border-radius: 999px;
  background: #e5f7ec; color: var(--mkt-cash); font-size: .75rem; font-weight: 700;
}
.mkt-ui-badge-muted { background: var(--mkt-bg-alt); color: var(--mkt-muted); }
.mkt-ui-badge-amber { background: #fbeed9; color: var(--mkt-amber); }
.mkt-ui-search {
  background: var(--mkt-bg-alt); border-radius: 8px; padding: 10px 12px;
  font-size: .8rem; color: var(--mkt-muted); margin-bottom: 12px;
}
.mkt-ui-table-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .82rem; font-weight: 600; padding: 8px 0; border-top: 1px solid var(--mkt-line);
}

/* ---- Problem band ---- */
.mkt-problem { background: var(--mkt-bg-alt); padding: 70px 24px; }
.mkt-problem-inner {
  max-width: 1000px; margin: 0 auto;
  display: grid; grid-template-columns: 260px 1fr; gap: 44px; align-items: center;
}
.mkt-problem-photo { width: 100%; aspect-ratio: 4/3.2; object-fit: cover; border-radius: 16px; }
.mkt-problem-copy h2 { font-size: 1.6rem; font-weight: 800; margin: 0 0 12px; }
.mkt-problem-copy p { color: var(--mkt-muted); font-size: 1.02rem; line-height: 1.6; margin: 0; max-width: 520px; }

/* ---- Zig-zag features ---- */
.mkt-zigzag { max-width: 1100px; margin: 0 auto; padding: 90px 24px; }
.mkt-zig {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
  margin-bottom: 90px;
}
.mkt-zig:last-child { margin-bottom: 0; }
.mkt-zig-reverse .mkt-zig-copy { order: 2; }
.mkt-zig-reverse .mkt-zig-media { order: 1; }
.mkt-eyebrow {
  display: inline-block; color: var(--mkt-blue); font-weight: 700; font-size: .8rem;
  letter-spacing: .04em; margin-bottom: 10px;
}
.mkt-eyebrow-cash { color: var(--mkt-cash); }
.mkt-zig-copy h2 { font-size: 1.75rem; font-weight: 800; margin: 0 0 14px; line-height: 1.25; }
.mkt-zig-copy p { color: var(--mkt-muted); font-size: 1.02rem; line-height: 1.65; margin: 0; }
.mkt-zig-photo { width: 100%; aspect-ratio: 4/3.2; object-fit: cover; border-radius: 16px; }
.mkt-ui-card-static { max-width: 380px; }

/* ---- Icon feature grid ---- */
.mkt-features-grid-section { background: var(--mkt-bg-alt); padding: 80px 24px; }
.mkt-features-grid-section h2 {
  text-align: center; font-size: 1.6rem; font-weight: 800; margin: 0 0 44px;
}
.mkt-feature-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px;
}
.mkt-feature { background: #fff; border: 1px solid var(--mkt-line); border-radius: 14px; padding: 26px; }
.mkt-tile { width: 34px; height: 34px; border-radius: 9px; background: var(--mkt-blue); margin-bottom: 16px; }
.mkt-feature:nth-child(3n+2) .mkt-tile { background: var(--mkt-amber); }
.mkt-feature:nth-child(3n) .mkt-tile { background: var(--mkt-cash); }
.mkt-feature h3 { margin: 0 0 8px; font-size: 1.02rem; font-weight: 700; }
.mkt-feature p { color: var(--mkt-muted); margin: 0; font-size: .9rem; line-height: 1.55; }

/* ---- How it works ---- */
.mkt-how { padding: 90px 24px 70px; text-align: center; }
.mkt-how h2 { font-size: 1.6rem; font-weight: 800; margin: 0 0 48px; }
.mkt-route {
  max-width: 700px; margin: 0 auto; height: 2px; background: var(--mkt-line);
  position: relative; top: 20px;
}
.mkt-steps {
  max-width: 900px; margin: 0 auto; position: relative;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}
.mkt-step-marker {
  width: 40px; height: 40px; border-radius: 50%; background: var(--mkt-blue); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  margin: 0 auto 18px; position: relative; z-index: 1;
}
.mkt-step:nth-child(2) .mkt-step-marker { background: var(--mkt-amber); }
.mkt-step:nth-child(3) .mkt-step-marker { background: var(--mkt-cash); }
.mkt-step p { color: var(--mkt-muted); margin: 0; font-size: .96rem; line-height: 1.6; }

/* ---- CTA band ---- */
.mkt-cta-band {
  text-align: center; padding: 90px 24px; background: var(--mkt-blue-dark); color: #fff;
}
.mkt-cta-band h2 { font-size: 1.9rem; font-weight: 800; margin: 0 0 10px; }
.mkt-cta-band p { color: #cfe0f7; margin: 0 0 30px; }
.mkt-cta-band-btn {
  background: #fff; color: var(--mkt-blue-dark); font-weight: 700;
  border-radius: 999px; padding: 14px 34px; font-size: 1.02rem;
}
.mkt-cta-band-btn:hover { background: #eef4fc; opacity: 1; }

/* ---- Footer ---- */
.mkt-footer { padding: 32px 24px 16px; border-top: 1px solid var(--mkt-line); }
.mkt-footer-inner {
  max-width: 1160px; margin: 0 auto; display: flex; justify-content: space-between;
  align-items: center; color: var(--mkt-muted); font-size: .9rem;
}
.mkt-brand-footer { font-size: 1.05rem; }
.mkt-photo-credit {
  max-width: 1160px; margin: 14px auto 0; font-size: .72rem; color: #9aa7b8;
}

@media (max-width: 860px) {
  .mkt-hero-grid { grid-template-columns: 1fr; }
  .mkt-hero-media { order: -1; }
  .mkt-hero-copy .mkt-sub { max-width: none; }
  .mkt-problem-inner { grid-template-columns: 1fr; }
  .mkt-problem-photo { max-width: 320px; }
  .mkt-zig, .mkt-zig-reverse .mkt-zig-copy, .mkt-zig-reverse .mkt-zig-media {
    grid-template-columns: 1fr; order: initial;
  }
  .mkt-zig { grid-template-columns: 1fr; }
  .mkt-route { display: none; }
  .mkt-footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}
@media (max-width: 480px) {
  .mkt-hero-copy h1 { font-size: 2.1rem; }
}
