/* Base */
:root {
  --bg: #0b0c10;
  --card: #111217;
  --surface: #161821;
  --text: #e8eaf0;
  --muted: #b6bccb;
  --primary: #5aa9e6;
  --primary-700: #3f89c4;
  --accent: #8de969;
  --border: #232735;
}
/* Light theme overrides */
[data-theme="light"] {
  --bg: #f6f7fb;
  --card: #ffffff;
  --surface: #f2f4f8;
  --text: #0b0c10;
  --muted: #4b5563;
  --primary: #2563eb;
  --primary-700: #1e40af;
  --accent: #10b981;
  --border: #e5e7eb;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1000px 600px at 10% -10%, #14213d55, transparent),
              radial-gradient(1000px 600px at 110% 0%, #1b5e2050, transparent),
              var(--bg);
  color: var(--text);
  line-height: 1.6;
}
[data-theme="light"] body,
[data-theme="light"] {
  /* Sanfte helle Akzente (hellblau/grün) statt dunkler Flächen */
  background: radial-gradient(900px 540px at -10% -20%, #e1efff66, transparent),
              radial-gradient(900px 540px at 120% 0%, #d1fae566, transparent),
              var(--bg);
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(6px); background: linear-gradient(180deg, #0b0c10dd, #0b0c10aa 70%, #0b0c1000); border-bottom: 1px solid #0b0c1000; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; gap: 12px; align-items: center; }
.logo { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #1b263b, #0f172a); display: grid; place-items: center; font-size: 18px; text-decoration: none; color: inherit; }
.brand-name { font-weight: 700; }
.brand-tag { color: var(--muted); font-size: 12px; }
.top-nav { display: flex; gap: 14px; align-items: center; margin-right: 10px; }
.top-nav a { color: var(--text); text-decoration: none; font-weight: 600; opacity: 0.9; }
.top-nav a:hover { opacity: 1; text-decoration: underline; }
.cta { color: #0b0c10; background: var(--accent); padding: 10px 14px; border-radius: 10px; text-decoration: none; font-weight: 600; }
.cta.primary { background: var(--primary); color: white; }
.cta:hover { filter: brightness(0.95); }
/* Light theme header fixes for contrast */
[data-theme="light"] .site-header { background: rgba(232,243,255,0.92); border-bottom: 1px solid #dbeafe; }
[data-theme="light"] .logo { background: linear-gradient(135deg, #e5e7eb, #cbd5e1); }
[data-theme="light"] .brand-name, [data-theme="light"] .brand-tag, [data-theme="light"] .top-nav a { color: var(--text); }

/* Hero */
.hero { padding: 48px 0 24px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 24px; }
.hero-copy h1 { margin: 0 0 10px; font-size: clamp(26px, 3.5vw, 38px); }
.hero-copy p { color: var(--muted); margin-top: 0; }
.bullets { margin: 14px 0 20px; padding: 0 0 0 18px; color: var(--muted); }
.hero-art .device { height: 260px; border-radius: 18px; background:
  radial-gradient(120px 60px at 20% 20%, #5aa9e644, transparent),
  radial-gradient(180px 80px at 80% 80%, #8de96933, transparent),
  linear-gradient(160deg, #0f172a, #0b132b);
  border: 1px solid #1f2330; box-shadow: 0 10px 40px #0008 inset, 0 10px 40px #0006;
}
/* Hero image inside the frame */
.hero-art .device { display: grid; place-items: center; overflow: hidden; }
.hero-art .device img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
[data-theme="light"] .hero {
  /* Oberer Hintergrund in hellblau */
  background: linear-gradient(180deg, #e8f3ff, rgba(232,243,255,0));
}
[data-theme="light"] .hero-art .device {
  background: linear-gradient(160deg, #eaf2ff, #e6f7ff);
  border-color: #dbeafe;
  box-shadow: 0 6px 24px rgba(0,0,0,0.08) inset, 0 10px 30px rgba(0,0,0,0.06);
}

/* Sections */
.section { padding: 40px 0; }
.section-alt { background: linear-gradient(180deg, #0d0f15, #0b0c10); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section h2 { margin-top: 0; }
[data-theme="light"] .section-alt {
  /* Zuvor dunkel – für Hellmodus auf hellblau umgestellt */
  background: linear-gradient(180deg, #e8f3ff, #f6faff);
  border-top: 1px solid #dbeafe;
  border-bottom: 1px solid #dbeafe;
}

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.card h3 { margin-top: 0; }

/* Prices */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.price-item { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.price-title { font-weight: 600; }
.price-value { font-size: 22px; font-weight: 700; margin-top: 6px; }
.price-list > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px dashed #2a3146; padding-top: 8px; margin-top: 8px; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price-note { color: var(--muted); font-size: 13px; margin-top: 6px; }
/* Price row helpers for logos and single-line layout */
.price-list .label { display: inline-flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
.price-list .amount { flex: 0 0 auto; }
.brand-logo { width: 18px; height: 18px; object-fit: contain; filter: drop-shadow(0 0 0 transparent); }
.price-title { display: inline-flex; align-items: center; gap: 8px; }

/* Form & Summary */
.form-layout { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 20px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.sticky { position: sticky; top: 90px; }
.orders-panel { grid-column: 1 / -1; }

fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
legend { padding: 0 8px; color: var(--muted); }
label { display: block; font-weight: 600; margin-bottom: 8px; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; margin-top: 6px; padding: 10px 12px; border-radius: 10px; border: 1px solid #2a3146; background: var(--surface); color: var(--text);
}
textarea { resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkboxes { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
label.inline { font-weight: 500; display: inline-flex; align-items: center; gap: 8px; margin-right: 10px; }
.small { font-size: 12px; }
.muted { color: var(--muted); }

.summary-list { list-style: none; margin: 0 0 10px; padding: 0; }
.summary-list li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed #2a3146; padding: 6px 0; }
.total, .grand { display: flex; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 8px; }
.grand { font-size: 20px; font-weight: 800; }

.actions { display: flex; gap: 16px; align-items: center; }
.btn-primary { background: var(--primary); color: #fff; font-weight: 700; border: 0; border-radius: 10px; padding: 12px 16px; cursor: pointer; }
.btn-primary:hover { background: var(--primary-700); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 24px 0; margin-top: 20px; background: #0b0c10aa; color: var(--text); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.site-footer nav { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.site-footer nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.site-footer nav a:hover { color: var(--text); text-decoration: none; }
.theme-switch { display: inline-flex; align-items: center; gap: 8px; }
.theme-switch select { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
[data-theme="light"] .site-footer { background: #ffffffcc; }
/* Admin link hidden by default; shown via JS if role=admin */
.admin-only { display: none !important; }

/* Modal (invoice preview) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: grid;
  place-items: center;
  z-index: 1000;
  padding: 20px;
}
.modal-card {
  width: min(100%, 980px);
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
}
.modal-content { margin-top: 8px; }

/* Link colors in content for visibility */
a { color: var(--primary); }
a:hover { color: var(--primary-700); }

/* Responsive */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; }
  .form-layout { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .grid-2 { grid-template-columns: 1fr; }
}
