/* =====================================================
   NV HUB - Zentrales Theme & Hub-Wide Styles
   Akzentfarbe und alle Farben hier zentral anpassbar
   ===================================================== */

:root {
  /* === FARBEN === Zentral anpassbar */
  --brand-dark: #0B171A;
  --brand-surface: #11232A;
  --brand-surface-2: #15313A;
  --brand-input: #142B33;
  --brand-accent: #80C8BE;
  --brand-accent-hover: #9DD8D0;
  --brand-accent-soft: rgba(128, 200, 190, 0.15);
  --brand-accent-border: rgba(128, 200, 190, 0.30);

  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.15);
  --warning: #fbbf24;
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.15);

  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-default: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.15);

  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 6px rgba(0,0,0,.25);
  --shadow-md: 0 4px 14px rgba(0,0,0,.3);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.4);
  --shadow-glow: 0 0 32px rgba(128, 200, 190, 0.12);

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  /* Einheitliche Control-Höhen */
  --control-h: 44px;       /* Standard für Buttons / Inputs */
  --control-h-lg: 52px;    /* Großzügig für Primary CTAs / Hauptsuche */
  --control-px: 1.1rem;
  --control-px-lg: 1.5rem;
}

* { box-sizing: border-box; }

body.hub-body {
  margin: 0;
  background: radial-gradient(circle at 20% -10%, #15313A 0%, var(--brand-dark) 55%) no-repeat;
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Pre-auth gate: hide application UI until login completes.
   .login-overlay (appended directly to body) and #nv-shell remain visible. */
body.hub-body:not(.nv-ready) > *:not(.login-overlay):not(#nv-shell):not(script):not(style) {
  visibility: hidden !important;
}

.hidden { display: none !important; }

/* ===================================================
   TOP NAV
   =================================================== */
.hub-nav {
  height: 64px;
  background: rgba(17, 35, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}
.hub-logo {
  display: flex; align-items: center; gap: .75rem;
  text-decoration: none; color: var(--text-primary);
  font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em;
}
.hub-logo .logo-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--brand-accent);
  color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.hub-nav-links { display: flex; gap: .35rem; }
.hub-nav-link {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: 0 .95rem;
  height: 38px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: .9rem; font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: var(--transition);
}
.hub-nav-link:hover { background: var(--border-subtle); color: var(--text-primary); border-color: var(--border-default); }
.hub-nav-link.active {
  background: var(--brand-accent-soft);
  color: var(--brand-accent);
  border-color: rgba(128, 200, 190, .35);
}
.hub-nav-link i { width: 14px; text-align: center; font-size: .95rem; }
.hub-nav-actions { display: flex; align-items: center; gap: .4rem; }
.hub-nav-actions .icon-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
  transition: var(--transition);
}
.hub-nav-actions .icon-btn:hover {
  color: var(--brand-accent);
  border-color: var(--brand-accent);
  background: var(--brand-accent-soft);
}

/* Header brand with image logo */
.hub-nav-brand {
  display: inline-flex; align-items: center; gap: .3rem;
  text-decoration: none; color: var(--text-primary);
}
.hub-nav-brand img.hub-brand-mark {
  height: 1.4rem; width: auto;
  display: block;
}
.hub-nav-brand .hub-brand-text {
  font-size: 1.85rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text-primary);
}

/* Beta badge – sits next to the brand wordmark */
.nv-beta-badge {
  display: inline-flex;
  align-items: center;
  margin-left: .5rem;
  padding: 5px 9px;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--brand-accent);
  background: var(--brand-accent-soft, rgba(94, 234, 212, .12));
  border: 1px solid var(--brand-accent);
  border-radius: 999px;
  position: relative;
  top: -2px;
  user-select: none;
}
.nv-beta-badge--lg {
  font-size: .72rem;
  padding: 7px 12px;
  margin-left: .65rem;
  top: -6px;
}

/* ===================================================
   CONTAINER & MODULES
   =================================================== */
.hub-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}
.module-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}
.module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.module-header h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex; align-items: center; gap: .85rem;
}
.module-header h1 i {
  color: var(--brand-accent);
  font-size: 1.4rem;
}
.module-toolbar {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
}

