.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(18, 41, 65, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  max-width: 90vw;
  width: 420px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(18, 41, 65, 0.3);
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
}

.modal-info .modal-icon {
  background: linear-gradient(135deg, var(--bg-accent) 0%, #e3f0fc 100%);
  color: var(--primary-dark);
}

.modal-success .modal-icon {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
}

.modal-error .modal-icon {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
}

.modal-warning .modal-icon {
  background: linear-gradient(135deg, var(--warning-light) 0%, #ffeeba 100%);
  color: #856404;
}

.modal-confirm .modal-icon {
  background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
  color: #0c5460;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0 0 1rem;
  text-align: center;
}

.modal-body {
  color: var(--text-gray);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  text-align: center;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.modal-button {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
}

.modal-button-primary {
  background: linear-gradient(135deg, var(--accent-orange) 0%, #d68900 100%);
  color: white;
}

.modal-button-primary:hover {
  background: linear-gradient(135deg, #b06900 0%, var(--accent-orange) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(200, 122, 0, 0.3);
}

.modal-button-secondary {
  background: #f1f3f4;
  color: #52647c;
}

.modal-button-secondary:hover {
  background: #e3e6e8;
  transform: translateY(-2px);
}

.modal-button-danger {
  background: linear-gradient(135deg, var(--error-color) 0%, #c82333 100%);
  color: white;
}

.modal-button-danger:hover {
  background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.modal-button-success {
  background: linear-gradient(135deg, var(--success-color) 0%, #218838 100%);
  color: white;
}

.modal-button-success:hover {
  background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Mobile Optimierung */
@media (max-width: 768px) {
  .modal-content {
    padding: 1.5rem;
    max-width: 95vw;
    border-radius: 12px;
  }

  .modal-icon {
    width: 56px;
    height: 56px;
    font-size: 1.75rem;
    margin-bottom: 1rem;
  }

  .modal-title {
    font-size: 1.25rem;
  }

  .modal-body {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  .modal-button {
    padding: 0.65rem 1.5rem;
    font-size: 0.95rem;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-button {
    width: 100%;
  }
}
/* ── Feedback Modal ── */
.fb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
  animation: fbFadeIn 0.18s ease;
}

@keyframes fbFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fb-modal {
  background: white;
  border-radius: 18px;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  animation: fbSlideUp 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes fbSlideUp {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Header */
.fb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 1.6rem;
  background: linear-gradient(135deg, #1a3550 0%, var(--primary-dark) 60%, #0d1f30 100%);
  border-radius: 18px 18px 0 0;
  color: white;
  position: relative;
  overflow: hidden;
}

.fb-header::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 110px; height: 110px;
  background: rgba(200, 122, 0, 0.13);
  border-radius: 50%;
  pointer-events: none;
}

.fb-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

.fb-header-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.fb-header h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.fb-header p {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  opacity: 0.7;
}

.fb-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 34px; height: 34px;
  border-radius: 9px;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.fb-close:hover { background: rgba(255,255,255,0.28); }

/* Body */
.fb-body {
  padding: 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

/* Info note */
.fb-info-note {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  background: var(--bg-accent);
  border: 1px solid rgba(18,41,65,0.1);
  border-left: 3px solid var(--primary-dark);
  border-radius: 0 8px 8px 0;
  padding: 0.7rem 0.9rem;
  font-size: 0.82rem;
  color: var(--text-gray);
  line-height: 1.5;
}

.fb-info-icon { font-size: 1rem; flex-shrink: 0; margin-top: 0.05rem; }

/* Section label */
.fb-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-gray);
  margin-bottom: 0.55rem;
}

/* Type chips */
.fb-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.fb-type-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.8rem;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  background: white;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary-dark);
  cursor: pointer;
  transition: all 0.18s;
  text-align: left;
  font-family: inherit;
  user-select: none;
}

.fb-type-chip:hover {
  border-color: var(--accent-orange);
  background: var(--orange-light);
}

.fb-type-chip.selected {
  border-color: var(--accent-orange);
  background: var(--orange-light);
  font-weight: 700;
  color: var(--primary-dark);
  box-shadow: 0 0 0 2px rgba(200,122,0,0.2);
}

.fb-type-chip-icon { font-size: 1.05rem; flex-shrink: 0; }

/* Textarea */
.fb-textarea-wrap { position: relative; }

.fb-textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.55;
  resize: vertical;
  min-height: 130px;
  background: white;
  color: var(--primary-dark);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.fb-textarea:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(200,122,0,0.1);
}

.fb-textarea.has-error {
  border-color: var(--red-dark);
}

.fb-textarea-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.35rem;
}

.fb-char-count {
  font-size: 0.77rem;
  color: var(--text-gray);
}

.fb-error-msg {
  font-size: 0.8rem;
  color: var(--red-dark);
  font-weight: 600;
}

/* Footer */
.fb-footer {
  display: flex;
  gap: 0.75rem;
  padding: 0.9rem 1.6rem 1.5rem;
  border-top: 1px solid var(--border-color);
}

.fb-cancel-btn {
  flex: 1;
  padding: 0.7rem;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  background: white;
  color: var(--text-gray);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}

.fb-cancel-btn:hover:not(:disabled) { background: var(--bg-light); }
.fb-cancel-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.fb-submit-btn {
  flex: 2;
  padding: 0.7rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(200,122,0,0.3);
  transition: all 0.2s;
  font-family: inherit;
}

.fb-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(200,122,0,0.42);
}

.fb-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Responsive */
@media (max-width: 480px) {
  .fb-type-grid { grid-template-columns: 1fr; }
  .fb-header { padding: 1.1rem 1.2rem; }
  .fb-body    { padding: 1.2rem; }
  .fb-footer  { padding: 0.8rem 1.2rem 1.2rem; }
}


.feedback-info {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
  background: #e3f2fd;
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid #2196F3;
}

.feedback-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feedback-form label {
  font-weight: 600;
  color: #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.char-count {
  font-size: 0.85rem;
  color: #999;
  font-weight: 400;
}

.feedback-form select,
.feedback-form textarea {
  padding: 0.75rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
  background: white;
}

.feedback-form select:focus,
.feedback-form textarea:focus {
  outline: none;
  border-color: #2196F3;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.feedback-form textarea {
  resize: vertical;
  min-height: 150px;
  line-height: 1.5;
}

.feedback-form textarea.error {
  border-color: #f44336;
}

.feedback-form .error-message {
  color: #f44336;
  font-size: 0.85rem;
  margin-top: -0.25rem;
  font-weight: 500;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.modal-actions button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
}

.modal-actions button[type="submit"] {
  background: linear-gradient(135deg, #2196F3 0%, var(--blue) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.modal-actions button[type="submit"]:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.modal-actions button[type="submit"]:active:not(:disabled) {
  transform: translateY(0);
}

.modal-actions .cancel-button {
  background-color: #f5f5f5;
  color: #333;
}

.modal-actions .cancel-button:hover:not(:disabled) {
  background-color: #e0e0e0;
}

.modal-actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
/* ── Doc Suggestion Modal ── */
.docsugg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
  animation: dsOverlayIn 0.18s ease;
}

@keyframes dsOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.docsugg-modal {
  background: white;
  border-radius: 18px;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28);
  animation: dsModalIn 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes dsModalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Header */
.docsugg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 1.6rem;
  background: linear-gradient(135deg, #1a3550 0%, var(--primary-dark) 60%, #0d1f30 100%);
  border-radius: 18px 18px 0 0;
  color: white;
  position: relative;
  overflow: hidden;
}

.docsugg-header::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 110px; height: 110px;
  background: rgba(200,122,0,0.13);
  border-radius: 50%;
  pointer-events: none;
}

.docsugg-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

.docsugg-header-icon { font-size: 1.5rem; line-height: 1; }

.docsugg-header h2 { margin: 0; font-size: 1.1rem; font-weight: 700; }
.docsugg-header p  { margin: 0.15rem 0 0; font-size: 0.8rem; opacity: 0.7; }

.docsugg-header-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 34px; height: 34px;
  border-radius: 9px;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
  position: relative; z-index: 1;
  flex-shrink: 0;
}

.docsugg-header-close:hover:not(:disabled) { background: rgba(255,255,255,0.28); }

/* Body */
.docsugg-body {
  padding: 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* Info note */
.docsugg-info-note {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  background: var(--bg-accent);
  border: 1px solid rgba(18,41,65,0.1);
  border-left: 3px solid var(--primary-dark);
  border-radius: 0 8px 8px 0;
  padding: 0.7rem 0.9rem;
  font-size: 0.82rem;
  color: var(--text-gray);
  line-height: 1.5;
}

.docsugg-info-icon { font-size: 1rem; flex-shrink: 0; margin-top: 0.05rem; }

/* Fields */
.docsugg-field { display: flex; flex-direction: column; gap: 0.4rem; }

.docsugg-field label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-gray);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.docsugg-required { color: var(--red-dark); }
.docsugg-optional { font-weight: 400; color: var(--text-gray); font-size: 0.78rem; text-transform: none; letter-spacing: 0; }
.docsugg-char     { font-weight: 400; color: var(--text-gray); font-size: 0.78rem; text-transform: none; letter-spacing: 0; margin-left: auto; }

.docsugg-field input,
.docsugg-field textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: white;
  color: var(--primary-dark);
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.docsugg-field textarea { min-height: 110px; line-height: 1.5; }

.docsugg-field input:focus,
.docsugg-field textarea:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(200,122,0,0.1);
}

/* Error */
.docsugg-error {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--red-dark);
  background: #fff5f5;
  border: 1px solid rgba(244,67,54,0.25);
  border-radius: 8px;
  padding: 0.55rem 0.8rem;
  margin: 0;
}

/* Footer */
.docsugg-footer {
  display: flex;
  gap: 0.75rem;
  padding: 0.9rem 1.6rem 1.5rem;
  border-top: 1px solid var(--border-color);
}

.docsugg-btn-cancel {
  flex: 1;
  padding: 0.7rem;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  background: white;
  color: var(--text-gray);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}

.docsugg-btn-cancel:hover:not(:disabled) { background: var(--bg-light); }
.docsugg-btn-cancel:disabled { opacity: 0.5; cursor: not-allowed; }

.docsugg-btn-submit {
  flex: 2;
  padding: 0.7rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(200,122,0,0.3);
  transition: all 0.2s;
  font-family: inherit;
}

.docsugg-btn-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(200,122,0,0.42);
}

.docsugg-btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Success state */
.docsugg-success-body {
  padding: 2.5rem 1.6rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.docsugg-success-circle {
  width: 68px; height: 68px;
  background: linear-gradient(135deg, #d4edda, #b8dfca);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 4px 16px rgba(40,167,69,0.2);
}

.docsugg-success-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0;
}

.docsugg-success-text {
  font-size: 0.9rem;
  color: var(--text-gray);
  line-height: 1.55;
  margin: 0;
  max-width: 340px;
}

.docsugg-success-footer {
  padding: 1rem 1.6rem 1.5rem;
}

.docsugg-btn-close {
  width: 100%;
  padding: 0.7rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(200,122,0,0.3);
  transition: all 0.2s;
  font-family: inherit;
}

.docsugg-btn-close:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(200,122,0,0.42);
}

/* Responsive */
@media (max-width: 480px) {
  .docsugg-header { padding: 1.1rem 1.2rem; }
  .docsugg-body   { padding: 1.2rem; }
  .docsugg-footer { padding: 0.8rem 1.2rem 1.2rem; }
  .docsugg-success-footer { padding: 0.8rem 1.2rem 1.2rem; }
}


.docsugg-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.docsugg-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.docsugg-field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.docsugg-required { color: #dc2626; }
.docsugg-optional { font-weight: 400; color: var(--text-gray); font-size: 0.8rem; }
.docsugg-char     { font-weight: 400; color: var(--text-gray); font-size: 0.78rem; margin-left: auto; }

.docsugg-field input,
.docsugg-field textarea {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.15s;
}

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

.docsugg-error {
  font-size: 0.85rem;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin: 0;
}

.docsugg-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.docsugg-btn-cancel {
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  color: var(--text-gray);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s;
}

.docsugg-btn-cancel:hover { background: var(--bg-light); }

.docsugg-btn-submit {
  padding: 0.55rem 1.25rem;
  border: none;
  border-radius: 8px;
  background: var(--primary-dark);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.docsugg-btn-submit:hover { opacity: 0.88; }
.docsugg-btn-submit:disabled { opacity: 0.55; cursor: not-allowed; }

/* Success state */
.docsugg-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  padding: 1.5rem 0;
}

.docsugg-success-icon { font-size: 2.5rem; }

.docsugg-success p {
  margin: 0;
  color: var(--primary-dark);
  font-size: 0.95rem;
  line-height: 1.5;
}

.docsugg-btn-close {
  margin-top: 0.5rem;
  padding: 0.55rem 1.5rem;
  border: none;
  border-radius: 8px;
  background: var(--primary-dark);
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.15s;
}

.docsugg-btn-close:hover { opacity: 0.88; }
.customer-selection-modal {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.customer-selection-desc {
  margin: 0;
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.5;
}

.customer-selection-new-hint {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  border-radius: 8px;
  padding: 10px 14px;
  color: #1d4ed8;
  font-size: 0.9rem;
}

.customer-selection-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 10px 14px;
  color: #dc2626;
  font-size: 0.9rem;
}

.customer-selection-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 340px;
  overflow-y: auto;
  padding: 4px 2px;
}

.customer-selection-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #fff;
  user-select: none;
}

.customer-selection-item:hover {
  border-color: #93c5fd;
  background: #f0f9ff;
}

.customer-selection-item.selected {
  border-color: #2563eb;
  background: #eff6ff;
}

.customer-selection-item.is-new {
  border-color: #34d399;
}

.customer-selection-item.is-new.selected {
  border-color: #059669;
  background: #f0fdf4;
}

.customer-selection-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
  flex-shrink: 0;
  cursor: pointer;
}

.customer-selection-name {
  font-size: 0.95rem;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.customer-selection-badge {
  background: #10b981;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.customer-selection-hint {
  margin: 0;
  font-size: 0.82rem;
  color: #9ca3af;
  text-align: center;
}
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #1a3550 0%, var(--primary-dark) 100%);
  color: white;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-screen p {
  margin-top: 1rem;
  font-size: 1.2rem;
}

.layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.layout-header {
  background: linear-gradient(135deg, #1a3550 0%, var(--primary-dark) 60%, #0d1f30 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(18, 41, 65, 0.25);
  border-bottom: 2px solid var(--accent-orange);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.app-logo {
  font-size: 2rem;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.app-logo:hover {
  transform: scale(1.1);
}

/* Header brand text */
.header-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.header-app-title {
  font-size: 1rem;
  font-weight: 700;
  color: white;
}

.header-app-sub {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.58);
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

.status-badge.online {
  background-color: rgba(76, 175, 80, 0.3);
}

.status-badge.offline {
  background-color: rgba(244, 67, 54, 0.3);
}

/* Development Notice */
.dev-notice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 1.5rem;
  padding: 0.6rem 1rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.15));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  max-width: 600px;
}

.dev-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.dev-text {
  font-size: 0.85rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
}

.dev-text strong {
  color: #fbbf24;
  font-weight: 600;
}

@media (max-width: 1200px) {
  .dev-notice {
    display: none;
  }
}

.nav-link {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  padding: 0.8rem 1.25rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-weight: 500;
  white-space: nowrap;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  box-shadow: inset 3px 0 0 transparent;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.nav-link.active {
  background: rgba(200, 122, 0, 0.2);
  box-shadow: inset 3px 0 0 var(--accent-orange);
  color: #ffd080;
  font-weight: 600;
}

.feedback-link {
  background: none;
  border: none;
  font-size: 1rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  color: white;
}

.nav-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0.5rem 0;
  border: none;
}

.nav-link .badge {
  background-color: var(--error-color);
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  margin-left: 0.25rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-orange) 0%, #e89a3c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
  overflow: hidden;
}

.user-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
}

.logout-btn {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logout-icon {
  font-size: 1.1rem;
}

.logout-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.layout-main {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
  padding-top: 0px;
}

/* ── Footer ──────────────────────────────── */
.layout-footer {
  background: linear-gradient(135deg, #0d1f30 0%, var(--primary-dark) 100%);
  color: white;
  margin-top: auto;
  border-top: 2px solid var(--accent-orange);
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 2rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .footer-content {
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 2rem;
    align-items: start;
  }
}

.footer-brand-col {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.footer-logo {
  font-size: 2rem;
  flex-shrink: 0;
}

.footer-brand-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  margin: 0 0 0.2rem;
}

.footer-brand-sub {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}

.footer-col-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-orange);
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.footer-links-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links-col a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.15s;
}

.footer-links-col a:hover {
  color: var(--accent-orange);
}

.footer-info-col {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-dev-credit {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
}

.footer-dev-credit a {
  color: var(--accent-orange);
  text-decoration: none;
  transition: opacity 0.15s;
}

.footer-dev-credit a:hover {
  opacity: 0.8;
}

.footer-version {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
  font-family: 'Courier New', monospace;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.9rem 2rem;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.38);
  margin: 0;
}

.mobile-menu-btn {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 110;
  order: 2;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  height: 24px;
  position: relative;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background: white;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.header-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  height: 100vh;
  background: linear-gradient(180deg, #1a3550 0%, var(--primary-dark) 60%, #0d1f30 100%);
  flex-direction: column;
  justify-content: flex-start;
  padding: 0;
  gap: 0;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  z-index: 100;
}

.header-nav.mobile-open {
  transform: translateX(0);
}

/* ── Nav sidebar brand header ─────────────── */
.nav-header-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}

.nav-header-brand-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-header-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.nav-header-title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}

.nav-header-sub {
  display: block;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.52);
}

/* ── Nav section labels ───────────────────── */
.nav-section-label {
  padding: 0.9rem 1.25rem 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.4);
}

.menu-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
  flex-shrink: 0;
}

.menu-close-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.close-icon {
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1;
}

.nav-link {
  width: 100%;
  padding: 0.8rem 1.25rem;
  font-size: 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.1rem;
}

.nav-link .badge {
  margin-left: auto;
}

.header-right {
  display: none;
}

.mobile-user-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-user-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.mobile-user-profile .user-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  font-size: 1.25rem;
  background: linear-gradient(135deg, var(--accent-orange) 0%, #ff9500 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  box-shadow: 0 2px 8px rgba(200, 122, 0, 0.3);
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.mobile-user-profile .user-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
}

.mobile-logout-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-start;
}

.mobile-logout-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateX(4px);
}

.mobile-logout-btn .logout-icon {
  font-size: 1.25rem;
}

/* Mobile Version Display */
.mobile-version-display {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.version-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  font-weight: 500;
}

.version-number {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
}

@media (max-width: 480px) {
  .header-content {
    padding: 1rem;
  }

  .app-logo {
    font-size: 1.5rem;
  }

  .header-brand {
    display: none;
  }

  .status-badge {
    display: none;
  }

  .header-nav {
    gap: 0.35rem;
  }

  .header-nav.mobile-open {
    transform: translateX(0);
  }

  .header-nav::before {
    content: '';
    position: fixed;
    top: 0;
    right: -100vw;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .header-nav.mobile-open::before {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border-radius: 8px;
    justify-content: flex-start;
  }

  .nav-link .badge {
    margin-left: auto;
  }

  .header-nav::-webkit-scrollbar {
    height: 4px;
  }

  .header-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
  }

  .header-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
  }
}

@media (max-width: 768px) {
  .header-content {
    padding: 1rem;
    gap: 1rem;
    flex-wrap: nowrap;
  }

  .app-title {
    font-size: 1.1rem;
  }

  .status-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
  }

  .mobile-menu-btn {
    display: block;
    order: 2;
  }

  .header-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #1a3550 0%, var(--primary-dark) 60%, #0d1f30 100%);
    flex-direction: column;
    justify-content: flex-start;
    padding: 0;
    gap: 0.35rem;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.3);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 100;
  }

  .header-nav.mobile-open {
    transform: translateX(0);
  }

  .header-nav::before {
    content: '';
    position: fixed;
    top: 0;
    right: -100vw;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .header-nav.mobile-open::before {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border-radius: 8px;
    justify-content: flex-start;
  }

  .nav-link .badge {
    margin-left: auto;
  }

  .header-right {
    display: none;
  }

  .layout-main {
    padding: 1rem;
    padding-top: 0px;
  }
}

@media (max-width: 480px) {
  .app-logo {
    font-size: 1.5rem;
  }

  .header-left {
    gap: 0.5rem;
  }

  .header-brand {
    display: none;
  }

  .status-badge {
    display: none;
  }
}
/* ── Overlay ──────────────────────────────────────── */
.docnotif-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: docnotif-fade-in 0.15s ease;
}

@keyframes docnotif-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Modal box ────────────────────────────────────── */
.docnotif-modal {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: docnotif-slide-up 0.2s ease;
}

@keyframes docnotif-slide-up {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Header ───────────────────────────────────────── */
.docnotif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
  gap: 0.75rem;
}

.docnotif-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.docnotif-trigger-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
}

.docnotif-trigger-created {
  background: #dcfce7;
  color: #15803d;
}

.docnotif-trigger-updated {
  background: #fef3c7;
  color: #b45309;
}

