:root {
  --bg-darkest: #070d18;
  --bg-dark: #0b1120;
  --bg-surface: #131d31;
  --bg-card: #182339;
  --bg-card-hover: #1e2c47;
  --bg-input: #0c1424;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(245, 158, 11, 0.5);
  
  --amber-primary: #d97706;
  --amber-light: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.18);
  --gradient-amber: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  --shadow-amber: 0 6px 20px rgba(245, 158, 11, 0.45);
  --blue-sky: #38bdf8;
  --blue-dark: #0284c7;
  --blue-glow: rgba(56, 189, 248, 0.15);
  --green-success: #10b981;
  --green-glow: rgba(16, 185, 129, 0.15);
  --red-danger: #ef4444;
  --red-glow: rgba(239, 68, 68, 0.15);
  --purple-accent: #a855f7;

  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #8292a9;
  --text-dim: #54657e;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-darkest);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-card-hover);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--amber-primary);
}

/* Universal Utility Classes */
.hidden {
  display: none !important;
}

/* ========================================================== */
/* HEADER & TOP COMMAND BAR */
/* ========================================================== */
.app-header {
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(16px);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 16px;
}

.header-left {
  display: flex;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  background: linear-gradient(135deg, var(--amber-light), var(--amber-primary));
  color: #0b1120;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.4);
}

.logo-icon i,
.logo-icon svg {
  width: 22px;
  height: 22px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.1;
}

.version-badge {
  font-size: 0.65rem;
  font-weight: 800;
  background: var(--amber-glow);
  color: var(--amber-light);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
}

.app-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Header Center Command Search Button */
.header-center {
  flex: 1;
  max-width: 480px;
}

.command-search-btn {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}

.command-search-btn:hover {
  background: var(--bg-card);
  border-color: var(--border-focus);
  color: var(--text-secondary);
}

.command-search-btn .cmd-icon,
.command-search-btn svg.cmd-icon {
  width: 16px;
  height: 16px;
  color: var(--amber-light);
  margin-right: 8px;
}

.shortcut-key {
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sync-badge {
  background-color: var(--blue-glow);
  color: var(--blue-sky);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.sync-dot {
  width: 7px;
  height: 7px;
  background-color: var(--blue-sky);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--blue-sky);
}

.quick-create-dropdown {
  position: relative;
}

.btn-quick-action {
  padding: 8px 14px !important;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.3);
}

.quick-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 240px;
  overflow: hidden;
  z-index: 100;
}

.quick-dropdown-menu.hidden {
  display: none;
}

.quick-menu-item {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-main);
  padding: 10px 14px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.quick-menu-item:hover {
  background: var(--bg-card-hover);
  color: var(--amber-light);
}

.quick-menu-item i,
.quick-menu-item svg {
  width: 16px;
  height: 16px;
  color: var(--amber-light);
}

/* ========================================================== */
/* NAVIGATION BAR (SEGMENTED NATIVE BAR) */
/* ========================================================== */
.nav-tabs-bar {
  background: var(--bg-darkest);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 20px;
}

.nav-tabs-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.nav-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 12px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-tab-btn i,
.nav-tab-btn svg {
  width: 17px;
  height: 17px;
  transition: transform 0.2s ease;
}

.nav-tab-btn:hover {
  color: var(--text-main);
}

.nav-tab-btn.active {
  color: var(--amber-light);
  border-bottom-color: var(--amber-light);
  background: linear-gradient(to top, rgba(245, 158, 11, 0.08), transparent);
}

.nav-tab-btn.active i,
.nav-tab-btn.active svg {
  transform: scale(1.1);
  color: var(--amber-light);
}