/* ===================================================
   BUTTONS - Konsistente, moderne Pill-Outline-Optik
   =================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  height: var(--control-h);
  padding: 0 var(--control-px);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
}
.btn i { font-size: .9em; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Primary = pill outline mit accent */
.btn-primary {
  background: var(--brand-accent);
  color: var(--brand-dark);
  border-color: var(--brand-accent);
  box-shadow: 0 8px 20px rgba(128, 200, 190, 0.15);
}
.btn-primary:hover:not(:disabled) {
  background: var(--brand-accent-hover);
  border-color: var(--brand-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(128, 200, 190, 0.25);
}

/* Outline (große CTAs) */
.btn-outline {
  border-color: var(--brand-accent);
  color: var(--brand-accent);
  background: transparent;
}
.btn-outline:hover:not(:disabled) {
  background: var(--brand-accent-soft);
  color: var(--brand-accent-hover);
}

/* Secondary - neutral pill */
.btn-secondary {
  background: var(--brand-input);
  color: var(--text-primary);
  border-color: var(--border-default);
}
.btn-secondary:hover:not(:disabled) {
  border-color: var(--brand-accent);
  color: var(--brand-accent);
}

/* Ghost - transparent text only */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
  color: var(--brand-accent);
  background: var(--border-subtle);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}
.btn-danger:hover:not(:disabled) {
  background: var(--danger-soft);
}

/* Größenvarianten */
.btn-lg {
  height: var(--control-h-lg);
  padding: 0 var(--control-px-lg);
  font-size: 1rem;
}
.btn-sm {
  height: 36px;
  padding: 0 0.85rem;
  font-size: .82rem;
}
.btn-icon {
  width: var(--control-h);
  padding: 0;
}
.btn-icon.btn-sm { width: 36px; }