.docnotif-counter {
  font-size: 0.8rem;
  color: var(--text-gray, #52647c);
  background: var(--bg-light, #f1f3f4);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
}

.docnotif-close {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-gray, #52647c);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  margin-left: auto;
}

.docnotif-close:hover {
  background: #f0f0f0;
}

/* ── Body ─────────────────────────────────────────── */
.docnotif-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.docnotif-doc-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-dark, #122941);
  margin: 0;
}

.docnotif-device {
  font-size: 0.85rem;
  color: var(--text-gray, #52647c);
  margin: 0;
}

.docnotif-meta {
  font-size: 0.82rem;
  color: var(--text-gray, #52647c);
  margin: 0;
}

.docnotif-message {
  display: flex;
  gap: 0.5rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.docnotif-message-icon {
  flex-shrink: 0;
  font-size: 1rem;
}

.docnotif-message p {
  margin: 0;
  font-size: 0.88rem;
  color: #92400e;
}

.docnotif-description {
  font-size: 0.9rem;
  color: #374151;
  margin: 0;
  padding: 0.6rem 0.9rem;
  background: var(--bg-light, #f1f3f4);
  border-radius: 8px;
  border-left: 3px solid var(--primary-dark, #122941);
}

.docnotif-content {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.docnotif-content h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-dark, #122941);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.docnotif-content-pre {
  background: var(--bg-light, #f1f3f4);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  padding: 1rem;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 0.88rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  color: #374151;
  max-height: 260px;
  overflow-y: auto;
  margin: 0;
}

.docnotif-pdf-hint {
  font-size: 0.85rem;
  color: var(--text-gray, #52647c);
  background: var(--bg-light, #f1f3f4);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 0;
}

.docnotif-changes {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.docnotif-changes h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-dark, #122941);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.docnotif-changes-text {
  margin: 0;
  font-size: 0.9rem;
  color: #374151;
  background: #fefce8;
  border: 1px solid #fde68a;
  border-left: 3px solid #b45309;
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.docnotif-changes-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-gray, #52647c);
  background: var(--bg-light, #f1f3f4);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  font-style: italic;
}

/* ── Footer ───────────────────────────────────────── */
.docnotif-footer {
  padding: 0.9rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border-color, #e0e0e0);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.docnotif-btn-open {
  padding: 0.65rem 1.25rem;
  background: transparent;
  color: var(--primary-dark, #122941);
  border: 1.5px solid var(--primary-dark, #122941);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  margin-right: auto;
}

.docnotif-btn-open:hover {
  background: var(--primary-dark, #122941);
  color: #fff;
}

.docnotif-btn-confirm {
  padding: 0.65rem 1.5rem;
  background: #15803d;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.docnotif-btn-confirm:hover:not(:disabled) {
  opacity: 0.88;
}

.docnotif-btn-confirm:disabled {
  opacity: 0.6;
  cursor: default;
}

.docnotif-btn-next {
  padding: 0.65rem 1.5rem;
  background: var(--primary-dark, #122941);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.docnotif-btn-next:hover {
  opacity: 0.88;
}
/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.rte-wrapper {
  display: flex;
  flex-direction: column;
  border: 1.5px solid #ced4da;
  border-radius: 8px;
  overflow: visible; /* must be visible so toolbar popups aren't clipped */
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  font-family: 'Segoe UI', Calibri, Arial, sans-serif;
}

/* ── Toolbar ─────────────────────────────────────────────────────────────── */
.rte-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  background: linear-gradient(to bottom, #f8f9fa 0%, #f1f3f4 100%);
  border-radius: 6px 6px 0 0;
  border-bottom: 1px solid #dde1e7;
  user-select: none;
}

.rte-toolbar-divider {
  display: inline-block;
  width: 1px;
  height: 22px;
  background: #cdd0d6;
  margin: 0 4px;
  flex-shrink: 0;
}

/* ── Toolbar buttons ─────────────────────────────────────────────────────── */
.rte-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  font-size: 0.88rem;
  font-family: inherit;
  color: #2d3748;
  transition: background 0.1s, border-color 0.1s;
  flex-shrink: 0;
}

.rte-btn svg {
  width: 14px;
  height: 14px;
  display: block;
  pointer-events: none;
}

.rte-btn:hover:not(:disabled) {
  background: #dde3ea;
  border-color: #c8cdd6;
}

.rte-btn-active {
  background: #d0e4f7 !important;
  border-color: #8ab4d6 !important;
  color: #1a5276;
}

.rte-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Style dropdown ──────────────────────────────────────────────────────── */
.rte-dropdown-wrap { display: inline-flex; align-items: center; }

.rte-style-select {
  height: 28px;
  padding: 0 6px;
  border: 1px solid #cdd0d6;
  border-radius: 4px;
  background: #fff;
  font-size: 0.82rem;
  font-family: inherit;
  color: #2d3748;
  cursor: pointer;
  min-width: 120px;
  outline: none;
}

.rte-style-select:focus { border-color: #4a90d9; }

/* ── Color icon ──────────────────────────────────────────────────────────── */
.rte-color-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.rte-color-icon svg { width: 14px; height: 14px; }

.rte-color-bar {
  display: block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
  border: 0.5px solid rgba(0,0,0,0.15);
}

.rte-color-wrap { position: relative; }

/* ── Color palette popup ─────────────────────────────────────────────────── */
.rte-color-palette {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: grid;
  grid-template-columns: repeat(8, 22px);
  gap: 3px;
  padding: 8px;
  background: #fff;
  border: 1px solid #cdd0d6;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
}

.rte-color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

.rte-color-swatch:hover { transform: scale(1.2); box-shadow: 0 2px 6px rgba(0,0,0,0.25); }
.rte-color-swatch-active { box-shadow: 0 0 0 2px #4a90d9; }

/* ── Link popup ──────────────────────────────────────────────────────────── */
.rte-link-popup {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: #fff;
  border: 1px solid #cdd0d6;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
  width: 280px;
}

.rte-link-input {
  padding: 6px 10px;
  border: 1px solid #cdd0d6;
  border-radius: 5px;
  font-size: 0.85rem;
  width: 100%;
  box-sizing: border-box;
  outline: none;
}
.rte-link-input:focus { border-color: #4a90d9; }

.rte-link-actions { display: flex; gap: 6px; justify-content: flex-end; }

.rte-link-btn {
  padding: 4px 14px;
  border: none;
  border-radius: 5px;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
}

.rte-link-ok     { background: #1a5276; color: #fff; }
.rte-link-ok:hover { background: #0d3349; }
.rte-link-cancel { background: #f1f3f4; color: #374151; }
.rte-link-cancel:hover { background: #e2e6ea; }

/* ── Table popup ─────────────────────────────────────────────────────────── */
.rte-table-popup {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border: 1px solid #cdd0d6;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
  width: 200px;
}

.rte-table-popup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #374151;
}

.rte-table-num {
  width: 60px;
  padding: 4px 6px;
  border: 1px solid #cdd0d6;
  border-radius: 4px;
  font-size: 0.85rem;
  text-align: center;
  outline: none;
}
.rte-table-num:focus { border-color: #4a90d9; }

.rte-table-insert-btn { width: 100%; text-align: center; justify-content: center; }

.rte-table-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 6px;
  border-top: 1px solid #e9ecef;
}

.rte-table-actions button {
  padding: 4px 8px;
  font-size: 0.78rem;
  border: 1px solid #cdd0d6;
  border-radius: 4px;
  background: #f8f9fa;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.rte-table-actions button:hover { background: #e9ecef; }
.rte-table-del { color: #dc2626 !important; border-color: #fca5a5 !important; }

/* ── Wiki link popup ─────────────────────────────────────────────────────── */
.rte-wiki-popup {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  transform: none;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: #fff;
  border: 1px solid #cdd0d6;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
  width: 320px;
}

.rte-wiki-popup-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e3a5f;
  padding-bottom: 4px;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 2px;
}

.rte-wiki-searching,
.rte-wiki-no-results {
  font-size: 0.8rem;
  color: #9ca3af;
  text-align: center;
  padding: 4px 0;
}

.rte-wiki-results {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 220px;
  overflow-y: auto;
}

.rte-wiki-result-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.1s;
}

.rte-wiki-result-item:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.rte-wiki-result-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: #1e3a5f;
  display: flex;
  align-items: center;
  gap: 6px;
}

.rte-wiki-result-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.rte-wiki-result-badge--doc {
  background: #e0f2fe;
  color: #0369a1;
}

.rte-wiki-result-badge--news {
  background: #fef3c7;
  color: #92400e;
}

.rte-wiki-result-meta {
  font-size: 0.75rem;
  color: #6b7280;
}

/* ── Internal links in editor & display ─────────────────────────────────── */
/* Documentation links */
.rte-editor-area a[href^="/documentation?docId="],
.rte-display-content a[href^="/documentation?docId="] {
  color: #0e7490;
  text-decoration: underline;
  text-decoration-style: dotted;
  cursor: pointer;
}

.rte-display-content a[href^="/documentation?docId="]:hover {
  color: #0a5c72;
  text-decoration-style: solid;
}

/* News-feed links */
.rte-editor-area a[href^="/news-feed?feedId="],
.rte-display-content a[href^="/news-feed?feedId="] {
  color: #b45309;
  text-decoration: underline;
  text-decoration-style: dotted;
  cursor: pointer;
}

.rte-display-content a[href^="/news-feed?feedId="]:hover {
  color: #92400e;
  text-decoration-style: solid;
}

/* ── Images in editor & display ─────────────────────────────────────────── */
.rte-editor-area .ProseMirror img,
.rte-display-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 0.4em 0;
  display: block;
}

.rte-editor-area .ProseMirror img.ProseMirror-selectednode {
  outline: 2px solid #4a90d9;
  border-radius: 4px;
}

/* ── Editor area ─────────────────────────────────────────────────────────── */
.rte-editor-area {
  flex: 1;
  min-height: 360px;
  background: #fff;  overflow: hidden; /* clip editor content to rounded corners */}

/* The actual ProseMirror contenteditable */
.rte-editor-area .ProseMirror {
  min-height: 360px;
  padding: 24px 40px;
  outline: none;
  font-family: Calibri, 'Segoe UI', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #1a202c;
}

/* Placeholder */
.rte-editor-area .ProseMirror p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  color: #adb5bd;
  pointer-events: none;
  height: 0;
}

/* ── Typography inside editor ────────────────────────────────────────────── */
.rte-editor-area .ProseMirror h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #1a3a5c;
  margin: 1.1em 0 0.4em;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.2em;
  line-height: 1.2;
}

.rte-editor-area .ProseMirror h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e4168;
  margin: 1em 0 0.35em;
  line-height: 1.25;
}

.rte-editor-area .ProseMirror h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #2c5282;
  margin: 0.9em 0 0.3em;
}

.rte-editor-area .ProseMirror h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #2d3748;
  margin: 0.8em 0 0.25em;
}

.rte-editor-area .ProseMirror p { margin: 0 0 0.65em; }

.rte-editor-area .ProseMirror strong { font-weight: 700; }
.rte-editor-area .ProseMirror em { font-style: italic; }
.rte-editor-area .ProseMirror u { text-decoration: underline; }
.rte-editor-area .ProseMirror s { text-decoration: line-through; }

.rte-editor-area .ProseMirror a {
  color: #2563eb;
  text-decoration: underline;
}
.rte-editor-area .ProseMirror a:hover { color: #1d4ed8; }

/* Lists */
.rte-editor-area .ProseMirror ul,
.rte-editor-area .ProseMirror ol {
  padding-left: 1.75em;
  margin: 0.25em 0 0.65em;
}
.rte-editor-area .ProseMirror li { margin: 0.15em 0; }
.rte-editor-area .ProseMirror li p { margin: 0; }

/* Task list */
.rte-editor-area .ProseMirror ul[data-type="taskList"] {
  list-style: none;
  padding-left: 0.5em;
}
.rte-editor-area .ProseMirror ul[data-type="taskList"] li {
  display: flex;
  align-items: flex-start;
  gap: 0.5em;
}
.rte-editor-area .ProseMirror ul[data-type="taskList"] li > label {
  flex-shrink: 0;
  margin-top: 0.15em;
}
.rte-editor-area .ProseMirror ul[data-type="taskList"] li > label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #2563eb;
  cursor: pointer;
}

/* Blockquote */
.rte-editor-area .ProseMirror blockquote {
  border-left: 4px solid #3b82f6;
  margin: 0.75em 0;
  padding: 0.5em 1em;
  background: #eff6ff;
  border-radius: 0 6px 6px 0;
  color: #1e3a5f;
  font-style: italic;
  transition: border-left-color 0.2s, background 0.2s, color 0.2s;
}
.rte-editor-area .ProseMirror blockquote p { margin: 0; }

/* ── Blockquote colour palette ───────────────────────────────────────────── */
.rte-bq-palette {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: grid;
  grid-template-columns: repeat(4, 44px);
  gap: 4px;
  padding: 8px;
  background: #fff;
  border: 1px solid #cdd0d6;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
}

.rte-bq-swatch {
  width: 44px;
  height: 28px;
  border-radius: 0 4px 4px 0;
  border-left: 4px solid transparent;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}
.rte-bq-swatch:hover { transform: scale(1.08); box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
.rte-bq-swatch-active { box-shadow: 0 0 0 2px #4a90d9; }

/* Inline code */
.rte-editor-area .ProseMirror code {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 0.1em 0.35em;
  font-family: 'Cascadia Code', 'Fira Code', Consolas, monospace;
  font-size: 0.88em;
  color: #be185d;
}

/* Code block */
.rte-editor-area .ProseMirror pre {
  background: #1e293b;
  border-radius: 8px;
  padding: 1em 1.25em;
  margin: 0.75em 0;
  overflow-x: auto;
  color: #e2e8f0;
}
.rte-editor-area .ProseMirror pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
  font-size: 0.9em;
}

/* Horizontal rule */
.rte-editor-area .ProseMirror hr {
  border: none;
  border-top: 2px solid #e2e8f0;
  margin: 1.25em 0;
}

/* Table */
.rte-editor-area .ProseMirror table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.75em 0;
  font-size: 0.93rem;
  overflow: hidden;
}
.rte-editor-area .ProseMirror th {
  background: #1e3a5f;
  color: #fff;
  font-weight: 600;
  text-align: left;
  padding: 8px 12px;
  border: 1px solid #3b5998;
}
.rte-editor-area .ProseMirror td {
  padding: 7px 12px;
  border: 1px solid #e2e8f0;
}
.rte-editor-area .ProseMirror tr:nth-child(even) td { background: #f8fafc; }
.rte-editor-area .ProseMirror tr:hover td { background: #eff6ff; }

/* Selected table cells */
.rte-editor-area .ProseMirror .selectedCell::after {
  position: absolute;
  content: '';
  inset: 0;
  background: rgba(37, 99, 235, 0.15);
  pointer-events: none;
  z-index: 2;
}

/* Selection highlight */
.rte-editor-area .ProseMirror ::selection { background: rgba(37, 99, 235, 0.15); }

/* ── Status bar ──────────────────────────────────────────────────────────── */
.rte-statusbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 4px 14px;
  background: linear-gradient(to bottom, #f1f3f4 0%, #e9ecef 100%);
  border-top: 1px solid #dde1e7;
  border-radius: 0 0 6px 6px;
  font-size: 0.75rem;
  color: #6c757d;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .rte-editor-area .ProseMirror { padding: 14px 16px; }
  .rte-style-select { min-width: 90px; }
}

/* ── Read-only display of rich-text content ──────────────────────────────── */
.rte-display-content {
  font-family: Calibri, 'Segoe UI', Arial, sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #1a202c;
}

.rte-display-content h1 { font-size: 1.7rem; font-weight: 700; color: #1a3a5c; margin: 0.9em 0 0.3em; border-bottom: 2px solid #e2e8f0; padding-bottom: 0.2em; }
.rte-display-content h2 { font-size: 1.3rem; font-weight: 600; color: #1e4168; margin: 0.8em 0 0.3em; }
.rte-display-content h3 { font-size: 1.1rem; font-weight: 600; color: #2c5282; margin: 0.7em 0 0.25em; }
.rte-display-content h4 { font-size: 1rem; font-weight: 600; color: #2d3748; margin: 0.6em 0 0.2em; }
.rte-display-content p { margin: 0 0 0.55em; }
.rte-display-content ul, .rte-display-content ol { padding-left: 1.5em; margin: 0.2em 0 0.55em; }
.rte-display-content blockquote { border-left: 4px solid #3b82f6; margin: 0.5em 0; padding: 0.4em 0.9em; background: #eff6ff; border-radius: 0 5px 5px 0; font-style: italic; color: #1e3a5f; }
.rte-display-content blockquote p { margin: 0; }
.rte-display-content code { background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 3px; padding: 0.1em 0.3em; font-family: Consolas, monospace; font-size: 0.87em; color: #be185d; }
.rte-display-content pre { background: #1e293b; border-radius: 6px; padding: 0.8em 1em; color: #e2e8f0; overflow-x: auto; }
.rte-display-content pre code { background: transparent; border: none; padding: 0; color: inherit; }
.rte-display-content hr { border: none; border-top: 2px solid #e2e8f0; margin: 1em 0; }
.rte-display-content a { color: #2563eb; text-decoration: underline; }
.rte-display-content table { border-collapse: collapse; width: 100%; margin: 0.5em 0; font-size: 0.9rem; }
.rte-display-content th { background: #1e3a5f; color: #fff; font-weight: 600; text-align: left; padding: 6px 10px; border: 1px solid #3b5998; }
.rte-display-content td { padding: 5px 10px; border: 1px solid #e2e8f0; }
.rte-display-content tr:nth-child(even) td { background: #f8fafc; }
.rte-display-content ul[data-type="taskList"] { list-style: none; padding-left: 0.25em; }
.rte-display-content ul[data-type="taskList"] li { display: flex; align-items: flex-start; gap: 0.45em; }
.home-page {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

/* ── Hero ─────────────────────────────────────── */
.hp-hero {
  background: linear-gradient(135deg, #1a3550 0%, var(--primary-dark) 60%, #0d1f30 100%);
  padding: 2rem 1.5rem 2.25rem;
  position: relative;
  overflow: hidden;
}

.hp-hero-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hp-hero-circle-1 {
  width: 180px;
  height: 180px;
  top: -50px;
  right: -40px;
  background: rgba(200, 122, 0, 0.12);
}

.hp-hero-circle-2 {
  width: 100px;
  height: 100px;
  bottom: -30px;
  left: 10%;
  background: rgba(200, 122, 0, 0.07);
}

.hp-hero-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}

.hp-hero-icon {
  font-size: 2.4rem;
  flex-shrink: 0;
}

.hp-hero-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: white;
  margin: 0 0 0.1rem;
}

.hp-hero-sub {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.68);
  margin: 0;
}

/* ── Hero search bar ─────────────────────────── */
.hp-search-wrap {
  display: flex;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hp-search-input {
  flex: 1;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-dark);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.hp-search-input:focus {
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(200, 122, 0, 0.2);
  background: white;
}

.hp-search-btn {
  padding: 0.8rem 1.25rem;
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(200, 122, 0, 0.35);
}

.hp-search-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200, 122, 0, 0.45);
}

.hp-search-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.hp-hero-clear-btn {
  margin-top: 0.6rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 1;
  transition: color 0.15s;
}

.hp-hero-clear-btn:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* ── Breadcrumb ─────────────────────────────── */
.hp-breadcrumb {
  padding: 0.75rem 1rem;
  background: white;
  border-bottom: 1px solid var(--border-color);
}

.hp-back-btn {
  background: rgba(18, 41, 65, 0.08);
  color: var(--primary-dark);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.9rem;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.hp-back-btn:hover {
  background: rgba(18, 41, 65, 0.14);
}

/* ── Search results ──────────────────────────── */
.hp-results {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hp-result-group {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(18, 41, 65, 0.07);
  overflow: hidden;
}

.hp-result-group-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-dark);
  padding: 0.75rem 1rem 0.5rem;
  margin: 0;
  border-bottom: 1px solid var(--bg-light);
}

.hp-result-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--bg-light);
  transition: background 0.15s;
}

.hp-result-card:last-of-type {
  border-bottom: none;
}

.hp-result-card:hover {
  background: var(--bg-light);
}

.hp-result-type-badge {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.hp-badge-parts {
  background: var(--orange-light);
  color: var(--accent-orange);
}

.hp-badge-docs {
  background: #e8f4fd;
  color: #1a6fa8;
}

.hp-badge-news {
  background: #f0fdf4;
  color: #16a34a;
}

.hp-result-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.hp-result-info strong {
  font-size: 0.9rem;
  color: var(--primary-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-result-sub {
  font-size: 0.78rem;
  color: var(--text-gray);
}

.hp-result-desc {
  font-size: 0.75rem;
  color: var(--text-gray);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hp-result-arrow {
  color: var(--accent-orange);
  font-size: 1.4rem;
  font-weight: 700;
  flex-shrink: 0;
}

.hp-result-more-btn {
  width: 100%;
  background: none;
  border: none;
  border-top: 1px solid var(--border-color);
  padding: 0.6rem 1rem;
  color: var(--accent-orange);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.hp-result-more-btn:hover {
  background: var(--orange-light);
}

.hp-no-results {
  text-align: center;
  padding: 2.5rem 1rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(18, 41, 65, 0.06);
}

.hp-no-results-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

.hp-no-results p {
  font-size: 1rem;
  color: var(--primary-dark);
  margin: 0 0 0.25rem;
}

.hp-no-results small {
  color: var(--text-gray);
  font-size: 0.85rem;
}

/* ── Mode cards (kept, just wrapping) ────────── */
.mode-selection-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  margin-top: 0.5rem;
  padding: 1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}



.mode-card {
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(18, 41, 65, 0.08);
}

.mode-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(18, 41, 65, 0.18);
}

.mode-card-parts {
  border-left: 5px solid var(--accent-orange);
}

.mode-card-parts:hover {
  border-color: var(--accent-orange);
  background: linear-gradient(135deg, var(--orange-light) 0%, #ffe8c0 100%);
}

.mode-card-docs {
  border-left: 5px solid var(--accent-orange);
}

.mode-card-docs:hover {
  border-color: var(--accent-orange);
  background: linear-gradient(135deg, #fff8ee 0%, #ffe8c0 100%);
}

.mode-card-news {
  border-left: 5px solid #10b981;
}

.mode-card-news:hover {
  border-color: #059669;
  background: linear-gradient(135deg, #f0fdf4 0%, #d1fae5 100%);
}

.mode-card-icon {
  font-size: 2.2rem;
  margin-bottom: 0.4rem;
}

.mode-card h2 {
  font-size: 1.05rem;
  margin: 0 0 0.15rem 0;
  color: var(--primary-dark);
  font-weight: 700;
}

.mode-card p {
  font-size: 0.8rem;
  color: var(--text-gray);
  margin: 0;
}

@media (min-width: 600px) {
  .mode-selection-grid {
    grid-template-columns: 1fr 1fr;
    margin-top: 0.5rem;
  }

  .mode-card {
    padding: 1.25rem 1rem;
  }

  .mode-card-icon {
    font-size: 2.5rem;
  }
}

/* Globale Suche — replaced by hp-hero search bar */
.global-search-section { display: none; }

/* Fortschrittsbalken für Bild-Download */
.image-download-progress-banner {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border: 2px solid var(--primary-dark);
  border-radius: 12px;
  margin: 0.75rem 1rem 0;
  box-shadow: 0 4px 12px rgba(18, 41, 65, 0.15);
  animation: slideDown 0.3s ease-out;
}

.progress-content {
  display: flex;
  flex-direction: column;
  padding: 0.875rem 1rem;
  gap: 0.625rem;
}

.progress-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.progress-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.progress-info {
  flex: 1;
  min-width: 0;
}

.progress-info strong {
  display: block;
  font-size: 0.95rem;
  color: #1565c0;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-info p {
  margin: 0;
  font-size: 0.85rem;
  color: #424242;
}

.progress-bar-container {
  width: 100%;
  height: 18px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-dark) 0%, #42a5f5 100%);
  border-radius: 10px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(18, 41, 65, 0.3);
}

.progress-percentage {
  font-size: 1rem;
  font-weight: bold;
  color: #1565c0;
  min-width: 46px;
  text-align: right;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── Doc notification banner ─────────────────────── */
.doc-notif-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, var(--orange-light) 0%, #fde8bb 100%);
  border: 2px solid var(--accent-orange);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 0.75rem 1rem 0;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.1s;
}
}

.doc-notif-banner:hover {
  box-shadow: 0 4px 16px rgba(200, 122, 0, 0.2);
  transform: translateY(-1px);
}

.doc-notif-banner-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.doc-notif-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.doc-notif-banner-text strong {
  font-size: 0.95rem;
  color: #6b3600;
}

.doc-notif-banner-text span {
  font-size: 0.82rem;
  color: var(--accent-orange);
}

.doc-notif-banner-badge {
  flex-shrink: 0;
  background: var(--accent-orange);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* News notification banner */
.news-notif-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 2px solid #fcd34d;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 0.75rem 1rem 0;
  transition: box-shadow 0.15s, transform 0.1s;
  cursor: pointer;
}

.news-notif-banner:hover {
  box-shadow: 0 4px 16px rgba(252, 211, 77, 0.25);
  transform: translateY(-1px);
}

.news-notif-banner-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.news-notif-banner-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.news-notif-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.news-notif-banner-text strong {
  font-size: 0.95rem;
  color: #78350f;
}

.news-notif-banner-text span {
  font-size: 0.82rem;
  color: #b45309;
}

.news-notif-banner-badge {
  flex-shrink: 0;
  background: #fcd34d;
  color: #78350f;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Warnung für veraltete Daten */
.data-warning-banner {
  background: linear-gradient(135deg, var(--warning-light) 0%, #ffeaa7 100%);
  border: 2px solid #ffc107;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.data-warning-content {
  display: flex;
  align-items: flex-start;
  padding: 1rem;
  gap: 0.75rem;
  position: relative;
}

.warning-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.warning-text {
  flex: 1;
}

.warning-text strong {
  display: block;
  font-size: 1.1rem;
  color: #856404;
  margin-bottom: 0.25rem;
}

.warning-text p {
  margin: 0 0 0.75rem 0;
  color: #856404;
  line-height: 1.5;
  font-size: 0.95rem;
}

.sync-now-btn {
  background: linear-gradient(135deg, #2196F3 0%, var(--blue) 100%);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
}

.sync-now-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.sync-now-btn:active {
  transform: translateY(0);
}

.close-warning-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  border: none;
  font-size: 1.75rem;
  color: #856404;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  transition: all 0.2s;
  border-radius: 4px;
}

.close-warning-btn:hover {
  background: rgba(133, 100, 4, 0.1);
  transform: scale(1.1);
}

.sync-now-btn {
  background: #856404;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s;
}

.sync-now-btn:hover {
  background: #6b4f03;
}


.category-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1rem;
  position: relative;
}

.category-header h1 {
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.category-header p {
  font-size: 1rem;
  color: var(--text);
}

.back-to-customers-btn {
  background: rgba(18, 41, 65, 0.1);
  color: var(--primary-dark);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.75rem;
}

.back-to-customers-btn:hover {
  background: rgba(18, 41, 65, 0.15);
  transform: scale(1.05);
}

.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0 1rem;
}

.category-card {
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(18, 41, 65, 0.08);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(18, 41, 65, 0.15);
  border-color: var(--primary);
}

.category-card.kassenwaage {
  border-left: 4px solid var(--link);
}

.category-card.kassenwaage:hover {
  background: var(--bg-light-blue);
}

.category-card.thekenwaage {
  border-left: 4px solid var(--primary);
}

.category-card.thekenwaage:hover {
  background: var(--bg-light-blue);
}

.category-card.drucker {
  border-left: 4px solid var(--secondary);
}

.category-card.drucker:hover {
  background: var(--bg-light-blue);
}

.category-card.customer-card {
  border-left: 4px solid #4CAF50;
}

.category-card.customer-card:hover {
  background: linear-gradient(135deg, var(--success-light) 0%, #c8e6c9 100%);
  border-color: #4CAF50;
}

.category-card.kleidung {
  border-left: 4px solid #9C27B0;
}

.category-card.kleidung:hover {
  background: linear-gradient(135deg, var(--purple-light) 0%, #e1bee7 100%);
}

.category-card.ausweise {
  border-left: 4px solid #FF9800;
}

.category-card.ausweise:hover {
  background: linear-gradient(135deg, var(--orange-light) 0%, #ffe0b2 100%);
}

.category-card.werkzeuge {
  border-left: 4px solid #607D8B;
}

.category-card.werkzeuge:hover {
  background: linear-gradient(135deg, #eceff1 0%, #cfd8dc 100%);
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.category-icon.customer-logo {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  background: white;
  padding: 0.5rem;
  margin: 0 auto 1rem;
}

.category-icon.customer-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.category-card h2 {
  font-size: 1.35rem;
  margin: 0 0 0.5rem 0;
  color: var(--primary-dark);
  font-weight: 600;
}

.category-card p {
  font-size: 0.95rem;
  color: var(--text);
  margin: 0;
}

.loading {
  text-align: center;
  padding: 3rem 1rem;
  font-size: 1.1rem;
  color: var(--text);
}

.seed-prompt {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(18, 41, 65, 0.08);
}

.seed-prompt h2 {
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.seed-prompt p {
  margin-bottom: 2rem;
  color: var(--text-gray);
}

.primary-button {
  background: linear-gradient(135deg, var(--accent-orange) 0%, #d68900 100%);
  color: white;
  border: none;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(200, 122, 0, 0.2);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(200, 122, 0, 0.3);
}

.primary-button:active {
  transform: translateY(0);
}

/* Desktop Optimierung */
@media (min-width: 769px) {
  .home-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
  }

  .hp-hero {
    padding: 2.5rem 2rem 2rem;
    border-radius: 0 0 20px 20px;
  }

  .hp-hero-title {
    font-size: 2rem;
  }

  .hp-search-input {
    font-size: 1rem;
    padding: 0.875rem 1.25rem;
  }

  .hp-search-btn {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
  }

  .hp-results {
    padding: 1.5rem 2rem;
  }

  .mode-selection-grid {
    padding: 1.5rem 2rem;
    grid-template-columns: 1fr 1fr;
  }

  .category-header h1 {
    font-size: 2.5rem;
  }

  .category-header p {
    font-size: 1.15rem;
  }

  .category-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
  }

  .category-card {
    padding: 2.5rem 2rem;
  }

  .category-icon {
    font-size: 4rem;
  }

  .category-card h2 {
    font-size: 1.5rem;
  }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-overlay-top {
  z-index: 2000;
}

.modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-height: 90vh;
  overflow-y: auto;
  width: 90%;
}

.documentation-modal-content {
  max-width: 900px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
}

.modal-header h2 {
  margin: 0;
  color: #333;
  font-size: 20px;
  flex: 1;
  padding-right: 10px;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: #f0f0f0;
  color: #333;
}

.documentation-modal {
  padding: 20px;
}

.documentation-modal {
  max-width: 800px;
}

.documentation-list {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 20px;
}

.documentation-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e6e8ee;
  border-radius: 12px;
  background: #f8fafc;
  margin-bottom: 12px;
}

.documentation-info {
  flex: 1;
}

.documentation-name {
  font-weight: bold;
  color: #333;
  margin-bottom: 5px;
  font-size: 16px;
  word-break: break-word;
}

.documentation-pages {
  color: #666;
  font-size: 14px;
  margin-bottom: 5px;
}

.documentation-description {
  color: #777;
  font-size: 13px;
  font-style: italic;
  word-break: break-word;
}

.documentation-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.doc-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  min-width: fit-content;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.doc-action-btn:focus-visible {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
}

.doc-action-btn:active {
  transform: translateY(1px) scale(0.98);
}

.doc-action-icon {
  font-size: 16px;
  line-height: 1;
}

.doc-action-label {
  line-height: 1;
}

.btn-view {
  background: #2563eb;
  color: white;
}

.btn-view:hover {
  background: #1d4ed8;
}

.btn-edit-doc {
  background: #f59e0b;
  color: #2b2b2b;
}

.btn-edit-doc:hover {
  background: #d97706;
}

.btn-delete-doc {
  background: #ef4444;
  color: white;
}

.btn-delete-doc:hover {
  background: #dc2626;
}

.documentation-form {
  background: #ffffff;
  padding: 22px;
  border-radius: 14px;
  margin-bottom: 20px;
  border: 1px solid #e6e8ee;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.documentation-form h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
}

.form-group-doc {
  margin-bottom: 15px;
}

.form-group-doc label {
  display: block;
  margin-bottom: 5px;
  color: #0f172a;
  font-weight: 500;
}

.form-group-doc input,
.form-group-doc select,
.form-group-doc textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #dbe0ea;
  border-radius: 10px;
  font-size: 14px;
  background: #f8fafc;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-group-doc input:focus,
.form-group-doc select:focus,
.form-group-doc textarea:focus {
  outline: none;
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.documentation-upload-info {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}

.page-type-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 5px;
}

.page-type-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: normal;
  cursor: pointer;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.2s;
}

.page-type-options label:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.page-type-options input[type="radio"] {
  width: auto;
  margin: 0;
  min-width: 20px;
  min-height: 20px;
}

.page-inputs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.page-inputs input {
  width: 100%;
}

.btn-submit-doc {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s;
  width: 100%;
}

.btn-submit-doc:hover {
  filter: brightness(0.95);
}

.btn-submit-doc:active {
  transform: scale(0.98);
}

.btn-cancel-doc {
  background: #0f172a;
  color: white;
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.2s;
  width: 100%;
}

.btn-cancel-doc:hover {
  background: #111827;
}

.btn-cancel-doc:active {
  transform: scale(0.98);
}

.btn-add-doc {
  background: #007bff;
  color: white;
  padding: 14px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  transition: all 0.2s;
  width: 100%;
}

.btn-add-doc:hover {
  background: #0056b3;
}

.btn-add-doc:active {
  transform: scale(0.98);
}
/* Mobile Optimierungen */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-height: 95vh;
    border-radius: 12px 12px 0 0;
    margin-top: auto;
  }

  .modal-header {
    padding: 16px;
  }

  .modal-header h2 {
    font-size: 18px;
  }

  .documentation-modal {
    padding: 16px;
  }

  .documentation-list {
    max-height: 60vh;
  }

  .documentation-item {
    padding: 12px;
  }

  .documentation-name {
    font-size: 15px;
  }

  .documentation-pages {
    font-size: 13px;
  }

  .documentation-description {
    font-size: 12px;
  }

  .documentation-actions {
    width: 100%;
  }

  .documentation-actions button {
    flex: 1;
    padding: 12px 8px;
    font-size: 13px;
  }

  .btn-view {
    min-width: 100px;
  }

  .documentation-form {
    padding: 16px;
  }

  .form-group-doc input,
  .form-group-doc select,
  .form-group-doc textarea {
    padding: 12px;
    font-size: 16px; /* Verhindert Auto-Zoom auf iOS */
  }

  .form-group-doc label {
    font-size: 14px;
    margin-bottom: 8px;
  }

  .page-type-options label {
    padding: 12px;
    font-size: 15px;
  }

  .page-type-options input[type="radio"] {
    min-width: 22px;
    min-height: 22px;
  }
}

/* Extra kleine Geräte */
@media (max-width: 480px) {
  .modal-header h2 {
    font-size: 16px;
  }

  .documentation-modal {
    padding: 12px;
  }

  .documentation-item {
    padding: 10px;
  }

  .btn-edit-doc,
  .btn-delete-doc {
    padding: 10px 8px;
    font-size: 16px;
  }
}

.btn-add-doc {
  background: #007bff;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  transition: all 0.2s;
}

.btn-add-doc:hover {
  background: #0056b3;
}

.no-documentation {
  text-align: center;
  padding: 30px;
  color: #999;
  font-style: italic;
}

.file-input-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.file-input-wrapper input[type="file"] {
  width: 100%;
}

.documentation-upload-info {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
}
/* Mobile-First Design */
.search-page {
  padding: 0;
  min-height: 100vh;
  background: var(--bg-light);
}

.device-header {
  background: linear-gradient(135deg, #1a3550 0%, var(--primary-dark) 60%, #0d1f30 100%);
  color: white;
  padding: 1.5rem 1rem;
  text-align: center;
  margin-bottom: 1rem;
  margin-left: -2rem;
  margin-right: -2rem;
  margin-top: 0;
  position: relative;
  overflow: hidden;
}

/* Hero Section (search mode & parser mode) */
.sp-hero {
  background: linear-gradient(135deg, #1a3550 0%, var(--primary-dark) 60%, #0d1f30 100%);
  color: white;
  padding: 2rem 1.5rem 2.25rem;
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
}

.sp-hero::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -20px;
  width: 140px;
  height: 140px;
  background: rgba(200, 122, 0, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.sp-back-btn {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  padding: 0.4rem 0.9rem;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.2s;
}

.sp-back-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.sp-hero-content {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  position: relative;
  z-index: 1;
}

.sp-hero-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.sp-hero-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin: 0 0 0.15rem;
}

.sp-hero-sub {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}

.device-header .back-button {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
}

.device-header .back-button:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

.device-header h1 {
  font-size: 1.5rem;
  margin: 0 0 0.25rem 0;
  font-weight: 700;
}

.device-header p {
  font-size: 0.95rem;
  margin: 0;
  opacity: 0.9;
}

.search-section {
  padding: 1rem;
}

.search-controls {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(18, 41, 65, 0.08);
  margin-bottom: 1.5rem;
}

.search-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.search-input {
  flex: 1;
  padding: 0.875rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--primary-dark);
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(200, 122, 0, 0.1);
}

.search-button {
  padding: 0.875rem 1.25rem;
  background: linear-gradient(135deg, var(--accent-orange) 0%, #a06000 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(200, 122, 0, 0.2);
}

.search-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(200, 122, 0, 0.3);
}

.search-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.loading {
  text-align: center;
  padding: 3rem 1rem;
  font-size: 1.1rem;
  color: var(--text);
}

.results-section {
  margin-top: 1.5rem;
}

.results-title {
  font-size: 1.25rem;
  color: var(--primary-dark);
  margin: 0 0 1rem 0;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.results-title .count {
  color: var(--text-gray);
  font-size: 1rem;
  font-weight: 400;
}

/* Gruppierte Ergebnisse */
.grouped-results {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.category-group {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(18, 41, 65, 0.08);
}

.category-group-title {
  font-size: 1.25rem;
  color: var(--primary-dark);
  margin: 0 0 1rem 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-color);
}

.category-count {
  color: var(--text-gray);
  font-size: 1rem;
  font-weight: 400;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.part-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(18, 41, 65, 0.06);
  transition: all 0.3s ease;
}

.part-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(18, 41, 65, 0.12);
  border-color: var(--accent-orange);
}

.part-image {
  width: 100%;
  height: 180px;
  background: var(--bg-light-blue);
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.part-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.part-info h3 {
  font-size: 1.1rem;
  color: var(--primary-dark);
  margin: 0 0 0.5rem 0;
  font-weight: 600;
  line-height: 1.4;
}

.part-article {
  font-size: 0.85rem;
  color: var(--accent-orange);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.part-description {
  font-size: 0.9rem;
  color: var(--text-gray);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.compatible-types {
  background: var(--bg-accent);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.compatible-types .label {
  font-weight: 600;
  color: var(--primary-dark);
  margin-right: 0.5rem;
}

.compatible-types .types {
  color: var(--text-gray);
}

.part-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bg-light);
}

.view-docs-button {
  padding: 0.75rem 1.25rem;
  background: #f0f4f8;
  color: var(--primary-dark);
  border: 1px solid #d0dae5;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-docs-button:hover {
  background: #e1e9f0;
  border-color: var(--primary-dark);
  transform: translateY(-1px);
}

.view-docs-button:active {
  transform: translateY(0);
}

.add-to-cart-button {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--accent-orange) 0%, #d68900 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(200, 122, 0, 0.2);
}

.add-to-cart-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(200, 122, 0, 0.3);
}

.add-to-cart-button:active {
  transform: translateY(0);
}

.no-results {
  text-align: center;
  padding: 3rem 1rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(18, 41, 65, 0.06);
}

.no-results-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.no-results p {
  font-size: 1rem;
  color: var(--text);
  margin: 0;
}

/* Parser Mode Styles */
.parser-header {
  background: linear-gradient(135deg, #1a3550 0%, var(--primary-dark) 60%, #0d1f30 100%);
  color: white;
  padding: 1.5rem 1rem;
  text-align: center;
  margin-bottom: 1rem;
}

.parser-header h1 {
  font-size: 1.5rem;
  margin: 0 0 0.25rem 0;
}

.parser-section {
  padding: 1rem;
}

.parser-result {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 2px 8px rgba(18, 41, 65, 0.08);
}

.parser-result.valid {
  border-left: 4px solid var(--success-color);
}

.parser-result.invalid {
  border-left: 4px solid var(--error-color);
}

.parser-result h3 {
  color: var(--primary-dark);
  margin: 0 0 1rem 0;
  font-size: 1.15rem;
}

.result-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--bg-light);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row .label {
  font-weight: 600;
  color: var(--text);
}

.detail-row .value {
  color: var(--accent-orange);
  font-weight: 500;
}

/* Desktop Optimierung */
@media (min-width: 769px) {
  .search-page {
    max-width: 1200px;
    margin: 0 auto;
  }

  .device-header,
  .parser-header {
    padding: 2rem;
    border-radius: 0 0 20px 20px;
  }

  .device-header h1,
  .parser-header h1 {
    font-size: 2rem;
  }

  .device-header p {
    font-size: 1.1rem;
  }

  .search-section,
  .parser-section {
    padding: 2rem;
  }

  .search-controls {
    padding: 1.5rem;
  }

  .search-box {
    margin-bottom: 0;
  }

  .results-title {
    font-size: 1.5rem;
  }

  .results-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
  }

  .part-card {
    padding: 1.5rem;
  }

  .part-info h3 {
    font-size: 1.2rem;
  }

  .part-description {
    font-size: 0.95rem;
  }
}

/* Tablet */
@media (min-width: 481px) and (max-width: 768px) {
  .results-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .device-header h1 {
    font-size: 1.75rem;
  }
}
/* Image Modal / Lightbox */
.image-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.image-modal-content {
  background: white;
  border-radius: 12px;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.image-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
  gap: 1rem;
}

.image-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--primary-dark);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-modal-controls {
  display: flex;
  gap: 0.5rem;
}

.image-modal-controls button {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-dark);
  transition: all 0.2s;
  min-width: 60px;
}

.image-modal-controls button:hover {
  background: var(--bg-light);
  border-color: var(--accent-orange);
}

.image-modal-controls button:active {
  transform: scale(0.95);
}

.image-modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.image-modal-close:hover {
  background: var(--bg-light);
  color: var(--primary-dark);
}

.image-modal-body {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: #f8f9fa;
}

.image-modal-body img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .image-modal-content {
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .image-modal-header {
    padding: 0.75rem 1rem;
  }
  
  .image-modal-header h3 {
    font-size: 0.95rem;
  }
  
  .image-modal-controls button {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
    min-width: 50px;
  }
  
  .image-modal-body {
    padding: 1rem;
  }

  .device-header .back-button {
    position: static;
    transform: none;
    display: block;
    margin: 0 auto 0.75rem auto;
    width: fit-content;
  }
  
  .device-header h1 {
    font-size: 1.25rem;
  }
}/* Mobile-First Design für DeviceSelectionPage */
.device-selection-page {
  padding: 0;
  min-height: 100vh;
  background: var(--bg-light);
}

.device-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 2rem 1rem;
  text-align: center;
  position: relative;
  box-shadow: 0 2px 8px rgba(18, 41, 65, 0.15);
}

.back-button {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.05);
}

.device-header h1 {
  font-size: 1.75rem;
  margin: 0;
  font-weight: 700;
}

.devices-grid {
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.device-card {
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(18, 41, 65, 0.08);
}

.device-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(18, 41, 65, 0.15);
  border-color: var(--link);
}

.device-card h2 {
  font-size: 1.2rem;
  color: var(--primary);
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

.device-card p {
  font-size: 0.9rem;
  color: var(--text);
  margin: 0;
  line-height: 1.5;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  padding: 3rem 1rem;
}

.loading-container .spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-container p {
  margin-top: 1rem;
  color: var(--text);
  font-size: 1.1rem;
}

.error-container {
  text-align: center;
  padding: 2rem 1rem;
  max-width: 600px;
  margin: 2rem auto;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(18, 41, 65, 0.1);
}

.error-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.error-container h2 {
  color: var(--warning-color);
  font-size: 1.35rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.error-container p {
  color: var(--text);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.error-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn-primary,
.btn-secondary {
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-orange) 0%, #d68900 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(200, 122, 0, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(200, 122, 0, 0.3);
}

.btn-secondary {
  background: white;
  color: var(--primary-dark);
  border: 2px solid var(--primary-dark);
}

.btn-secondary:hover {
  background: var(--bg-accent);
  transform: translateY(-2px);
}

.device-grid {
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.device-image {
  width: 100%;
  height: 180px;
  background: var(--bg-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  overflow: hidden;
}

.device-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.device-placeholder {
  font-size: 3rem;
  opacity: 0.3;
}

/* Tablet Optimierung */
@media (min-width: 481px) {
  .error-actions {
    flex-direction: row;
    justify-content: center;
  }

  .btn-primary,
  .btn-secondary {
    flex: 1;
    max-width: 200px;
  }

  .device-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop Optimierung */
@media (min-width: 769px) {
  .device-selection-page {
    max-width: 1200px;
    margin: 0 auto;
  }

  .device-header {
    padding: 3rem 2rem;
  }

  .back-button {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
  }

  .device-header h1 {
    font-size: 2.25rem;
  }

  .device-grid {
    padding: 2rem;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
  }

  .device-card {
    padding: 2rem;
  }

  .device-card h2 {
    font-size: 1.4rem;
  }

  .device-image {
    height: 220px;
  }
}
/* ── Cart Page (cp-) ── */
.cp-page {
  min-height: 100vh;
  background: var(--bg-light);
}

/* Hero */
.cp-hero {
  background: linear-gradient(135deg, #1a3550 0%, var(--primary-dark) 60%, #0d1f30 100%);
  padding: 2rem 1.5rem 1.25rem;
  position: relative;
  overflow: hidden;
}

.cp-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: rgba(200,122,0,0.1);
  border-radius: 50%;
  pointer-events: none;
}

.cp-hero-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.1rem;
  position: relative; z-index: 1;
}

.cp-hero-icon { font-size: 2.2rem; line-height: 1; flex-shrink: 0; }

.cp-hero-text h1 { margin: 0; font-size: 1.5rem; font-weight: 800; color: white; }
.cp-hero-text p  { margin: 0.2rem 0 0; font-size: 0.88rem; color: rgba(255,255,255,0.65); }

.cp-hero-stats {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  position: relative; z-index: 1;
}

.cp-stat-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}

.cp-stat-chip.offline {
  background: rgba(244,67,54,0.2);
  border-color: rgba(244,67,54,0.3);
  color: #ffcdd2;
}

.cp-stat-chip strong { color: white; }

/* Layout */
.cp-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Loading */
.cp-loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-gray);
  font-size: 0.95rem;
}

/* Empty */
.cp-empty-wrap {
  max-width: 480px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.cp-empty-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  padding: 3rem 2rem;
  text-align: center;
}

.cp-empty-icon { font-size: 4rem; opacity: 0.25; margin-bottom: 1rem; }
.cp-empty-card h2 { margin: 0 0 0.5rem; font-size: 1.2rem; color: var(--primary-dark); }
.cp-empty-card p  { margin: 0 0 1.75rem; color: var(--text-gray); font-size: 0.92rem; }

.cp-empty-btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(200,122,0,0.3);
  transition: all 0.2s;
}

.cp-empty-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(200,122,0,0.4); }

/* Items panel */
.cp-items {
  background: white;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  overflow: hidden;
}

.cp-items-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.cp-items-header h2 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--primary-dark); }

.cp-items-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-orange);
  background: var(--orange-light);
  border-radius: 12px;
  padding: 0.2rem 0.65rem;
}

/* Table */
.cp-table-wrap { overflow-x: auto; }

.cp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.cp-table thead th {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-gray);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.cp-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s;
}

.cp-table tbody tr:last-child { border-bottom: none; }
.cp-table tbody tr:hover { background: var(--bg-light); }

.cp-table td { padding: 0.65rem 1rem; vertical-align: middle; }

.cp-artno {
  font-family: 'Courier New', monospace;
  color: var(--accent-orange);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.cp-name  { color: var(--primary-dark); font-size: 0.9rem; font-weight: 600; }
.cp-qty-cell { text-align: center; white-space: nowrap; }

.cp-qty-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-light);
  padding: 0.2rem;
  border-radius: 7px;
}

.cp-qty-btn {
  width: 26px; height: 26px;
  border: none;
  background: white;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.cp-qty-btn:hover:not(:disabled) { background: var(--accent-orange); color: white; }
.cp-qty-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.cp-qty {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 0.9rem;
}

.cp-action-cell { text-align: center; width: 44px; }

.cp-remove-btn {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.2s, transform 0.2s;
  padding: 0.25rem;
}

.cp-remove-btn:hover { opacity: 1; transform: scale(1.15); }

/* Table footer actions */
.cp-table-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-light);
}

.cp-btn-back,
.cp-btn-clear {
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.cp-btn-back  { background: white; color: var(--text-gray); border: 1.5px solid var(--border-color); }
.cp-btn-back:hover  { background: var(--bg-light); }
.cp-btn-clear { background: white; color: var(--error-color); border: 1.5px solid var(--error-color); }
.cp-btn-clear:hover { background: var(--error-color); color: white; }

/* Summary panel */
.cp-summary {
  background: white;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  position: sticky;
  top: 1rem;
  overflow: hidden;
}

.cp-summary-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-light);
}

.cp-summary-header h2 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--primary-dark); }

.cp-summary-body {
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cp-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-gray);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-color);
}

.cp-summary-row:last-of-type { border-bottom: none; }
.cp-summary-row strong { color: var(--primary-dark); font-size: 1.05rem; }

/* Ticket */
.cp-ticket-field { display: flex; flex-direction: column; gap: 0.4rem; }

.cp-ticket-field label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-gray);
}

.cp-ticket-input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.cp-ticket-input:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(200,122,0,0.1);
}

.cp-ticket-hint { font-size: 0.78rem; color: var(--text-gray); margin: 0; }

/* Offline */
.cp-offline {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #856404;
}

/* Summary footer */
.cp-summary-footer {
  padding: 0 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cp-order-btn {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(200,122,0,0.3);
  transition: all 0.2s;
  font-family: inherit;
}

.cp-order-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(200,122,0,0.4); }
.cp-order-btn:disabled { background: #ccc; box-shadow: none; cursor: not-allowed; transform: none; }

.cp-order-note {
  font-size: 0.78rem;
  color: var(--text-gray);
  text-align: center;
  margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .cp-layout { grid-template-columns: 1fr; }
  .cp-summary { position: static; }
}

@media (max-width: 768px) {
  .cp-hero   { padding: 1.5rem 1rem 1rem; }
  .cp-layout { padding: 1rem; gap: 1rem; }
  .cp-table thead th,
  .cp-table td { padding: 0.5rem 0.5rem; }
}

.settings-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 0 2rem;
}

/* ── Hero ──────────────────────────────── */
.st-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1a3550 0%, var(--primary-dark) 60%, #0d1f30 100%);
  padding: 2rem 1.5rem 2.25rem;
  margin-bottom: 1.25rem;
}

.st-hero::before {
  content: '';
  position: absolute;
  top: -70px;
  right: -70px;
  width: 240px;
  height: 240px;
  background: rgba(200, 122, 0, 0.1);
  border-radius: 50%;
}

.st-hero-deco-1 {
  position: absolute;
  bottom: -50px;
  left: 8%;
  width: 160px;
  height: 160px;
  background: rgba(200, 122, 0, 0.07);
  border-radius: 50%;
}

.st-hero-content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.st-hero-icon {
  font-size: 3rem;
  flex-shrink: 0;
  line-height: 1;
}

.st-hero-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: white;
  margin: 0 0 0.35rem;
  line-height: 1.1;
}

.st-hero-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.st-user-name {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

.st-user-role {
  background: var(--accent-orange);
  color: white;
  padding: 0.15rem 0.65rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Tab Navigation ───────────────────── */
.settings-tabs {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  padding: 0 1rem 0.75rem;
  margin-bottom: 0.5rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.settings-tabs::-webkit-scrollbar {
  display: none;
}

.settings-tab {
  flex-shrink: 0;
  padding: 0.55rem 1.1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: white;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.settings-tab:hover {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
  background: rgba(200, 122, 0, 0.05);
}

.settings-tab--active {
  border-color: var(--accent-orange);
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: white;
  font-weight: 600;
}

.settings-tab--active:hover {
  background: linear-gradient(135deg, #d68900, #c07800);
  color: white;
}

.settings-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 0 1rem;
}

.settings-section h2 {
  margin: 0 0 1rem 0;
  color: var(--primary-dark);
  font-size: 1.1rem;
  font-weight: 700;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-orange);
}

.settings-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Customer selection list in settings */
.customer-settings-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 400px;
  overflow-y: auto;
}

.customer-settings-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #fff;
  user-select: none;
  font-size: 0.95rem;
  color: #111827;
}

.customer-settings-item:hover {
  border-color: var(--accent-orange);
  background: rgba(200, 122, 0, 0.05);
}

.customer-settings-item.selected {
  border-color: var(--accent-orange);
  background: rgba(200, 122, 0, 0.08);
}

.customer-settings-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-orange);
  flex-shrink: 0;
  cursor: pointer;
}

/* Favorites action list */
.favorites-actions {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.action-buttons-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 130px;
}

.section-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* User Section */
.user-info {
  margin-bottom: 1.5rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
  border-bottom: none;
}

.info-row .label {
  font-weight: 600;
  color: var(--text-secondary);
}

.info-row .value {
  color: var(--text-primary);
}

.text-warning {
  color: var(--warning-color) !important;
  font-weight: 600;
}

.session-days {
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 400;
}

.badge {
  background-color: var(--primary-dark);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Statistics Section */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background-color: var(--background);
  border-radius: 8px;
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-orange);
}

.sync-info {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sync-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.sync-value {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 600;
}

/* Storage Section */
.storage-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.storage-bar {
  width: 100%;
  height: 24px;
  background-color: var(--background);
  border-radius: 12px;
  overflow: hidden;
}

.storage-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-orange), #d68900);
  transition: width 0.3s;
}

.storage-details {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Buttons */
.primary-button {
  padding: 0.875rem 1.75rem;
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  width: 100%;
}

.primary-button:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

.primary-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.offline-warning {
  width: 100%;
  padding: 1rem;
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
}

.secondary-button {
  padding: 0.75rem 1.5rem;
  background-color: transparent;
  color: var(--primary-dark);
  border: 2px solid var(--primary-dark);
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.secondary-button:hover {
  background-color: var(--primary-dark);
  color: white;
}

.danger-button {
  padding: 0.75rem 1.5rem;
  background-color: transparent;
  color: var(--error-color);
  border: 2px solid var(--error-color);
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  width: 100%;
}

.danger-button:hover {
  background-color: var(--error-color);
  color: white;
}

/* Maintenance Section */
.maintenance-actions {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.action-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background-color: var(--background);
  border-radius: 8px;
  gap: 2rem;
}

.action-item h4 {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
}

.action-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.danger-text {
  color: var(--error-color) !important;
  font-weight: 600;
}

/* App Info Section */
.info-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-badge.online {
  background-color: #e8f5e9;
  color: var(--success-color);
}

.status-badge.offline {
  background-color: #ffebee;
  color: var(--error-color);
}

/* Password Change Section */
.password-change-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.password-change-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.password-change-form label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.password-change-form input {
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--text-primary);
  background: white;
  transition: all 0.2s ease;
}

.password-change-form input:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(200, 122, 0, 0.1);
}

.password-change-form input:disabled {
  background-color: var(--background);
  opacity: 0.6;
  cursor: not-allowed;
}

.password-change-form button[type="submit"] {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(200, 122, 0, 0.3);
  margin-top: 0.5rem;
}

.password-change-form button[type="submit"]:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200, 122, 0, 0.4);
}

.password-change-form button[type="submit"]:active:not(:disabled) {
  transform: translateY(0);
}

.password-change-form button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.password-requirements {
  background: var(--orange-light);
  border-left: 4px solid var(--accent-orange);
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.password-requirements p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.password-requirements strong {
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .settings-header h1 {
    font-size: 1.6rem;
  }

  .settings-tab {
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .action-item {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .action-item button,
  .action-buttons-col button {
    width: 100%;
  }

  .action-buttons-col {
    min-width: unset;
  }

  .storage-details {
    flex-direction: column;
    gap: 0.25rem;
  }
}

/* Push Notification Section */
.push-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.push-status-info {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex: 1;
  min-width: 200px;
}

.push-status-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.push-status-info strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.push-status-description {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
}

.push-warning {
  color: #e65100;
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
}

.push-not-supported {
  color: #888;
  font-size: 0.95rem;
}

.push-test-row {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* \u2500\u2500 Push Details Dashboard \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
.push-details-dashboard {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.push-section-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-gray);
  margin: 0 0 1rem;
  font-weight: 700;
}

.push-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.875rem;
}

.push-detail-card {
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 8px;
  border-left: 4px solid var(--border-color);
}

.push-detail-card.pdc--ok   { border-left-color: var(--success-color); }
.push-detail-card.pdc--error { border-left-color: var(--error-color); }
.push-detail-card.pdc--warn  { border-left-color: #e6a817; }
.push-detail-card.pdc--info  { border-left-color: var(--primary-dark); }

.push-detail-label {
  font-size: 0.75rem;
  color: var(--text-gray);
  margin-bottom: 0.3rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.push-detail-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.2;
}

.push-detail-value--lg { font-size: 1.4rem; }
.push-detail-value--sm { font-size: 0.88rem; }

.push-detail-sub {
  font-size: 0.78rem;
  color: #999;
  margin-top: 0.25rem;
}

.push-detail-sub--error { color: var(--error-color); }

.push-actions {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.push-checked-at {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #aaa;
  text-align: right;
}

/* \u2500\u2500 Responsive \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
@media (max-width: 480px) {
  .st-hero-title { font-size: 1.45rem; }
  .st-hero-icon  { font-size: 2.2rem; }
  .settings-tabs { padding: 0 0.5rem 0.75rem; }
  .settings-content { padding: 0 0.5rem; }
}
.profile-complete-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-complete-description {
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.profile-error {
  padding: 0.75rem 1rem;
  background-color: #fee;
  color: #c00;
  border-radius: 4px;
  border: 1px solid #fcc;
  font-size: 0.9rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.form-group input {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-group input:disabled {
  background-color: var(--background);
  cursor: not-allowed;
}

.profile-submit-button {
  padding: 1rem 2rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.profile-submit-button:hover:not(:disabled) {
  background-color: var(--primary-dark);
}

.profile-submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.forgot-password-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.forgot-password-info {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.forgot-password-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.forgot-password-form label {
  font-weight: 500;
  color: #333;
}

.forgot-password-form input {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.forgot-password-form input:focus {
  outline: none;
  border-color: #2196F3;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.modal-actions button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.modal-actions button[type="submit"] {
  background-color: #2196F3;
  color: white;
}

.modal-actions button[type="submit"]:hover:not(:disabled) {
  background-color: #1976D2;
}

.modal-actions .cancel-button {
  background-color: #f5f5f5;
  color: #333;
}

.modal-actions .cancel-button:hover:not(:disabled) {
  background-color: #e0e0e0;
}

.modal-actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
/* Mobile-First Login Design */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--text-gray) 100%);
  padding: 1rem;
}

.login-container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(18, 41, 65, 0.3);
  width: 100%;
  max-width: 420px;
  padding: 2rem 1.5rem;
  animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: bounce 1s ease-in-out;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.login-header h1 {
  font-size: 1.75rem;
  color: var(--primary-dark);
  margin: 0 0 0.5rem 0;
  font-weight: 700;
}

.login-header p {
  font-size: 1rem;
  color: var(--text-gray);
  margin: 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.form-group input {
  padding: 0.875rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--primary-dark);
  transition: all 0.2s;
  background: white;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(200, 122, 0, 0.1);
}

.form-group input:disabled {
  background: var(--bg-light);
  cursor: not-allowed;
}

.login-button {
  padding: 1rem;
  background: linear-gradient(135deg, var(--accent-orange) 0%, #a06000 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(200, 122, 0, 0.3);
  margin-top: 0.5rem;
}

.login-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200, 122, 0, 0.4);
}

.login-button:active:not(:disabled) {
  transform: translateY(0);
}

.login-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.forgot-password-link {
  text-align: center;
  margin-top: -0.5rem;
}

.link-button {
  background: none;
  border: none;
  color: var(--link);
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  padding: 0.5rem;
  transition: opacity 0.2s ease;
}

.link-button:hover:not(:disabled) {
  opacity: 0.8;
  text-decoration: underline;
}

.link-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.login-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.info-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-light-blue);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text);
}