.tab-badge {
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.nav-tab-btn.active .tab-badge {
  background: var(--amber-light);
  color: #0b1120;
}

.tab-badge.info {
  background: var(--blue-glow);
  color: var(--blue-sky);
  border-color: rgba(56, 189, 248, 0.3);
}

/* ========================================================== */
/* MAIN CONTAINER & VIEWPORT */
/* ========================================================== */
.app-container {
  flex: 1;
  padding: 20px;
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
}

.tab-view {
  animation: fadeIn 0.2s ease-out;
}

.tab-view.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header Action Bars */
.view-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.view-heading {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.view-subheading {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.header-action-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Pixel-Perfect Aligned Search Input Wrapper */
.search-input-wrapper {
  position: relative;
  min-width: 280px;
  display: flex;
  align-items: center;
}

.search-input-wrapper i,
.search-input-wrapper svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-wrapper input {
  width: 100%;
  padding-left: 36px !important;
  height: 38px;
}

/* Segmented Filter Row */
.segmented-filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.segmented-control {
  display: inline-flex;
  background: var(--bg-surface);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
  max-width: 100%;
}

.seg-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.seg-btn:hover {
  color: var(--text-main);
}

.seg-btn.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.seg-btn.seg-danger.active {
  background: var(--red-danger);
  color: #ffffff;
}

.seg-btn.seg-success.active {
  background: var(--green-success);
  color: #ffffff;
}

.view-display-toggles {
  display: flex;
  gap: 4px;
  background: var(--bg-surface);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.btn-icon-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-icon-toggle i,
.btn-icon-toggle svg {
  width: 16px;
  height: 16px;
}

.btn-icon-toggle.active {
  background: var(--bg-card);
  color: var(--amber-light);
}

/* ========================================================== */
/* BUTTONS & FORMS */
/* ========================================================== */
button {
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber-light), var(--amber-primary));
  color: #0b1120;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
}

.btn-primary i,
.btn-primary svg {
  width: 16px;
  height: 16px;
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-secondary i,
.btn-secondary svg {
  width: 15px;
  height: 15px;
}

.btn-danger {
  background: var(--red-danger);
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-danger-ghost {
  background: var(--red-glow);
  color: var(--red-danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-danger-ghost:hover {
  background: var(--red-danger);
  color: #ffffff;
}

.btn-danger-ghost i,
.btn-danger-ghost svg {
  width: 15px;
  height: 15px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

input[type="text"], input[type="number"], input[type="email"], input[type="tel"], input[type="date"], select, textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--amber-light);
  box-shadow: 0 0 0 2px var(--amber-glow);
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

/* ========================================================== */
/* ORDER CARDS & LIST */
/* ========================================================== */
.orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.orders-grid.list-mode {
  grid-template-columns: 1fr;
}

.order-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.order-card:hover {
  border-color: var(--amber-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.order-card.has-problem {
  border: 1px solid var(--red-danger);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.04), var(--bg-card));
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.order-num-tag {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--amber-light);
  font-size: 0.95rem;
}

.type-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.pill-eigenbau { background: rgba(217, 119, 6, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.pill-zukauf { background: rgba(100, 116, 139, 0.15); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }
.pill-mischform { background: rgba(245, 158, 11, 0.2); color: #fde68a; border: 1px solid var(--amber-light); }
.pill-fenster { background: rgba(13, 148, 136, 0.15); color: #2dd4bf; border: 1px solid #0d9488; }
.pill-kueche { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; border: 1px solid #6366f1; }
.pill-sonder { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid #a855f7; }

.client-name-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.site-address-row {
  font-size: 0.84rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.site-address-row i,
.site-address-row svg {
  width: 14px;
  height: 14px;
  color: var(--amber-light);
}

.order-desc-text {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 14px;
  flex: 1;
}

.problem-callout {
  background: var(--red-glow);
  border: 1px solid var(--red-danger);
  color: #fca5a5;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.problem-callout i,
.problem-callout svg {
  width: 16px;
  height: 16px;
  color: var(--red-danger);
}

.progress-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.progress-track-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--amber-primary), var(--amber-light));
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.progress-fill-bar.done {
  background: var(--green-success);
}

.progress-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

/* ========================================================== */
/* ORDER DETAIL VIEW (HUB & CLEAN TABS) */
/* ========================================================== */
.detail-top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.btn-back {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-back:hover {
  background: var(--bg-card-hover);
}

.detail-action-buttons {
  display: flex;
  gap: 8px;
}

.order-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.order-hero-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.hero-client {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 4px;
}

.hero-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  background: var(--bg-surface);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.hero-meta-item {
  display: flex;
  flex-direction: column;
}

.hero-meta-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.hero-meta-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 2px;
}

/* Detail Subtabs Bar */
.subtabs-bar {
  display: flex;
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
  overflow-x: auto;
}

.subtab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.subtab-btn:hover {
  color: var(--text-main);
}

.subtab-btn.active {
  background: var(--bg-card);
  color: var(--amber-light);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.subtab-btn i,
.subtab-btn svg {
  width: 16px;
  height: 16px;
}

.subtab-count {
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.72rem;
  padding: 1px 7px;
  border-radius: var(--radius-full);
}

.subtab-count.danger {
  background: var(--red-danger);
  color: white;
}

.subtab-content.hidden {
  display: none;
}

/* ========================================================== */
/* STEPS & TASK ENGINE (TABBED & CLEAN) */
/* ========================================================== */
.steps-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.step-filter-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 4px;
}

.step-phase-pill {
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.step-phase-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.step-phase-pill.active {
  background: var(--amber-light);
  color: #0b1120;
  border-color: var(--amber-light);
  font-weight: 700;
}

.step-phase-pill.pill-danger.active {
  background: var(--red-danger);
  color: #ffffff;
  border-color: var(--red-danger);
}

.steps-clean-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Step Card */
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: all 0.15s ease;
  position: relative;
}

.step-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
}

.step-card.step-problem {
  border: 1px solid var(--red-danger);
  background: linear-gradient(to right, rgba(239, 68, 68, 0.06), var(--bg-card));
}

.step-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.step-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.step-role-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}

.role-werkstatt { background: var(--amber-glow); color: var(--amber-light); border: 1px solid rgba(245, 158, 11, 0.3); }
.role-montage { background: var(--blue-glow); color: var(--blue-sky); border: 1px solid rgba(56, 189, 248, 0.3); }

.step-title-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.step-menu-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-step-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-step-icon i,
.btn-step-icon svg {
  width: 15px;
  height: 15px;
}

.btn-step-icon:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
}

/* Dynamic Wiki Match Box */
.dynamic-wiki-box {
  margin-top: 10px;
  margin-bottom: 12px;
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.wiki-match-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--blue-sky);
  font-weight: 600;
}

.wiki-match-info i,
.wiki-match-info svg {
  width: 15px;
  height: 15px;
}

.wiki-match-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.wiki-tag-pill {
  background: rgba(56, 189, 248, 0.15);
  color: #bae6fd;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.wiki-tag-pill i,
.wiki-tag-pill svg {
  width: 12px;
  height: 12px;
}

.wiki-tag-pill:hover {
  background: var(--blue-dark);
  color: #ffffff;
}

/* Step Problem & Photo */
.step-problem-box {
  background: var(--red-glow);
  border-left: 3px solid var(--red-danger);
  color: #fca5a5;
  padding: 8px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.86rem;
  margin-bottom: 10px;
}

.step-photo-preview {
  margin-top: 8px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-photo-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--amber-light);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.step-photo-thumb:hover {
  transform: scale(1.08);
}

/* 4 Status Segmented Buttons */
.status-pill-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 12px;
}

.st-pill {
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.st-pill i,
.st-pill svg {
  width: 13px;
  height: 13px;
}

.st-pill:hover {
  color: var(--text-main);
  background: var(--bg-surface);
}

.st-pill.st-offen.active { background: #334155; color: #ffffff; border-color: #475569; }
.st-pill.st-arbeit.active { background: var(--blue-dark); color: #ffffff; border-color: var(--blue-sky); }
.st-pill.st-done.active { background: var(--green-success); color: #ffffff; border-color: #34d399; }
.st-pill.st-problem.active { background: var(--red-danger); color: #ffffff; border-color: #f87171; }

/* ========================================================== */
/* ELEMENTS / AUFMAß MATRIX TABLE */
/* ========================================================== */
.elements-tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.elements-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.modern-table th {
  background: var(--bg-darkest);
  color: var(--text-muted);
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.modern-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

.modern-table tr:last-child td {
  border-bottom: none;
}

.modern-table tr:hover {
  background: var(--bg-card-hover);
}

.dim-code {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--amber-light);
  background: var(--amber-glow);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.din-badge {
  font-weight: 700;
  font-size: 0.78rem;
  padding: 3px 8px;
  border-radius: 4px;
}

.din-left { background: var(--blue-glow); color: var(--blue-sky); }
.din-right { background: var(--green-glow); color: var(--green-success); }

/* ========================================================== */
/* WORKSHOP TASKS VIEW & KANBAN */
/* ========================================================== */
.tasks-enhanced-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.15s ease;
}

.task-item-card:hover {
  border-color: var(--border-focus);
}

.task-item-card.completed {
  opacity: 0.6;
}

.task-item-card.completed .task-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-checkbox-custom {
  width: 22px;
  height: 22px;
  accent-color: var(--amber-light);
  cursor: pointer;
}

.task-main-info {
  flex: 1;
}

.task-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.task-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.task-prio-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.prio-dringend { background: var(--red-danger); color: white; }
.prio-normal { background: var(--bg-surface); color: var(--text-muted); }
.prio-niedrig { background: rgba(148, 163, 184, 0.1); color: var(--text-dim); }

.task-sub-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

/* Kanban Board */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  overflow-x: auto;
  min-height: 400px;
}

.kanban-column {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.col-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot-grey { background: #64748b; }
.dot-blue { background: var(--blue-sky); }
.dot-amber { background: var(--amber-light); }
.dot-green { background: var(--green-success); }

.col-count {
  margin-left: auto;
  font-size: 0.75rem;
  background: var(--bg-darkest);
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.kanban-col-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.kanban-card:hover {
  border-color: var(--amber-light);
  transform: translateY(-2px);
}

/* ========================================================== */
/* FIRMEN-WIKI SYSTEM (RICH KNOWLEDGE BASE) */
/* ========================================================== */
.wiki-search-container {
  margin-bottom: 18px;
}

.wiki-search-box-large {
  position: relative;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}

.wiki-search-box-large input {
  width: 100%;
  padding: 12px 14px 12px 42px !important;
  font-size: 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.wiki-search-box-large .search-icon,
.wiki-search-box-large i,
.wiki-search-box-large svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--amber-light);
  pointer-events: none;
}

.btn-clear-search {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.wiki-category-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-chip {
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.filter-chip:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.filter-chip.active {
  background: var(--amber-primary);
  color: #ffffff;
  border-color: var(--amber-primary);
}

/* Wiki Main Layout (Split Pane) */
.wiki-main-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 20px;
  min-height: 550px;
}

@media (max-width: 900px) {
  .wiki-main-layout {
    grid-template-columns: 1fr;
  }
}

.wiki-articles-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 700px;
  overflow-y: auto;
  padding-right: 4px;
}

.wiki-article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wiki-article-card:hover {
  border-color: var(--amber-light);
  background: var(--bg-card-hover);
}

.wiki-article-card.selected {
  border-color: var(--amber-light);
  background: var(--bg-surface);
  box-shadow: 0 0 0 1px var(--amber-light);
}

.wiki-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.wiki-cat-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--blue-sky);
  background: var(--blue-glow);
  padding: 2px 6px;
  border-radius: 4px;
}

.wiki-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.wiki-card-snippet {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Wiki Full Reader Pane */
.wiki-reader-pane {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-height: 700px;
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}

.wiki-reader-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.wiki-reader-empty i,
.wiki-reader-empty svg {
  width: 48px;
  height: 48px;
  color: var(--amber-light);
  margin-bottom: 12px;
}

.wiki-article-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.wiki-article-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.wiki-article-meta {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  align-items: center;
  flex-wrap: wrap;
}

/* Markdown & Technical formatting for Wiki */
.wiki-article-body {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.wiki-article-body h3 {
  color: #ffffff;
  font-size: 1.15rem;
  margin-top: 18px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 4px;
}

.wiki-article-body ul {
  padding-left: 20px;
  margin-bottom: 14px;
}

.wiki-article-body li {
  margin-bottom: 6px;
}

.wiki-article-body strong {
  color: #ffffff;
}

/* Parameter Tables in Wiki */
.wiki-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 0.85rem;
}

.wiki-table th, .wiki-table td {
  border: 1px solid var(--border-subtle);
  padding: 8px 12px;
  text-align: left;
}

.wiki-table th {
  background: var(--bg-darkest);
  color: var(--amber-light);
}

/* Wiki Alert Callout Boxes */
.callout-warning {
  background: var(--red-glow);
  border-left: 4px solid var(--red-danger);
  padding: 12px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 14px 0;
  color: #fca5a5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.callout-tip {
  background: var(--amber-glow);
  border-left: 4px solid var(--amber-light);
  padding: 12px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 14px 0;
  color: #fef08a;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.callout-note {
  background: var(--blue-glow);
  border-left: 4px solid var(--blue-sky);
  padding: 12px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 14px 0;
  color: #bae6fd;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.callout-warning i, .callout-warning svg,
.callout-tip i, .callout-tip svg,
.callout-note i, .callout-note svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ========================================================== */
/* IN-CONTEXT SLIDE-OVER WIKI DRAWER */
/* ========================================================== */
.drawer-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(7, 13, 24, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1050;
  display: flex;
  justify-content: flex-end;
}

.drawer-overlay.hidden {
  display: none;
}

.drawer-panel {
  background: var(--bg-card);
  width: 100%;
  max-width: 580px;
  height: 100%;
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--amber-light);
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
}

.drawer-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
}

.drawer-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.drawer-search-bar {
  position: relative;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
}

.drawer-search-bar input {
  width: 100%;
  padding-left: 36px !important;
  height: 38px;
}

.drawer-search-bar i,
.drawer-search-bar svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.drawer-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

/* ========================================================== */
/* CUSTOMERS VIEW */
/* ========================================================== */
.customers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.customer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.customer-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cust-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--amber-light);
  background: var(--amber-glow);
  padding: 2px 6px;
  border-radius: 4px;
}

.cust-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.cust-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cust-info-item i,
.cust-info-item svg {
  width: 14px;
  height: 14px;
}

.cust-info-item a {
  color: var(--blue-sky);
  text-decoration: none;
}

.cust-info-item a:hover {
  text-decoration: underline;
}

/* ========================================================== */
/* SETTINGS VIEW */
/* ========================================================== */
/* ========================================================== */
/* SETTINGS VIEW */
/* ========================================================== */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 20px;
}

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.settings-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.settings-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 14px;
}

.settings-header-titles {
  flex: 1;
  min-width: 0;
}

.settings-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.set-icon,
.settings-card-header svg.set-icon {
  width: 24px;
  height: 24px;
  color: var(--amber-light);
  flex-shrink: 0;
  margin-top: 2px;
}

.settings-card-header h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.settings-card-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.settings-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.template-steps-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  background: var(--bg-darkest);
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 12px;
}

.template-step-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  transition: all 0.15s ease;
}

.template-step-row:hover {
  background: var(--bg-card-hover);
  border-color: rgba(245, 158, 11, 0.3);
}

.template-add-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.template-step-input {
  flex: 1;
  min-width: 180px;
}

.template-role-btn-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.template-role-select {
  width: 120px;
}

.btn-add-step-submit {
  padding: 8px 14px;
  font-weight: 700;
  white-space: nowrap;
}

.tag-add-bar {
  display: flex;
  gap: 8px;
  align-items: center;
}

.tag-input-field {
  flex: 1;
  min-width: 180px;
}

.tags-cloud-box {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  background: var(--bg-darkest);
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  max-height: 240px;
  overflow-y: auto;
}

.tag-badge-pill {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.tag-badge-pill:hover {
  border-color: var(--amber-light);
  color: #ffffff;
}

.tag-badge-pill button {
  background: none;
  border: none;
  color: var(--red-danger);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  transition: transform 0.15s ease;
}

.tag-badge-pill button:hover {
  transform: scale(1.2);
}

.settings-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-upload-label {
  cursor: pointer;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ========================================================== */
/* MODALS */
/* ========================================================== */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(7, 13, 24, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 3500;
}

.modal.hidden {
  display: none !important;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-large {
  max-width: 720px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.modal-header h3 {
  font-size: 1.2rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-header h3 i,
.modal-header h3 svg {
  width: 20px;
  height: 20px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

/* Editor helpers */
.editor-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 6px;
}

.markdown-toolbar {
  display: flex;
  gap: 4px;
}

.md-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 0.74rem;
  cursor: pointer;
}

.md-btn:hover {
  background: var(--bg-card-hover);
  color: var(--amber-light);
}

.tag-suggestions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.tag-sug-pill {
  font-size: 0.72rem;
  background: var(--bg-surface);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
}

.tag-sug-pill:hover {
  color: var(--amber-light);
  background: var(--bg-card-hover);
}

/* ========================================================== */
/* COMMAND PALETTE (CTRL + K) */
/* ========================================================== */
.command-palette-box {
  background: var(--bg-card);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: fadeIn 0.15s ease-out;
}

.command-search-header {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  gap: 12px;
}

.palette-icon,
.command-search-header svg.palette-icon {
  width: 20px;
  height: 20px;
  color: var(--amber-light);
  flex-shrink: 0;
}

.command-search-header input {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  font-size: 1.05rem;
  color: #ffffff;
}

.command-search-header input:focus {
  box-shadow: none !important;
}

.esc-badge {
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
}

.command-results {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
}

.cmd-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 6px 12px;
}

.cmd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.88rem;
  transition: all 0.1s ease;
}

.cmd-item i,
.cmd-item svg {
  width: 16px;
  height: 16px;
  color: var(--amber-light);
  flex-shrink: 0;
}

.cmd-item:hover, .cmd-item.selected {
  background: var(--bg-surface);
  color: #ffffff;
}

.command-footer {
  display: flex;
  gap: 16px;
  padding: 10px 18px;
  background: var(--bg-darkest);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.command-footer kbd {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: monospace;
}

/* ========================================================== */
/* LIGHTBOX & TOASTS */
/* ========================================================== */
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  text-align: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-md);
  border: 2px solid var(--amber-light);
  box-shadow: var(--shadow-lg);
}

.lightbox-close-btn {
  position: absolute;
  top: -16px;
  right: -16px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border: 1px solid var(--border-subtle);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInUp 0.2s ease-out;
}

.toast i,
.toast svg {
  width: 18px;
  height: 18px;
}

.toast.toast-success { border-left: 4px solid var(--green-success); }
.toast.toast-danger { border-left: 4px solid var(--red-danger); }
.toast.toast-info { border-left: 4px solid var(--blue-sky); }

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================================== */
/* USER PROFILE & FAST TEAM SWITCHER */
/* ========================================================== */
.user-profile-widget {
  position: relative;
}

.btn-user-profile {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 10px 4px 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-user-profile:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber-light), var(--amber-primary));
  color: #0b1120;
  font-weight: 800;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-meta-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.user-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
}

.user-role-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  margin-top: 2px;
}

.user-chevron,
.btn-user-profile svg.user-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

/* Role Badges */
.role-badge-meister { background: var(--amber-glow); color: var(--amber-light); border: 1px solid rgba(245, 158, 11, 0.3); }
.role-badge-buero { background: rgba(129, 140, 248, 0.18); color: #a5b4fc; border: 1px solid rgba(129, 140, 248, 0.35); }
.role-badge-werkstatt { background: var(--blue-glow); color: var(--blue-sky); border: 1px solid rgba(56, 189, 248, 0.3); }
.role-badge-montage { background: var(--green-glow); color: var(--green-success); border: 1px solid rgba(16, 185, 129, 0.3); }
.role-badge-azubi { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }

/* User Profile Dropdown */
.user-profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 290px;
  padding: 12px;
  z-index: 200;
}

.dropdown-user-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
}

.dropdown-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber-light), var(--amber-primary));
  color: #0b1120;
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropdown-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
}

