/* ==========================================================================
   CLAB3D MANUFAKTUR DARK THEME
   Shared design layer for legal pages, inquiry form, customer portal and the
   admin vault. Dark slate surfaces, 1px technical borders, blue accents.
   Load AFTER style.css / c3d-vault.css.
   ========================================================================== */

body.theme-manufaktur {
  --bg-main: #0a1018;
  --bg-surface: #101827;
  --bg-subtle: #0b1320;
  --bg-accent-light: rgba(56, 189, 248, 0.08);
  --text-primary: #f1f5f9;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border-color: rgba(148, 163, 184, 0.16);
  --border-hover: rgba(148, 163, 184, 0.32);
  --blue-primary: #38bdf8;
  --blue-hover: #0ea5e9;
  --blue-light: rgba(56, 189, 248, 0.1);
  --blue-border: rgba(56, 189, 248, 0.3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 20px -12px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 18px 38px -18px rgba(0, 0, 0, 0.85);
  --shadow-xl: 0 28px 60px -24px rgba(0, 0, 0, 0.9);

  /* vault.css token names */
  --bg-dark: #070c14;
  --bg-card: #101827;
  --bg-accent: #162133;
  --success-green: #34d399;
  --danger-red: #f87171;
  --border-focus: #38bdf8;

  background: #0a1018 !important;
  color: var(--text-body) !important;
  background-image: radial-gradient(circle at 18% -8%, rgba(56, 189, 248, 0.09), transparent 55%) !important;
}

/* ---------- Legal pages ---------- */
body.theme-manufaktur .legal-page-header-nav {
  background: rgba(10, 16, 24, 0.92);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
}
body.theme-manufaktur .legal-page-brand img { filter: none; }
body.theme-manufaktur .legal-back-btn {
  background: #162133;
  color: #e2e8f0;
  border: 1px solid var(--border-color);
}
body.theme-manufaktur .legal-back-btn:hover { border-color: var(--blue-primary); color: #fff; }
body.theme-manufaktur .legal-page-wrapper { color: var(--text-body); }
body.theme-manufaktur .legal-nav-pill {
  background: #101827;
  border-color: var(--border-color);
  color: var(--text-muted);
}
body.theme-manufaktur .legal-nav-pill:hover { color: #fff; border-color: var(--blue-border); }
body.theme-manufaktur .legal-nav-pill.active {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.45);
  color: #e0f2fe;
}
body.theme-manufaktur .legal-article-card {
  background: #101827;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, var(--shadow-lg);
  color: var(--text-body);
}
body.theme-manufaktur .legal-article-card h1,
body.theme-manufaktur .legal-article-card h2,
body.theme-manufaktur .legal-article-card h3,
body.theme-manufaktur .legal-article-card strong { color: #f1f5f9; }
body.theme-manufaktur .legal-article-card p,
body.theme-manufaktur .legal-article-card li { color: #cbd5e1; }
body.theme-manufaktur .legal-article-card a { color: #7dd3fc; }
body.theme-manufaktur .legal-meta-card {
  background: #0b1320;
  border-color: var(--border-color);
  border-left: 3px solid var(--blue-primary);
}
body.theme-manufaktur footer {
  background: #070c14 !important;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
}
body.theme-manufaktur footer a { color: #94a3b8; }

/* ---------- Inquiry form ---------- */
body.theme-manufaktur .container,
body.theme-manufaktur .form-container,
body.theme-manufaktur .anfrage-card {
  color: var(--text-body);
}
body.theme-manufaktur .form-control,
body.theme-manufaktur input[type="text"],
body.theme-manufaktur input[type="email"],
body.theme-manufaktur input[type="tel"],
body.theme-manufaktur input[type="number"],
body.theme-manufaktur textarea,
body.theme-manufaktur select {
  background: #0b1320 !important;
  border: 1px solid var(--border-color) !important;
  color: #f1f5f9 !important;
}
body.theme-manufaktur .form-control::placeholder,
body.theme-manufaktur textarea::placeholder { color: #5b6b80; }
body.theme-manufaktur .form-control:focus,
body.theme-manufaktur textarea:focus { border-color: var(--blue-primary) !important; }

/* ---------- Vault / admin ---------- */
body.theme-manufaktur .vault-main {
  background: #0a1018;
  color: var(--text-body);
}
body.theme-manufaktur .vault-topbar,
body.theme-manufaktur .vault-topbar h1,
body.theme-manufaktur .vault-topbar h2 { color: #f1f5f9; }
body.theme-manufaktur .vault-sidebar { background: #070c14; border-right: 1px solid var(--border-color); }
body.theme-manufaktur .login-wrapper {
  background: radial-gradient(circle at 50% 0%, #142033 0%, #070c14 70%);
}
body.theme-manufaktur .login-card {
  background: #101827;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  color: var(--text-body);
}
body.theme-manufaktur .login-header h2 { color: #f1f5f9; }
body.theme-manufaktur .login-header p { color: var(--text-muted); }

body.theme-manufaktur .card,
body.theme-manufaktur .card-body,
body.theme-manufaktur .vault-card,
body.theme-manufaktur .stat-card,
body.theme-manufaktur .system-card,
body.theme-manufaktur .inquiry-card {
  background: #101827 !important;
  border-color: var(--border-color) !important;
  color: var(--text-body) !important;
}
body.theme-manufaktur .card-header,
body.theme-manufaktur .card-header-toggle {
  background: #0c1522 !important;
  border-color: var(--border-color) !important;
  color: #f1f5f9 !important;
}

/* Legacy inline light colors used throughout the vault markup */
body.theme-manufaktur [style*="background:#fff"],
body.theme-manufaktur [style*="background: #fff"],
body.theme-manufaktur [style*="background:#ffffff"],
body.theme-manufaktur [style*="background: #ffffff"],
body.theme-manufaktur [style*="background:#ffffff;"],
body.theme-manufaktur [style*="background:#f8fafc"],
body.theme-manufaktur [style*="background: #f8fafc"],
body.theme-manufaktur [style*="background:#f1f5f9"],
body.theme-manufaktur [style*="background: #f1f5f9"],
body.theme-manufaktur [style*="background-color:#fff"],
body.theme-manufaktur [style*="background-color: #fff"] {
  background-color: #101827 !important;
  background-image: none !important;
}
body.theme-manufaktur [style*="color:#0f172a"],
body.theme-manufaktur [style*="color: #0f172a"],
body.theme-manufaktur [style*="color:#1e293b"],
body.theme-manufaktur [style*="color: #1e293b"],
body.theme-manufaktur [style*="color:#334155"],
body.theme-manufaktur [style*="color: #334155"],
body.theme-manufaktur [style*="color:#475569"],
body.theme-manufaktur [style*="color: #475569"] {
  color: #cbd5e1 !important;
}

/* Tables */
body.theme-manufaktur table { color: var(--text-body); border-color: var(--border-color); }
body.theme-manufaktur th {
  background: #0b1320 !important;
  color: #94a3b8 !important;
  border-color: var(--border-color) !important;
}
body.theme-manufaktur td {
  border-color: var(--border-color) !important;
  color: #cbd5e1 !important;
}
body.theme-manufaktur tr:hover td { background: rgba(56, 189, 248, 0.04); }

/* Inputs inside vault */
body.theme-manufaktur .vault-main input,
body.theme-manufaktur .vault-main textarea,
body.theme-manufaktur .vault-main select,
body.theme-manufaktur .login-form input {
  background: #0b1320 !important;
  border: 1px solid var(--border-color) !important;
  color: #f1f5f9 !important;
}
body.theme-manufaktur .vault-main label { color: var(--text-muted); }

/* Status portal already dark; keep accents consistent */
body.theme-manufaktur .portal-header { background: rgba(10, 16, 24, 0.92); }
body.theme-manufaktur .portal-footer { background: #070c14; }

/* ---------- Icon system ---------- */
.c3d-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -0.14em;
  line-height: 1;
  margin: 0 0.12em;
}
.c3d-ico svg { width: 1em; height: 1em; display: block; }
h1 .c3d-ico, h2 .c3d-ico, h3 .c3d-ico { vertical-align: -0.1em; }

/* Remaining light vault surfaces */
body.theme-manufaktur .table-card,
body.theme-manufaktur .btn-secondary,
body.theme-manufaktur .btn-vault-external-link {
  background: #101827 !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
  color: #cbd5e1 !important;
}
body.theme-manufaktur .btn-secondary:hover,
body.theme-manufaktur .btn-vault-external-link:hover { background: #162133 !important; color: #fff !important; }
body.theme-manufaktur .table-card .table-header,
body.theme-manufaktur .table-card th { background: #0b1320 !important; }

/* Vault headings & editable fields keep light contrast on dark slate */
body.theme-manufaktur .vault-main h1,
body.theme-manufaktur .vault-main h2,
body.theme-manufaktur .vault-main h3,
body.theme-manufaktur .vault-main h4,
body.theme-manufaktur .editable-field,
body.theme-manufaktur .section-title,
body.theme-manufaktur .product-title { color: #f1f5f9 !important; }
body.theme-manufaktur .vault-main p,
body.theme-manufaktur .vault-main li { color: #cbd5e1; }

/* Muted inline greys stay readable on dark surfaces */
body.theme-manufaktur [style*="color:#64748b"],
body.theme-manufaktur [style*="color: #64748b"] { color: #94a3b8 !important; }
body.theme-manufaktur [style*="color:#94a3b8"],
body.theme-manufaktur [style*="color: #94a3b8"] { color: #a8b6c8 !important; }

/* ---------- Inquiry page (anfrage.html) ---------- */
body.theme-manufaktur #navbar {
  background: rgba(10, 16, 24, 0.94) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(12px);
}
body.theme-manufaktur #general-inquiry-card,
body.theme-manufaktur .contact-form-card {
  background: #101827 !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  box-shadow: 0 18px 38px -18px rgba(0, 0, 0, 0.85);
  color: #cbd5e1 !important;
}
body.theme-manufaktur .contact-form-card h1,
body.theme-manufaktur .contact-form-card h2,
body.theme-manufaktur .contact-form-card h3,
body.theme-manufaktur .contact-form-card label { color: #f1f5f9 !important; }
body.theme-manufaktur .contact-form-card p,
body.theme-manufaktur .contact-form-card small,
body.theme-manufaktur .contact-card-sub { color: #94a3b8 !important; }
body.theme-manufaktur .contact-form-card a { color: #7dd3fc !important; }
body.theme-manufaktur .inq-dropzone-box,
body.theme-manufaktur #inq-dropzone {
  background: #0b1320 !important;
  border-color: rgba(56, 189, 248, 0.28) !important;
  color: #cbd5e1 !important;
}
body.theme-manufaktur .inq-dropzone-box strong,
body.theme-manufaktur #inq-dropzone strong { color: #e2e8f0 !important; }
body.theme-manufaktur #inq-browse-btn { color: #7dd3fc !important; border-color: rgba(56, 189, 248, 0.35) !important; }
body.theme-manufaktur .badge-tag {
  background: rgba(56, 189, 248, 0.14) !important;
  color: #7dd3fc !important;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
body.theme-manufaktur .badge-nav { background: #0369a1 !important; color: #ffffff !important; }
body.theme-manufaktur .btn-etsy { background: #c2410c !important; color: #ffffff !important; }

/* ---------- Vault: content cards, KPIs and action buttons ---------- */
body.theme-manufaktur .vault-main .section-card,
body.theme-manufaktur .vault-main .status-card,
body.theme-manufaktur .vault-main .rate-card,
body.theme-manufaktur .vault-main .stat-item,
body.theme-manufaktur .vault-main .table-card,
body.theme-manufaktur .vault-main .analytics-time-pills,
body.theme-manufaktur .vault-main #analytics-profit-bar,
body.theme-manufaktur .vault-main .section-card .card-body {
  background: #101827 !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
  color: #cbd5e1 !important;
}
body.theme-manufaktur .vault-main .analytics-time-pills,
body.theme-manufaktur .vault-main #analytics-profit-bar { background: #0b1320 !important; }

body.theme-manufaktur .vault-main .btn-sm {
  background: #162133 !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  color: #cbd5e1 !important;
}
body.theme-manufaktur .vault-main .btn-sm:hover { background: #1c2a40 !important; color: #fff !important; }
body.theme-manufaktur .vault-main .btn-sm.btn-primary { background: #0369a1 !important; border-color: #0369a1 !important; color: #fff !important; }
body.theme-manufaktur .vault-main .btn-sm.btn-danger { background: rgba(220, 38, 38, 0.18) !important; border-color: rgba(248, 113, 113, 0.4) !important; color: #fca5a5 !important; }

body.theme-manufaktur .vault-main .btn-action {
  background: #162133 !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  color: #cbd5e1 !important;
}
body.theme-manufaktur .vault-main .btn-action.btn-edit { color: #7dd3fc !important; }
body.theme-manufaktur .vault-main .btn-action.btn-delete { color: #fca5a5 !important; }
body.theme-manufaktur .vault-main .btn-action:hover { border-color: rgba(56, 189, 248, 0.45) !important; }

body.theme-manufaktur .vault-main .material-badge.badge-standard,
body.theme-manufaktur .vault-main .badge.badge-standard {
  background: rgba(16, 185, 129, 0.16) !important; color: #6ee7b7 !important; border-color: rgba(16, 185, 129, 0.32) !important;
}
body.theme-manufaktur .vault-main .material-badge.badge-technical {
  background: rgba(56, 189, 248, 0.14) !important; color: #7dd3fc !important; border-color: rgba(56, 189, 248, 0.3) !important;
}
body.theme-manufaktur .vault-main .material-badge.badge-cf {
  background: rgba(148, 163, 184, 0.14) !important; color: #cbd5e1 !important; border-color: rgba(148, 163, 184, 0.3) !important;
}
body.theme-manufaktur .vault-main .material-badge.badge-flexible {
  background: rgba(245, 158, 11, 0.16) !important; color: #fcd34d !important; border-color: rgba(245, 158, 11, 0.32) !important;
}
body.theme-manufaktur .vault-main .badge.badge-etsy {
  background: rgba(241, 100, 30, 0.18) !important; color: #fdba74 !important; border-color: rgba(241, 100, 30, 0.35) !important;
}
body.theme-manufaktur .vault-main .section-card h4,
body.theme-manufaktur .vault-main .status-card h4 { color: #f1f5f9 !important; }

/* Editor iframes keep the site preview readable without glaring white chrome */
body.theme-manufaktur .vault-main iframe {
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  background: #0b1320 !important;
}

/* Inline var() backgrounds inside the vault must resolve dark */
body.theme-manufaktur {
  --bg-surface-subtle: #0b1320;
  --bg-surface-hover: #162133;
  --bg-surface: #101827;
  --bg-card-hover: #162133;
  --text-secondary: #cbd5e1;
  --text-dark: #f1f5f9;
}
body.theme-manufaktur .vault-main .btn-primary {
  background: #0369a1 !important;
  border-color: #0369a1 !important;
  color: #ffffff !important;
}
body.theme-manufaktur .vault-main .btn-primary:hover { background: #075985 !important; }
body.theme-manufaktur .vault-main label { color: #a8b6c8 !important; }
body.theme-manufaktur .vault-main small { color: #93a3b7 !important; }
body.theme-manufaktur [style*="color:#dc2626"],
body.theme-manufaktur [style*="color: #dc2626"] { color: #f87171 !important; }
body.theme-manufaktur [style*="color:#b91c1c"],
body.theme-manufaktur [style*="color: #b91c1c"] { color: #fca5a5 !important; }