.badge-icon {
  font-size: 1.25rem;
}

.login-hint {
  background: var(--bg-light);
  border-left: 4px solid var(--link);
  padding: 1rem;
  border-radius: 8px;
  margin-top: 0.5rem;
}

.login-hint p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
  color: var(--text);
}

.login-hint p:first-child {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.login-hint code {
  background: white;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: var(--link);
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.login-footer a {
  color: var(--link);
  text-decoration: none;
  transition: opacity 0.2s ease;
  font-weight: 500;
}

.login-footer a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.loading {
  text-align: center;
  padding: 3rem 1rem;
  font-size: 1.1rem;
  color: var(--text);
}

/* Offline Message Styles */
.offline-container {
  max-width: 600px;
}

.offline-icon {
  animation: pulse 2s ease-in-out infinite !important;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.offline-message {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.message-box {
  padding: 1.5rem;
  border-radius: 12px;
  border-left: 4px solid;
}

.message-box h3 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: var(--primary);
}

.message-box p {
  margin: 0;
  line-height: 1.6;
  color: var(--text);
}

.message-box ul, .message-box ol {
  margin: 0.5rem 0 0 0;
  padding-left: 1.5rem;
  line-height: 1.8;
  color: var(--text);
}

.message-box li {
  margin-bottom: 0.5rem;
}

.message-box.warning {
  background: #fff3cd;
  border-left-color: #ffc107;
}

.message-box.warning h3 {
  color: #856404;
}

.message-box.info {
  background: #e3f2fd;
  border-left-color: #2196F3;
}

.message-box.info h3 {
  color: #1565C0;
}

.message-box.steps {
  background: #f3e5f5;
  border-left-color: #9c27b0;
}

.message-box.steps h3 {
  color: #6a1b9a;
}

.connection-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.connection-status.offline {
  background: #ffebee;
  color: #c62828;
}

.connection-status.online {
  background: #e8f5e9;
  color: #2e7d32;
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.status-icon {
  font-size: 1.5rem;
}

.status-text {
  font-size: 1rem;
}

/* Desktop Optimierung */
@media (min-width: 769px) {
  .login-container {
    padding: 3rem 2.5rem;
  }

  .login-icon {
    font-size: 5rem;
  }

  .login-header h1 {
    font-size: 2rem;
  }

  .login-header p {
    font-size: 1.1rem;
  }

  .form-group label {
    font-size: 1rem;
  }

  .form-group input {
    padding: 1rem;
    font-size: 1.05rem;
  }

  .login-button {
    padding: 1.125rem;
    font-size: 1.15rem;
  }

  .info-badge {
    flex-direction: row;
  }
}

/* Tablet */
@media (min-width: 481px) and (max-width: 768px) {
  .login-container {
    padding: 2.5rem 2rem;
  }

  .login-icon {
    font-size: 4.5rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .login-container,
  .login-icon {
    animation: none;
  }
}
/* Reset Password Page Design */
.reset-password-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--text-gray) 100%);
  padding: 1rem;
}

.reset-container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(18, 41, 65, 0.3);
  width: 100%;
  max-width: 420px;
  padding: 2rem 1.5rem;
  animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reset-header {
  text-align: center;
  margin-bottom: 2rem;
}

.reset-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: bounce 1s ease-in-out;
}

.reset-icon.error {
  animation: shake 0.5s ease-in-out;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

.reset-header h1 {
  font-size: 1.75rem;
  color: var(--primary-dark);
  margin: 0 0 0.5rem 0;
  font-weight: 700;
}

.reset-header p {
  font-size: 1rem;
  color: var(--text-gray);
  margin: 0;
}

.reset-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.reset-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.reset-form label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.reset-form input {
  padding: 0.875rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--primary-dark);
  transition: all 0.2s;
  background: white;
}

.reset-form input:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(200, 122, 0, 0.1);
}