.dropdown-role-label {
  font-size: 0.72rem;
  color: var(--amber-light);
  font-weight: 600;
}

.dropdown-email {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 8px 0;
}

.dropdown-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 6px;
  padding: 0 4px;
}

.quick-users-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 180px;
  overflow-y: auto;
}

.quick-user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-user-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(245, 158, 11, 0.3);
}

.quick-user-item.active {
  border-color: var(--amber-light);
  background: rgba(245, 158, 11, 0.1);
}

.quick-user-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-u-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #334155;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropdown-item {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-main);
  padding: 8px 10px;
  text-align: left;
  font-size: 0.84rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease;
}

.dropdown-item i,
.dropdown-item svg {
  width: 15px;
  height: 15px;
  color: var(--amber-light);
}

.dropdown-item:hover {
  background: var(--bg-surface);
}

.dropdown-item.text-danger {
  color: var(--red-danger);
}

.dropdown-item.text-danger i,
.dropdown-item.text-danger svg {
  color: var(--red-danger);
}

/* Auth Modal Quick Grid */
.auth-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.auth-quick-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-quick-card:hover {
  border-color: var(--amber-light);
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.auth-quick-card.active {
  border-color: var(--amber-light);
  background: rgba(245, 158, 11, 0.12);
}

/* Team Management in Settings */
.team-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.team-member-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
  position: relative;
}

