/* Henkel Adhesive Technologies Brand Styles */
:root {
  --henkel-red: #e1000f;
  --henkel-red-hover: #b4000c;
  --henkel-red-outline: #830009;
  --henkel-dark: #3b3b3b;
  --henkel-white: #ffffff;
  --henkel-light-gray: #f6f6f6;
  --henkel-border: #dde7ed;
  --henkel-mid-gray: #787878;
  --henkel-green: #0a8a3e;
  --henkel-green-bg: #e6f7ed;
  --henkel-orange: #e67e00;
  --henkel-orange-bg: #fff5e6;
  --henkel-red-bg: #fce8e8;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --radius: 8px;
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--henkel-dark);
  background: var(--henkel-light-gray);
  min-height: 100vh;
}

/* Navigation */
.navbar {
  background: var(--henkel-red);
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 56px;
  box-shadow: 0 2px 8px rgba(225, 0, 15, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  color: var(--henkel-white);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-right: 40px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-brand svg {
  width: 24px;
  height: 24px;
  fill: white;
}

.nav-tabs {
  display: flex;
  gap: 4px;
  height: 100%;
}

.nav-tab {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 100%;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}

.nav-tab:hover {
  color: var(--henkel-white);
  background: rgba(255,255,255,0.1);
}

.nav-tab.active {
  color: var(--henkel-white);
  border-bottom-color: var(--henkel-white);
}

/* Main content */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* Cards */
.card {
  background: var(--henkel-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--henkel-dark);
}

/* Input groups */
.input-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.input-group input[type="text"],
.input-group input[type="url"] {
  flex: 1;
}

input[type="text"],
input[type="url"],
input[type="search"],
select,
textarea {
  padding: 10px 14px;
  border: 2px solid var(--henkel-border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: var(--henkel-dark);
  transition: border-color 0.2s;
  outline: none;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--henkel-red);
}

/* Buttons */
.btn {
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--henkel-red);
  color: var(--henkel-white);
}

.btn-primary:hover {
  background: var(--henkel-red-hover);
}

.btn-primary:disabled {
  background: var(--henkel-mid-gray);
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--henkel-white);
  color: var(--henkel-dark);
  border: 2px solid var(--henkel-border);
}

.btn-secondary:hover {
  border-color: var(--henkel-dark);
}

.btn-danger {
  background: var(--henkel-white);
  color: var(--henkel-red);
  border: 2px solid var(--henkel-red-bg);
}

.btn-danger:hover {
  background: var(--henkel-red-bg);
}

.btn-success {
  background: var(--henkel-green);
  color: var(--henkel-white);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  text-align: left;
  padding: 10px 14px;
  background: var(--henkel-light-gray);
  font-weight: 600;
  color: var(--henkel-mid-gray);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--henkel-border);
}

td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--henkel-border);
  vertical-align: top;
}

tr:hover td {
  background: var(--henkel-light-gray);
}

tr.clickable {
  cursor: pointer;
}

/* Tags/badges */
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.tag-type {
  background: #e8eaf6;
  color: #3949ab;
}

.tag-hidden {
  background: #f3e5f5;
  color: #7b1fa2;
}

.tag-required {
  background: var(--henkel-red-bg);
  color: var(--henkel-red);
}

.tag-select {
  background: #e3f2fd;
  color: #1565c0;
}

.tag-checkbox {
  background: #fff3e0;
  color: #e65100;
}

/* Filter bar */
.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--henkel-mid-gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Status banners */
.status-banner {
  padding: 16px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.status-banner svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.status-success {
  background: var(--henkel-green-bg);
  color: var(--henkel-green);
  border: 1px solid var(--henkel-green);
}

.status-warning {
  background: var(--henkel-orange-bg);
  color: var(--henkel-orange);
  border: 1px solid var(--henkel-orange);
}

.status-error {
  background: var(--henkel-red-bg);
  color: var(--henkel-red);
  border: 1px solid var(--henkel-red);
}

/* Loading spinner */
.spinner {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 24px;
  justify-content: center;
  color: var(--henkel-mid-gray);
}

.spinner.active {
  display: flex;
}

.spinner-circle {
  width: 24px;
  height: 24px;
  border: 3px solid var(--henkel-border);
  border-top-color: var(--henkel-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Toast notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: 6px;
  color: white;
  font-weight: 500;
  font-size: 14px;
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-success { background: var(--henkel-green); }
.toast-error { background: var(--henkel-red); }

/* Options list in table */
.options-list {
  max-height: 150px;
  overflow-y: auto;
  font-size: 12px;
  background: var(--henkel-light-gray);
  border-radius: 4px;
  padding: 6px 10px;
  margin-top: 4px;
}

.options-list div {
  padding: 2px 0;
  border-bottom: 1px solid var(--henkel-border);
}

.options-list div:last-child {
  border-bottom: none;
}

/* Editable field */
.editable-value {
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: border-color 0.2s;
  cursor: text;
  min-width: 120px;
}

.editable-value:hover {
  border-color: var(--henkel-border);
}

.editable-value:focus {
  border-color: var(--henkel-red);
  outline: none;
  background: white;
}

/* Diff highlighting */
.diff-added {
  background: var(--henkel-green-bg);
}

.diff-removed {
  background: var(--henkel-red-bg);
  text-decoration: line-through;
}

.diff-changed {
  background: var(--henkel-orange-bg);
}

/* Meta info */
.meta-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--henkel-border);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--henkel-mid-gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-value {
  font-size: 14px;
  color: var(--henkel-dark);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px;
  color: var(--henkel-mid-gray);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar {
    padding: 0 12px;
  }
  .navbar-brand {
    margin-right: 16px;
    font-size: 15px;
  }
  .nav-tab {
    padding: 0 12px;
    font-size: 13px;
  }
  .container {
    padding: 12px;
  }
  .filter-bar {
    grid-template-columns: 1fr;
  }
  .input-group {
    flex-direction: column;
  }
}

/* Modal overlay */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

/* Field count summary */
.field-summary {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.field-count {
  padding: 8px 16px;
  border-radius: 6px;
  background: var(--henkel-light-gray);
  font-size: 13px;
}

.field-count strong {
  font-size: 18px;
  display: block;
  color: var(--henkel-dark);
}