.reset-form input:disabled {
  background: var(--bg-light);
  cursor: not-allowed;
}

.reset-button {
  padding: 1rem;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
  margin-top: 0.5rem;
}

.reset-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.reset-button:active:not(:disabled) {
  transform: translateY(0);
}

.reset-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.back-button {
  width: 100%;
  padding: 1rem;
  background: var(--bg-light);
  color: var(--primary-dark);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1rem;
}

.back-button:hover {
  background: var(--border-color);
}

.reset-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.reset-footer .link-button {
  background: none;
  border: none;
  color: var(--accent-orange);
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  padding: 0.5rem;
  transition: opacity 0.2s ease;
}

.reset-footer .link-button:hover:not(:disabled) {
  opacity: 0.8;
  text-decoration: underline;
}

.reset-footer .link-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  .reset-container {
    padding: 1.5rem 1rem;
  }

  .reset-header h1 {
    font-size: 1.5rem;
  }

  .reset-icon {
    font-size: 3rem;
  }
}
/* ── Device Management Page ── */
.dev-page {
  padding: 2rem;
  max-width: 1300px;
  margin: 0 auto;
}

/* ── Hero ── */
.dev-hero {
  background: linear-gradient(135deg, #1a3550 0%, var(--primary-dark) 60%, #0d1f30 100%);
  border-radius: 16px;
  padding: 2rem 2.5rem 1.8rem;
  margin-bottom: 1.5rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.dev-hero::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 200px; height: 200px;
  background: rgba(200, 122, 0, 0.12);
  border-radius: 50%;
}

.dev-hero::after {
  content: '';
  position: absolute;
  bottom: -30px; left: 40%;
  width: 120px; height: 120px;
  background: rgba(200, 122, 0, 0.07);
  border-radius: 50%;
}

.dev-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.dev-hero-text h1 { font-size: 1.9rem; font-weight: 700; margin: 0 0 0.3rem; }
.dev-hero-text p  { font-size: 0.95rem; opacity: 0.7; margin: 0; }

.dev-new-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.3rem;
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 3px 10px rgba(200, 122, 0, 0.35);
  white-space: nowrap;
  font-family: inherit;
}

.dev-new-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(200, 122, 0, 0.45);
}

.dev-hero-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.3rem;
  position: relative;
  z-index: 1;
}

.dev-stats {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dev-stat-chip {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 30px;
  padding: 0.3rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.dev-stat-chip strong { font-size: 0.95rem; font-weight: 700; }

.dev-search-wrap {
  position: relative;
  flex-shrink: 0;
}

.dev-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.6;
  font-size: 0.9rem;
  pointer-events: none;
}

.dev-search-input {
  padding: 0.55rem 0.9rem 0.55rem 2.2rem;
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  color: white;
  font-size: 0.88rem;
  font-family: inherit;
  width: 220px;
  transition: all 0.2s;
}

.dev-search-input::placeholder { color: rgba(255,255,255,0.5); }
.dev-search-input:focus {
  outline: none;
  border-color: var(--accent-orange);
  background: rgba(255,255,255,0.18);
}

/* ── Device Grid ── */
.dev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
}

/* ── Device Card ── */
.dev-card {
  background: white;
  border-radius: 14px;
  border: 1.5px solid var(--border-color);
  box-shadow: 0 2px 10px rgba(18,41,65,0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}

.dev-card:hover {
  box-shadow: 0 6px 22px rgba(18,41,65,0.13);
  transform: translateY(-2px);
}

.dev-card-accent { height: 4px; background: linear-gradient(90deg, var(--accent-orange), #e8a000); }

/* Image area */
.dev-card-img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 130px;
  background: var(--bg-light);
  overflow: hidden;
}

.dev-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
}

.dev-card-icon {
  font-size: 3rem;
  opacity: 0.35;
}

/* Card body */
.dev-card-body {
  padding: 0.9rem 1.2rem 0.6rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dev-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.dev-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.25;
}

.dev-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.18rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.dev-type-badge.type-kassenwaage  { background: #e3f2fd; color: #1565c0; border: 1px solid rgba(21,101,192,0.2); }
.dev-type-badge.type-thekenwaage  { background: #f1f8e9; color: #2e7d32; border: 1px solid rgba(46,125,50,0.2); }
.dev-type-badge.type-drucker      { background: #f3e5f5; color: #7b1fa2; border: 1px solid rgba(123,31,162,0.2); }
.dev-type-badge.type-other        { background: var(--bg-light); color: var(--text-gray); border: 1px solid var(--border-color); }

.dev-meta-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-gray);
}

.dev-meta-icon { font-size: 0.85rem; opacity: 0.7; }

.dev-desc {
  font-size: 0.8rem;
  color: var(--text-gray);
  line-height: 1.45;
  margin-top: 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card footer */
.dev-card-footer {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.2rem 1rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.dev-btn-edit {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-light);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--primary-dark);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.dev-btn-edit:hover { background: var(--primary-dark); color: white; border-color: var(--primary-dark); }

.dev-btn-delete {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  background: #fff5f5;
  border: 1.5px solid rgba(244,67,54,0.25);
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--red-dark);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.dev-btn-delete:hover { background: var(--red-dark); color: white; border-color: var(--red-dark); }

/* ── Empty / Loading ── */
.dev-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-gray);
  background: white;
  border-radius: 14px;
  border: 2px dashed var(--border-color);
}

.dev-empty-icon { font-size: 3.5rem; margin-bottom: 1rem; opacity: 0.4; }
.dev-empty h3   { font-size: 1.2rem; color: var(--primary-dark); margin-bottom: 0.4rem; }

.dev-loading { text-align: center; padding: 4rem 2rem; color: var(--text-gray); }

/* ── Modal ── */
.dev-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.dev-modal {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 580px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: devModalIn 0.2s ease;
}

@keyframes devModalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

.dev-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 1.6rem;
  background: linear-gradient(135deg, #1a3550, var(--primary-dark));
  border-radius: 16px 16px 0 0;
  color: white;
}

.dev-modal-header h3 { margin: 0; font-size: 1.1rem; font-weight: 700; }

.dev-modal-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 32px; height: 32px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}

.dev-modal-close:hover { background: rgba(255,255,255,0.25); }

.dev-modal-body {
  padding: 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.dev-field { display: flex; flex-direction: column; gap: 0.4rem; }

.dev-field label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-gray);
}

.dev-field input,
.dev-field select,
.dev-field textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: white;
  color: var(--primary-dark);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.dev-field textarea { resize: vertical; min-height: 80px; }

.dev-field input:focus,
.dev-field select:focus,
.dev-field textarea:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(200,122,0,0.1);
}

.dev-field-hint { font-size: 0.77rem; color: var(--text-gray); margin: 0; line-height: 1.5; }

/* Image upload */
.dev-image-area {
  border: 2px dashed var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  background: var(--bg-light);
  transition: border-color 0.2s;
}

.dev-image-area:hover { border-color: var(--accent-orange); }

.dev-img-preview-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.dev-img-preview-wrap img {
  max-height: 100px;
  max-width: 220px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  display: block;
  object-fit: contain;
}

.dev-remove-img-btn {
  position: absolute;
  top: -8px; right: -8px;
  width: 24px; height: 24px;
  background: var(--red-dark);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
}

.dev-remove-img-btn:hover { transform: scale(1.15); }
.dev-image-hint { font-size: 0.78rem; color: var(--text-gray); margin: 0.4rem 0 0; }

/* Modal footer */
.dev-modal-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.6rem 1.5rem;
  border-top: 1px solid var(--border-color);
}

.dev-cancel-btn {
  flex: 1;
  padding: 0.7rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  background: white;
  color: var(--text-gray);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.dev-cancel-btn:hover { background: var(--bg-light); }

.dev-submit-btn {
  flex: 2;
  padding: 0.7rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(200,122,0,0.3);
  transition: all 0.2s;
  font-family: inherit;
}

.dev-submit-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 15px rgba(200,122,0,0.4); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .dev-page  { padding: 1rem; }
  .dev-hero  { padding: 1.5rem 1.2rem 1.2rem; }
  .dev-hero-text h1 { font-size: 1.4rem; }
  .dev-grid  { grid-template-columns: 1fr; }
  .dev-search-input { width: 160px; }
}
/* ── Parts Management Page ── */
.pm-page {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── Hero ── */
.pm-hero {
  background: linear-gradient(135deg, #1a3550 0%, var(--primary-dark) 60%, #0d1f30 100%);
  border-radius: 16px;
  padding: 2rem 2.5rem 1.8rem;
  margin-bottom: 1.5rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.pm-hero::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 200px; height: 200px;
  background: rgba(200, 122, 0, 0.12);
  border-radius: 50%;
}

.pm-hero::after {
  content: '';
  position: absolute;
  bottom: -30px; left: 40%;
  width: 120px; height: 120px;
  background: rgba(200, 122, 0, 0.07);
  border-radius: 50%;
}

.pm-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.pm-hero-text h1 {
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
}

.pm-hero-text p {
  font-size: 0.95rem;
  opacity: 0.7;
  margin: 0;
}

.pm-hero-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.pm-new-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.3rem;
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 3px 10px rgba(200, 122, 0, 0.35);
  white-space: nowrap;
}

.pm-new-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(200, 122, 0, 0.45);
}

/* ── Search row ── */
.pm-search-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.4rem;
  position: relative;
  z-index: 1;
}

.pm-search-wrap {
  position: relative;
  flex: 1;
  max-width: 520px;
}

.pm-search-wrap .pm-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  opacity: 0.5;
  pointer-events: none;
}

.pm-search-input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.4rem;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 9px;
  font-size: 0.9rem;
  color: white;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.pm-search-input::placeholder { color: rgba(255,255,255,0.5); }

.pm-search-input:focus {
  background: rgba(255,255,255,0.18);
  border-color: rgba(200,122,0,0.7);
}

.pm-search-btn {
  padding: 0.6rem 1.2rem;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 9px;
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.pm-search-btn:hover {
  background: rgba(255,255,255,0.25);
}

/* Stats chips */
.pm-stats {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
  position: relative;
  z-index: 1;
}

.pm-stat-chip {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 30px;
  padding: 0.3rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.pm-stat-chip strong {
  font-size: 0.95rem;
  font-weight: 700;
}

/* ── Bulk selection bar ── */
.pm-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(90deg, #1a3550, #263e54);
  border-radius: 10px;
  padding: 0.75rem 1.2rem;
  margin-bottom: 1rem;
  color: white;
  animation: slideDown 0.2s ease;
  flex-wrap: wrap;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pm-bulk-count {
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pm-bulk-count span {
  background: var(--accent-orange);
  color: white;
  border-radius: 20px;
  padding: 0.15rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.pm-bulk-actions {
  display: flex;
  gap: 0.6rem;
}

.pm-bulk-edit-btn {
  padding: 0.45rem 1rem;
  background: var(--accent-orange);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.pm-bulk-edit-btn:hover { background: #d68900; }

.pm-bulk-clear-btn {
  padding: 0.45rem 0.85rem;
  background: rgba(255,255,255,0.12);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.pm-bulk-clear-btn:hover { background: rgba(255,255,255,0.2); }

/* ── Table container ── */
.pm-table-wrap {
  background: white;
  border-radius: 14px;
  border: 1.5px solid var(--border-color);
  box-shadow: 0 2px 12px rgba(18,41,65,0.07);
  overflow: hidden;
}

.pm-table {
  width: 100%;
  border-collapse: collapse;
}

.pm-table thead tr {
  background: var(--primary-dark);
  color: white;
}

.pm-table thead th {
  padding: 0.9rem 1rem;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.pm-table thead th:first-child { padding-left: 1.2rem; border-radius: 0; }
.pm-table thead th:last-child  { text-align: center; }

.pm-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s;
}

.pm-table tbody tr:last-child { border-bottom: none; }

.pm-table tbody tr:hover { background: var(--bg-accent); }

.pm-table tbody tr.pm-row-selected { background: #fff8f0; }
.pm-table tbody tr.pm-row-selected:hover { background: #fff3e0; }

.pm-table td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  font-size: 0.9rem;
  color: var(--primary-dark);
}

.pm-table td:first-child { padding-left: 1.2rem; }

/* Checkbox cell */
.pm-cb-cell { width: 36px; }

.pm-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent-orange);
}

/* Thumbnail cell */
.pm-thumb-cell { width: 52px; }

.pm-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  background: var(--bg-light);
  display: block;
}

.pm-thumb-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0.4;
  border: 1px solid var(--border-color);
}

/* Article number */
.pm-art-nr {
  font-family: monospace;
  font-size: 0.82rem;
  background: var(--bg-light);
  border-radius: 5px;
  padding: 0.2rem 0.5rem;
  white-space: nowrap;
  color: var(--primary-dark);
}

/* Name cell */
.pm-name-cell {
  min-width: 140px;
}

.pm-name-text {
  font-weight: 600;
  line-height: 1.3;
}

.pm-rewe-badge {
  display: inline-block;
  margin-left: 6px;
  font-weight: 800;
  font-size: 0.68rem;
  color: #D40511;
  font-family: Arial, sans-serif;
  background: white;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1.5px solid #D40511;
  vertical-align: middle;
  cursor: help;
}

/* Description */
.pm-desc-cell {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.83rem;
  color: var(--text-gray);
}

/* Category / Device pills */
.pm-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  max-width: 200px;
}

.pm-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.18rem 0.55rem;
  border-radius: 20px;
  font-size: 0.73rem;
  font-weight: 600;
  white-space: nowrap;
}

.pm-pill-cat {
  background: var(--bg-accent);
  color: var(--primary-dark);
  border: 1px solid rgba(18,41,65,0.12);
}

.pm-pill-dev {
  background: var(--orange-light);
  color: var(--accent-orange);
  border: 1px solid rgba(200,122,0,0.18);
}

.pm-pill-more {
  background: var(--bg-light);
  color: var(--text-gray);
  border: 1px solid var(--border-color);
}

/* Actions */
.pm-actions-cell { text-align: center; white-space: nowrap; }

.pm-icon-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 2px;
  transition: all 0.2s;
}

.pm-icon-btn.doc {
  background: var(--bg-accent);
  color: var(--primary-dark);
}
.pm-icon-btn.doc:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-1px);
}

.pm-icon-btn.edit {
  background: #f0f7ff;
  color: var(--blue);
}
.pm-icon-btn.edit:hover {
  background: var(--blue);
  color: white;
  transform: translateY(-1px);
}

.pm-icon-btn.del {
  background: #fff0f0;
  color: var(--red-dark);
}
.pm-icon-btn.del:hover {
  background: var(--red-dark);
  color: white;
  transform: translateY(-1px);
}

/* ── Empty / Loading ── */
.pm-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-gray);
  background: white;
  border-radius: 14px;
  border: 2px dashed var(--border-color);
}

.pm-empty-icon { font-size: 3.5rem; margin-bottom: 1rem; opacity: 0.45; }
.pm-empty h3 { font-size: 1.2rem; color: var(--primary-dark); margin-bottom: 0.4rem; }

.pm-loading {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-gray);
}

/* ── Form Modal ── */
.pm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.pm-modal {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 620px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: pmModalIn 0.2s ease;
}

@keyframes pmModalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

.pm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 1.6rem;
  background: linear-gradient(135deg, #1a3550, var(--primary-dark));
  border-radius: 16px 16px 0 0;
  color: white;
}

.pm-modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pm-modal-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 32px; height: 32px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.pm-modal-close:hover { background: rgba(255,255,255,0.25); }

.pm-modal-body {
  padding: 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.pm-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.pm-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pm-field label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-gray);
}

.pm-field label .req { color: var(--red-dark); margin-left: 2px; }

.pm-field input,
.pm-field textarea,
.pm-field select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: white;
  color: var(--primary-dark);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pm-field input:focus,
.pm-field textarea:focus,
.pm-field select:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(200,122,0,0.1);
}

.pm-field textarea { resize: vertical; min-height: 80px; }

.pm-field-hint {
  font-size: 0.77rem;
  color: var(--text-gray);
  margin: 0;
}

/* Section label */
.pm-section-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-gray);
  margin: 0 0 0.6rem;
}

/* Checkbox grid */
.pm-check-grid {
  max-height: 180px;
  overflow-y: auto;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  padding: 0.6rem;
  background: var(--bg-light);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.pm-check-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.6rem;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 0.9rem;
  color: var(--primary-dark);
  user-select: none;
}

.pm-check-item:hover { background: white; }
.pm-check-item.pm-checked { background: white; font-weight: 600; }

.pm-check-item input[type="checkbox"] {
  width: 16px; height: 16px;
  cursor: pointer;
  accent-color: var(--accent-orange);
  flex-shrink: 0;
}

.pm-no-items {
  font-size: 0.85rem;
  color: var(--text-gray);
  padding: 0.5rem;
  text-align: center;
}

/* REWE toggle */
.pm-rewe-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid rgba(212,5,17,0.25);
  border-radius: 10px;
  background: #fff8f8;
  cursor: pointer;
}

.pm-rewe-toggle input { accent-color: #D40511; cursor: pointer; }

.pm-rewe-mark {
  font-weight: 800;
  font-size: 0.9rem;
  color: #D40511;
  font-family: Arial, sans-serif;
  background: white;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1.5px solid #D40511;
}

/* Image upload */
.pm-image-area {
  border: 2px dashed var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  background: var(--bg-light);
  transition: border-color 0.2s;
}
.pm-image-area:hover { border-color: var(--accent-orange); }

.pm-image-preview-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.pm-image-preview-wrap img {
  max-height: 140px;
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  display: block;
}

.pm-remove-img-btn {
  position: absolute;
  top: -8px; right: -8px;
  width: 24px; height: 24px;
  background: var(--red-dark);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
}
.pm-remove-img-btn:hover { transform: scale(1.15); }

.pm-image-hint { font-size: 0.78rem; color: var(--text-gray); margin: 0.4rem 0 0; }

.pm-modal-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.6rem 1.5rem;
  border-top: 1px solid var(--border-color);
}

.pm-cancel-btn {
  flex: 1;
  padding: 0.7rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  background: white;
  color: var(--text-gray);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.pm-cancel-btn:hover { background: var(--bg-light); border-color: var(--text-gray); }

.pm-submit-btn {
  flex: 2;
  padding: 0.7rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(200,122,0,0.3);
  transition: all 0.2s;
}
.pm-submit-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 15px rgba(200,122,0,0.4); }

/* ── Bulk Edit Modal ── */
.pm-bulk-modal { max-width: 700px; }

.pm-bulk-body {
  padding: 1.5rem 1.6rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.pm-bulk-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pm-bulk-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-gray);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

.pm-bulk-section-title.add  { color: var(--green-dark); }
.pm-bulk-section-title.rem  { color: var(--red-dark); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .pm-page { padding: 1rem; }
  .pm-hero { padding: 1.5rem 1.2rem 1.2rem; }
  .pm-hero-text h1 { font-size: 1.4rem; }
  .pm-form-row,
  .pm-bulk-body { grid-template-columns: 1fr; }
  .pm-desc-cell { display: none; }
  .pm-pills { max-width: 120px; }
}
/* ── User Management Page ── */
.usr-page {
  padding: 2rem;
  max-width: 1300px;
  margin: 0 auto;
}

/* ── Hero ── */
.usr-hero {
  background: linear-gradient(135deg, #1a3550 0%, var(--primary-dark) 60%, #0d1f30 100%);
  border-radius: 16px;
  padding: 2rem 2.5rem 1.8rem;
  margin-bottom: 1.5rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.usr-hero::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 200px; height: 200px;
  background: rgba(200, 122, 0, 0.12);
  border-radius: 50%;
}

.usr-hero::after {
  content: '';
  position: absolute;
  bottom: -30px; left: 40%;
  width: 120px; height: 120px;
  background: rgba(200, 122, 0, 0.07);
  border-radius: 50%;
}

.usr-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.usr-hero-text h1 { font-size: 1.9rem; font-weight: 700; margin: 0 0 0.3rem; }
.usr-hero-text p  { font-size: 0.95rem; opacity: 0.7; margin: 0; }

.usr-new-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.3rem;
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 3px 10px rgba(200, 122, 0, 0.35);
  white-space: nowrap;
  font-family: inherit;
}

.usr-new-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(200, 122, 0, 0.45);
}

.usr-hero-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.3rem;
  position: relative;
  z-index: 1;
}

.usr-stats {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.usr-stat-chip {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 30px;
  padding: 0.3rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.usr-stat-chip strong { font-size: 0.95rem; font-weight: 700; }

.usr-search-wrap {
  position: relative;
  flex-shrink: 0;
}

.usr-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.6;
  font-size: 0.9rem;
  pointer-events: none;
}

.usr-search-input {
  padding: 0.55rem 0.9rem 0.55rem 2.2rem;
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  color: white;
  font-size: 0.88rem;
  font-family: inherit;
  width: 220px;
  transition: all 0.2s;
}

.usr-search-input::placeholder { color: rgba(255,255,255,0.5); }
.usr-search-input:focus {
  outline: none;
  border-color: var(--accent-orange);
  background: rgba(255,255,255,0.18);
}

/* ── Offline banner ── */
.usr-offline {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-gray);
  background: white;
  border-radius: 14px;
  border: 2px dashed var(--border-color);
}

.usr-offline-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.usr-offline h3   { font-size: 1.2rem; color: var(--primary-dark); margin-bottom: 0.4rem; }

/* ── Users grid ── */
.usr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.2rem;
}

/* ── User Card ── */
.usr-card {
  background: white;
  border-radius: 14px;
  border: 1.5px solid var(--border-color);
  box-shadow: 0 2px 10px rgba(18,41,65,0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}

.usr-card:hover { box-shadow: 0 6px 22px rgba(18,41,65,0.13); transform: translateY(-2px); }

.usr-card.inactive { opacity: 0.7; }
.usr-card.inactive .usr-card-accent { background: #ccc; }

.usr-card-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--accent-orange), #e8a000);
}

/* Card header */
.usr-card-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.2rem 0.8rem;
}

.usr-avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-dark), #26466a);
  color: white;
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.usr-avatar.inactive { background: linear-gradient(135deg, #9e9e9e, #757575); }

.usr-head-info { flex: 1; min-width: 0; }

.usr-fullname {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.usr-email {
  font-size: 0.78rem;
  color: var(--text-gray);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.usr-inactive-badge {
  padding: 0.15rem 0.55rem;
  background: #fce4e4;
  color: var(--red-dark);
  border: 1px solid rgba(244,67,54,0.2);
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Permission badge */
.usr-perm-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.usr-perm-badge.perm-admin         { background: #fff3e0; color: #b74d00; border: 1px solid rgba(183,77,0,0.2); }
.usr-perm-badge.perm-key-technician { background: #e8f0fe; color: #1a56a8; border: 1px solid rgba(26,86,168,0.2); }
.usr-perm-badge.perm-dispatcher    { background: #e0f2f1; color: #00695c; border: 1px solid rgba(0,105,92,0.2); }
.usr-perm-badge.perm-technician    { background: #f1f8e9; color: #33691e; border: 1px solid rgba(51,105,30,0.2); }
.usr-perm-badge.perm-readonly      { background: var(--bg-light); color: var(--text-gray); border: 1px solid var(--border-color); }

/* Card body */
.usr-card-body {
  padding: 0 1.2rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.usr-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0 0 0.2rem;
}

.usr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 28px;
}

.usr-row-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-gray);
  white-space: nowrap;
  flex-shrink: 0;
}

.usr-select {
  border: 1.5px solid var(--border-color);
  border-radius: 7px;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  font-family: inherit;
  background: white;
  color: var(--primary-dark);
  cursor: pointer;
  transition: border-color 0.2s;
  max-width: 200px;
}

.usr-select:focus { outline: none; border-color: var(--accent-orange); }
.usr-select:disabled { background: var(--bg-light); cursor: not-allowed; opacity: 0.6; }

.usr-status-btn {
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  border: 1.5px solid;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.usr-status-btn.active {
  background: #f1f8e9;
  color: #33691e;
  border-color: rgba(51,105,30,0.3);
}

.usr-status-btn.active:hover:not(:disabled) {
  background: #33691e;
  color: white;
}

.usr-status-btn.inactive {
  background: #fce4e4;
  color: var(--red-dark);
  border-color: rgba(244,67,54,0.3);
}

.usr-status-btn.inactive:hover:not(:disabled) {
  background: var(--red-dark);
  color: white;
}

.usr-status-btn:disabled { cursor: not-allowed; opacity: 0.5; }

.usr-push-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.usr-push-on  { font-size: 0.8rem; color: #33691e; font-weight: 600; }
.usr-push-off { font-size: 0.8rem; color: var(--text-gray); }

.usr-push-test-btn {
  padding: 0.15rem 0.6rem;
  background: var(--bg-light);
  border: 1.5px solid var(--border-color);
  border-radius: 7px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  color: var(--primary-dark);
}

.usr-push-test-btn:hover:not(:disabled) {
  background: var(--primary-dark);
  color: white;
  border-color: var(--primary-dark);
}

.usr-push-test-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.usr-last-login {
  font-size: 0.8rem;
  color: var(--text-gray);
}

/* Card footer */
.usr-card-footer {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.2rem 1rem;
  border-top: 1px solid var(--border-color);
  margin-top: 0.4rem;
}

.usr-btn-edit {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-light);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--primary-dark);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.usr-btn-edit:hover:not(:disabled) { background: var(--primary-dark); color: white; border-color: var(--primary-dark); }
.usr-btn-edit:disabled { opacity: 0.4; cursor: not-allowed; }

.usr-btn-delete {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  background: #fff5f5;
  border: 1.5px solid rgba(244,67,54,0.25);
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--red-dark);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.usr-btn-delete:hover:not(:disabled) { background: var(--red-dark); color: white; border-color: var(--red-dark); }
.usr-btn-delete:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Empty / Loading ── */
.usr-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-gray);
  background: white;
  border-radius: 14px;
  border: 2px dashed var(--border-color);
}

.usr-empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.45; }
.usr-empty h3   { font-size: 1.2rem; color: var(--primary-dark); margin-bottom: 0.4rem; }

.usr-loading { text-align: center; padding: 4rem 2rem; color: var(--text-gray); }

/* ── Modal ── */
.usr-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.usr-modal {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 580px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: usrModalIn 0.2s ease;
}

@keyframes usrModalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

.usr-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 1.6rem;
  background: linear-gradient(135deg, #1a3550, var(--primary-dark));
  border-radius: 16px 16px 0 0;
  color: white;
}

.usr-modal-header h3 { margin: 0; font-size: 1.1rem; font-weight: 700; }

.usr-modal-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 32px; height: 32px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}

.usr-modal-close:hover { background: rgba(255,255,255,0.25); }

.usr-modal-body {
  padding: 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* Info strip inside edit modal */
.usr-edit-info-strip {
  background: var(--bg-accent);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.usr-edit-info-row {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.usr-edit-info-label { font-weight: 700; color: var(--text-gray); }
.usr-edit-info-val   { color: var(--primary-dark); }

.usr-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.usr-form-full { grid-column: 1 / -1; }

.usr-field { display: flex; flex-direction: column; gap: 0.4rem; }

.usr-field label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-gray);
}

.usr-field input,
.usr-field select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: white;
  color: var(--primary-dark);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.usr-field input:focus,
.usr-field select:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(200,122,0,0.1);
}

.usr-pw-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.usr-pw-row .usr-field { flex: 1; }

.usr-gen-btn {
  padding: 0.65rem 1rem;
  background: var(--bg-light);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  color: var(--primary-dark);
  transition: all 0.2s;
  flex-shrink: 0;
}

.usr-gen-btn:hover:not(:disabled) { background: var(--primary-dark); color: white; border-color: var(--primary-dark); }

.usr-field-hint {
  font-size: 0.77rem;
  color: var(--text-gray);
  margin: 0;
  line-height: 1.5;
}

/* Modal footer */
.usr-modal-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.6rem 1.5rem;
  border-top: 1px solid var(--border-color);
}

.usr-cancel-btn {
  flex: 1;
  padding: 0.7rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  background: white;
  color: var(--text-gray);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.usr-cancel-btn:hover { background: var(--bg-light); }

.usr-submit-btn {
  flex: 2;
  padding: 0.7rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(200,122,0,0.3);
  transition: all 0.2s;
  font-family: inherit;
}

.usr-submit-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 5px 15px rgba(200,122,0,0.4); }
.usr-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .usr-page  { padding: 1rem; }
  .usr-hero  { padding: 1.5rem 1.2rem 1.2rem; }
  .usr-hero-text h1 { font-size: 1.4rem; }
  .usr-grid  { grid-template-columns: 1fr; }
  .usr-form-grid { grid-template-columns: 1fr; }
  .usr-search-input { width: 160px; }
}
/* ── Customer Management Page ── */
.cust-page {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Hero ── */
.cust-hero {
  background: linear-gradient(135deg, #1a3550 0%, var(--primary-dark) 60%, #0d1f30 100%);
  border-radius: 16px;
  padding: 2rem 2.5rem 1.8rem;
  margin-bottom: 1.5rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.cust-hero::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 200px; height: 200px;
  background: rgba(200, 122, 0, 0.12);
  border-radius: 50%;
}

.cust-hero::after {
  content: '';
  position: absolute;
  bottom: -30px; left: 40%;
  width: 120px; height: 120px;
  background: rgba(200, 122, 0, 0.07);
  border-radius: 50%;
}

.cust-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.cust-hero-text h1 { font-size: 1.9rem; font-weight: 700; margin: 0 0 0.3rem; }
.cust-hero-text p  { font-size: 0.95rem; opacity: 0.7; margin: 0; }

.cust-new-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.3rem;
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 3px 10px rgba(200, 122, 0, 0.35);
  white-space: nowrap;
  font-family: inherit;
}

.cust-new-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(200, 122, 0, 0.45);
}

.cust-new-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cust-stats {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.3rem;
  position: relative;
  z-index: 1;
}

.cust-stat-chip {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 30px;
  padding: 0.3rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.cust-stat-chip strong { font-size: 0.95rem; font-weight: 700; }

/* ── Offline banner ── */
.cust-offline-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #fff8e1;
  border: 1.5px solid #f9a825;
  border-radius: 10px;
  padding: 0.7rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #795416;
  margin-bottom: 1.2rem;
}

/* ── Customer Grid ── */
.cust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
}

