* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #faf7f4;
  --surface: #ffffff;
  --primary: #c2a68c;
  --primary-dark: #a68968;
  --text: #3d3230;
  --text-light: #8a7a74;
  --border: #e8e0da;
  --danger: #d4665a;
  --radius: 12px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container,
.landing,
.login-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  overflow-x: hidden;
}


header {
  text-align: center;
  margin-bottom: 2.5rem;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  transition: opacity 0.2s;
}

.logo:hover {
  opacity: 0.7;
}

.logo-icon {
  width: 28px;
  height: 28px;
}

.logo span {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

.role-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-light);
}

.upgrade-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: linear-gradient(135deg, #d4a843, #c2922e);
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: opacity 0.2s;
}

.upgrade-badge:hover {
  opacity: 0.85;
}

.btn-profile {
  color: var(--text-light);
  font-size: 1.25rem;
  text-decoration: none;
  transition: color 0.2s;
  line-height: 1;
}

.btn-profile:hover {
  color: var(--primary-dark);
}

.btn-logout {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-light);
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

/* Landing */
.landing {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.hero,
.feature-showcase,
.landing-cta {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.landing-header {
  padding-bottom: 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.hero-tagline {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-top: 0.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.hero-cta {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.85rem 2.5rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  transition: background 0.2s;
}

.hero-cta:hover {
  background: var(--primary-dark);
}

.feature-showcase {
  margin-top: 2rem;
}

.feature-showcase h2 {
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 2rem;
  color: var(--text);
}

.feature-item {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2.5rem;
}

.feature-item-reverse {
  grid-template-columns: 1.4fr 1fr;
}

.feature-item-reverse .feature-text {
  order: 2;
}

.feature-item-reverse .feature-img {
  order: 1;
}

.feature-text h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.feature-text p {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.6;
}

.feature-img img {
  width: 100%;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.landing-cta {
  text-align: center;
  padding: 1rem 0 3rem;
}

.landing-disclaimer {
  text-align: center;
  padding: 1rem 0 2rem;
  border-top: 1px solid var(--border);
}

/* Site footer */
.site-footer-spacer {
  flex: 1;
  min-height: 2rem;
}

.site-footer {
  text-align: center;
  flex-shrink: 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}

.site-footer a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.8rem;
  margin: 0 0.75rem;
}

.site-footer a:hover {
  color: var(--primary-dark);
}

.landing-disclaimer p {
  font-size: 0.75rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .hero h1 { font-size: 2rem; }
  .feature-item,
  .feature-item-reverse {
    grid-template-columns: 1fr;
  }
  .feature-item-reverse .feature-text,
  .feature-item-reverse .feature-img {
    order: unset;
  }
}

.btn-logout:hover {
  border-color: var(--danger);
  color: var(--danger);
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.subtitle {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.nav-pills {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.nav-pill {
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
  transition: all 0.2s;
}

.nav-pill:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-pill.active {
  background: var(--surface);
  color: var(--primary-dark);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.nav-pill-upgrade {
  background: linear-gradient(135deg, #d4a843, #c2922e);
  color: #fff !important;
  font-weight: 600;
}

.nav-pill-upgrade:hover {
  opacity: 0.85;
  background: linear-gradient(135deg, #d4a843, #c2922e);
  color: #fff;
}

/* Add Product Form */
.add-product {
  margin-bottom: 2.5rem;
}

.input-group {
  display: flex;
  gap: 0.75rem;
}

.input-group input {
  flex: 1;
  padding: 0.85rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.input-group input::placeholder {
  color: var(--text-light);
}

.input-group button {
  padding: 0.85rem 1.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  min-width: 130px;
}

.input-group button:hover {
  background: var(--primary-dark);
}

.input-group button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.hidden {
  display: none !important;
}

/* Products */
.products-header {
  margin-bottom: 1rem;
}

.products-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
}

.count {
  color: var(--text-light);
  font-weight: 400;
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Matrix */
.matrix-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.matrix {
  width: 100%;
  min-width: 500px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.matrix-corner {
  width: 130px;
  min-width: 130px;
  border-bottom: 2px solid var(--border);
  border-right: 2px solid var(--border);
  vertical-align: bottom;
  padding: 0.4rem;
}

.matrix-corner-actions {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.btn-matrix-action {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-light);
  font-size: 0.7rem;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-matrix-action:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.btn-matrix-delete:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.matrix-col-head {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  padding: 0.75rem 0.5rem;
  text-align: center;
  border-bottom: 2px solid var(--border);
}


.matrix-row-head {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  padding: 0.75rem 0.75rem 0.75rem 0;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  border-right: 2px solid var(--border);
  white-space: nowrap;
}

.matrix-cell {
  padding: 0.5rem;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.matrix tbody tr:last-child .matrix-row-head,
.matrix tbody tr:last-child .matrix-cell {
  border-bottom: none;
}

.tr-before-unset .matrix-row-head,
.tr-before-unset .matrix-cell,
.tr-before-unset .matrix-cell-unset {
  border-bottom: none;
}

.matrix-col-unset {
  border-left: 2px dashed var(--border);
}

.matrix-cell-unset {
  border-left: 2px dashed var(--border);
}

.matrix-row-unset,
.tr-unset td {
  border-top: 2px dashed var(--border);
}

.matrix-row-unset {
  font-style: italic;
  color: var(--text-light);
}

/* Product Chip */
.product-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s;
  margin-bottom: 0.4rem;
}

.product-chip:last-child {
  margin-bottom: 0;
}

.product-chip:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  border-color: var(--primary);
}

.chip-img {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.chip-name {
  font-size: 0.8rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

/* Compatibility indicators */
.chip-conflict {
  border-color: var(--danger);
  background: rgba(212, 102, 90, 0.04);
}

.chip-caution {
  border-color: #e0a84d;
  background: rgba(224, 168, 77, 0.04);
}

.chip-synergy {
  border-color: #6dab6d;
  background: rgba(109, 171, 109, 0.04);
}

.chip-icon {
  flex-shrink: 0;
  font-size: 0.85rem;
  line-height: 1;
  cursor: help;
}

.chip-icon-conflict {
  color: var(--danger);
}

.chip-icon-caution {
  color: #d49a3a;
}

.chip-icon-synergy {
  color: #5a9a5a;
}

.chip-unknown {
  border-color: #e0a84d;
  background: rgba(224, 168, 77, 0.04);
}

.chip-icon-unknown {
  color: #d49a3a;
  font-weight: 700;
}

.chip-routine {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  flex-shrink: 0;
  line-height: 1;
  color: var(--primary-dark);
  background: rgba(194, 166, 140, 0.15);
}

.chip-routine-morgens {
  color: #c08c30;
  background: rgba(192, 140, 48, 0.12);
}

.chip-routine-abends {
  color: #6070a0;
  background: rgba(96, 112, 160, 0.12);
}

.chip-delete {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.15rem;
  border-radius: 4px;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
}

.product-chip:hover .chip-delete {
  opacity: 1;
}

.chip-delete:hover {
  color: var(--danger);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip-list .product-chip {
  margin-bottom: 0;
}

/* Unassigned Section */
.unassigned-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
}

.unassigned-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}

.unassigned-header .category-heading {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.category-heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}

.unassigned-group {
  margin-bottom: 0.75rem;
}

.unassigned-group:last-child {
  margin-bottom: 0;
}

.unassigned-cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.unassigned-cat {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
}

.btn-delete-all {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-light);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.btn-delete-all:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: rgba(212, 102, 90, 0.06);
}

/* Parking Area */
.parking-area {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 2px dashed var(--border);
  transition: border-color 0.2s, background 0.2s;
  min-height: 80px;
}

.parking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.parking-header .category-heading {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.parking-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.parking-chips .product-chip {
  margin-bottom: 0;
}

.parking-hint {
  color: var(--text-light);
  font-size: 0.85rem;
  font-style: italic;
  padding: 0.5rem 0;
}

/* Drag & Drop */
.chip-dragging {
  opacity: 0.4;
}

.drop-valid {
  background: rgba(194, 166, 140, 0.08);
}

.drop-hover {
  background: rgba(194, 166, 140, 0.2) !important;
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.parking-area.drop-valid {
  border-color: var(--primary);
  background: rgba(194, 166, 140, 0.04);
}

.parking-area.drop-hover {
  border-color: var(--primary-dark);
  background: rgba(194, 166, 140, 0.12) !important;
}

/* Matrix as drop zone */
.matrix-col-head.drop-valid {
  background: rgba(194, 166, 140, 0.12);
}

.matrix-col-head.drop-hover {
  background: rgba(194, 166, 140, 0.25) !important;
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.matrix-wrapper.drop-valid {
  outline: 2px dashed var(--primary);
  outline-offset: 4px;
  border-radius: var(--radius);
}

.matrix-wrapper.drop-hover {
  outline-color: var(--primary-dark);
  background: rgba(194, 166, 140, 0.04);
}

.matrix-drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
  transition: border-color 0.2s, background 0.2s;
}

.matrix-drop-zone.drop-valid {
  border-color: var(--primary);
}

.matrix-drop-zone.drop-hover {
  border-color: var(--primary-dark);
  background: rgba(194, 166, 140, 0.08);
}

.parking-area.drop-valid .parking-header,
.parking-area.drop-valid .parking-chips,
.parking-area.drop-valid .parking-hint,
.matrix-drop-zone.drop-valid p {
  pointer-events: none;
}

.empty-state {
  text-align: center;
  color: var(--text-light);
  padding: 3rem 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 2px dashed var(--border);
}

/* (product cards replaced by chips + matrix) */

/* Spinner */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
}

.modal-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.modal-content .brand {
  color: var(--primary-dark);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.modal-content .detail-image {
  width: 100%;
  max-height: 250px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--bg);
  margin-bottom: 1rem;
}

.detail-section {
  margin-bottom: 1rem;
}

.detail-section label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 0.25rem;
}

.detail-section p {
  font-size: 0.95rem;
}

.detail-section a {
  color: var(--primary-dark);
  word-break: break-all;
}

.detail-input,
.detail-textarea {
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text);
  width: 100%;
  font-family: inherit;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.detail-input:focus,
.detail-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.detail-textarea {
  min-height: 4rem;
  resize: vertical;
}

.detail-select {
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--surface);
  width: 100%;
}

.detail-row {
  display: flex;
  gap: 1rem;
}

.detail-half {
  flex: 1;
}

/* Active ingredient tags */
.actives-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  min-height: 1.5rem;
}

.active-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text);
}

.active-remove {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0 0.1rem;
}

.active-remove:hover {
  color: var(--danger);
}

.actives-add {
  margin-top: 0.25rem;
}

.actives-add .detail-select {
  font-size: 0.85rem;
  padding: 0.4rem 0.6rem;
}

/* Compatibility info in detail */
.compat-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.compat-item {
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.compat-conflict {
  background: rgba(212, 102, 90, 0.08);
  border: 1px solid rgba(212, 102, 90, 0.25);
}

.compat-caution-item {
  background: rgba(224, 168, 77, 0.08);
  border: 1px solid rgba(224, 168, 77, 0.25);
}

.compat-synergy-item {
  background: rgba(109, 171, 109, 0.08);
  border: 1px solid rgba(109, 171, 109, 0.25);
}

.compat-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: var(--danger);
  color: white;
  margin-right: 0.4rem;
}

.compat-badge-caution {
  background: #d49a3a;
}

.compat-badge-synergy {
  background: #5a9a5a;
}

.compat-with {
  color: var(--text-light);
  font-size: 0.8rem;
}

.compat-reason {
  color: var(--text-light);
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

/* Split Dialog */
.split-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.split-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

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

.split-item:has(input:checked) {
  border-color: var(--primary);
  background: rgba(194, 166, 140, 0.06);
}

.split-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.split-item-info {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  min-width: 0;
}

.split-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg);
  flex-shrink: 0;
}

.split-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.split-item-brand {
  color: var(--primary-dark);
  font-size: 0.8rem;
}

.split-item-price {
  color: var(--text-light);
  font-size: 0.8rem;
}

.split-confirm {
  padding: 0.7rem 1.25rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.split-confirm:hover {
  background: var(--primary-dark);
}

.split-confirm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.split-btn {
  padding: 0.7rem 1.25rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}

.split-btn:hover {
  background: var(--border);
}

/* Responsive */
@media (max-width: 600px) {
  .input-group {
    flex-direction: column;
  }

  .input-group button {
    min-width: auto;
  }

  .matrix-corner {
    width: 90px;
    min-width: 90px;
  }

  .matrix-row-head {
    font-size: 0.8rem;
  }

  .matrix-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

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

  .header-row {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .nav-pills {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .nav-pill {
    white-space: nowrap;
  }

  .container {
    padding: 1rem 1rem;
  }

  .modal-content {
    margin: 1rem;
    max-height: 90vh;
    overflow-y: auto;
  }

  .user-info {
    font-size: 0.8rem;
  }

  .logo span {
    font-size: 1.1rem;
  }
}

/* --- Weekly view --- */
.week-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
.week-toolbar .week-nav {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.week-toolbar .week-range {
  font-weight: 500;
  min-width: 200px;
  text-align: center;
}
.week-toolbar .week-today {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}
.weekly-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.weekly-grid th,
.weekly-grid td {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.4rem;
  vertical-align: top;
  font-weight: normal;
}
.weekly-grid tr > th:last-child,
.weekly-grid tr > td:last-child {
  border-right: 0;
}
.weekly-grid tr:last-child > th,
.weekly-grid tr:last-child > td {
  border-bottom: 0;
}
.weekly-corner {
  width: 110px;
  background: var(--bg);
}
.weekly-day-head {
  background: var(--bg);
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-light);
}
.weekly-day-head.is-today {
  background: #f0e6dc;
}
.weekly-day-head.is-today .weekly-day-name {
  color: var(--primary-dark);
}
.weekly-day-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.weekly-day-date {
  font-size: 0.7rem;
}
.weekly-slot-head {
  background: var(--bg);
  font-size: 0.82rem;
  color: var(--text-light);
  text-align: center;
}
.weekly-slot-morgens { color: #b88a3e; }
.weekly-slot-abends { color: #6d5a8a; }
.weekly-cell {
  min-width: 110px;
  min-height: 96px;
  background: #fff;
}
.weekly-cell.is-today {
  background: rgba(194, 166, 140, 0.06);
}
.weekly-chip {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.45rem;
  margin-bottom: 0.3rem;
  font-size: 0.74rem;
  line-height: 1.2;
  cursor: grab;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  box-shadow: 0 1px 2px rgba(60, 40, 30, 0.05);
}
.weekly-chip.is-readonly {
  cursor: pointer;
}
.tab-premium-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  margin-left: 0.4rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}
.tab-premium-badge[hidden] {
  display: none;
}
.feature-premium-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  margin-left: 0.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
  font-weight: 500;
}
.weekly-upgrade-banner {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--primary);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: var(--text);
}
.weekly-upgrade-link {
  flex-shrink: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
}
.weekly-upgrade-link:hover {
  background: var(--primary-dark);
}
.weekly-chip:hover {
  border-color: var(--primary);
}
.weekly-chip:active {
  cursor: grabbing;
}
.weekly-chip.is-dragging {
  opacity: 0.4;
}
.weekly-cell.drop-hover {
  background: rgba(194, 166, 140, 0.18);
  outline: 2px dashed var(--primary);
  outline-offset: -2px;
}
.weekly-chip-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.weekly-chip-name {
  color: var(--text);
}
.weekly-chip .chip-icon {
  font-size: 0.78rem;
}
.weekly-chip-row {
  position: relative;
}
.weekly-chip-remove {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.1rem 0.2rem;
  border-radius: 4px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  margin-left: auto;
}
.weekly-chip:hover .weekly-chip-remove {
  opacity: 1;
}
.weekly-chip-remove:hover {
  color: var(--danger);
}
.weekly-chip-meta {
  color: var(--text-light);
  font-size: 0.66rem;
}
.weekly-parking-area {
  margin-top: 1.25rem;
}
.weekly-parking-area.drop-hover {
  border-color: var(--primary);
  border-style: solid;
  background: rgba(194, 166, 140, 0.08);
}
.product-chip:has(.chip-cadence) {
  flex-wrap: wrap;
}
.chip-cadence {
  flex-basis: 100%;
  font-size: 0.72rem;
  color: var(--text-light);
  padding-top: 0.25rem;
  margin-top: 0.1rem;
  border-top: 1px solid var(--border);
}