.team-member-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.team-member-card.team-card-current {
  border-color: rgba(16, 185, 129, 0.5);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.06) 0%, var(--bg-surface) 100%);
}

.team-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-avatar-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.45));
  border: 1.5px solid var(--amber-light);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.team-card-headings {
  flex: 1;
  min-width: 0;
}

.team-card-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.team-card-name {
  font-weight: 800;
  color: #ffffff;
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-active-pill {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green-success);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.team-active-pill svg {
  width: 10px;
  height: 10px;
}

.team-card-role-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.team-spec-pill {
  font-size: 0.74rem;
  color: var(--text-muted);
  background: var(--bg-darkest);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.team-card-body {
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.team-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-meta-item svg {
  width: 13px;
  height: 13px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.team-meta-val {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-token-code {
  font-family: var(--font-mono, monospace);
  color: var(--amber-light);
  font-weight: 700;
  background: rgba(245, 158, 11, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(245, 158, 11, 0.25);
  font-size: 0.76rem;
}

.team-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.btn-qr-pass-action {
  flex: 1;
  font-size: 0.8rem !important;
  padding: 7px 12px !important;
  font-weight: 700;
  justify-content: center;
}

.btn-card-icon {
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-card-icon:hover {
  background: var(--bg-card-hover);
  color: #ffffff;
  border-color: var(--amber-light);
}

.btn-card-icon svg {
  width: 15px;
  height: 15px;
}

.btn-card-icon.btn-card-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red-danger);
  border-color: var(--red-danger);
}

/* ========================================================== */
/* ========================================================== */
/* SECURE FULLSCREEN ENTERPRISE LOGIN SCREEN */
/* ========================================================== */
.lock-screen-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 20%, rgba(30, 41, 59, 0.95), #060a12 90%);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow-y: auto;
}

.lock-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  box-shadow: var(--shadow-xl), 0 0 50px rgba(245, 158, 11, 0.1);
  animation: fadeIn 0.3s ease-out;
  overflow: visible;
}

.lock-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.lock-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--amber-light), var(--amber-primary));
  color: #0b1120;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.lock-logo svg {
  width: 28px;
  height: 28px;
}