/* Icon-only ohne Bordr (z.B. quick actions) */
.icon-button {
  width: 38px; height: 38px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.icon-button:hover {
  color: var(--brand-accent);
  border-color: var(--brand-accent);
}
.icon-button.danger:hover {
  color: var(--danger);
  border-color: var(--danger);
}

/* ===================================================
   DASHBOARD TILES
   =================================================== */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1rem;
  padding: 1.75rem 1.5rem 1.5rem;
  background: var(--brand-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.tile:hover {
  transform: translateY(-4px);
  border-color: var(--brand-accent-border);
  box-shadow: var(--shadow-lg);
}
.tile-icon {
  font-size: 2.4rem;
  color: var(--brand-accent);
  margin-bottom: 1rem;
  line-height: 1;
}
.tile-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0;
}
.tile-count {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: .35rem;
  margin-bottom: 0;
}
.tile-body { display: flex; flex-direction: column; }
.tile-arrow {
  position: absolute;
  top: 1.25rem; right: 1.25rem;
  color: var(--text-dim);
  transition: var(--transition);
}
.tile:hover .tile-arrow {
  color: var(--brand-accent);
  transform: translate(3px, -3px);
}

/* ===================================================
   FORMS / INPUTS - Konsistente Höhe & Style
   =================================================== */
.form-section {
  background: var(--brand-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}
.form-section h3 {
  margin: 0 0 1.25rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand-accent);
  display: flex; align-items: center; gap: .55rem;
}
.form-section h3 i { font-size: .85em; }

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.form-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-row.cols-2-3   { grid-template-columns: 2fr 3fr; }
.form-row.cols-3-1   { grid-template-columns: 3fr 1fr; }
.form-row.cols-1-2-2 { grid-template-columns: 1fr 2fr 2fr; }
.form-row.cols-1-3-2 { grid-template-columns: 1fr 3fr 2fr; }
@media (max-width: 720px) {
  .form-row,
  .form-row.cols-3,
  .form-row.cols-2-3,
  .form-row.cols-3-1,
  .form-row.cols-1-2-2,
  .form-row.cols-1-3-2 { grid-template-columns: 1fr; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.form-group label {
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: .01em;
}

.form-group input,
.form-group select,
.form-group textarea,
input.hub-input,
select.hub-input,
textarea.hub-input {
  width: 100%;
  height: var(--control-h);
  padding: 0 .9rem;
  background: var(--brand-input);
  color: var(--text-primary);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: .92rem;
  transition: var(--transition);
}
.form-group textarea,
textarea.hub-input {
  height: auto;
  padding: .75rem .9rem;
  min-height: 90px;
  resize: vertical;
  line-height: 1.5;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
input.hub-input:focus,
select.hub-input:focus,
textarea.hub-input:focus {
  outline: none;
  border-color: var(--brand-accent);
  background: var(--brand-surface-2);
  box-shadow: 0 0 0 4px var(--brand-accent-soft);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }
.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Inline-Action Wrapper: Input mit Button daneben */
.input-with-action {
  display: flex;
  gap: .5rem;
  align-items: stretch;
}
.input-with-action > input,
.input-with-action > select { flex: 1; }
.input-with-action > .btn { flex-shrink: 0; }

/* ===================================================
   SEARCH / SORT / VIEW TOGGLE
   =================================================== */
.search-input {
  height: var(--control-h);
  min-width: 240px;
  padding: 0 1rem 0 2.5rem;
  background: var(--brand-input);
  color: var(--text-primary);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: .92rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16' fill='none'><circle cx='7' cy='7' r='5.5' stroke='%2394a3b8' stroke-width='1.5'/><path d='M11 11L14 14' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: 1rem center;
  transition: var(--transition);
}
.search-input:focus {
  outline: none;
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 4px var(--brand-accent-soft);
}
.sort-select {
  height: var(--control-h);
  padding: 0 2.5rem 0 1rem;
  background: var(--brand-input);
  color: var(--text-primary);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: .9rem;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
  transition: var(--transition);
}
.sort-select:focus { outline: none; border-color: var(--brand-accent); }

.view-toggle {
  display: inline-flex;
  background: var(--brand-input);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-pill);
  padding: 3px;
  height: var(--control-h);
  gap: 2px;
}
.view-toggle button {
  /* square icon-only */
  width: calc(var(--control-h) - 8px);
  height: calc(var(--control-h) - 8px);
  aspect-ratio: 1 / 1;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition);
  font-size: .9rem;
}
.view-toggle button:hover { color: var(--text-primary); }
.view-toggle button.active {
  background: var(--brand-accent);
  color: var(--brand-dark);
}

/* ===================================================
   DATA CARDS / GRID
   =================================================== */
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.data-card {
  position: relative;
  background: var(--brand-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}
.data-card:hover {
  border-color: var(--brand-accent-border);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.data-card h3 {
  margin: 0 0 .35rem;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding-right: 90px;
}
.data-card .sub {
  font-size: .82rem;
  color: var(--text-muted);
  margin: 0 0 .9rem;
}
.data-card .meta {
  display: flex; flex-wrap: wrap; gap: .9rem;
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: .85rem;
  padding-top: .85rem;
  border-top: 1px solid var(--border-subtle);
}
.data-card .meta i { color: var(--brand-accent); margin-right: .25rem; }
.data-card .quick-actions {
  position: absolute;
  top: 1rem; right: 1rem;
  display: flex; gap: .25rem;
  opacity: 0;
  transition: var(--transition);
}
.data-card:hover .quick-actions { opacity: 1; }
.data-card .quick-actions button {
  width: 32px; height: 32px;
  background: var(--brand-input);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: .75rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.data-card .quick-actions button:hover {
  color: var(--brand-accent);
  border-color: var(--brand-accent);
}
.data-card .quick-actions button.danger:hover {
  color: var(--danger);
  border-color: var(--danger);
}

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }
.tag {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .65rem;
  background: var(--brand-accent-soft);
  color: var(--brand-accent);
  border-radius: var(--radius-pill);
  font-size: .72rem;
  font-weight: 500;
}
.tag i { font-size: .8em; }
.tag.neutral { background: var(--border-subtle); color: var(--text-secondary); }
.tag.danger { background: var(--danger-soft); color: var(--danger); }
.tag.success { background: var(--success-soft); color: var(--success); }

/* ===================================================
   DATA LIST (Table view)
   =================================================== */
.data-list {
  background: var(--brand-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.data-list table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
.data-list th {
  text-align: left;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: .9rem 1.25rem;
  border-bottom: 1px solid var(--border-default);
  background: var(--brand-input);
}
.data-list td {
  padding: .85rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}
.data-list tr { transition: var(--transition); cursor: pointer; }
.data-list tr:hover { background: var(--brand-accent-soft); }
.data-list .row-actions {
  display: flex; gap: .25rem; justify-content: flex-end;
}
.data-list .row-actions button {
  width: 32px; height: 32px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: .75rem;
  transition: var(--transition);
}
.data-list .row-actions button:hover {
  color: var(--brand-accent);
  border-color: var(--brand-accent);
}
.data-list .row-actions button.danger:hover {
  color: var(--danger);
  border-color: var(--danger);
}

/* ===================================================
   EMPTY STATE
   =================================================== */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  background: var(--brand-surface);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-xl);
}
.empty-state { width: 100%; box-sizing: border-box; }
.empty-state > i {
  font-size: 3rem;
  color: var(--brand-accent);
  opacity: 0.5;
  margin-bottom: 1.25rem;
}
.empty-state .btn i { font-size: .9em; opacity: 1; margin: 0; }
.empty-state h3 {
  margin: 0 0 .5rem;
  font-size: 1.15rem;
  font-weight: 600;
}
.empty-state p {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  max-width: 360px;
  margin-inline: auto;
}

/* ===================================================
   MODAL / TOAST
   =================================================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  animation: fadeIn .15s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--brand-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: slideUp .2s ease-out;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.modal.lg { max-width: 820px; }
.modal.xl { max-width: 1100px; }
.modal-header {
  display: flex; align-items: center; gap: .75rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-default);
}
.modal-header i { color: var(--brand-accent); font-size: 1.1rem; }
.modal-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  flex: 1;
}
.modal-close {
  width: 36px; height: 36px;
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition);
}
.modal-close:hover { color: var(--brand-accent); border-color: var(--brand-accent); }
.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-default);
  display: flex;
  gap: .65rem;
  justify-content: flex-end;
  background: var(--brand-input);
}

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  display: flex; flex-direction: column; gap: .5rem;
}
.toast {
  background: var(--brand-surface);
  border: 1px solid var(--border-default);
  border-left: 4px solid var(--brand-accent);
  border-radius: var(--radius-md);
  padding: .85rem 1.15rem;
  display: flex; align-items: center; gap: .65rem;
  min-width: 280px;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  animation: toastIn .2s ease-out;
  font-size: .9rem;
}
@keyframes toastIn { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: translateX(0); } }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast i { color: var(--brand-accent); }
.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.warning i { color: var(--warning); }

/* ===================================================
   LOGIN
   =================================================== */
.login-overlay {
  position: fixed; inset: 0;
  background: var(--brand-dark);
  background: radial-gradient(circle at 50% 30%, #15313A 0%, var(--brand-dark) 60%);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--brand-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.login-card .login-logo,
.login-card .logo-mark {
  width: 72px; height: 72px;
  border-radius: 18px;
  background: var(--brand-accent-soft);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}
.login-card .login-logo img {
  width: 56px; height: 56px;
  object-fit: contain;
  display: block;
}
.login-card h1 { margin: 0 0 .35rem; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.login-card p { margin: 0 0 1.75rem; color: var(--text-muted); font-size: .92rem; }
.login-input {
  width: 100%;
  height: var(--control-h);
  padding: 0 1rem;
  background: var(--brand-input);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-align: center;
  font-size: 1.1rem;
  letter-spacing: 0.25rem;
  margin-bottom: 1rem;
  transition: var(--transition);
}
.login-input:focus {
  outline: none;
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 4px var(--brand-accent-soft);
}
.login-error {
  color: #ff8b8b;
  background: rgba(255, 90, 90, 0.08);
  border: 1px solid rgba(255, 90, 90, 0.3);
  border-radius: var(--radius-md);
  padding: .6rem .85rem;
  font-size: .88rem;
  margin: 0 0 1.25rem;
  text-align: center;
}
.login-card .btn { margin-top: .5rem; }

/* New brand layout for the login card (mirrors the hub-nav-brand) */
.login-brand {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0 0 1.5rem;
}
.login-brand .login-brand-mark {
  height: 2.4rem;
  width: auto;
  display: block;
}
.login-brand .login-brand-text {
  font-size: 3rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text-primary);
}

/* Settings: give the "Passwort speichern" button some breathing room
   from the inputs above. */
#nv-change-pw-btn { margin-top: 1rem; }

/* ===================================================
   INVOICE STATUS BADGES
   =================================================== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .55rem;
  border-radius: var(--radius-pill);
  font-size: .75rem;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  white-space: nowrap;
}
.status-badge.status-open    { background: rgba(160,160,160,0.15); color: #b8b8b8; border-color: rgba(160,160,160,0.35); }
.status-badge.status-unpaid  { background: rgba(234,179,8,0.15);   color: #facc15; border-color: rgba(234,179,8,0.45); }
.status-badge.status-overdue { background: rgba(239,68,68,0.15);   color: #f87171; border-color: rgba(239,68,68,0.45); }
.status-badge.status-paid    { background: rgba(34,197,94,0.15);   color: #4ade80; border-color: rgba(34,197,94,0.45); }

/* ===================================================
   CUSTOMER DETAIL – Linked documents (stacked rows)
   =================================================== */
.linked-docs-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.linked-docs-col {
  background: var(--brand-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: .9rem 1rem 1rem;
  display: flex; flex-direction: column;
  min-width: 0;
}
.linked-docs-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem;
  margin-bottom: .6rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--border-default);
}
.linked-docs-head h4 {
  margin: 0;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--text-primary);
  display: inline-flex; align-items: center; gap: .45rem;
}
.linked-docs-head h4 i { color: var(--brand-accent); font-size: .85em; }
.linked-docs-head h4 .muted { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: .8rem; }
.linked-docs-head .btn { padding: .25rem .55rem; }

.linked-docs-table {
  overflow-x: auto;
}
.linked-docs-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.linked-docs-table thead th {
  text-align: left;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: .35rem .5rem;
  border-bottom: 1px solid var(--border-default);
}
.linked-docs-table tbody td {
  padding: .55rem .5rem;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.linked-docs-table tbody tr:last-child td { border-bottom: none; }
.linked-docs-table tbody tr { cursor: pointer; transition: background .15s ease; }
.linked-docs-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.linked-docs-table .text-right { text-align: right; }
.linked-docs-table .row-actions-cell { width: 1%; white-space: nowrap; text-align: right; }
.linked-docs-table .row-actions { display: inline-flex; gap: .25rem; }
.linked-docs-table .row-actions button {
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: .78rem;
}
.linked-docs-table .row-actions button:hover {
  background: var(--brand-accent-soft);
  color: var(--brand-accent);
  border-color: var(--brand-accent);
}

/* ===================================================
   CONTRACTS EDITOR – full-viewport split (mirrors invoice tool)
   =================================================== */
#editor-view {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
}
#editor-view.hidden { display: none; }
#editor-view #editor-shell.module-container {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
  flex: 1;
  min-height: 0;
  display: flex;
}
.nv-doc-split {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}
.nv-doc-editor-panel {
  width: 50%;
  min-width: 500px;
  max-width: 700px;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.5rem;
  background: var(--brand-dark, var(--brand-surface));
  border-right: 1px solid var(--border-default);
}
.nv-doc-preview-panel {
  position: relative;
  flex: 1;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 3rem 1.5rem;
  background: rgb(11, 23, 26);
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 20px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
@media (max-width: 1024px) {
  .nv-doc-split { flex-direction: column; }
  .nv-doc-editor-panel { width: 100%; max-width: none; height: auto; max-height: 50vh; }
  .nv-doc-preview-panel { height: auto; min-height: 50vh; }
}

/* Compact + collapsible form sections inside the contracts editor */
.nv-doc-editor-panel .form-section {
  padding: 1.1rem 1.25rem;
  margin-bottom: .75rem;
}
.nv-doc-editor-panel .form-section h3 {
  margin: 0 0 .9rem;
}
.nv-doc-editor-panel .form-section.collapsible > h3 {
  cursor: pointer;
  user-select: none;
  justify-content: space-between;
  margin-bottom: .9rem;
}
.nv-doc-editor-panel .form-section.collapsible > h3::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: .7rem;
  margin-left: auto;
  color: var(--brand-accent);
  transition: transform .2s ease;
}
.nv-doc-editor-panel .form-section.collapsible.collapsed > h3 {
  margin-bottom: 0;
}
.nv-doc-editor-panel .form-section.collapsible.collapsed > h3::after {
  transform: rotate(-90deg);
}
.nv-doc-editor-panel .form-section.collapsible.collapsed > *:not(h3) {
  display: none !important;
}
.nv-doc-editor-panel .form-row { gap: .75rem; }
.nv-doc-editor-panel .form-group { gap: .25rem; }
.nv-doc-editor-panel .form-group label { font-size: .72rem; }
.nv-doc-editor-panel .form-group input,
.nv-doc-editor-panel .form-group select,
.nv-doc-editor-panel .form-group textarea {
  font-size: .88rem;
}

/* Preview badge + page wrapper (used by both contracts and any future doc tool) */
.doc-preview-badge {
  position: absolute;
  top: 14px; right: 14px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: .72rem;
  padding: .35rem .7rem;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.06);
  display: inline-flex; align-items: center; gap: .45rem;
  font-weight: 500; letter-spacing: .03em;
  z-index: 10;
}
.doc-preview-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4ade80;
  animation: nv-pulse 1.6s ease-in-out infinite;
}
@keyframes nv-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
.doc-preview-wrapper {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.doc-pages {
  display: flex; flex-direction: column; gap: 1rem;
  align-items: center;
}

/* ===================================================
   SHARED: Misc utilities
   =================================================== */
.muted { color: var(--text-muted); }
.text-sm { font-size: .85rem; }
.text-xs { font-size: .75rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }

/* Radio Pills */
.radio-pills { display: inline-flex; background: var(--brand-input); border: 1.5px solid var(--border-default); border-radius: var(--radius-pill); padding: 3px; }
.radio-pills label { cursor: pointer; }
.radio-pills label input { display: none; }
.radio-pills label span {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem 1rem;
  font-size: .85rem;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  transition: var(--transition);
}
.radio-pills label input:checked + span {
  background: var(--brand-accent);
  color: var(--brand-dark);
  font-weight: 600;
}

/* Settings dropdown */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--brand-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: .35rem;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}
.dropdown-menu button {
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  padding: .55rem .75rem;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: .88rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; gap: .65rem;
  transition: var(--transition);
}
.dropdown-menu button:hover { background: var(--brand-accent-soft); color: var(--brand-accent); }

/* ===================================================
   Invoice-Hub integration toolbar + pickers
   =================================================== */
.nv-picker-list {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  max-height: 60vh;
  overflow: auto;
  padding-right: 4px;
}
.nv-picker-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  background: var(--brand-input);
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}
.nv-picker-item:hover {
  border-color: var(--brand-accent);
  background: var(--brand-accent-soft);
}
.nv-picker-item .row-actions { display: flex; gap: .25rem; }
.nv-picker-item .row-actions button {
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  width: 32px; height: 32px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition);
}
.nv-picker-item .row-actions button:hover {
  color: var(--brand-accent);
  border-color: var(--brand-accent);
}
.nv-picker-item .row-actions button.danger:hover {
  color: var(--danger);
  border-color: var(--danger);
}