/* ── Customer Card ── */
.cust-card {
  background: white;
  border-radius: 14px;
  border: 1.5px solid var(--border-color);
  box-shadow: 0 2px 10px rgba(18,41,65,0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}

.cust-card:hover {
  box-shadow: 0 6px 22px rgba(18,41,65,0.13);
  transform: translateY(-2px);
}

/* Orange accent stripe at top */
.cust-card-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--accent-orange), #e8a000);
}

/* Logo / initials area */
.cust-card-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.4rem 1.2rem 0.8rem;
}

.cust-logo-img {
  max-height: 64px;
  max-width: 160px;
  object-fit: contain;
  border-radius: 6px;
}

.cust-logo-initials {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary-dark), #26466a);
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -1px;
}

/* Card body */
.cust-card-body {
  padding: 0.8rem 1.2rem 0.6rem;
  flex: 1;
}

.cust-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.cust-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.25;
}

.cust-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.cust-type-badge.device {
  background: var(--bg-accent);
  color: var(--primary-dark);
  border: 1px solid rgba(18,41,65,0.12);
}

.cust-type-badge.category {
  background: #f0fff4;
  color: #276749;
  border: 1px solid rgba(39,103,73,0.18);
}

/* Easyhelp case types */
.cust-case-types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.5rem;
}

.cust-case-chip {
  padding: 0.15rem 0.55rem;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-gray);
}

/* Card footer */
.cust-card-footer {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.2rem 1rem;
  border-top: 1px solid var(--border-color);
}

.cust-btn-edit {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-light);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--primary-dark);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.cust-btn-edit:hover:not(:disabled) {
  background: var(--primary-dark);
  color: white;
  border-color: var(--primary-dark);
}

.cust-btn-edit:disabled { opacity: 0.4; cursor: not-allowed; }

.cust-btn-delete {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  background: #fff5f5;
  border: 1.5px solid rgba(244,67,54,0.25);
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--red-dark);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.cust-btn-delete:hover:not(:disabled) {
  background: var(--red-dark);
  color: white;
  border-color: var(--red-dark);
}

.cust-btn-delete:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Empty state ── */
.cust-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-gray);
  background: white;
  border-radius: 14px;
  border: 2px dashed var(--border-color);
}

.cust-empty-icon { font-size: 3.5rem; margin-bottom: 1rem; opacity: 0.45; }
.cust-empty h3   { font-size: 1.2rem; color: var(--primary-dark); margin-bottom: 0.4rem; }

/* ── Loading ── */
.cust-loading {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-gray);
}

/* ── Modal ── */
.cust-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.cust-modal {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: custModalIn 0.2s ease;
}

@keyframes custModalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

.cust-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 1.6rem;
  background: linear-gradient(135deg, #1a3550, var(--primary-dark));
  border-radius: 16px 16px 0 0;
  color: white;
}

.cust-modal-header h3 { margin: 0; font-size: 1.1rem; font-weight: 700; }

.cust-modal-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 32px; height: 32px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}

.cust-modal-close:hover { background: rgba(255,255,255,0.25); }

.cust-modal-body {
  padding: 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.cust-field { display: flex; flex-direction: column; gap: 0.4rem; }

.cust-field label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-gray);
}

.cust-field input,
.cust-field select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: white;
  color: var(--primary-dark);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cust-field input:focus,
.cust-field select:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(200,122,0,0.1);
}

.cust-field-hint {
  font-size: 0.77rem;
  color: var(--text-gray);
  margin: 0;
  line-height: 1.5;
}

/* Easyhelp checkboxes */
.cust-check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.cust-check-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.7rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.88rem;
  user-select: none;
}

.cust-check-item:hover  { border-color: var(--accent-orange); background: var(--orange-light); }
.cust-check-item.checked { border-color: var(--accent-orange); background: var(--orange-light); font-weight: 600; }

.cust-check-item input[type="checkbox"] {
  width: 15px; height: 15px;
  cursor: pointer;
  accent-color: var(--accent-orange);
  flex-shrink: 0;
}

/* Image upload */
.cust-image-area {
  border: 2px dashed var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  background: var(--bg-light);
  transition: border-color 0.2s;
}

.cust-image-area:hover { border-color: var(--accent-orange); }

.cust-img-preview-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.cust-img-preview-wrap img {
  max-height: 100px;
  max-width: 220px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  display: block;
  object-fit: contain;
}

.cust-remove-img-btn {
  position: absolute;
  top: -8px; right: -8px;
  width: 24px; height: 24px;
  background: var(--red-dark);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
}

.cust-remove-img-btn:hover { transform: scale(1.15); }
.cust-image-hint { font-size: 0.78rem; color: var(--text-gray); margin: 0.4rem 0 0; }

/* Modal footer */
.cust-modal-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.6rem 1.5rem;
  border-top: 1px solid var(--border-color);
}

.cust-cancel-btn {
  flex: 1;
  padding: 0.7rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  background: white;
  color: var(--text-gray);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.cust-cancel-btn:hover { background: var(--bg-light); }

.cust-submit-btn {
  flex: 2;
  padding: 0.7rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(200,122,0,0.3);
  transition: all 0.2s;
  font-family: inherit;
}

.cust-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(200,122,0,0.4);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .cust-page  { padding: 1rem; }
  .cust-hero  { padding: 1.5rem 1.2rem 1.2rem; }
  .cust-hero-text h1 { font-size: 1.4rem; }
  .cust-grid  { grid-template-columns: 1fr; }
  .cust-check-grid { grid-template-columns: 1fr; }
}
/* ── Category Management Page ── */
.cat-mgmt-page {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Page Header ── */
.cat-mgmt-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3f5e 100%);
  border-radius: 16px;
  padding: 2.5rem 2.5rem 2rem;
  margin-bottom: 2rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.cat-mgmt-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: rgba(200, 122, 0, 0.15);
  border-radius: 50%;
}

.cat-mgmt-hero::after {
  content: '';
  position: absolute;
  bottom: -30px;
  right: 60px;
  width: 100px;
  height: 100px;
  background: rgba(200, 122, 0, 0.1);
  border-radius: 50%;
}

.cat-mgmt-hero-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.cat-mgmt-hero-text h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cat-mgmt-hero-text p {
  font-size: 1rem;
  opacity: 0.75;
  margin: 0;
}

.cat-mgmt-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  position: relative;
  z-index: 1;
}

.cat-stat-chip {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cat-stat-chip strong {
  font-size: 1rem;
  font-weight: 700;
}

/* ── Toolbar ── */
.cat-mgmt-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.cat-mgmt-toolbar h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin: 0;
}

.cat-add-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  background: linear-gradient(135deg, var(--accent-orange) 0%, #d68900 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 3px 10px rgba(200, 122, 0, 0.3);
}

.cat-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(200, 122, 0, 0.4);
}

.cat-add-btn:active {
  transform: translateY(0);
}

/* ── Category Grid ── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* ── Category Card ── */
.cat-card {
  background: white;
  border-radius: 14px;
  border: 1.5px solid var(--border-color);
  box-shadow: 0 2px 12px rgba(18, 41, 65, 0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}

.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(18, 41, 65, 0.13);
  border-color: var(--accent-orange);
}

.cat-card-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--accent-orange), var(--primary-dark));
  width: 100%;
}

.cat-card-body {
  padding: 1.4rem 1.4rem 0;
  flex: 1;
}

.cat-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.cat-card-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  background: linear-gradient(135deg, var(--bg-accent), #ddeeff);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  box-shadow: 0 2px 8px rgba(18, 41, 65, 0.1);
}

.cat-card-icon.no-icon {
  font-size: 1.3rem;
  opacity: 0.5;
}

.cat-card-title-group {
  flex: 1;
  min-width: 0;
}

.cat-card-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

.cat-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.badge-customer {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-accent);
  color: var(--primary-dark);
  border: 1px solid rgba(18, 41, 65, 0.15);
  border-radius: 20px;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-type {
  display: inline-flex;
  align-items: center;
  background: var(--orange-light);
  color: var(--accent-orange);
  border: 1px solid rgba(200, 122, 0, 0.2);
  border-radius: 20px;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: monospace;
}

.cat-card-description {
  font-size: 0.88rem;
  color: var(--text-gray);
  line-height: 1.5;
  margin: 0.5rem 0 0;
}

/* ── Subcategories ── */
.cat-subcategories {
  margin: 1rem 1.4rem 0;
  background: var(--bg-light);
  border-radius: 10px;
  padding: 0.75rem;
}

.cat-subcategories-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-gray);
  margin: 0 0 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.cat-subcategories-label span {
  background: var(--accent-orange);
  color: white;
  border-radius: 10px;
  padding: 0.05rem 0.45rem;
  font-size: 0.68rem;
}

.cat-subcat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--border-color);
  margin-bottom: 0.4rem;
  gap: 0.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cat-subcat-item:last-child {
  margin-bottom: 0;
}

.cat-subcat-item:hover {
  border-color: var(--accent-orange);
  box-shadow: 0 2px 6px rgba(200, 122, 0, 0.1);
}

.cat-subcat-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  flex: 1;
}

.cat-subcat-icon {
  font-size: 1rem;
  min-width: 20px;
  text-align: center;
}

.cat-subcat-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-subcat-type {
  font-size: 0.72rem;
  color: var(--text-gray);
  font-family: monospace;
  background: var(--bg-light);
  border-radius: 4px;
  padding: 0.05rem 0.3rem;
  white-space: nowrap;
}

.cat-subcat-btns {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
}

.subcat-icon-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.subcat-icon-btn.edit {
  background: var(--bg-accent);
  color: var(--primary-dark);
}

.subcat-icon-btn.edit:hover {
  background: var(--primary-dark);
  color: white;
}

.subcat-icon-btn.del {
  background: #fff0f0;
  color: var(--red-dark);
}

.subcat-icon-btn.del:hover {
  background: var(--red-dark);
  color: white;
}

/* ── Card Footer / Actions ── */
.cat-card-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1.1rem 1.4rem 1.4rem;
  margin-top: 1rem;
}

.cat-btn-edit,
.cat-btn-delete {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.cat-btn-edit {
  background: var(--bg-accent);
  color: var(--primary-dark);
  border: 1.5px solid rgba(18, 41, 65, 0.15);
}

.cat-btn-edit:hover {
  background: var(--primary-dark);
  color: white;
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(18, 41, 65, 0.2);
}

.cat-btn-delete {
  background: #fff5f5;
  color: var(--red-dark);
  border: 1.5px solid rgba(244, 67, 54, 0.2);
}

.cat-btn-delete:hover {
  background: var(--red-dark);
  color: white;
  border-color: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(244, 67, 54, 0.25);
}

/* ── Empty State ── */
.cat-empty {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-gray);
  background: white;
  border-radius: 14px;
  border: 2px dashed var(--border-color);
}

.cat-empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.cat-empty h3 {
  font-size: 1.3rem;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.cat-empty p {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* ── Form Modal (overrides for category form) ── */
.cat-form-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.cat-form-modal {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: catModalIn 0.2s ease;
}

@keyframes catModalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

.cat-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 1.6rem;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, var(--primary-dark), #1e3f5e);
  border-radius: 16px 16px 0 0;
  color: white;
}

.cat-form-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cat-form-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.cat-form-close:hover {
  background: rgba(255,255,255,0.25);
}

.cat-form-body {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.cat-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.cat-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cat-form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-gray);
}

.cat-form-group label .required {
  color: var(--red-dark);
  margin-left: 2px;
}

.cat-form-group input,
.cat-form-group textarea,
.cat-form-group select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  background: white;
  color: var(--primary-dark);
}

.cat-form-group input:focus,
.cat-form-group textarea:focus,
.cat-form-group select:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(200, 122, 0, 0.12);
}

.cat-form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23122941' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
}

.cat-form-group textarea {
  resize: vertical;
  min-height: 72px;
}

.cat-form-hint {
  font-size: 0.78rem;
  color: var(--text-gray);
  margin: 0;
}

.cat-form-icon-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cat-form-icon-preview input {
  max-width: 80px;
  text-align: center;
  font-size: 1.3rem;
}

.cat-icon-bubble {
  width: 44px;
  height: 44px;
  background: var(--bg-accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 1.5px solid var(--border-color);
}

.cat-form-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1.2rem 1.6rem 1.6rem;
  border-top: 1px solid var(--border-color);
}

.cat-form-cancel {
  flex: 1;
  padding: 0.7rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  background: white;
  color: var(--text-gray);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.cat-form-cancel:hover {
  background: var(--bg-light);
  border-color: var(--text-gray);
}

.cat-form-submit {
  flex: 2;
  padding: 0.7rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: white;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(200, 122, 0, 0.3);
  transition: all 0.2s;
}

.cat-form-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(200, 122, 0, 0.4);
}

/* ── Offline / Loading States ── */
.cat-offline-state,
.cat-loading-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-gray);
}

.cat-offline-state .offline-icon,
.cat-loading-state .loading-spinner {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  display: block;
}

.cat-loading-state .loading-spinner {
  font-size: 1.5rem;
  animation: spin 1s linear infinite;
  display: inline-block;
}

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

/* ── Responsive ── */
@media (max-width: 600px) {
  .cat-mgmt-page {
    padding: 1rem;
  }

  .cat-mgmt-hero {
    padding: 1.5rem 1.2rem;
  }

  .cat-mgmt-hero-text h1 {
    font-size: 1.5rem;
  }

  .cat-form-row {
    grid-template-columns: 1fr;
  }

  .cat-grid {
    grid-template-columns: 1fr;
  }
}
/* ── Maintenance Page ── */
.maint-page {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── Hero ── */
.maint-hero {
  background: linear-gradient(135deg, #1a3550 0%, var(--primary-dark) 60%, #0d1f30 100%);
  border-radius: 16px;
  padding: 2rem 2.5rem 1.8rem;
  margin-bottom: 1.5rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.maint-hero::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 200px; height: 200px;
  background: rgba(200, 122, 0, 0.12);
  border-radius: 50%;
}

.maint-hero::after {
  content: '';
  position: absolute;
  bottom: -30px; left: 40%;
  width: 120px; height: 120px;
  background: rgba(200, 122, 0, 0.07);
  border-radius: 50%;
}

.maint-hero-text { position: relative; z-index: 1; }
.maint-hero-text h1 { font-size: 1.9rem; font-weight: 700; margin: 0 0 0.3rem; }
.maint-hero-text p  { font-size: 0.95rem; opacity: 0.7; margin: 0; }

/* ── Stats row ── */
.maint-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  position: relative;
  z-index: 1;
}

.maint-stat {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 0.75rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 105px;
}

.maint-stat strong {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.maint-stat span {
  font-size: 0.73rem;
  opacity: 0.8;
  text-align: center;
  white-space: nowrap;
}

.maint-stat.warn {
  background: rgba(200, 122, 0, 0.18);
  border-color: rgba(200, 122, 0, 0.38);
}

.maint-stat.warn strong { color: #ffb74d; }

.maint-stat.ok {
  background: rgba(40, 167, 69, 0.12);
  border-color: rgba(40, 167, 69, 0.25);
}

.maint-stat.ok strong { color: #81c784; }

/* ── Toolbar ── */
.maint-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
  background: white;
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(18,41,65,0.05);
}

/* ── Filter chips ── */
.maint-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex: 1;
}

.maint-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  background: var(--bg-light);
  color: var(--text-gray);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: inherit;
}

.maint-filter-chip:hover {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
  background: var(--orange-light);
}

.maint-filter-chip.active {
  background: var(--orange-light);
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

.maint-filter-badge {
  background: var(--accent-orange);
  color: white;
  border-radius: 10px;
  padding: 0 0.42rem;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.6;
}

/* ── Search in toolbar ── */
.maint-search-wrap {
  position: relative;
  min-width: 240px;
}

.maint-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.4;
  pointer-events: none;
}

.maint-search-input {
  width: 100%;
  padding: 0.5rem 2.6rem 0.5rem 2.1rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  background: white;
  color: var(--primary-dark);
}

.maint-search-input:focus { border-color: var(--accent-orange); }

.maint-result-badge {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-dark);
  color: white;
  border-radius: 10px;
  padding: 0.1rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ── Table ── */
.maint-table-wrap {
  background: white;
  border-radius: 14px;
  border: 1.5px solid var(--border-color);
  box-shadow: 0 2px 12px rgba(18,41,65,0.07);
  overflow: hidden;
}

.maint-table {
  width: 100%;
  border-collapse: collapse;
}

.maint-table thead tr {
  background: var(--primary-dark);
  color: white;
}

.maint-table thead th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.maint-table thead th.center { text-align: center; }
.maint-table thead th:last-child { text-align: center; }

.maint-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s;
}

.maint-table tbody tr:last-child { border-bottom: none; }
.maint-table tbody tr:hover { background: var(--bg-accent); }

.maint-table td {
  padding: 0.7rem 1rem;
  vertical-align: middle;
  font-size: 0.88rem;
  color: var(--primary-dark);
}

.maint-table td.center { text-align: center; }

/* Article number chip */
.maint-art-nr {
  font-family: monospace;
  font-size: 0.8rem;
  background: var(--bg-light);
  border-radius: 5px;
  padding: 0.2rem 0.5rem;
  white-space: nowrap;
}

.maint-name-cell { font-weight: 600; min-width: 130px; }

.maint-desc-cell {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.maint-desc-text { color: var(--text-gray); font-size: 0.83rem; }

/* Status circle badges */
.maint-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 700;
}

.maint-status-badge.ok      { background: #e6f4ea; color: #2e7d32; }
.maint-status-badge.missing { background: #fce8e6; color: #c62828; }
.maint-status-badge.pending { background: var(--bg-light); color: var(--text-gray); font-size: 0.75rem; }

.maint-badge-missing {
  display: inline-flex;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: #c62828;
  background: #fce8e6;
  border-radius: 5px;
  padding: 0.15rem 0.5rem;
}

/* Action buttons */
.maint-actions-cell { text-align: center; white-space: nowrap; }

.maint-icon-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 2px;
  transition: all 0.2s;
}

.maint-icon-btn.edit { background: #f0f7ff; color: #1565c0; }
.maint-icon-btn.edit:hover { background: #1565c0; color: white; transform: translateY(-1px); }

.maint-icon-btn.doc  { background: var(--bg-accent); color: var(--primary-dark); }
.maint-icon-btn.doc:hover  { background: var(--primary-dark); color: white; transform: translateY(-1px); }

/* ── Empty / Loading ── */
.maint-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-gray);
  background: white;
  border-radius: 14px;
  border: 2px dashed var(--border-color);
}

.maint-empty-icon { font-size: 3.5rem; margin-bottom: 1rem; opacity: 0.5; }
.maint-empty h3   { font-size: 1.2rem; color: var(--primary-dark); margin-bottom: 0.4rem; }

.maint-loading {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-gray);
}

/* ── Modal ── */
.maint-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.maint-modal {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: maintModalIn 0.2s ease;
}

@keyframes maintModalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

.maint-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 1.6rem;
  background: linear-gradient(135deg, #1a3550, var(--primary-dark));
  border-radius: 16px 16px 0 0;
  color: white;
}

.maint-modal-header h3 { margin: 0; font-size: 1.1rem; font-weight: 700; }

.maint-modal-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 32px; height: 32px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}

.maint-modal-close:hover { background: rgba(255,255,255,0.25); }

.maint-modal-body {
  padding: 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.maint-field { display: flex; flex-direction: column; gap: 0.4rem; }

.maint-field label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-gray);
}

.maint-field input,
.maint-field textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: white;
  color: var(--primary-dark);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.maint-field input:focus,
.maint-field textarea:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(200,122,0,0.1);
}

.maint-field textarea { resize: vertical; min-height: 80px; }

.maint-section-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-gray);
  margin: 0 0 0.5rem;
}

.maint-check-grid {
  max-height: 160px;
  overflow-y: auto;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  padding: 0.6rem;
  background: var(--bg-light);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.maint-check-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 0.6rem;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 0.88rem;
  user-select: none;
}

.maint-check-item:hover  { background: white; }
.maint-check-item.checked { background: white; font-weight: 600; }

.maint-check-item input[type="checkbox"] {
  width: 15px; height: 15px;
  cursor: pointer;
  accent-color: var(--accent-orange);
  flex-shrink: 0;
}

.maint-no-items {
  font-size: 0.83rem;
  color: var(--text-gray);
  padding: 0.5rem;
  text-align: center;
}

.maint-image-area {
  border: 2px dashed var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  background: var(--bg-light);
  transition: border-color 0.2s;
}

.maint-image-area:hover { border-color: var(--accent-orange); }

.maint-img-preview-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.maint-img-preview-wrap img {
  max-height: 130px;
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  display: block;
}

.maint-remove-img-btn {
  position: absolute;
  top: -8px; right: -8px;
  width: 24px; height: 24px;
  background: var(--red-dark);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
}

.maint-remove-img-btn:hover { transform: scale(1.15); }
.maint-image-hint { font-size: 0.78rem; color: var(--text-gray); margin: 0.4rem 0 0; }

.maint-modal-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.6rem 1.5rem;
  border-top: 1px solid var(--border-color);
}

.maint-cancel-btn {
  flex: 1;
  padding: 0.7rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  background: white;
  color: var(--text-gray);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.maint-cancel-btn:hover { background: var(--bg-light); }

.maint-submit-btn {
  flex: 2;
  padding: 0.7rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(200,122,0,0.3);
  transition: all 0.2s;
  font-family: inherit;
}

.maint-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(200,122,0,0.4);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .maint-page          { padding: 1rem; }
  .maint-hero          { padding: 1.5rem 1.2rem 1.2rem; }
  .maint-hero-text h1  { font-size: 1.4rem; }
  .maint-toolbar       { flex-direction: column; align-items: stretch; }
  .maint-search-wrap   { min-width: unset; }
  .maint-desc-cell     { display: none; }
}/* ── Dispatcher Order Page (do-) ── */
.do-page {
  min-height: 100vh;
  background: var(--bg-light);
}

/* Hero */
.do-hero {
  background: linear-gradient(135deg, #1a3550 0%, var(--primary-dark) 60%, #0d1f30 100%);
  padding: 2rem 1.5rem 0;
  position: relative;
  overflow: hidden;
}

.do-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: rgba(200,122,0,0.1);
  border-radius: 50%;
  pointer-events: none;
}

.do-hero::after {
  content: '';
  position: absolute;
  bottom: -20px; left: 35%;
  width: 100px; height: 100px;
  background: rgba(200,122,0,0.06);
  border-radius: 50%;
  pointer-events: none;
}

.do-hero-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.2rem;
  position: relative; z-index: 1;
}

.do-hero-icon { font-size: 2.2rem; line-height: 1; flex-shrink: 0; }

.do-hero-text h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
}

.do-hero-text p {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
}

/* Hero search */
.do-hero-search {
  position: relative;
  z-index: 1;
  margin-bottom: 1.2rem;
}

.do-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
}

.do-search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.6rem;
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: rgba(255,255,255,0.1);
  color: white;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  box-sizing: border-box;
}

.do-search-input::placeholder { color: rgba(255,255,255,0.45); }

.do-search-input:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(200,122,0,0.2);
  background: rgba(255,255,255,0.15);
}

/* Hero stats */
.do-hero-stats {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  position: relative; z-index: 1;
  padding-bottom: 1.25rem;
}

.do-stat-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}

.do-stat-chip strong { color: white; }

/* Layout */
.do-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 1.5rem;
  align-items: start;
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Parts panel */
.do-parts {
  background: white;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  overflow: hidden;
}

.do-parts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.do-parts-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.do-parts-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-orange);
  background: var(--orange-light);
  border-radius: 12px;
  padding: 0.2rem 0.65rem;
}

.do-parts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  padding: 1.25rem;
  max-height: 70vh;
  overflow-y: auto;
}

/* Part card */
.do-part-card {
  background: var(--bg-light);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}

.do-part-card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.do-part-img {
  width: 100%;
  height: 140px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.do-part-img img { max-width: 100%; max-height: 100%; object-fit: contain; }

.do-part-body {
  padding: 0.85rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.do-part-name { margin: 0; font-size: 0.9rem; font-weight: 700; color: var(--primary-dark); line-height: 1.3; }
.do-part-artno { font-size: 0.78rem; font-weight: 700; color: var(--accent-orange); margin: 0; }
.do-part-desc  { font-size: 0.8rem; color: var(--text-gray); margin: 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.do-part-add {
  margin: 0 1rem 1rem;
  padding: 0.6rem;
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.do-part-add:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(200,122,0,0.35); }

.do-loading {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-gray);
  font-size: 0.95rem;
}

/* Cart panel */
.do-cart {
  background: white;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.do-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-light);
  flex-shrink: 0;
}

.do-cart-title { display: flex; align-items: center; gap: 0.5rem; }

.do-cart-title h2 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--primary-dark); }

.do-cart-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--accent-orange);
  color: white;
  border-radius: 10px;
  padding: 0.15rem 0.5rem;
  min-width: 20px;
  text-align: center;
}

.do-cart-clear {
  padding: 0.35rem 0.75rem;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  background: white;
  color: var(--text-gray);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.do-cart-clear:hover { background: #ffe8e8; border-color: #f44336; color: #f44336; }

/* Empty */
.do-cart-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-gray);
}

.do-cart-empty-icon { font-size: 3rem; opacity: 0.3; margin-bottom: 0.75rem; }
.do-cart-empty p { margin: 0.3rem 0; font-size: 0.9rem; }
.do-hint { font-size: 0.8rem; opacity: 0.7; }

/* Items list */
.do-cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.do-cart-item {
  background: var(--bg-accent);
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem;
}