.lock-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.lock-version {
  font-size: 0.78rem;
  color: var(--amber-light);
  font-weight: 600;
}

.lock-security-banner {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #6ee7b7;
  margin-bottom: 20px;
}

.lock-security-banner svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--green-success);
}

.lock-tabs {
  display: flex;
  background: var(--bg-darkest);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
  margin-bottom: 20px;
}

.lock-tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.lock-tab-btn.active {
  background: var(--amber-primary);
  color: #0b1120;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon svg {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-with-icon input {
  padding-left: 38px !important;
  width: 100%;
}

.btn-lg {
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 700;
}

.lock-footer-help {
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.lock-footer-help svg {
  width: 13px;
  height: 13px;
}

/* QR Code & Token Login Area */
.qr-login-box {
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.qr-scanner-trigger-area {
  text-align: center;
  padding: 10px 0;
}

.qr-scan-icon-ring {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.15);
  border: 2px dashed var(--amber-light);
  color: var(--amber-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px auto;
}

.qr-scan-icon-ring svg {
  width: 30px;
  height: 30px;
}

.qr-scan-heading {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.qr-scan-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.qr-video-feed {
  width: 100%;
  max-height: 200px;
  border-radius: var(--radius-md);
  border: 2px solid var(--amber-primary);
  margin-bottom: 10px;
  object-fit: cover;
  background: #000000;
}

.qr-divider-text {
  text-align: center;
  position: relative;
  margin: 16px 0;
}

.qr-divider-text::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background: var(--border-subtle);
}

.qr-divider-text span {
  position: relative;
  background: var(--bg-darkest);
  padding: 0 10px;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.token-input-field {
  letter-spacing: 2px;
  font-weight: 700;
  font-size: 0.95rem;
}

/* ========================================================== */
/* PRINTABLE QR-PASS ID CARD */
/* ========================================================== */
.qr-pass-card {
  background: #0f172a;
  border: 2px solid var(--amber-primary);
  border-radius: var(--radius-lg);
  padding: 20px;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  margin: 0 auto;
}

.qr-pass-header {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(245, 158, 11, 0.3);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.qr-code-canvas-box {
  width: 150px;
  height: 150px;
  background: #ffffff;
  padding: 8px;
  border-radius: 8px;
  margin: 0 auto 12px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-code-canvas-box img,
.qr-code-canvas-box canvas {
  width: 100% !important;
  height: 100% !important;
}

.qr-user-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 2px;
}

.qr-token-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 4px;
}

.qr-token-code {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--amber-light);
  letter-spacing: 2px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px dashed var(--amber-light);
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 2px;
}

.qr-pass-footer {
  font-size: 0.68rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
  margin-top: 12px;
}

/* ========================================================== */
/* INVITATION SYSTEM & ONBOARDING STYLES */
/* ========================================================== */
.invitations-section {
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
}

.invitations-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.pending-invites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.invite-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.invite-card.expired {
  opacity: 0.6;
  border-color: rgba(239, 68, 68, 0.3);
}

.invite-card.used {
  opacity: 0.7;
  border-color: rgba(16, 185, 129, 0.3);
}

.invite-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.invite-code-pill {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--amber-light);
  background: rgba(245, 158, 11, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px dashed var(--amber-light);
}

.invite-status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.status-badge-active {
  background: rgba(245, 158, 11, 0.2);
  color: var(--amber-light);
  border: 1px solid var(--amber-primary);
}

.status-badge-expired {
  background: rgba(239, 68, 68, 0.2);
  color: var(--red-danger);
}

.status-badge-used {
  background: rgba(16, 185, 129, 0.2);
  color: var(--green-success);
}

.invite-card-body {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.invite-actions-row {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

/* Printable / Presentable Invitation Badge */
.invite-badge-card {
  background: linear-gradient(145deg, #0f172a, #090e1a);
  border: 2px solid var(--amber-primary);
  border-radius: var(--radius-lg);
  padding: 20px;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  margin: 0 auto;
}

.invite-expiry-pill {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--amber-light);
  color: var(--amber-light);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.invite-expiry-pill svg {
  width: 14px;
  height: 14px;
}

/* Onboarding Welcome Banner */
.onboarding-welcome-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 78, 59, 0.4));
  border: 1px solid var(--green-success);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}

/* ========================================================== */
/* COMPREHENSIVE RESPONSIVE DESIGN (MOBILE & TABLET) */
/* ========================================================== */

/* Large Tablets and Laptops <= 992px */
@media (max-width: 992px) {
  .wiki-main-layout {
    grid-template-columns: 1fr;
  }
  .wiki-reader-pane {
    position: relative;
    max-height: none;
  }
  .order-hero-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .hero-meta-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Tablets & Mobile Devices <= 768px */
@media (max-width: 768px) {
  .app-header {
    padding: 8px 12px;
    height: auto;
    flex-wrap: wrap;
    gap: 8px;
  }

  .header-left .brand-subtitle,
  .brand-text .app-subtitle {
    display: none;
  }

  .header-center {
    order: 3;
    width: 100%;
    margin: 0;
  }

  .command-search-btn {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    padding: 8px 12px;
  }

  .command-search-btn .shortcut-key {
    display: none;
  }

  .header-right {
    margin-left: auto;
    gap: 8px;
  }

  .sync-text {
    display: none;
  }

  .sync-badge {
    padding: 6px;
  }

  .quick-btn-label {
    display: none;
  }

  .btn-quick-action {
    padding: 6px 10px;
  }

  .user-profile-widget {
    display: none !important;
  }

  .nav-tabs-bar {
    top: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-tabs-container {
    width: max-content;
    padding: 6px 12px;
  }

  .nav-tab-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .app-container {
    padding: 12px;
  }

  .view-header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .header-action-group {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input-wrapper {
    width: 100%;
  }

  .segmented-filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .segmented-control {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  .seg-btn {
    white-space: nowrap;
    padding: 6px 12px;
  }

  .subtabs-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  .subtab-btn {
    white-space: nowrap;
    padding: 8px 14px;
  }

  .step-filter-pills {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding-bottom: 4px;
  }

  .step-phase-pill {
    white-space: nowrap;
  }

  .wiki-category-chips {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding-bottom: 4px;
  }

  .filter-chip {
    white-space: nowrap;
  }

  .orders-grid,
  .customers-grid,
  .team-cards-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .modal-content {
    max-width: 96vw;
    padding: 16px;
    max-height: 90vh;
  }

  .status-pill-grid {
    grid-template-columns: 1fr 1fr;
  }

  .drawer-panel {
    width: 100vw;
    max-width: 100vw;
  }

  .hero-meta-grid {
    grid-template-columns: 1fr;
  }

  .detail-top-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .detail-action-buttons {
    justify-content: flex-end;
  }
}

/* Small Mobile Screens <= 480px */
@media (max-width: 480px) {
  .lock-card {
    padding: 20px 14px;
  }

  .lock-users-grid {
    grid-template-columns: 1fr;
  }

  .pin-key {
    padding: 10px 0;
    font-size: 1.15rem;
  }

  .status-pill-grid {
    grid-template-columns: 1fr 1fr;
  }

  .step-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .step-menu-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ========================================================== */
/* MOBILE HAMBURGER, DRAWER & BOTTOM NAV STYLES */
/* ========================================================== */
.btn-hamburger {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
  margin-right: 6px;
}

.btn-hamburger:hover {
  background: var(--bg-card-hover);
  border-color: var(--amber-light);
  color: var(--amber-light);
}

.mobile-drawer-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(7, 13, 24, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1100;
  transition: opacity 0.3s ease;
}

.mobile-drawer-backdrop.hidden {
  display: none;
  opacity: 0;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(320px, 86vw);
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-subtle);
  z-index: 1110;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateX(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.mobile-nav-drawer.hidden {
  transform: translateX(-100%);
  pointer-events: none;
}

.mobile-drawer-header {
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-title {
  font-weight: 800;
  color: white;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.drawer-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-drawer-close {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-drawer-close:hover {
  color: white;
  border-color: var(--border-focus);
}

.drawer-user-card {
  padding: 16px 20px;
  background: var(--bg-darkest);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--gradient-amber);
  color: #0b1120;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-amber);
}

.drawer-user-name {
  font-weight: 700;
  color: white;
  font-size: 0.95rem;
}

.drawer-user-email {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.drawer-nav-section, .drawer-actions-section {
  padding: 16px 14px;
}

.drawer-section-heading {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  padding-left: 8px;
}

.drawer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-nav-item, .drawer-action-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: var(--transition-fast);
}

.drawer-nav-item:hover, .drawer-action-btn:hover {
  background: var(--bg-card-hover);
  color: white;
}

.drawer-nav-item.active {
  background: var(--amber-glow);
  color: var(--amber-light);
  font-weight: 700;
  border-left: 3px solid var(--amber-light);
}

.drawer-nav-item svg, .drawer-action-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.drawer-actions-section {
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: rgba(11, 17, 32, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  z-index: 1000;
  justify-content: space-around;
  align-items: center;
  padding: 0 4px;
}

.mobile-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 2px;
  position: relative;
  transition: var(--transition-fast);
}

.mobile-nav-btn svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.mobile-nav-btn.active {
  color: var(--amber-light);
}

.mobile-nav-btn.active svg {
  transform: translateY(-2px);
  color: var(--amber-light);
}

.mobile-nav-btn .tab-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 18px);
  font-size: 0.6rem;
  padding: 1px 4px;
  border-radius: 10px;
}

/* Mobile Floating Action Button (FAB) */
.main-mobile-fab {
  position: fixed;
  bottom: 76px;
  right: 18px;
  z-index: 990;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%) !important;
  color: #0b1120 !important;
  font-weight: 800 !important;
  font-size: 0.88rem;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 30px;
  padding: 12px 18px;
  display: none;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.55), 0 3px 8px rgba(0, 0, 0, 0.4) !important;
  cursor: pointer;
  opacity: 1 !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-mobile-fab:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.7), 0 4px 10px rgba(0, 0, 0, 0.5) !important;
}

.main-mobile-fab:active {
  transform: scale(0.96);
}

.main-mobile-fab svg,
.main-mobile-fab i {
  width: 18px;
  height: 18px;
  color: #0b1120 !important;
  stroke: #0b1120 !important;
  stroke-width: 2.4px;
}

.main-mobile-fab span,
.main-mobile-fab .fab-label {
  color: #0b1120 !important;
  font-weight: 800 !important;
}

/* ========================================================== */
/* STREAMLINED ORDER DETAIL TOPBAR */
/* ========================================================== */
.order-detail-topbar {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.order-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-back-link {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-back-link:hover {
  background: var(--bg-card-hover);
  color: white;
  border-color: var(--amber-light);
}

.btn-back-link svg {
  width: 16px;
  height: 16px;
}

.order-headline-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.order-headline-group.clickable-order-info {
  cursor: pointer;
  border-radius: var(--radius-md);
  padding: 6px 10px;
  margin: -6px -10px;
  transition: all 0.2s ease;
  user-select: none;
}

.order-headline-group.clickable-order-info:hover {
  background: rgba(251, 191, 36, 0.08);
  outline: 1px dashed rgba(251, 191, 36, 0.35);
}

.btn-info-badge {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: var(--amber-light);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-info-badge:hover {
  background: var(--amber-primary);
  color: #0b1120;
  border-color: var(--amber-light);
  transform: translateY(-1px);
}

.btn-info-badge svg {
  width: 12px;
  height: 12px;
}

.det-client-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.02em;
  margin: 0;
}

.order-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ========================================================== */
/* ORDER ATTACHMENTS & DRAWINGS STYLES */
/* ========================================================== */
.attachment-dropzone {
  border: 2px dashed var(--border-subtle);
  background: rgba(30, 41, 59, 0.4);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.attachment-dropzone:hover,
.attachment-dropzone.dragover {
  border-color: var(--amber-light);
  background: rgba(251, 191, 36, 0.06);
  transform: translateY(-1px);
}

.attachment-dropzone .dropzone-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.12);
  color: var(--amber-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.attachment-dropzone .dropzone-icon svg {
  width: 22px;
  height: 22px;
}

.attachment-dropzone .dropzone-text {
  font-size: 0.92rem;
  color: var(--text-main);
}

.attachment-dropzone .dropzone-browse {
  color: var(--amber-light);
  text-decoration: underline;
  font-weight: 700;
}

.attachment-dropzone .dropzone-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.attachments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.attachment-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  position: relative;
}

.attachment-card:hover {
  border-color: var(--border-focus);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.attachment-preview-box {
  width: 100%;
  height: 180px;
  background: #0b1120;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.attachment-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.attachment-preview-box:hover img {
  transform: scale(1.04);
}

.attachment-pdf-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(15, 23, 42, 0.9));
  color: var(--red-danger);
}

.attachment-pdf-preview svg {
  width: 48px;
  height: 48px;
}

.attachment-type-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.attachment-card-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.attachment-file-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.attachment-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.attachment-card-actions button,
.attachment-card-actions a {
  flex: 1;
  font-size: 0.76rem;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

/* ========================================================== */
/* DECOUPLED WIKI FULL-SCREEN & CARDS STYLES */
/* ========================================================== */
.wiki-sub-page {
  animation: fadeIn 0.2s ease;
}

.wiki-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.wiki-reader-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.wiki-reader-actions {
  display: flex;
  gap: 8px;
}

.wiki-full-reader-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-md);
  max-width: 960px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .btn-hamburger {
    display: inline-flex;
  }

  .nav-tabs-bar {
    display: none;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .main-mobile-fab {
    display: inline-flex;
  }

  /* Hide redundant static top action buttons replaced by the FAB */
  #btn-new-order,
  #btn-new-task,
  #btn-new-wiki,
  #btn-new-customer,
  #btn-add-step-to-order,
  #btn-add-element,
  .steps-action-group,
  .quick-create-dropdown {
    display: none !important;
  }

  /* Ample bottom padding so FAB & bottom nav bar NEVER obscure cards, tables or buttons */
  .app-container {
    padding: 12px 14px 160px 14px;
  }

  .tab-view,
  .subtab-content,
  .orders-grid,
  .steps-clean-list,
  .elements-table-wrapper,
  .customer-info-hub,
  .photos-gallery-grid,
  .tasks-enhanced-list,
  .kanban-board,
  .wiki-cards-grid,
  .wiki-full-reader-card,
  .customers-grid,
  .settings-tab-layout {
    padding-bottom: 80px;
  }

  .view-header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .header-action-group {
    width: 100%;
    flex-direction: column;
  }

  .header-action-group .search-input-wrapper {
    width: 100%;
  }

  .steps-toolbar {
    margin-bottom: 12px;
  }

  .order-detail-topbar {
    padding: 12px 14px;
    flex-direction: column;
    align-items: stretch;
  }

  .order-topbar-left {
    width: 100%;
    justify-content: space-between;
  }

  .order-topbar-right {
    width: 100%;
    justify-content: flex-end;
  }

  .wiki-full-reader-card {
    padding: 18px 16px 80px 16px;
  }

  .subtabs-bar {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 6px;
  }

  /* Settings Mobile Layout */
  .settings-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .settings-card {
    padding: 16px;
  }

  .settings-card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .settings-header-actions {
    margin-left: 0;
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }

  .settings-header-actions .btn-primary,
  .settings-header-actions .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .template-add-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .template-role-btn-group {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .template-role-select {
    flex: 1;
    width: auto;
  }

  .btn-add-step-submit {
    flex: 1;
    justify-content: center;
  }

  .team-cards-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .tag-add-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .tag-add-bar button {
    width: 100%;
    justify-content: center;
  }
}

/* ========================================================== */
/* DEDICATED PRINT STYLES */
/* ========================================================== */
.printable-order-container {
  display: none;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 10mm 12mm 10mm 12mm;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 10pt !important;
    line-height: 1.3 !important;
  }

  /* Hide entire interactive web app UI */
  .app-header,
  .nav-tabs-bar,
  .subtabs-bar,
  .tab-view,
  .modal,
  .mobile-bottom-nav,
  .main-mobile-fab,
  .mobile-nav-drawer,
  .mobile-drawer-backdrop,
  .toast-container,
  .steps-toolbar,
  #subtab-content-steps,
  #subtab-content-notes,
  .detail-action-buttons,
  .btn-back-link,
  .order-detail-topbar,
  .elements-tab-header,
  .header-action-group,
  .quick-create-dropdown,
  .user-profile-widget {
    display: none !important;
  }

  /* Show dedicated printable sheet */
  .printable-order-container {
    display: block !important;
    width: 100% !important;
    color: #000000 !important;
    background: #ffffff !important;
  }

  .print-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #000000;
    padding-bottom: 8px;
    margin-bottom: 12px;
  }

  .print-logo-title {
    font-size: 16pt;
    font-weight: bold;
    color: #000000;
    margin: 0;
  }

  .print-sub {
    font-size: 8.5pt;
    color: #444444;
    margin-top: 2px;
  }

  .print-doc-meta {
    text-align: right;
    font-size: 8.5pt;
  }

  .print-meta-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 10px;
    margin-bottom: 14px;
  }

  .print-card {
    border: 1px solid #000000;
    border-radius: 3px;
    padding: 8px 10px;
  }

  .print-card h4 {
    margin: 0 0 5px 0;
    font-size: 9.5pt;
    font-weight: bold;
    border-bottom: 1px solid #cccccc;
    padding-bottom: 2px;
    text-transform: uppercase;
  }

  .print-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
    font-size: 8.5pt;
  }

  .print-row-label {
    font-weight: bold;
    color: #333333;
  }

  .print-section-heading {
    font-size: 11pt;
    font-weight: bold;
    border-bottom: 1.5px solid #000000;
    padding-bottom: 3px;
    margin: 14px 0 6px 0;
  }

  .print-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px;
    font-size: 8pt;
  }

  .print-table th,
  .print-table td {
    border: 1px solid #000000;
    padding: 4px 5px;
    text-align: left;
  }

  .print-table th {
    background-color: #f0f0f0 !important;
    font-weight: bold;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-table tr {
    page-break-inside: avoid;
  }

  .print-attachment-container {
    page-break-inside: avoid;
    margin-top: 12px;
    margin-bottom: 16px;
  }

  .print-attachment-title {
    font-weight: bold;
    font-size: 9.5pt;
    margin-bottom: 4px;
  }

  .print-attachment-img {
    max-width: 100% !important;
    max-height: 460px !important;
    width: auto;
    display: block;
    border: 1px solid #888888;
    object-fit: contain;
    page-break-inside: avoid;
  }

  .print-footer {
    margin-top: 20px;
    padding-top: 8px;
    border-top: 1px solid #cccccc;
    display: flex;
    justify-content: space-between;
    font-size: 7.5pt;
    color: #555555;
  }
}