/* Bar above the invoice tool (slim) */
.nv-invoice-bar {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .75rem 1.5rem;
  background: rgba(17, 35, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-default);
  flex-wrap: wrap;
  position: relative;
  z-index: 60;
  overflow: visible;
}
.nv-invoice-bar .spacer { flex: 1; }
.nv-invoice-bar .doc-title-input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  padding: .35rem .5rem;
  letter-spacing: .01em;
}
.nv-invoice-bar .doc-title-input[readonly] {
  cursor: default;
  opacity: .92;
}

/* Helper buttons inside invoice tool fields */
.inline-helper-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--brand-input);
  color: var(--brand-accent);
  border: 1.5px solid var(--brand-accent-border);
  height: 36px;
  padding: 0 .9rem;
  border-radius: var(--radius-pill);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.inline-helper-btn:hover {
  background: var(--brand-accent-soft);
  border-color: var(--brand-accent);
}
.inline-helper-row {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-top: .6rem;
}

/* ===================================================
   Invoice slim bar - export + lang controls
   =================================================== */
.nv-invoice-bar .nv-lang-toggle {
  display: inline-flex; gap: 2px;
  background: var(--brand-input);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-pill);
  padding: 3px;
}
.nv-invoice-bar .nv-lang-toggle button {
  width: 32px; height: 32px;
  border-radius: var(--radius-pill);
  border: none; background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
  transition: var(--transition);
  opacity: .55;
}
.nv-invoice-bar .nv-lang-toggle button.active { opacity: 1; background: var(--brand-accent-soft); }
.nv-invoice-bar .nv-lang-toggle img { width: 18px; height: 18px; border-radius: 999px; display: block; }