.do-item-name { margin: 0 0 0.15rem; font-size: 0.88rem; font-weight: 700; color: var(--primary-dark); }
.do-item-artno { font-size: 0.75rem; font-weight: 700; color: var(--accent-orange); margin: 0 0 0.5rem; }

.do-item-ticket {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.do-item-ticket label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-gray);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.do-ticket-input {
  flex: 1;
  padding: 0.35rem 0.6rem;
  border: 1.5px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.82rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.do-ticket-input:focus { outline: none; border-color: var(--accent-orange); box-shadow: 0 0 0 2px rgba(200,122,0,0.12); }
.do-ticket-input::placeholder { color: #bbb; }
.do-ticket-input:disabled { background: var(--bg-light); }

.do-item-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.do-qty-btn {
  width: 28px; height: 28px;
  background: var(--accent-orange);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.do-qty-btn:hover { background: #b06900; }

.do-qty-input {
  width: 48px;
  text-align: center;
  padding: 0.3rem;
  border: 1.5px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
}

.do-qty-input:focus { outline: none; border-color: var(--accent-orange); }

.do-remove-btn {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s, transform 0.2s;
  padding: 0.2rem;
}

.do-remove-btn:hover { opacity: 1; transform: scale(1.15); }

/* Cart footer */
.do-cart-footer {
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
  background: var(--bg-light);
}

.do-cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-gray);
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.do-cart-total strong { font-size: 1.1rem; color: var(--primary-dark); }

.do-submit-btn {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(200,122,0,0.3);
  transition: all 0.2s;
  font-family: inherit;
}

.do-submit-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(200,122,0,0.4); }
.do-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Responsive */
@media (max-width: 1200px) {
  .do-layout { grid-template-columns: 1fr; }
  .do-cart   { position: static; max-height: none; }
  .do-parts-grid { max-height: none; }
}

@media (max-width: 768px) {
  .do-hero { padding: 1.5rem 1rem 0; }
  .do-layout { padding: 1rem; gap: 1rem; }
  .do-parts-grid { grid-template-columns: 1fr; }
}


.page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-gray);
  font-size: 1.1rem;
}

.order-content {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
  align-items: start;
}

/* Linke Seite: Artikelauswahl */
.parts-selection {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-section {
  margin-bottom: 1.5rem;
}

.search-section h2 {
  font-size: 1.3rem;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.search-input {
  width: 100%;
  padding: 0.875rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(200, 122, 0, 0.1);
}

.parts-list h3 {
  font-size: 1.1rem;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.parts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.part-card {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.2s;
}

.part-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.part-image {
  width: 100%;
  height: 150px;
  background: white;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.part-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.part-info h4 {
  font-size: 1rem;
  color: var(--primary-dark);
  margin: 0;
}

.part-info .article-number {
  color: var(--accent-orange);
  font-weight: 600;
  font-size: 0.85rem;
  margin: 0.25rem 0;
}

.part-info .description {
  color: var(--text-gray);
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.add-button {
  padding: 0.625rem;
  background: linear-gradient(135deg, var(--accent-orange) 0%, #d68900 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.add-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(200, 122, 0, 0.3);
}

/* Rechte Seite: Bestellübersicht */
.order-summary {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.summary-header h2 {
  font-size: 1.3rem;
  color: var(--primary-dark);
  margin: 0;
}

.clear-button {
  padding: 0.5rem 1rem;
  background: var(--bg-light);
  color: var(--text-gray);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.clear-button:hover {
  background: #e0e0e0;
  color: var(--error-color);
}

.empty-selection {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-gray);
}

.empty-icon {
  font-size: 4rem;
  opacity: 0.3;
  margin-bottom: 1rem;
}

.empty-selection p {
  margin: 0.5rem 0;
}

.empty-selection .hint {
  font-size: 0.9rem;
  opacity: 0.7;
}

.selected-items {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.selected-item {
  background: var(--bg-accent);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.selected-item .item-info h4 {
  font-size: 1rem;
  color: var(--primary-dark);
  margin: 0 0 0.25rem 0;
}

.selected-item .article-number {
  color: var(--accent-orange);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.ticket-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.ticket-input-row label {
  font-size: 0.85rem;
  color: var(--text-gray);
  font-weight: 500;
}

.ticket-input-small {
  flex: 1;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.ticket-input-small:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 2px rgba(200, 122, 0, 0.1);
}

.ticket-input-small::placeholder {
  color: #999;
}

.item-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qty-btn {
  width: 32px;
  height: 32px;
  background: var(--accent-orange);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  background: #b06900;
}

.qty-input {
  width: 60px;
  padding: 0.5rem;
  text-align: center;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
}

.qty-input:focus {
  outline: none;
  border-color: var(--accent-orange);
}

.remove-btn {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.2s;
  padding: 0.25rem;
}

.remove-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.order-footer {
  padding-top: 1rem;
  border-top: 2px solid var(--border-color);
}

.ticket-number-section {
  margin-bottom: 1rem;
}

.ticket-number-section label {
  display: block;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.ticket-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  font-size: 1rem;
  transition: all 0.2s;
}

.ticket-input:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(200, 122, 0, 0.1);
}

.ticket-input:disabled {
  background: var(--bg-light);
  cursor: not-allowed;
}

.total-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--bg-accent);
  border-radius: 6px;
}

.total-info strong {
  color: var(--primary-dark);
  font-size: 1.3rem;
}

.submit-order-button {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--accent-orange) 0%, #d68900 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(200, 122, 0, 0.3);
}

.submit-order-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200, 122, 0, 0.4);
}

.submit-order-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-gray);
  font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .order-content {
    grid-template-columns: 1fr;
  }

  .order-summary {
    position: static;
    max-height: none;
  }

  .parts-grid {
    max-height: none;
  }
}

@media (max-width: 768px) {
  .dispatcher-order-page {
    padding: 1rem 0.5rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  .parts-grid {
    grid-template-columns: 1fr;
  }

  .order-content {
    gap: 1rem;
  }
}
.documentation-page {
  max-width: 100%;
  margin: 0;
  padding: 1rem;
}

/* ── Search bar ─────────────────────────────────────────── */
.doc-search-bar {
  margin-bottom: 1.5rem;
}

.doc-search-input-wrap {
  display: flex;
  align-items: center;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 14px;
  padding: 0.6rem 1rem;
  gap: 0.65rem;
  box-shadow: 0 2px 10px rgba(18, 41, 65, 0.08);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.doc-search-input-wrap:focus-within {
  border-color: var(--accent-orange);
  box-shadow: 0 4px 16px rgba(200,122,0,0.15);
}

.doc-search-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  opacity: 0.7;
}

.doc-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: inherit;
  color: var(--primary-dark);
  background: transparent;
  min-width: 0;
}

.doc-search-input::placeholder {
  color: var(--text-lighter);
}

.doc-search-clear {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-gray);
  cursor: pointer;
  line-height: 1;
  padding: 0 0.25rem;
  flex-shrink: 0;
  transition: color 0.2s;
}

.doc-search-clear:hover {
  color: var(--error-color);
}

/* Search results container */
.doc-search-results {
  animation: fadeIn 0.2s ease;
}

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

.doc-search-count {
  font-size: 0.9rem;
  color: var(--text-gray);
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
}

.doc-search-hint {
  font-size: 0.85rem;
  color: var(--text-lighter);
  margin-top: 0.5rem !important;
  font-style: italic;
}

/* Search result item extras */
.doc-item-search {
  border-left: 3px solid var(--accent-orange);
}

.doc-item-clickable {
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.1s;
}

.doc-item-clickable:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  transform: translateY(-1px);
}

.doc-item-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-gray);
  margin: 0.2rem 0 0 0;
}

.doc-meta-sep {
  color: var(--border-color);
}

.doc-item-desc {
  font-size: 0.85rem;
  color: var(--text-lighter);
  margin: 0.2rem 0 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Attachments ─────────────────────────────────────────── */
.doc-attachments {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.att-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.att-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-light);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
}

.att-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.att-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--primary-dark);
  font-weight: 500;
}

.att-size {
  color: var(--text-gray);
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* PDF category badge in attachment list */
.att-pdf-cat {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}
.att-pdf-cat-documentation { background: #dbeeff; color: #1a5c99; }
.att-pdf-cat-service_report { background: #fff0d4; color: #8a5200; }
.att-pdf-cat-instruction    { background: #e0f7e9; color: #1a6b3a; }
.att-pdf-cat-other          { background: #f0f0f0; color: #555; }

.att-btn-view {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  flex-shrink: 0;
}

.att-btn-view:hover {
  background: var(--primary-dark);
}

.att-btn-delete {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.15rem 0.3rem;
  border-radius: 4px;
  flex-shrink: 0;
  transition: background 0.15s;
}

.att-btn-delete:hover {
  background: #ffeaea;
}

.att-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border: 1.5px dashed var(--accent-orange);
  border-radius: 8px;
  color: var(--accent-orange);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  align-self: flex-start;
}

.att-upload-label:hover {
  background: rgba(200, 122, 0, 0.07);
}

.att-upload-label.att-uploading {
  opacity: 0.6;
  cursor: not-allowed;
}

.att-upload-input {
  display: none;
}

/* ── Attachment viewer overlay ───────────────────────────── */
.att-viewer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.15s ease;
}

.att-viewer-box {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: min(95vw, 1100px);
  height: min(90vh, 820px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.att-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--primary-dark);
  color: white;
  gap: 1rem;
}

.att-viewer-name {
  font-weight: 600;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.att-viewer-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  font-size: 1.1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.att-viewer-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.att-viewer-iframe {
  flex: 1;
  border: none;
  width: 100%;
}

.att-viewer-img {
  flex: 1;
  object-fit: contain;
  padding: 1rem;
  max-height: 100%;
  max-width: 100%;
}

.doc-header {
  background: linear-gradient(135deg, #1a3550 0%, var(--primary-dark) 60%, #0d1f30 100%);
  border-radius: 16px;
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  text-align: left;
}

.doc-header::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 160px; height: 160px;
  background: rgba(200,122,0,0.1);
  border-radius: 50%;
  pointer-events: none;
}

.doc-header::after {
  content: '';
  position: absolute;
  bottom: -40px; right: 80px;
  width: 100px; height: 100px;
  background: rgba(200,122,0,0.06);
  border-radius: 50%;
  pointer-events: none;
}

.doc-header h1 {
  font-size: 1.75rem;
  color: white;
  margin-bottom: 0.4rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.doc-header p {
  font-size: 1rem;
  color: rgba(255,255,255,0.72);
  margin: 0;
  position: relative;
  z-index: 1;
}

.doc-header p strong {
  color: rgba(255,255,255,0.95);
}

/* Breadcrumb */
.doc-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: white;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 4px rgba(18, 41, 65, 0.06);
}

.doc-breadcrumb-sep {
  color: var(--text-gray);
  font-size: 1.1rem;
}

.doc-breadcrumb-btn {
  background: none;
  border: none;
  color: var(--accent-orange);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: background 0.2s;
  font-weight: 500;
}

.doc-breadcrumb-btn:hover {
  background: rgba(200, 122, 0, 0.08);
}

.doc-breadcrumb-btn.active {
  color: var(--primary-dark);
  font-weight: 600;
  cursor: default;
}

.doc-breadcrumb-btn.active:hover {
  background: none;
}

/* Grid for customer / device selection */
.doc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.doc-card {
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(18, 41, 65, 0.08);
}

.doc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(18, 41, 65, 0.15);
}

.doc-card-customer {
  border-left: 4px solid var(--accent-orange);
}

.doc-card-customer:hover {
  border-color: var(--accent-orange);
  background: linear-gradient(135deg, #fff8ee 0%, #ffe8c0 100%);
}

.doc-card-device {
  border-left: 4px solid var(--primary);
}

.doc-card-device:hover {
  background: linear-gradient(135deg, #f0f7fd 0%, #dbeeff 100%);
  border-color: var(--primary);
}

/* Customer-level docs card (always first in device grid) */
.doc-card-customer-level {
  border-left: 4px solid var(--accent-orange);
  background: linear-gradient(135deg, #fffbf4 0%, #fff3dc 100%);
}

.doc-card-customer-level:hover {
  background: linear-gradient(135deg, #fff5e0 0%, #ffe8b0 100%);
  border-color: var(--accent-orange);
}

.doc-card-customer-level .doc-count {
  color: var(--accent-orange);
  font-weight: 500;
}

.doc-card-category-combined {
  border-left: 4px solid var(--primary);
  background: linear-gradient(135deg, #f0f4f8 0%, #dde8f5 100%);
}

.doc-card-category-combined:hover {
  background: linear-gradient(135deg, #e4edf7 0%, #c8d9ee 100%);
  border-color: var(--primary);
}

.doc-card-category-combined .doc-count {
  color: var(--primary);
  font-weight: 500;
}

/* Cards without any documents (admin view) */
.doc-card.doc-card-empty {
  opacity: 0.65;
  border-left-color: var(--border-color);
}

.doc-card.doc-card-empty:hover {
  opacity: 1;
  border-left-color: var(--accent-orange);
  background: linear-gradient(135deg, #fff8ee 0%, #ffe8c0 100%);
}

.doc-count {
  font-size: 0.9rem;
  color: var(--text-gray);
  margin: 0;
}

.doc-count-empty {
  font-size: 0.85rem;
  color: var(--text-lighter);
  margin: 0;
  font-style: italic;
}

.doc-card-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.doc-card h2 {
  font-size: 1.2rem;
  margin: 0 0 0.4rem 0;
  color: var(--primary-dark);
  font-weight: 600;
}

.doc-card p {
  font-size: 0.9rem;
  color: var(--text-gray);
  margin: 0;
}

/* Docs section */
.doc-docs-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.doc-admin-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
}

.doc-suggestions-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  color: var(--primary-dark);
  border: 1.5px solid var(--primary-dark);
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.doc-suggestions-btn:hover { background: var(--bg-light); }

.doc-suggestions-badge {
  background: #dc2626;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 0.05rem 0.4rem;
  min-width: 18px;
  text-align: center;
}

/* Suggestions panel */
.doc-suggestions-panel {
  margin-bottom: 1.25rem;
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 10px;
  padding: 1rem 1.25rem;
}

.doc-suggestions-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.doc-suggestions-header h4 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--primary-dark);
  flex: 1;
}

.doc-suggestions-reload {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem;
  border-radius: 4px;
  transition: background 0.15s;
}

.doc-suggestions-reload:hover { background: #fef3c7; }

.doc-suggestions-loading,
.doc-suggestions-empty {
  font-size: 0.85rem;
  color: var(--text-gray);
}

.doc-suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.doc-suggestion-item {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.doc-suggestion-done    { opacity: 0.65; }
.doc-suggestion-rejected { opacity: 0.55; }

.doc-suggestion-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.doc-suggestion-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--primary-dark);
  flex: 1;
}

.doc-suggestion-device {
  font-size: 0.78rem;
  color: var(--text-gray);
}

.doc-suggestion-status-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.doc-suggestion-badge-open      { background: var(--orange-light); color: var(--accent-orange); }
.doc-suggestion-badge-in_review { background: #fef3c7; color: #b45309; }
.doc-suggestion-badge-done      { background: #dcfce7; color: #15803d; }
.doc-suggestion-badge-rejected  { background: #fee2e2; color: #b91c1c; }

.doc-suggestion-desc {
  font-size: 0.85rem;
  color: #374151;
  margin: 0;
  white-space: pre-wrap;
}

.doc-suggestion-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.76rem;
  color: var(--text-gray);
}

.doc-suggestion-note {
  font-size: 0.82rem;
  color: #78350f;
  background: #fffbeb;
  border-radius: 5px;
  padding: 0.3rem 0.6rem;
  margin: 0;
}

.doc-suggestion-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--border-color);
}

.doc-suggestion-note-input {
  width: 100%;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.83rem;
  font-family: inherit;
  box-sizing: border-box;
}

.doc-suggestion-note-input:focus {
  outline: none;
  border-color: var(--primary-dark);
}

.doc-suggestion-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.doc-sugg-btn {
  padding: 0.3rem 0.75rem;
  border: none;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.doc-sugg-btn:hover { opacity: 0.8; }
.doc-sugg-review  { background: #fef3c7; color: #b45309; }
.doc-sugg-done    { background: #dcfce7; color: #15803d; }
.doc-sugg-reject  { background: #fee2e2; color: #b91c1c; }
.doc-sugg-reopen  { background: var(--orange-light); color: var(--accent-orange); }

.doc-add-btn {
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: white;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(200,122,0,0.25);
}

.doc-add-btn:hover {
  background: linear-gradient(135deg, #d68900, #b55f00);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200,122,0,0.4);
}

/* Form card */
.doc-form-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  border: 2px solid var(--accent-orange);
  box-shadow: 0 4px 16px rgba(200,122,0,0.12);
}

.doc-form-card h3 {
  margin: 0 0 1.25rem 0;
  color: var(--primary-dark);
  font-size: 1.1rem;
}

.doc-form-group {
  margin-bottom: 1rem;
}

.doc-form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0.4rem;
}

.doc-form-group input,
.doc-form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.doc-form-group input:focus,
.doc-form-group textarea:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(200,122,0,0.1);
}

.doc-form-group textarea {
  resize: vertical;
}

.doc-form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

.doc-btn-cancel {
  background: var(--bg-light);
  color: var(--primary-dark);
  border: 2px solid var(--border-color);
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.doc-btn-cancel:hover:not(:disabled) {
  background: var(--border-color);
}

.doc-btn-save {
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: white;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(200,122,0,0.25);
}

.doc-btn-save:hover:not(:disabled) {
  background: linear-gradient(135deg, #d68900, #b55f00);
  box-shadow: 0 4px 12px rgba(200,122,0,0.4);
}

.doc-btn-save:disabled,
.doc-btn-cancel:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Document list */
.doc-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.doc-item {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-shadow: 0 1px 4px rgba(18, 41, 65, 0.06);
  transition: box-shadow 0.2s;
}

.doc-item:hover {
  box-shadow: 0 4px 12px rgba(18, 41, 65, 0.12);
}

.doc-item-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  border-radius: 6px;
  padding: 0.1rem;
  margin: -0.1rem;
  user-select: none;
  transition: background 0.15s;
}

.doc-item-top:hover {
  background: #f8fafc;
}

.doc-item-top:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
}

.doc-item-chevron {
  font-size: 0.7rem;
  color: #94a3b8;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  display: inline-block;
}

.doc-item-chevron.expanded {
  transform: rotate(180deg);
}

.doc-item-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.doc-item-info {
  flex: 1;
  min-width: 0;
}

.doc-item-info h3 {
  margin: 0 0 0.2rem 0;
  font-size: 1rem;
  color: var(--primary-dark);
  font-weight: 600;
  word-break: break-word;
}

.doc-item-info p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-gray);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-item-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}

.doc-btn-open {
  background: var(--accent-orange);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.doc-btn-open:hover {
  background: #a86500;
  transform: translateY(-1px);
}

.doc-btn-copylink {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
  white-space: nowrap;
}

.doc-btn-copylink:hover {
  background: var(--bg-light);
  border-color: var(--primary);
  color: var(--primary);
}

.doc-btn-copylink.copied {
  border-color: var(--success-color, #22c55e);
  color: var(--success-color, #22c55e);
  background: var(--success-light, #f0fdf4);
}

/* Highlighted doc (arrived via direct link) */
.doc-item-highlighted {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
  animation: doc-highlight-pulse 1.8s ease-out forwards;
}

@keyframes doc-highlight-pulse {
  0%   { box-shadow: 0 0 0 4px rgba(200,122,0,0.35); }
  100% { box-shadow: none; }
}

.doc-btn-edit,
.doc-btn-delete {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
}

.doc-btn-edit:hover {
  background: var(--bg-light);
  border-color: var(--primary);
}

.doc-btn-delete:hover {
  background: var(--error-light);
  border-color: var(--error-color);
}

/* Empty state */
.doc-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-gray);
}

.doc-empty p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

/* Loading */
.doc-loading {
  text-align: center;
  padding: 3rem 1rem;
}

.doc-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-dark);
  border-radius: 50%;
  animation: docSpin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

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

/* Desktop */
@media (min-width: 769px) {
  .documentation-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
  }

  .doc-header {
    padding: 2.5rem 2.5rem;
  }

  .doc-header h1 {
    font-size: 2.25rem;
  }

  .doc-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  .doc-card {
    padding: 2.5rem 2rem;
  }

  .doc-card-icon {
    font-size: 3.5rem;
  }

  .doc-item {
    padding: 1.25rem 1.5rem;
  }
}

/* ── Notify users section in form ────────────────── */
.doc-form-notify {
  background: var(--orange-light);
  border: 1px solid rgba(200,122,0,0.25);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.doc-notify-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--primary-dark);
  cursor: pointer;
}

.doc-notify-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary-dark);
}

.doc-notify-message {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(200,122,0,0.35);
  border-radius: 6px;
  font-size: 0.88rem;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
}

.doc-notify-message:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(200,122,0,0.1);
}

/* ── Notification read-status panel ──────────────── */
.doc-notif-status-wrap {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color);
}

.doc-notif-status-btn {
  font-size: 0.8rem;
  color: var(--text-gray);
  background: none;
  border: 1px dashed var(--border-color);
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.doc-notif-status-btn:hover {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

.doc-notif-status-panel {
  margin-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.doc-notif-loading,
.doc-notif-empty {
  font-size: 0.82rem;
  color: var(--text-gray);
  padding: 0.5rem 0;
}

.doc-notif-entry {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.doc-notif-entry-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.doc-notif-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
}

.doc-notif-badge-created { background: #dcfce7; color: #15803d; }
.doc-notif-badge-updated { background: #fef3c7; color: #b45309; }

.doc-notif-date {
  font-size: 0.78rem;
  color: var(--text-gray);
}

.doc-notif-by {
  font-size: 0.78rem;
  color: var(--text-gray);
  margin-left: auto;
}

.doc-notif-message {
  font-size: 0.82rem;
  color: #92400e;
  background: #fffbeb;
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
}

.doc-notif-progress {
  display: flex;
  gap: 1rem;
  font-size: 0.82rem;
}

.doc-notif-confirmed { color: #15803d; font-weight: 600; }
.doc-notif-pending   { color: #b45309; font-weight: 600; }

.doc-notif-user-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.doc-notif-user-label {
  font-size: 0.75rem;
  color: var(--text-gray);
  font-weight: 600;
}

.doc-notif-user-chip {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.doc-notif-chip-confirmed {
  background: #dcfce7;
  color: #15803d;
}

.doc-notif-chip-pending {
  background: #fee2e2;
  color: #b91c1c;
}

/* ── Changelog / Versionierung ───────────────────── */
.doc-changelog-wrap {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color);
}

.doc-changelog-btn {
  font-size: 0.8rem;
  color: var(--text-gray);
  background: none;
  border: 1px dashed var(--border-color);
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: border-color 0.15s, color 0.15s;
}

.doc-changelog-btn:hover {
  border-color: var(--accent-orange, #C87A00);
  color: var(--accent-orange, #C87A00);
}

.doc-changelog-count {
  background: var(--primary-dark, #122941);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 12px;
}

.doc-changelog-panel {
  margin-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.doc-changelog-loading,
.doc-changelog-empty {
  font-size: 0.82rem;
  color: var(--text-gray);
  padding: 0.4rem 0;
}

.doc-changelog-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.doc-changelog-entry {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--border-color);
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.doc-changelog-entry-created  { border-left-color: #15803d; }
.doc-changelog-entry-updated  { border-left-color: #b45309; }
.doc-changelog-entry-deleted  { border-left-color: #b91c1c; }

.doc-changelog-entry-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.doc-changelog-action {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
}

.doc-changelog-action-created { background: #dcfce7; color: #15803d; }
.doc-changelog-action-updated { background: #fef3c7; color: #b45309; }
.doc-changelog-action-deleted { background: #fee2e2; color: #b91c1c; }

.doc-changelog-by {
  font-size: 0.78rem;
  color: var(--primary-dark, #122941);
  font-weight: 500;
}

.doc-changelog-date {
  font-size: 0.78rem;
  color: var(--text-gray);
  margin-left: auto;
}

.doc-changelog-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.doc-changelog-field-chip {
  background: #e0e7ef;
  color: var(--primary-dark, #122941);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
}

/* ── Doc type selector in form ───────────────────── */
.doc-type-selector {
  display: flex;
  gap: 0.5rem;
}

.doc-type-btn {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  color: var(--text-gray);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.doc-type-btn:hover {
  border-color: var(--primary-dark);
  color: var(--primary-dark);
}

.doc-type-btn.active {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
  color: #fff;
}

/* ── Content editor textarea ─────────────────────── */
.doc-content-editor {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
  resize: vertical;
  min-height: 200px;
  box-sizing: border-box;
}

.doc-content-editor:focus {
  outline: none;
  border-color: var(--primary-dark);
}

/* ── PDF upload in form ──────────────────────────── */
.doc-pdf-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-gray);
  transition: border-color 0.15s, color 0.15s;
}

.doc-pdf-upload-label:hover {
  border-color: var(--primary-dark);
  color: var(--primary-dark);
}

.doc-pdf-upload-input {
  display: none;
}

.doc-pdf-clear {
  margin-left: 0.5rem;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--text-gray);
}

.doc-pdf-clear:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #dc2626;
}

.doc-pdf-hint {
  font-size: 0.78rem;
  color: var(--text-gray);
  margin-top: 0.4rem;
}

/* ── Pending attachments in form ─────────────────── */
.doc-form-attachments {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.doc-form-att-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  flex-wrap: wrap;
}

.doc-form-att-name {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-dark);
  word-break: break-all;
}

.doc-form-att-cat {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.82rem;
  background: white;
  cursor: pointer;
}

.doc-form-att-remove {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--text-gray);
  flex-shrink: 0;
}

.doc-form-att-remove:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #dc2626;
}

.doc-form-att-add {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-gray);
  transition: border-color 0.15s, color 0.15s;
  width: fit-content;
}

.doc-form-att-add:hover {
  border-color: var(--primary-dark);
  color: var(--primary-dark);
}

.doc-form-att-input {
  display: none;
}

/* ── PDF category picker (popup overlay) ─────────────────── */
.pdf-cat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}

.pdf-cat-popup {
  background: white;
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  width: min(440px, 95vw);
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}

.pdf-cat-popup h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  color: var(--primary-dark);
}

.pdf-cat-filename {
  font-size: 0.82rem;
  color: var(--text-gray);
  margin: 0 0 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-cat-options {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.pdf-cat-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  border: 2px solid var(--border-color);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--primary-dark);
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}

.pdf-cat-option input[type="radio"] {
  accent-color: var(--accent-orange);
  flex-shrink: 0;
}

.pdf-cat-option.selected {
  border-color: var(--accent-orange);
  background: var(--orange-light);
  font-weight: 600;
}

.pdf-cat-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

.pdf-cat-btn-cancel {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 7px;
  padding: 0.45rem 1rem;
  cursor: pointer;
  color: var(--text-gray);
  font-size: 0.9rem;
  transition: background 0.15s;
}
.pdf-cat-btn-cancel:hover { background: var(--bg-light); }

.pdf-cat-btn-confirm {
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: white;
  border: none;
  border-radius: 7px;
  padding: 0.45rem 1.2rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 6px rgba(200,122,0,0.25);
}
.pdf-cat-btn-confirm:hover { background: linear-gradient(135deg, #d68900, #b55f00); box-shadow: 0 3px 10px rgba(200,122,0,0.4); }

/* ── Inline PDF category picker (in main form) ─────────────────── */
.pdf-cat-inline {
  margin-top: 0.75rem;
}

.pdf-cat-inline-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-dark);
  display: block;
  margin-bottom: 0.4rem;
}

.pdf-cat-options-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

/* ── Doc type badge on item title ─────────────────── */
.doc-type-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  vertical-align: middle;
  letter-spacing: 0.03em;
}

.doc-type-badge-text {
  background: var(--orange-light);
  color: var(--accent-orange);
}

.doc-type-badge-pdf {
  background: #fee2e2;
  color: #b91c1c;
}

.doc-type-badge-legacy {
  background: #f3e8ff;
  color: #7c3aed;
}

/* ── Inline text content display ─────────────────── */
.doc-text-content {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  border-top: 3px solid var(--accent-orange);
}

.doc-text-pre {
  margin: 0;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 0.88rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  color: #374151;
}

/* ── Search result text preview ──────────────────── */
.doc-search-content-preview {
  font-size: 0.8rem;
  color: var(--text-gray);
  margin-top: 0.25rem;
  font-style: italic;
}

.doc-search-content-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 600;
  background: var(--orange-light);
  color: var(--accent-orange);
  border-radius: 4px;
  padding: 1px 5px;
  margin-right: 0.4rem;
  vertical-align: middle;
}

/* ── Linked parts chips ──────────────────────────── */
.doc-parts-section {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color);
}

.doc-parts-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.doc-part-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #eaf1fb;
  color: var(--primary-dark);
  border: 1px solid #b8d0ee;
  border-radius: 20px;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.doc-part-chip:hover {
  background: #d0e4f7;
  border-color: #7aadda;
}

.doc-part-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.25rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #b8d0ee;
  color: var(--primary-dark);
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
}
.doc-part-chip-remove:hover {
  background: #e05252;
  color: #fff;
}

.doc-parts-manage-btn {
  font-size: 0.78rem;
  color: var(--text-gray);
  background: none;
  border: 1px dashed var(--border-color);
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.doc-parts-manage-btn:hover {
  border-color: var(--primary-dark);
  color: var(--primary-dark);
}

/* ── Part manager panel ────────────────────────── */
.doc-parts-manager {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  margin-top: 0.5rem;
}

.doc-parts-manager-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.doc-parts-manager-close {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  font-size: 0.78rem;
  cursor: pointer;
  color: var(--text-gray);
}
.doc-parts-manager-close:hover { background: #e8e8e8; }

.doc-parts-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.doc-parts-search-input {
  width: 100%;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.85rem;
  background: #fff;
}
.doc-parts-search-input:focus {
  outline: none;
  border-color: var(--primary-dark);
}

.doc-parts-searching {
  position: absolute;
  right: 0.6rem;
  font-size: 0.8rem;
}

.doc-parts-search-results {
  margin-top: 0.4rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #fff;
  max-height: 180px;
  overflow-y: auto;
}

.doc-parts-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  gap: 0.5rem;
}
.doc-parts-search-item:last-child { border-bottom: none; }

.doc-parts-search-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.doc-parts-search-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-parts-search-art {
  font-size: 0.75rem;
  color: var(--text-gray);
}

.doc-parts-search-add {
  flex-shrink: 0;
  font-size: 0.78rem;
  padding: 0.25rem 0.6rem;
  background: var(--primary-dark);
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
}
.doc-parts-search-add:hover { opacity: 0.85; }
.doc-parts-search-add.already-linked {
  background: #a5d6a7;
  color: #2e7d32;
  cursor: default;
}

/* ── Part detail popup ─────────────────────────── */
.part-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.part-popup-box {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.part-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.part-popup-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin: 0;
}

.part-popup-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-gray);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}
.part-popup-close:hover { background: #eee; }

.part-popup-body {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
}

.part-popup-image {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-light);
}
.part-popup-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.part-popup-info {
  flex: 1;
  min-width: 0;
}

.part-popup-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin: 0 0 0.4rem;
}

.part-popup-art {
  font-size: 0.85rem;
  color: var(--text-gray);
  margin: 0 0 0.5rem;
}

.part-popup-desc {
  font-size: 0.85rem;
  color: #555;
  margin: 0;
  line-height: 1.5;
}

.part-popup-footer {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem 1.25rem;
  justify-content: flex-end;
  border-top: 1px solid var(--border-color);
}

.part-popup-cancel {
  padding: 0.55rem 1.1rem;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text-gray);
}
.part-popup-cancel:hover { background: #f5f5f5; }

.part-popup-order {
  padding: 0.55rem 1.25rem;
  background: var(--primary-dark);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.part-popup-order:hover:not(:disabled) { opacity: 0.85; }
.part-popup-order:disabled { opacity: 0.5; cursor: default; }
/* ====================================================================
   News Feed Page – Styles
   ==================================================================== */

.news-feed-page {
  min-height: calc(100vh - 80px);
  background: var(--bg-light);
}

/* ── Layout ─────────────────────────────────────────────────────────── */
.nf-layout {
  display: flex;
  gap: 0;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 80px);
}

/* ── Sidebar ─────────────────────────────────────────────────────────── */
.nf-sidebar {
  width: 280px;
  min-width: 240px;
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
}

.nf-sidebar-header {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #1a3550 0%, var(--primary-dark) 60%, #0d1f30 100%);
  position: relative;
  overflow: hidden;
}

.nf-sidebar-header::before {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 80px; height: 80px;
  background: rgba(200,122,0,0.1);
  border-radius: 50%;
  pointer-events: none;
}

.nf-sidebar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: white;
  margin: 0;
  flex: 1;
  position: relative; z-index: 1;
}

.nf-pending-badge {
  background: var(--accent-orange);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
  position: relative; z-index: 1;
}

.nf-pending-badge-sm {
  background: #f59e0b;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
}

.nf-sidebar-loading,
.nf-sidebar-empty {
  padding: 1.5rem 1.25rem;
  color: #64748b;
  font-size: 0.9rem;
}

.nf-customer-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}

.nf-customer-item {
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.nf-customer-item:hover {
  background: #f1f5f9;
}

.nf-customer-item.active {
  background: var(--orange-light);
  border-left-color: var(--accent-orange);
}

.nf-customer-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
}

.nf-customer-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nf-feed-count {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* ── Main content ────────────────────────────────────────────────────── */
.nf-main {
  flex: 1;
  padding: 2rem 2.5rem;
  min-width: 0;
}

/* Welcome screen */
.nf-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  color: #64748b;
}

.nf-welcome-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.nf-welcome h2 {
  font-size: 1.5rem;
  color: #334155;
  margin-bottom: 0.5rem;
}

.nf-welcome p {
  font-size: 1rem;
  color: #64748b;
  max-width: 400px;
}

/* Feed header */
.nf-feed-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.nf-feed-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.nf-feed-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Filter tabs */
.nf-filter-tabs {
  display: flex;
  gap: 0.25rem;
  background: #f1f5f9;
  padding: 0.25rem;
  border-radius: 8px;
}

.nf-filter-tab {
  padding: 0.35rem 0.75rem;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s;
}

.nf-filter-tab.active {
  background: #ffffff;
  color: var(--accent-orange);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nf-tab-badge {
  background: #f59e0b;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.nf-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1.1rem;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.nf-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.nf-btn-primary {
  background: linear-gradient(135deg, var(--accent-orange), #d68900);
  color: #fff;
  box-shadow: 0 3px 8px rgba(200,122,0,0.25);
}

.nf-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #d68900, #b55f00);
  box-shadow: 0 4px 12px rgba(200,122,0,0.4);
  transform: translateY(-1px);
}

.nf-btn-secondary {
  background: #e2e8f0;
  color: #334155;
}

.nf-btn-secondary:hover:not(:disabled) {
  background: #cbd5e1;
}

.nf-btn-outline {
  background: transparent;
  color: var(--accent-orange);
  border: 1.5px solid rgba(200,122,0,0.4);
}

.nf-btn-outline:hover:not(:disabled) {
  background: var(--orange-light);
  border-color: var(--accent-orange);
}

.nf-btn-danger {
  background: #dc2626;
  color: #fff;
}

.nf-btn-danger:hover:not(:disabled) {
  background: #b91c1c;
}

.nf-btn-sm {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
}

/* ── Form card ───────────────────────────────────────────────────────── */
.nf-form-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.nf-form-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 1.25rem;
}

.nf-info-banner {
  background: var(--orange-light);
  border: 1px solid rgba(200,122,0,0.25);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #7a4500;
  margin-bottom: 1.25rem;
}

.nf-form-group {
  margin-bottom: 1.25rem;
}

.nf-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.4rem;
}

.nf-input {
  width: 100%;
  padding: 0.6rem 0.875rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #1e293b;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.nf-input:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(200,122,0,0.1);
}

.nf-textarea {
  width: 100%;
  padding: 0.6rem 0.875rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #1e293b;
  background: #fff;
  box-sizing: border-box;
  resize: vertical;
  font-family: inherit;
  transition: border-color 0.15s;
}

.nf-textarea:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(200,122,0,0.1);
}

.nf-form-attachments {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.nf-form-att-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
}

.nf-form-att-name {
  flex: 1;
  font-size: 0.85rem;
  color: #374151;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nf-form-att-remove {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  line-height: 1;
}

.nf-form-att-remove:hover {
  color: #ef4444;
  background: #fee2e2;
}

.nf-form-att-add {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border: 1.5px dashed #cbd5e1;
  border-radius: 7px;
  font-size: 0.83rem;
  color: var(--accent-orange);
  cursor: pointer;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
  align-self: flex-start;
  margin-top: 0.2rem;
}

.nf-form-att-add:hover {
  background: var(--orange-light);
  border-color: rgba(200,122,0,0.5);
}

.nf-form-att-input {
  display: none;
}

.nf-form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

/* ── Loading / empty ─────────────────────────────────────────────────── */
.nf-loading,
.nf-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 4rem 2rem;
  color: #64748b;
  text-align: center;
}

.nf-empty-icon {
  font-size: 3rem;
  opacity: 0.4;
}

/* ── Feed list ───────────────────────────────────────────────────────── */
.nf-feed-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ── Feed card ───────────────────────────────────────────────────────── */
.nf-feed-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s;
}

.nf-feed-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.09);
}

.nf-feed-card.pinned {
  border-left: 4px solid var(--accent-orange);
}

.nf-feed-card.status-pending {
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
}

.nf-feed-card.status-rejected {
  border-left: 4px solid #ef4444;
  background: #fef2f2;
}

/* Card summary (clickable header + meta area) */
.nf-card-summary {
  cursor: pointer;
  border-radius: 8px;
  padding: 0.1rem;
  margin: -0.1rem;
  transition: background 0.15s;
  user-select: none;
}

.nf-card-summary:hover {
  background: #f8fafc;
}

.nf-card-summary:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
}

/* Chevron indicator */
.nf-card-chevron {
  font-size: 0.7rem;
  color: #94a3b8;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  display: inline-block;
  margin-left: 0.35rem;
}

.nf-card-chevron.expanded {
  transform: rotate(180deg);
}

/* Card header */
.nf-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.nf-card-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.nf-pin-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.nf-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  word-break: break-word;
}

.nf-card-header-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.nf-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.status-published {
  background: #dcfce7;
  color: #166534;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-rejected {
  background: #fee2e2;
  color: #991b1b;
}

/* Card actions */
.nf-card-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.nf-action-btn {
  padding: 0.3rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  font-size: 0.78rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.15s;
}

.nf-action-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.nf-btn-approve {
  background: #f0fdf4;
  color: #166534;
  border-color: #86efac;
}

.nf-btn-approve:hover {
  background: #dcfce7;
}

.nf-btn-reject {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

.nf-btn-reject:hover {
  background: #fee2e2;
}

.nf-action-delete {
  color: #dc2626;
}

.nf-action-delete:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

.nf-btn-copylink {
  color: #64748b;
}

.nf-btn-copylink:hover {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

.nf-btn-copylink.copied {
  border-color: var(--success-color);
  color: var(--success-color);
  background: #f0fdf4;
}

.nf-feed-highlighted {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
  animation: nf-highlight-pulse 1.8s ease-out forwards;
}

@keyframes nf-highlight-pulse {
  0%   { box-shadow: 0 0 0 4px rgba(200,122,0,0.35); }
  100% { box-shadow: none; }
}

/* Card meta */
.nf-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.nf-card-author {
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
}

.nf-card-date {
  font-size: 0.8rem;
  color: #94a3b8;
}

.nf-card-edited {
  font-size: 0.76rem;
  color: #94a3b8;
  font-style: italic;
}

/* Rejection note */
.nf-rejection-note {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 0.6rem 0.875rem;
  font-size: 0.83rem;
  color: #991b1b;
  margin-bottom: 0.75rem;
}

/* Content area */
.nf-card-content {
  overflow: hidden;
  position: relative;
}

.nf-card-content.expanded {
  max-height: none;
}

.nf-card-content::after {
  display: none;
}

.nf-rich-content {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #374151;
  word-break: break-word;
}

.nf-rich-content h1,
.nf-rich-content h2,
.nf-rich-content h3 {
  margin: 0.75em 0 0.4em;
  color: #1e293b;
}

.nf-rich-content p {
  margin: 0 0 0.6em;
}

.nf-rich-content ul,
.nf-rich-content ol {
  padding-left: 1.5em;
  margin: 0.4em 0;
}

.nf-rich-content blockquote {
  border-left: 3px solid #cbd5e1;
  margin: 0.5em 0;
  padding-left: 1em;
  color: #64748b;
}

.nf-rich-content a {
  color: var(--accent-orange);
  text-decoration: underline;
}

.nf-rich-content table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.85rem;
}

.nf-rich-content td,
.nf-rich-content th {
  border: 1px solid #e2e8f0;
  padding: 0.4rem 0.6rem;
}

.nf-rich-content th {
  background: #f8fafc;
  font-weight: 600;
}

/* Expand toggle - kept for reference but no longer rendered */
.nf-expand-btn {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.3rem;
  background: none;
  border: none;
  font-size: 0.78rem;
  color: var(--accent-orange);
  cursor: pointer;
  text-align: center;
  font-weight: 500;
}

.nf-expand-btn:hover {
  text-decoration: underline;
}

/* ── Attachments ─────────────────────────────────────────────────────── */
.nf-attachments {
  border-top: 1px solid #f1f5f9;
  margin-top: 1rem;
  padding-top: 0.875rem;
}

.nf-attach-list {
  list-style: none;
  margin: 0 0 0.6rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nf-attach-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  padding: 0.4rem 0.65rem;
}

.nf-attach-name {
  flex: 1;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 0.82rem;
  color: var(--accent-orange);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  word-break: break-all;
  padding: 0;
}

.nf-attach-name:hover {
  text-decoration: underline;
}

.nf-attach-size {
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
}

.nf-attach-delete {
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: 0.85rem;
  padding: 0.15rem 0.3rem;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.15s;
}

.nf-attach-delete:hover {
  color: #dc2626;
}

.nf-attach-upload {
  margin-top: 0.4rem;
}

/* ── Pagination ──────────────────────────────────────────────────────── */
.nf-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.nf-page-info {
  font-size: 0.85rem;
  color: #64748b;
}

/* ── Modals ──────────────────────────────────────────────────────────── */
.nf-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.nf-modal {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.nf-modal h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 1rem;
}

.nf-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

/* Attachment viewer */
.nf-attach-viewer {
  background: #fff;
  border-radius: 12px;
  width: 90vw;
  max-width: 900px;
  height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.nf-attach-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
}

.nf-attach-viewer-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: #64748b;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.nf-attach-viewer-close:hover {
  background: #f1f5f9;
}

.nf-attach-viewer-iframe {
  flex: 1;
  width: 100%;
  border: none;
}

.nf-attach-viewer-img {
  flex: 1;
  object-fit: contain;
  max-height: 100%;
  padding: 1rem;
  box-sizing: border-box;
}

/* ── Responsive: Tablet / iPad ───────────────────────────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {
  .nf-sidebar {
    width: 200px;
    min-width: 180px;
  }

  .nf-main {
    padding: 1.5rem 1.25rem;
  }

  .nf-feed-header {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .nf-feed-header-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .nf-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .nf-card-header-right {
    width: 100%;
    justify-content: flex-start;
  }

  .nf-card-actions {
    flex-wrap: wrap;
  }

  .nf-filter-tabs {
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nf-feed-title {
    font-size: 1.25rem;
  }

  .nf-card-title {
    font-size: 1rem;
  }
}

/* ── Responsive: Mobile ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nf-layout {
    flex-direction: column;
  }

  .nf-sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }

  .nf-customer-list {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0.5rem;
    gap: 0.4rem;
  }

  .nf-customer-item {
    padding: 0.5rem 0.875rem;
    border-left: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
  }

  .nf-customer-item.active {
    background: var(--orange-light);
    border-color: var(--accent-orange);
    border-left-color: var(--accent-orange);
  }

  .nf-main {
    padding: 1.25rem 1rem;
  }

  .nf-feed-header {
    flex-direction: column;
    gap: 0.75rem;
  }

  .nf-feed-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .nf-filter-tabs {
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nf-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .nf-attach-viewer {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }
}

/* ── Form: Notify users ──────────────────────────────────────────────── */
.nf-form-notify {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nf-notify-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #166534;
  cursor: pointer;
}

.nf-notify-checkbox-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  accent-color: #10b981;
}

.nf-notify-message {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #a7f3d0;
  border-radius: 6px;
  background: #fff;
  font-size: 0.875rem;
  color: #1e293b;
  resize: vertical;
  box-sizing: border-box;
}

.nf-notify-message:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* ── Changelog ───────────────────────────────────────────────────────── */
.nf-changelog-wrap {
  margin-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.5rem;
}

.nf-changelog-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  color: #64748b;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.15s, color 0.15s;
}

.nf-changelog-btn:hover {
  background: #f1f5f9;
  color: #334155;
}