.nv-export-wrap { position: relative; z-index: 100; }
.nv-export-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 280px;
  background: var(--brand-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: .5rem;
  z-index: 9999;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.nv-export-wrap.open .nv-export-menu { display: flex; }
.nv-export-menu button {
  display: flex; align-items: center; gap: .75rem;
  width: 100%; padding: .65rem .85rem;
  background: transparent; border: none;
  text-align: left; cursor: pointer;
  color: var(--text-secondary);
  font-family: inherit; font-size: .9rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.nv-export-menu button:hover { background: var(--brand-accent-soft); color: var(--brand-accent); }
.nv-export-menu button i { width: 18px; text-align: center; color: var(--brand-accent); font-size: 1rem; }
.nv-export-menu .menu-section {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-muted); padding: .5rem .85rem .25rem; margin: 0;
}
.nv-export-menu .menu-divider { height: 1px; background: var(--border-subtle); margin: .35rem 0; }

/* Per-position quick actions injected into invoice items */
.nv-pos-actions {
  position: absolute;
  top: .55rem; right: .55rem;
  display: flex; gap: .35rem;
  z-index: 5;
}
.nv-pos-actions button {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: rgba(128, 200, 190, 0.10);
  border: 1px solid rgba(128, 200, 190, 0.35);
  color: var(--brand-accent);
  cursor: pointer;
  font-size: .78rem;
  display: inline-flex; align-items: center; justify-content: center;
  transition: var(--transition);
  opacity: 1;
}
.nv-pos-actions button:hover {
  background: var(--brand-accent);
  color: var(--brand-dark);
  border-color: var(--brand-accent);
  transform: translateY(-1px);
}
.nv-pos-actions button.danger {
  color: #ff8b8b;
  border-color: rgba(255, 90, 90, 0.4);
  background: rgba(255, 90, 90, 0.08);
}
.nv-pos-actions button.danger:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
/* Hide app.js inline trash + Pos-X badge to avoid overlap with nv-pos-actions */
.position-box button[onclick*="removeItem"] { display: none !important; }
.position-box > .absolute.top-3.right-3 { display: none !important; }
/* Roomier position-box layout - reserve right space for action buttons */
.position-box { padding: 1.1rem 1rem !important; padding-right: 7.5rem !important; position: relative; }
.position-box .grid { gap: .75rem !important; }

/* ===================================================
   RESPONSIVE OPTIMIZATIONS (global)
   =================================================== */

/* Universal overflow guards */
html, body { max-width: 100%; overflow-x: hidden; }
img, svg, video, canvas { max-width: 100%; height: auto; }
table { max-width: 100%; }

/* Tablet & smaller — collapse top-nav text labels */
@media (max-width: 960px) {
  .hub-nav { padding: 0 1rem; }
  .hub-nav-link .hide-md { display: none; }
  .hub-nav-link { padding: 0 .7rem; }
  .hub-nav-links { gap: .2rem; }
}

/* Mobile — hide the inline top-nav links entirely (FAB menu takes over) */
@media (max-width: 720px) {
  .hub-nav { padding: 0 .9rem; }
  .hub-nav-links { display: none; }
  .hub-nav-brand .hub-brand-text { font-size: 1.5rem; }
  .hub-nav-brand img.hub-brand-mark { height: 1.2rem; }
  .nv-beta-badge { font-size: .55rem; padding: 4px 7px; margin-left: .35rem; }

  .hub-container,
  .module-container { padding: 1.25rem .9rem 6rem; }

  .module-header { gap: .75rem; margin-bottom: 1.25rem; }
  .module-header h1 { font-size: 1.35rem; }
  .module-header .actions,
  .module-header > div { width: 100%; }
  .module-header .actions { display: flex; flex-wrap: wrap; gap: .5rem; }
  .module-header .actions .btn,
  .module-header .actions button { flex: 1 1 auto; }

  .form-section { padding: 1rem; }
  .form-row,
  .form-row.cols-3,
  .form-row.cols-2-3,
  .form-row.cols-3-1,
  .form-row.cols-1-2-2,
  .form-row.cols-1-3-2 { grid-template-columns: 1fr; gap: .65rem; }

  /* Full-width inputs */
  .form-group,
  .form-group input,
  .form-group select,
  .form-group textarea,
  input.hub-input,
  .input-field { width: 100%; max-width: 100%; box-sizing: border-box; }

  /* Toast + modal width */
  #toast-container { left: .75rem; right: .75rem; bottom: 5.5rem; }
  #toast-container .toast { width: 100%; max-width: none; }

  /* Tables → horizontal scroll wrappers */
  .table-wrap,
  .nv-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Linked docs card list — already vertical */
  .linked-docs-col { padding: .9rem; }

  /* Customer detail rows — stack labels */
  .detail-row { flex-direction: column; align-items: flex-start; gap: .15rem; }

  /* Invoice / contract editor split — already stacks via 1024px MQ */
  .nv-doc-editor-panel { min-width: 0; padding: 1rem; }
  .nv-doc-preview-panel { padding: 1.25rem .5rem; }

  /* Position items — single column inside box */
  .position-box { padding: .9rem .9rem !important; padding-right: .9rem !important; }
  .position-box .grid.grid-cols-12 > * { grid-column: span 12 !important; }
  .position-box .grid.grid-cols-2 { grid-template-columns: 1fr !important; }
  .nv-pos-actions {
    position: static !important;
    display: flex;
    justify-content: flex-end;
    gap: .4rem;
    margin-top: .65rem;
    padding-top: .65rem;
    border-top: 1px solid var(--border-subtle);
  }

  /* Quill / contract editor body */
  .ql-editor { min-height: 160px; }

  /* Generic buttons stretch nicely */
  .btn { min-height: 40px; }

  /* Modals near-full-width */
  .nv-modal,
  .modal-card { width: calc(100vw - 1.25rem) !important; max-width: 100% !important; }
}

/* Very small phones */
@media (max-width: 380px) {
  .hub-nav-brand .hub-brand-text { font-size: 1.25rem; }
  .module-header h1 { font-size: 1.15rem; }
  .nv-beta-badge { display: none; }
}

/* ===================================================
   MOBILE FAB NAVIGATION
   =================================================== */
.nv-fab-wrap {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom, 1rem));
  transform: translateX(-50%);
  z-index: 80;
  display: none;
  pointer-events: none;
}
@media (max-width: 720px) {
  .nv-fab-wrap { display: block; }
}
.nv-fab-btn {
  pointer-events: auto;
  width: 60px;
  height: 60px;
  border-radius: 999px;
  border: 1px solid var(--brand-accent);
  background: linear-gradient(145deg, var(--brand-accent), #6fd9c8);
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow:
    0 12px 32px -8px rgba(0,0,0,.6),
    0 4px 12px rgba(0,0,0,.4),
    0 0 0 6px rgba(94, 234, 212, .08);
  cursor: pointer;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease, background .2s ease;
}
.nv-fab-btn:hover { transform: translateY(-2px); }
.nv-fab-btn:active { transform: scale(.94); }
.nv-fab-btn .fa-xmark { display: none; }
.nv-fab-wrap.open .nv-fab-btn { transform: rotate(45deg); background: linear-gradient(145deg, #ef9a9a, var(--danger, #e57373)); border-color: var(--danger, #e57373); }
.nv-fab-wrap.open .nv-fab-btn .fa-bars { display: none; }
.nv-fab-wrap.open .nv-fab-btn .fa-xmark { display: inline-block; transform: rotate(-45deg); }

.nv-fab-backdrop {
  position: fixed; inset: 0;
  background: rgba(5, 15, 18, .55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 70;
}
.nv-fab-wrap.open ~ .nv-fab-backdrop,
.nv-fab-backdrop.open { opacity: 1; pointer-events: auto; }

.nv-fab-menu {
  position: absolute;
  left: 50%;
  bottom: calc(100% + .85rem);
  transform: translateX(-50%) translateY(8px) scale(.96);
  width: min(86vw, 320px);
  background: rgba(17, 35, 42, .96);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl, 18px);
  box-shadow: 0 24px 60px -10px rgba(0,0,0,.7), 0 8px 20px rgba(0,0,0,.4);
  padding: .5rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nv-fab-wrap.open .nv-fab-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}
.nv-fab-menu .nv-fab-link {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .85rem 1rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: var(--transition);
}
.nv-fab-menu .nv-fab-link i {
  width: 22px;
  text-align: center;
  color: var(--brand-accent);
  font-size: 1rem;
}
.nv-fab-menu .nv-fab-link:hover,
.nv-fab-menu .nv-fab-link:focus-visible {
  background: var(--brand-accent-soft);
  border-color: rgba(128, 200, 190, .25);
  outline: none;
}
.nv-fab-menu .nv-fab-link.active {
  background: var(--brand-accent-soft);
  color: var(--brand-accent);
  border-color: rgba(128, 200, 190, .35);
}
.nv-fab-menu .nv-fab-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: .35rem .25rem;
}