.nf-changelog-count {
  background: #e2e8f0;
  color: #475569;
  border-radius: 10px;
  padding: 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.nf-changelog-panel {
  margin-top: 0.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem;
}

.nf-changelog-loading,
.nf-changelog-empty {
  font-size: 0.85rem;
  color: #94a3b8;
  text-align: center;
  padding: 0.5rem 0;
  margin: 0;
}

.nf-changelog-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nf-changelog-entry {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border-left: 3px solid #e2e8f0;
  background: #fff;
}

.nf-changelog-entry-created { border-left-color: #10b981; }
.nf-changelog-entry-updated { border-left-color: var(--accent-orange); }
.nf-changelog-entry-deleted { border-left-color: #ef4444; }

.nf-changelog-entry-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

.nf-changelog-action {
  font-weight: 600;
  font-size: 0.8rem;
}

.nf-changelog-action-created { color: #059669; }
.nf-changelog-action-updated { color: var(--accent-orange); }
.nf-changelog-action-deleted { color: #dc2626; }

.nf-changelog-by {
  color: #334155;
  font-weight: 500;
}

.nf-changelog-date {
  color: #94a3b8;
  margin-left: auto;
  font-size: 0.78rem;
}

.nf-changelog-fields {
  margin-top: 0.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.nf-changelog-field-chip {
  background: #e0e7ff;
  color: #3730a3;
  font-size: 0.75rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
}

/* ── Notification status (admin card panel) ──────────────────────────── */
.nf-notif-status-wrap {
  margin-top: 0.5rem;
}

.nf-notif-status-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  color: #64748b;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.15s, color 0.15s;
}

.nf-notif-status-btn:hover {
  background: #f1f5f9;
  color: #334155;
}

.nf-notif-status-panel {
  margin-top: 0.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nf-notif-loading,
.nf-notif-empty {
  font-size: 0.85rem;
  color: #94a3b8;
  text-align: center;
  padding: 0.5rem 0;
  margin: 0;
}

.nf-notif-entry {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.nf-notif-entry-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.82rem;
}

.nf-notif-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.nf-notif-badge-created { background: #d1fae5; color: #065f46; }
.nf-notif-badge-updated { background: #dbeafe; color: #1e40af; }

.nf-notif-date {
  color: #94a3b8;
  font-size: 0.78rem;
}

.nf-notif-by {
  color: #64748b;
  font-size: 0.8rem;
  margin-left: auto;
}

.nf-notif-message {
  font-size: 0.85rem;
  color: #475569;
  font-style: italic;
  margin: 0;
}

.nf-notif-progress {
  display: flex;
  gap: 1rem;
  font-size: 0.82rem;
  font-weight: 500;
}

.nf-notif-confirmed { color: #059669; }
.nf-notif-pending   { color: #d97706; }

.nf-notif-user-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
}

.nf-notif-user-label {
  color: #64748b;
  font-weight: 500;
  margin-right: 0.25rem;
}

.nf-notif-user-chip {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
}

.nf-notif-chip-confirmed {
  background: #d1fae5;
  color: #065f46;
}

.nf-notif-chip-pending {
  background: #fef3c7;
  color: #92400e;
}

/* ── Pending notifications banner ────────────────────────────────────── */
.nf-notif-banner {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 0.875rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nf-notif-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.nf-notif-banner-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #92400e;
}

.nf-notif-banner-dismiss-all {
  background: none;
  border: 1px solid #fcd34d;
  border-radius: 6px;
  color: #92400e;
  font-size: 0.78rem;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  transition: background 0.15s;
}

.nf-notif-banner-dismiss-all:hover {
  background: #fde68a;
}

.nf-notif-banner-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid #fde68a;
  border-radius: 7px;
  padding: 0.5rem 0.75rem;
}

.nf-notif-banner-item-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #1e293b;
}

.nf-notif-banner-customer {
  color: #64748b;
  font-size: 0.82rem;
}

.nf-notif-banner-by {
  color: #64748b;
  font-size: 0.82rem;
}

.nf-notif-banner-msg {
  color: #475569;
  font-style: italic;
  font-size: 0.82rem;
}

.nf-notif-banner-confirm {
  flex-shrink: 0;
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.nf-notif-banner-confirm:hover {
  background: #059669;
}

/* ── Search bar ──────────────────────────────────────────────────────── */
.nf-search-bar {
  margin-bottom: 1.5rem;
}

.nf-search-input-wrap {
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.6rem 1rem;
  gap: 0.65rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.nf-search-input-wrap:focus-within {
  border-color: var(--accent-orange);
  box-shadow: 0 4px 16px rgba(200,122,0,0.15);
}

.nf-search-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  opacity: 0.7;
}

.nf-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: inherit;
  color: #1e293b;
  background: transparent;
  min-width: 0;
}

.nf-search-input::placeholder {
  color: #94a3b8;
}

.nf-search-clear {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  padding: 0 0.25rem;
  flex-shrink: 0;
  transition: color 0.2s;
}

.nf-search-clear:hover {
  color: #ef4444;
}

/* Search results */
.nf-search-results {
  animation: nf-fade-in 0.2s ease;
}

@keyframes nf-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nf-search-count {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
}

.nf-search-hint {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 0.5rem;
  font-style: italic;
}

.nf-feed-card-search {
  border-left: 3px solid var(--accent-orange);
}

.nf-search-content-preview {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0.35rem 0 0.5rem;
  font-style: italic;
  line-height: 1.5;
}

.nf-search-result-nav {
  margin-top: 0.5rem;
}

/* ── Comments ──────────────────────────────────────────────────────────────── */
.nf-comments-wrap {
  margin-top: 0.75rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
  padding-top: 0.5rem;
}

.nf-comments-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  color: #64748b;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.15s, color 0.15s;
}
.nf-comments-btn:hover {
  background: #f1f5f9;
  color: #334155;
}

.nf-comments-count {
  background: #3b82f6;
  color: #fff;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0 6px;
  min-width: 18px;
  text-align: center;
  line-height: 1.5;
}

.nf-comments-panel {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nf-comments-loading,
.nf-comments-empty {
  font-size: 0.85rem;
  color: #94a3b8;
  padding: 0.4rem 0.25rem;
}

.nf-comments-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nf-comment-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.nf-comment-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.nf-comment-body {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
}

.nf-comment-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
  flex-wrap: wrap;
}

.nf-comment-author {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

.nf-comment-date {
  font-size: 0.75rem;
  color: #94a3b8;
}

.nf-comment-delete {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  color: #94a3b8;
  padding: 0;
  margin-left: auto;
  line-height: 1;
  transition: color 0.15s;
}
.nf-comment-delete:hover {
  color: #ef4444;
}

.nf-comment-text {
  font-size: 0.88rem;
  color: #475569;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

.nf-comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.nf-comment-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
  color: #334155;
  resize: vertical;
  box-sizing: border-box;
  background: #fff;
  transition: border-color 0.15s;
  font-family: inherit;
}
.nf-comment-input:focus {
  outline: none;
  border-color: #3b82f6;
}

.nf-comment-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.nf-comment-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  font-style: italic;
}

/* ── Overlay & Modal ────────────────────────────────────────────────────── */
.ehc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 1rem;
}

.ehc-modal {
  background: var(--bg-primary, #1a1a2e);
  border: 1px solid var(--border-color, #2d2d4e);
  border-radius: 12px;
  width: 100%;
  max-width: 700px;
  height: min(85vh, 750px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.ehc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary, #16213e);
  border-bottom: 1px solid var(--border-color, #2d2d4e);
  flex-shrink: 0;
}

.ehc-header-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.ehc-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary, #e0e0e0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 500px;
}

.ehc-participants {
  font-size: 0.75rem;
  color: var(--text-secondary, #8888aa);
  margin: 0;
}

.ehc-close {
  background: none;
  border: none;
  color: var(--text-secondary, #8888aa);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  flex-shrink: 0;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}

.ehc-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary, #e0e0e0);
}

/* ── Message list ────────────────────────────────────────────────────────── */
.ehc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  scroll-behavior: smooth;
}

.ehc-loading,
.ehc-empty {
  text-align: center;
  color: var(--text-secondary, #8888aa);
  font-size: 0.875rem;
  margin: auto;
}

/* Date separator */
.ehc-date-sep {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary, #8888aa);
  font-size: 0.72rem;
  margin: 0.75rem 0 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ehc-date-sep::before,
.ehc-date-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color, #2d2d4e);
}

/* ── Message bubble ──────────────────────────────────────────────────────── */
.ehc-msg {
  display: flex;
  flex-direction: column;
  max-width: 75%;
  gap: 0.15rem;
}

.ehc-msg--own {
  align-self: flex-end;
  align-items: flex-end;
}

.ehc-msg--other {
  align-self: flex-start;
  align-items: flex-start;
}

.ehc-msg-sender {
  font-size: 0.7rem;
  color: var(--text-secondary, #8888aa);
  padding: 0 0.4rem;
}

.ehc-msg-bubble {
  background: var(--bg-secondary, #16213e);
  border: 1px solid var(--border-color, #2d2d4e);
  border-radius: 12px;
  padding: 0.55rem 0.8rem;
  position: relative;
  min-width: 60px;
}

.ehc-msg--own .ehc-msg-bubble {
  background: var(--accent-color, #4a6cf7);
  border-color: var(--accent-color, #4a6cf7);
  border-bottom-right-radius: 4px;
}

.ehc-msg--other .ehc-msg-bubble {
  border-bottom-left-radius: 4px;
}

.ehc-msg--pending .ehc-msg-bubble {
  opacity: 0.7;
}

.ehc-msg-text {
  margin: 0 0 0.3rem;
  font-size: 0.875rem;
  color: var(--text-primary, #e0e0e0);
  white-space: pre-wrap;
  word-break: break-word;
}

.ehc-msg-time {
  display: block;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.45);
  text-align: right;
  margin-top: 0.15rem;
}

.ehc-read-receipt {
  font-size: 0.65rem;
  margin-left: 0.2rem;
}
.ehc-read-receipt--sending { color: rgba(255, 255, 255, 0.3); }
.ehc-read-receipt--sent    { color: rgba(255, 255, 255, 0.45); }
.ehc-read-receipt--read    { color: #60a5fa; }

/* ── Image message ───────────────────────────────────────────────────────── */
.ehc-msg-image-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.ehc-msg-image {
  max-width: 280px;
  max-height: 200px;
  border-radius: 8px;
  cursor: zoom-in;
  object-fit: cover;
  display: block;
}

.ehc-msg-caption {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-primary, #e0e0e0);
}

/* ── File message ────────────────────────────────────────────────────────── */
.ehc-msg-file {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary, #e0e0e0);
  padding: 0.1rem 0;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font: inherit;
}

.ehc-msg-file-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.ehc-msg-file-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.ehc-msg-file-name {
  font-size: 0.85rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}

.ehc-msg-file-size {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
}

.ehc-msg-file-dl {
  font-size: 0.9rem;
  margin-left: auto;
  opacity: 0.7;
}

/* ── Link messages (doc/part) ────────────────────────────────────────────── */
.ehc-msg-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  background: rgba(255, 255, 255, 0.07);
}

.ehc-msg-link-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.ehc-msg-link-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.ehc-msg-link-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.5);
}

.ehc-msg-link-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary, #e0e0e0);
  word-break: break-word;
}

.ehc-msg-link-meta {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
}

.ehc-msg-link--part {
  cursor: default;
}

.ehc-msg-link--clickable {
  cursor: pointer;
  transition: background 0.15s;
}
.ehc-msg-link--clickable:hover {
  background: rgba(255, 255, 255, 0.13);
}
.ehc-msg-link-arrow {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 0.85rem;
  opacity: 0.55;
}

.ehc-part-cart-btn {
  flex-shrink: 0;
  margin-left: auto;
  background: rgba(96, 165, 250, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.4);
  color: #93c5fd;
  border-radius: 7px;
  padding: 0.3rem 0.55rem;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.ehc-part-cart-btn:hover:not(:disabled) {
  background: rgba(96, 165, 250, 0.28);
  color: #bfdbfe;
}
.ehc-part-cart-btn--added {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
  color: #4ade80;
  cursor: default;
}

/* ── Search overlay ──────────────────────────────────────────────────────── */
.ehc-search-overlay {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  max-height: 240px;
  background: var(--bg-secondary, #16213e);
  border-top: 1px solid var(--border-color, #2d2d4e);
  border-bottom: 1px solid var(--border-color, #2d2d4e);
}

.ehc-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary, #8888aa);
}

.ehc-search-close {
  background: none;
  border: none;
  color: var(--text-secondary, #8888aa);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.ehc-search-input {
  margin: 0 0.75rem 0.5rem;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border-color, #2d2d4e);
  background: var(--bg-primary, #1a1a2e);
  color: var(--text-primary, #e0e0e0);
  font-size: 0.875rem;
  outline: none;
}

.ehc-search-input:focus {
  border-color: var(--accent-color, #4a6cf7);
}

.ehc-search-results {
  overflow-y: auto;
  flex: 1;
  padding: 0 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ehc-search-hint {
  font-size: 0.78rem;
  color: var(--text-secondary, #8888aa);
  text-align: center;
  padding: 0.4rem 0;
}

.ehc-search-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  width: 100%;
}

.ehc-search-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-color, #2d2d4e);
}

.ehc-search-item-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.ehc-search-item-name {
  font-size: 0.85rem;
  color: var(--text-primary, #e0e0e0);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.ehc-search-item-sub {
  font-size: 0.72rem;
  color: var(--text-secondary, #8888aa);
  flex-shrink: 0;
}

/* ── Input bar ───────────────────────────────────────────────────────────── */
.ehc-input-bar {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary, #16213e);
  border-top: 1px solid var(--border-color, #2d2d4e);
  flex-shrink: 0;
}

.ehc-input {
  flex: 1;
  background: var(--bg-primary, #1a1a2e);
  border: 1px solid var(--border-color, #2d2d4e);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  color: var(--text-primary, #e0e0e0);
  font-size: 0.875rem;
  resize: none;
  outline: none;
  line-height: 1.45;
  min-height: 42px;
  max-height: 120px;
  overflow-y: auto;
  transition: border-color 0.15s;
}

.ehc-input:focus {
  border-color: var(--accent-color, #4a6cf7);
}

.ehc-input:disabled {
  opacity: 0.6;
}

.ehc-input-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.ehc-btn-icon {
  background: none;
  border: 1px solid var(--border-color, #2d2d4e);
  border-radius: 8px;
  color: var(--text-secondary, #8888aa);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.4rem 0.5rem;
  line-height: 1;
  transition: background 0.12s, color 0.12s;
}

.ehc-btn-icon:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary, #e0e0e0);
}

.ehc-btn-icon:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ehc-btn-send {
  background: var(--accent-color, #4a6cf7);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.45rem 0.75rem;
  line-height: 1;
  transition: opacity 0.12s, transform 0.1s;
}

.ehc-btn-send:hover:not(:disabled) {
  opacity: 0.88;
}

.ehc-btn-send:active:not(:disabled) {
  transform: scale(0.95);
}

.ehc-btn-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ehc-file-input {
  display: none;
}

/* ── Lightbox ────────────────────────────────────────────────────────────── */
.ehc-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  cursor: zoom-out;
  padding: 1rem;
}

.ehc-lightbox-img {
  max-width: 96vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.ehc-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  font-size: 1.1rem;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.ehc-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

/* Tablet */
@media (max-width: 768px) {
  .ehc-modal {
    max-width: 100%;
    height: min(92dvh, 750px);
  }

  .ehc-title {
    max-width: calc(100vw - 120px);
  }

  .ehc-msg {
    max-width: 84%;
  }
}

/* Mobile – full-screen modal */
@media (max-width: 600px) {
  .ehc-overlay {
    padding: 0;
    align-items: stretch;
  }

  .ehc-modal {
    width: 100%;
    max-width: 100%;
    /* 100dvh shrinks when the soft keyboard appears, keeping the input visible */
    height: 100dvh;
    border-radius: 0;
    border: none;
  }

  /* Respect iOS status bar / notch */
  .ehc-header {
    padding: 0.75rem 1rem;
    padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
  }

  .ehc-title {
    font-size: 0.9rem;
    max-width: calc(100vw - 72px);
  }

  .ehc-participants {
    font-size: 0.68rem;
  }

  .ehc-messages {
    padding: 0.75rem;
  }

  .ehc-msg {
    max-width: 90%;
  }

  .ehc-msg-image {
    max-width: min(200px, 60vw);
    max-height: 160px;
  }

  .ehc-msg-file-name {
    max-width: min(140px, 38vw);
  }

  /* Respect iOS home-bar / bottom notch */
  .ehc-input-bar {
    padding: 0.6rem 0.75rem;
    padding-bottom: calc(0.6rem + env(safe-area-inset-bottom, 0px));
    gap: 0.35rem;
  }

  /* ≥ 16 px prevents iOS from auto-zooming on focus */
  .ehc-input {
    font-size: 1rem;
    min-height: 40px;
  }

  /* Larger tap targets */
  .ehc-btn-icon {
    padding: 0.5rem;
    font-size: 1.05rem;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ehc-btn-send {
    padding: 0.5rem 0.9rem;
    min-width: 44px;
    min-height: 40px;
    font-size: 1rem;
  }

  .ehc-close {
    padding: 0.4rem 0.6rem;
    font-size: 1.2rem;
  }

  .ehc-search-overlay {
    max-height: 50dvh;
  }

  /* Prevent iOS zoom in search input */
  .ehc-search-input {
    font-size: 1rem;
    margin: 0 0.5rem 0.5rem;
  }

  .ehc-lightbox {
    padding: 0.5rem;
    padding-bottom: env(safe-area-inset-bottom, 0.5rem);
  }

  .ehc-lightbox-close {
    top: calc(0.75rem + env(safe-area-inset-top, 0px));
    right: 1rem;
  }
}\n\n/* ── Geschlossener / archivierter Fall ── */\n.ehc-closed-banner {\n  background: rgba(99, 102, 241, 0.1);\n  border: 1px solid rgba(99, 102, 241, 0.3);\n  border-radius: 7px;\n  padding: 0.45rem 0.85rem;\n  font-size: 0.8rem;\n  font-weight: 600;\n  color: #818cf8;\n  margin-top: 0.4rem;\n  width: 100%;\n  box-sizing: border-box;\n}
/* ── Overlay & Modal ────────────────────────────────────────────────────── */
.ecm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 1rem;
}

.ecm-modal {
  background: var(--bg-primary, #1a1a2e);
  border: 1px solid var(--border-color, #2d2d4e);
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.ecm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary, #16213e);
  border-bottom: 1px solid var(--border-color, #2d2d4e);
}

.ecm-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary, #e0e0e0);
}

.ecm-close {
  background: none;
  border: none;
  color: var(--text-secondary, #8888aa);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}

.ecm-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary, #e0e0e0);
}

/* ── Body ────────────────────────────────────────────────────────────────── */
.ecm-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.ecm-desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary, #8888aa);
  line-height: 1.5;
}

/* ── Tabs ────────────────────────────────────────────────────────────────── */
.ecm-tabs {
  display: flex;
  gap: 0.4rem;
  background: var(--bg-secondary, #16213e);
  border-radius: 8px;
  padding: 0.25rem;
}

.ecm-tab {
  flex: 1;
  padding: 0.45rem 0.75rem;
  background: none;
  border: none;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary, #8888aa);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.ecm-tab--active {
  background: var(--accent-color, #4a6cf7);
  color: #fff;
}

.ecm-tab:not(.ecm-tab--active):hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary, #e0e0e0);
}

/* ── Textarea ────────────────────────────────────────────────────────────── */
.ecm-textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-secondary, #16213e);
  border: 1px solid var(--border-color, #2d2d4e);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  color: var(--text-primary, #e0e0e0);
  font-size: 0.875rem;
  resize: vertical;
  outline: none;
  line-height: 1.5;
  min-height: 120px;
  transition: border-color 0.15s;
}

.ecm-textarea:focus {
  border-color: var(--accent-color, #4a6cf7);
}

/* ── Message list ────────────────────────────────────────────────────────── */
.ecm-msg-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--border-color, #2d2d4e);
  border-radius: 8px;
  padding: 0.4rem;
  background: var(--bg-secondary, #16213e);
}

.ecm-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-secondary, #8888aa);
  padding: 0.6rem 0;
}

.ecm-msg-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  width: 100%;
}

.ecm-msg-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color, #2d2d4e);
}

.ecm-msg-item--selected {
  background: rgba(74, 108, 247, 0.15);
  border-color: var(--accent-color, #4a6cf7) !important;
}

.ecm-msg-sender {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-color, #4a6cf7);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ecm-msg-content {
  font-size: 0.85rem;
  color: var(--text-primary, #e0e0e0);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 60px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.ecm-msg-time {
  font-size: 0.68rem;
  color: var(--text-secondary, #8888aa);
}

/* ── Error ───────────────────────────────────────────────────────────────── */
.ecm-error {
  margin: 0;
  font-size: 0.82rem;
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.ecm-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary, #16213e);
  border-top: 1px solid var(--border-color, #2d2d4e);
}

.ecm-btn-cancel {
  padding: 0.5rem 1.1rem;
  background: none;
  border: 1px solid var(--border-color, #2d2d4e);
  border-radius: 8px;
  color: var(--text-secondary, #8888aa);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.15s;
}

.ecm-btn-cancel:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
}

.ecm-btn-submit {
  padding: 0.5rem 1.3rem;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  color: #fff;
}

.ecm-btn-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ecm-btn-submit--resolve {
  background: #22c55e;
}

.ecm-btn-submit--resolve:hover:not(:disabled) {
  opacity: 0.88;
}

.ecm-btn-submit--cancel {
  background: #ef4444;
}

.ecm-btn-submit--cancel:hover:not(:disabled) {
  opacity: 0.88;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 540px) {
  .ecm-modal {
    max-width: 100%;
    border-radius: 0;
  }
  .ecm-overlay {
    padding: 0;
    align-items: flex-end;
  }
}
/* ====================================================================
   Easyhelp Page – Styles
   ==================================================================== */

.easyhelp-page {
  min-height: calc(100vh - 80px);
  background: var(--bg-light);
}

/* ── Hero ── */
.eh-hero {
  background: linear-gradient(135deg, #1a3550 0%, var(--primary-dark) 60%, #0d1f30 100%);
  padding: 2rem 1.5rem 2.25rem;
  position: relative;
  overflow: hidden;
}

.eh-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: rgba(200, 122, 0, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.eh-hero-deco {
  position: absolute;
  bottom: -40px;
  left: 8%;
  width: 140px;
  height: 140px;
  background: rgba(200, 122, 0, 0.07);
  border-radius: 50%;
  pointer-events: none;
}

.eh-hero-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.eh-hero-title {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.eh-hero-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.eh-hero-h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  margin: 0 0 0.2rem;
  line-height: 1.1;
}

.eh-hero-sub {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  margin: 0;
}

/* ── Content ── */
.eh-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── Buttons ── */
.eh-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-orange);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.eh-btn-primary:hover:not(:disabled) { background: #a36200; }
.eh-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.eh-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #f1f5f9;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.eh-btn-secondary:hover:not(:disabled) { background: #e2e8f0; }
.eh-btn-secondary:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Form card ── */
.eh-form-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  padding: 1.75rem;
}

.eh-form-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 1.5rem;
}

.eh-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.eh-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.eh-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
}

.eh-required {
  color: #ef4444;
  margin-left: 2px;
}

.eh-select {
  width: 100%;
  padding: 0.65rem 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #1e293b;
  background: #fff;
  transition: border-color 0.15s;
  appearance: auto;
}
.eh-select:focus { outline: none; border-color: var(--accent-orange); box-shadow: 0 0 0 2px rgba(200,122,0,0.15); }
.eh-select:disabled { background: #f8fafc; color: #94a3b8; }

.eh-loading-inline {
  color: #64748b;
  font-size: 0.9rem;
  padding: 0.5rem 0;
}

/* ── Type buttons ── */
.eh-type-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.eh-type-btn {
  padding: 0.55rem 1.1rem;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.eh-type-btn:hover:not(:disabled) { border-color: var(--accent-orange); background: var(--orange-light); color: var(--accent-orange); }
.eh-type-btn.selected { border-color: var(--accent-orange); background: var(--accent-orange); color: white; }
.eh-type-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Eichgesetz box ── */
.eh-eichgesetz-box {
  background: #fefce8;
  border: 1px solid #fde047;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.eh-eichgesetz-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.eh-eichgesetz-icon { font-size: 1.2rem; }

.eh-eichgesetz-title {
  font-size: 1rem;
  font-weight: 700;
  color: #92400e;
}

.eh-eichgesetz-desc {
  font-size: 0.9rem;
  color: #78350f;
  margin: 0;
}

.eh-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.eh-radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: #1e293b;
}
.eh-radio-label input[type="radio"] { accent-color: #d97706; width: 1rem; height: 1rem; cursor: pointer; }

/* ── Textarea ── */
.eh-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #1e293b;
  resize: vertical;
  min-height: 120px;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.eh-textarea:focus { outline: none; border-color: var(--accent-orange); box-shadow: 0 0 0 2px rgba(200,122,0,0.15); }
.eh-textarea:disabled { background: #f8fafc; }

.eh-char-hint {
  font-size: 0.8rem;
  color: #94a3b8;
  text-align: right;
}
.eh-char-hint.hint-warn { color: #ef4444; }

/* ── Form actions ── */
.eh-form-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
}

/* ── Cases section ── */
.eh-cases-section { }

.eh-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.eh-count-badge {
  background: #e2e8f0;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
}

/* ── Loading / empty ── */
.eh-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 3rem 1rem;
  color: #64748b;
}

.eh-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-orange);
  border-radius: 50%;
  animation: eh-spin 0.7s linear infinite;
}
@keyframes eh-spin { to { transform: rotate(360deg); } }

.eh-empty {
  background: #fff;
  border-radius: 12px;
  padding: 3rem 1.5rem;
  text-align: center;
  color: #64748b;
}
.eh-empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.eh-empty h3 { margin: 0 0 0.5rem; color: #374151; font-size: 1.05rem; }
.eh-empty p { margin: 0; font-size: 0.9rem; }

/* ── Cases grid ── */
.eh-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

/* ── Case card ── */
.eh-case-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  border-left: 4px solid #d1d5db;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.eh-case-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

.status-border-open { border-left-color: #f59e0b; }
.status-border-in-progress { border-left-color: #2563eb; }
.status-border-closed { border-left-color: #22c55e; }

/* Phase-basierte Kartenfarben */
.eh-phase-waiting { border-left-color: #f59e0b; }
.eh-phase-escalated { border-left-color: #ef4444; }
.eh-phase-locked { border-left-color: #2563eb; }
.eh-phase-closed { border-left-color: #22c55e; }

.eh-case-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem 0.5rem;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.eh-case-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.eh-case-id {
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
}

.eh-status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}
.status-open { background: #fef3c7; color: #92400e; }
.status-inprogress { background: #dbeafe; color: #1e40af; }
.status-closed { background: #dcfce7; color: #166534; }

.eh-eich-badge {
  font-size: 0.75rem;
  font-weight: 600;
  background: #fef9c3;
  color: #854d0e;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #fde047;
}

.eh-case-type-badge {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}

.eh-case-body {
  padding: 0.5rem 1rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.eh-case-row {
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.eh-case-label {
  color: #94a3b8;
  font-weight: 500;
  min-width: 52px;
}

.eh-case-value {
  color: #1e293b;
  font-weight: 500;
}

.eh-case-desc {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.5;
  margin-top: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.eh-case-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
  font-size: 0.8rem;
  color: #94a3b8;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.eh-case-author { font-weight: 500; color: #64748b; }
.eh-case-date { white-space: nowrap; }

/* Eskalierungs-Badge */
.eh-escalated-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: #fee2e2;
  color: #991b1b;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #fca5a5;
}

/* Lock / Wartestatus Info */
.eh-lock-info {
  margin-top: 6px;
  padding: 8px 12px;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 8px;
  font-size: 0.85rem;
  border-left: 3px solid #2563eb;
}
.eh-lock-mine {
  background: #dcfce7;
  color: #166534;
  border-left-color: #22c55e;
}
.eh-waiting-info {
  margin-top: 6px;
  padding: 8px 12px;
  background: #fef9c3;
  color: #854d0e;
  border-radius: 8px;
  font-size: 0.85rem;
  border-left: 3px solid #f59e0b;
}

/* Fall-Aktionsbuttons */
.eh-case-actions {
  padding: 0.6rem 1rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.eh-btn-lock {
  flex: 1;
  padding: 0.55rem 1rem;
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.eh-btn-lock:hover:not(:disabled) { background: #dc2626; }
.eh-btn-lock:disabled { opacity: 0.6; cursor: not-allowed; }

.eh-btn-unlock {
  padding: 0.55rem 1rem;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.eh-btn-unlock:hover:not(:disabled) { background: #e2e8f0; }
.eh-btn-unlock:disabled { opacity: 0.6; cursor: not-allowed; }

.eh-btn-chat {
  padding: 0.55rem 1rem;
  background: var(--primary-dark);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.eh-btn-chat:hover { opacity: 0.88; }
.eh-btn-chat:active { transform: scale(0.97); }

.eh-btn-resolve {
  padding: 0.55rem 1rem;
  background: #22c55e;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.eh-btn-resolve:hover { opacity: 0.88; }

.eh-btn-abort {
  padding: 0.55rem 1rem;
  background: none;
  color: #ef4444;
  border: 1px solid #ef4444;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.eh-btn-abort:hover { background: #ef4444; color: #fff; }

.eh-solution-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  margin-top: 0.25rem;
}

.eh-solution-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #22c55e;
}

.eh-solution-text {
  font-size: 0.85rem;
  color: var(--text-primary, #e0e0e0);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .eh-header { padding: 1rem; }
  .eh-content { padding: 1rem; }
  .eh-form-card { padding: 1.25rem; }
  .eh-cases-grid { grid-template-columns: 1fr; }
  .eh-type-grid { gap: 0.4rem; }
  .eh-type-btn { font-size: 0.85rem; padding: 0.5rem 0.8rem; }
}

/* ── Slow-connection warning ── */
.eh-slow-warning {
  background: rgba(217, 119, 6, 0.12);
  border: 1px solid rgba(217, 119, 6, 0.5);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
}

.eh-slow-warning-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: #f59e0b;
}

.eh-slow-warning-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.eh-slow-warning-text {
  font-size: 0.875rem;
  color: var(--text-secondary, #b0b0b0);
  margin: 0.25rem 0;
  line-height: 1.45;
}

.eh-phone-link {
  color: #60a5fa;
  text-decoration: underline;
  font-weight: 600;
}

.eh-slow-warning-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.85rem;
  flex-wrap: wrap;
}

.eh-slow-btn-proceed {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
  border-radius: 7px;
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.eh-slow-btn-proceed:hover { background: rgba(34, 197, 94, 0.25); }

.eh-slow-btn-cancel {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  border-radius: 7px;
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.eh-slow-btn-cancel:hover { background: rgba(239, 68, 68, 0.2); }

/* ── Suche ── */
.eh-search-bar {
  position: relative;
  margin-bottom: 1.5rem;
}

.eh-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card, #1a1a2e);
  border: 1px solid var(--border-color, rgba(255,255,255,0.1));
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  transition: border-color 0.15s;
}
.eh-search-input-wrap:focus-within {
  border-color: var(--accent-orange);
}

.eh-search-icon {
  font-size: 0.9rem;
  opacity: 0.55;
  flex-shrink: 0;
}

.eh-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary, #e0e0e0);
  font-size: 0.925rem;
  min-width: 0;
}
.eh-search-input::placeholder { color: var(--text-secondary, #888); }

.eh-search-clear {
  background: none;
  border: none;
  color: var(--text-secondary, #888);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.1rem 0.2rem;
  border-radius: 4px;
  flex-shrink: 0;
  line-height: 1;
  transition: color 0.15s;
}
.eh-search-clear:hover { color: var(--text-primary, #e0e0e0); }

.eh-search-results {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  background: var(--bg-card, #1a1a2e);
  border: 1px solid var(--border-color, rgba(255,255,255,0.15));
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  max-height: 420px;
  overflow-y: auto;
  z-index: 200;
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.eh-search-hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary, #888);
  padding: 0.75rem;
}

.eh-search-result-card {
  padding: 0.65rem 0.8rem;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.12s;
  border: 1px solid transparent;
}
.eh-search-result-card:hover,
.eh-search-result-card:focus {
  background: rgba(200, 122, 0, 0.1);
  border-color: rgba(200, 122, 0, 0.3);
  outline: none;
}

.eh-search-result-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-secondary, #999);
}

.eh-search-match-type {
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.eh-search-match-type.ticket {
  background: rgba(200, 122, 0, 0.18);
  color: var(--accent-orange);
}
.eh-search-match-type.message {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.eh-search-result-preview {
  font-size: 0.82rem;
  color: var(--text-primary, #ccc);
  margin-top: 0.3rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  opacity: 0.85;
}

/* ── Archiv ── */
.eh-archive-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 0.25rem 0;
  user-select: none;
  border-radius: 6px;
  transition: background 0.12s;
}
.eh-archive-header:hover { background: rgba(255,255,255,0.04); }
.eh-archive-header:focus { outline: 2px solid var(--accent-orange); }

.eh-archive-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.eh-archive-toggle {
  font-size: 0.8rem;
  color: var(--text-secondary, #888);
  padding: 0 0.4rem;
}

/* ── Chatverlauf-Button ── */
.eh-btn-history {
  flex: 1;
  padding: 0.5rem 1rem;
  background: rgba(200, 122, 0, 0.1);
  border: 1px solid rgba(200, 122, 0, 0.3);
  border-radius: 8px;
  color: var(--accent-orange);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.eh-btn-history:hover { background: rgba(200, 122, 0, 0.2); }
/* ====================================================================
   Easyhelp Leaderboard Page – Styles
   ==================================================================== */

.eh-lb-page {
  min-height: calc(100vh - 80px);
  background: var(--bg-light);
}

/* ── Hero ── */
.eh-lb-hero {
  background: linear-gradient(135deg, #1a3550 0%, var(--primary-dark) 60%, #0d1f30 100%);
  padding: 2rem 1.5rem 2.25rem;
  position: relative;
  overflow: hidden;
}

.eh-lb-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: rgba(200, 122, 0, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.eh-lb-hero-deco {
  position: absolute;
  bottom: -40px;
  left: 8%;
  width: 140px;
  height: 140px;
  background: rgba(200, 122, 0, 0.07);
  border-radius: 50%;
  pointer-events: none;
}

.eh-lb-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.eh-lb-title {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.eh-lb-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.eh-lb-title h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  margin: 0 0 0.2rem;
  line-height: 1.1;
}

.eh-lb-subtitle {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  margin: 0;
}

/* ── Refresh Button ── */
.eh-lb-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 0.6rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.eh-lb-btn-secondary:hover:not(:disabled) { background: rgba(255, 255, 255, 0.22); }
.eh-lb-btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Content ── */
.eh-lb-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 1.5rem;
}

.eh-lb-loading,
.eh-lb-empty {
  text-align: center;
  color: var(--text-gray);
  padding: 3rem 0;
  font-size: 1rem;
}

/* ── List ── */
.eh-lb-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

/* ── Row ── */
.eh-lb-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.875rem 1.25rem;
  transition: box-shadow 0.15s;
}
.eh-lb-row:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.07); }

/* Top 3 highlights */
.eh-lb-row--top1 { border-color: #fbbf24; background: #fffbeb; }
.eh-lb-row--top2 { border-color: #94a3b8; background: #f8fafc; }
.eh-lb-row--top3 { border-color: var(--accent-orange); background: #fff7ed; }

/* ── Rank ── */
.eh-lb-rank {
  min-width: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eh-lb-medal {
  font-size: 1.6rem;
  line-height: 1;
}

.eh-lb-rank-num {
  font-size: 1rem;
  font-weight: 700;
  color: #94a3b8;
  min-width: 1.5rem;
  text-align: center;
}

/* ── Avatar ── */
.eh-lb-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--primary-dark);
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.eh-lb-row--top1 .eh-lb-avatar { background: #d97706; }
.eh-lb-row--top2 .eh-lb-avatar { background: #64748b; }
.eh-lb-row--top3 .eh-lb-avatar { background: #b45309; }

/* ── Info ── */
.eh-lb-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.eh-lb-name {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eh-lb-role {
  font-size: 0.8rem;
  color: var(--text-gray);
}

/* ── Points ── */
.eh-lb-points {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.05rem;
  flex-shrink: 0;
}

.eh-lb-points-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-orange);
  line-height: 1;
}

.eh-lb-row--top1 .eh-lb-points-value { color: #d97706; }
.eh-lb-row--top2 .eh-lb-points-value { color: #64748b; }
.eh-lb-row--top3 .eh-lb-points-value { color: #b45309; }

.eh-lb-points-label {
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .eh-lb-hero-content { flex-direction: column; align-items: flex-start; }
  .eh-lb-row { padding: 0.75rem 1rem; gap: 0.75rem; }
  .eh-lb-name { font-size: 0.9rem; }
  .eh-lb-points-value { font-size: 1.1rem; }
  .eh-lb-adj-input { width: 2.5rem; }
}

/* ── Admin point controls ── */
.eh-lb-adjust {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.eh-lb-adj-input {
  width: 3rem;
  text-align: center;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.3rem 0.25rem;
  font-size: 0.9rem;
  color: #1e293b;
}
.eh-lb-adj-input:focus { outline: none; border-color: var(--accent-orange); }

.eh-lb-adj-btn {
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-light);
  color: #374151;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  padding: 0;
}
.eh-lb-adj-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.eh-lb-adj-btn--plus:hover:not(:disabled) { background: #dcfce7; border-color: #16a34a; color: #15803d; }
.eh-lb-adj-btn--minus:hover:not(:disabled) { background: #fee2e2; border-color: #dc2626; color: #b91c1c; }

.eh-lb-adj-input {
  width: 3rem;
  text-align: center;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.25rem 0.25rem;
  font-size: 0.875rem;
  color: #1e293b;
  background: #fff;
}
.eh-lb-adj-input:disabled { background: #f8fafc; color: #94a3b8; }
.eh-lb-adj-input::-webkit-inner-spin-button,
.eh-lb-adj-input::-webkit-outer-spin-button { opacity: 1; }
:root {
  /* CI-Farben */
  --primary-dark: #122941;
  --accent-orange: #C87A00;
  --bg-light: #F1F3F4;
  --bg-accent: #F0F7FD;
  --text-dark: #000;
  --text-gray: #52647C;
  
  /* Kompatibilität - Alias für bestehenden Code */
  --primary: #122941;
  --secondary: #52647C;
  --bg-light-blue: #F0F7FD;
  --text: #52647C;
  --link: #C87A00;
  --link-hover: #122941;
  
  /* Zusätzliche Farben */
  --success-color: #28a745;
  --success-dark: #2e7d32;
  --success-light: #e8f5e9;
  --error-color: #dc3545;
  --error-dark: #c62828;
  --error-light: #ffebee;
  --warning-color: #ffc107;
  --warning-dark: #856404;
  --warning-light: #fff3cd;
  --surface: #ffffff;
  --border-color: #e0e0e0;
  --border-light: #f0f0f0;
  --text-light: #666;
  --text-lighter: #999;
  
  /* UI Colors */
  --purple: #667eea;
  --purple-dark: #764ba2;
  --blue: #1976d2;
  --blue-light: #e3f2fd;
  --orange: #f57c00;
  --orange-light: #fff3e0;
  --purple-badge: #7b1fa2;
  --purple-light: #f3e5f5;
  --green: #4caf50;
  --green-dark: #388e3c;
  --red: #ff5252;
  --red-dark: #f44336;
  --pink: #f093fb;
  --pink-dark: #f5576c;
  --indigo: #4f46e5;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-light);
  color: var(--text);
}

code {
  font-family: 'Courier New', Courier, monospace;
  background-color: var(--border-light);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
}

#root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
