/* ============================================================
   HMC CAFM — Components CSS  (Modernized 2026)
   Hamburg Messe und Congress GmbH
   Brand: Black/Charcoal primary, Navy accent — NO RED
   ============================================================ */

/* ============================================================
   TREE VIEW — cleaner, white panel, modern hover
   ============================================================ */
.hmc-tree {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
}

.hmc-tree ul {
  list-style: none;
  padding-left: 20px;
  margin: 0;
  position: relative;
}

.hmc-tree ul::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #E2E8F0;
}

.hmc-tree-node {
  position: relative;
}

.hmc-tree-node > .hmc-tree-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: #334155;
  transition: background 0.12s ease, color 0.12s ease;
  user-select: none;
}

.hmc-tree-node > .hmc-tree-row:hover {
  background-color: #F8FAFC;
  color: #0F172A;
}

.hmc-tree-node > .hmc-tree-row.active {
  background-color: #EFF4FA;
  color: #1E3A5F;
  font-weight: 600;
}

.hmc-tree-toggle {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #94A3B8;
  font-size: 10px;
  border-radius: 4px;
  transition: transform 0.2s ease;
}

.hmc-tree-toggle.expanded {
  transform: rotate(90deg);
}

.hmc-tree-toggle.leaf {
  visibility: hidden;
}

.hmc-tree-icon {
  font-size: 14px;
  flex-shrink: 0;
  color: #94A3B8;
  transition: color 0.12s ease;
}

.hmc-tree-row.active .hmc-tree-icon {
  color: #1E3A5F;
}

.hmc-tree-label {
  flex: 1;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hmc-tree-badge {
  font-size: 10px;
  background: #EFF4FA;
  color: #1E3A5F;
  border: 1px solid #DBEAFE;
  padding: 1px 7px;
  border-radius: 20px;
  flex-shrink: 0;
  font-weight: 600;
}

.hmc-tree-children {
  overflow: hidden;
}

.hmc-tree-children.collapsed {
  display: none;
}

/* ============================================================
   WIZARD STEPS — modern circular steps
   ============================================================ */
.hmc-wizard-steps {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 20px 28px;
  background: #FFFFFF;
  border-bottom: 1px solid #F1F5F9;
  overflow-x: auto;
}

.hmc-wizard-step {
  display: flex;
  align-items: center;
  flex: 1;
  position: relative;
  min-width: 0;
}

.hmc-wizard-step:not(:last-child)::after {
  content: '';
  flex: 1;
  height: 2px;
  background: #E2E8F0;
  margin: 0 10px;
  transition: background 0.3s ease;
  min-width: 20px;
}

.hmc-wizard-step.completed:not(:last-child)::after {
  background: #16A34A;
}

.hmc-wizard-step.active:not(:last-child)::after {
  background: #DBEAFE;
}

.hmc-wizard-step-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.hmc-wizard-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #F1F5F9;
  color: #94A3B8;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s ease;
  border: 2px solid #E2E8F0;
}

.hmc-wizard-step.active .hmc-wizard-step-num {
  background: #1E3A5F;
  color: #FFFFFF;
  border-color: #1E3A5F;
  box-shadow: 0 0 0 4px rgba(30,58,95,0.15);
}

.hmc-wizard-step.completed .hmc-wizard-step-num {
  background: #16A34A;
  color: #FFFFFF;
  border-color: #16A34A;
}

.hmc-wizard-step-label {
  font-size: 13px;
  font-weight: 500;
  color: #94A3B8;
  transition: color 0.2s ease;
}

.hmc-wizard-step.active .hmc-wizard-step-label {
  color: #1E3A5F;
  font-weight: 600;
}

.hmc-wizard-step.completed .hmc-wizard-step-label {
  color: #16A34A;
}

/* ============================================================
   ASSET DETAIL INFO STRIP — modern pill style
   ============================================================ */
.hmc-info-strip {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.hmc-info-strip-item {
  flex: 1;
  padding: 14px 18px;
  border-right: 1px solid #F1F5F9;
  text-align: center;
  transition: background 0.12s ease;
}

.hmc-info-strip-item:last-child {
  border-right: none;
}

.hmc-info-strip-item:hover {
  background: #F8FAFC;
}

.hmc-info-strip-item .info-label {
  font-size: 10px;
  color: #94A3B8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

.hmc-info-strip-item .info-value {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
}

/* ============================================================
   TAG INPUT — modern chips
   ============================================================ */
.hmc-tag-input {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  background: #FFFFFF;
  min-height: 44px;
  cursor: text;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hmc-tag-input:focus-within {
  border-color: #1E3A5F;
  box-shadow: 0 0 0 3px rgba(30,58,95,0.12);
}

.hmc-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #EFF4FA;
  color: #1E3A5F;
  border: 1px solid #DBEAFE;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
}

.hmc-tag .tag-remove {
  background: none;
  border: none;
  color: #1E3A5F;
  padding: 0;
  cursor: pointer;
  line-height: 1;
  font-size: 14px;
  display: flex;
  align-items: center;
  opacity: 0.6;
  transition: opacity 0.12s ease;
}

.hmc-tag .tag-remove:hover {
  opacity: 1;
}

.hmc-tag-input input {
  border: none;
  outline: none;
  font-size: 13px;
  flex: 1;
  min-width: 80px;
  background: transparent;
  color: #0F172A;
}

.hmc-tag-input input::placeholder {
  color: #94A3B8;
}

/* ============================================================
   DRAG-DROP UPLOAD ZONE — dashed border, modern
   ============================================================ */
.hmc-dropzone {
  border: 2px dashed #CBD5E1;
  border-radius: 10px;
  background: #F8FAFC;
  padding: 48px 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.hmc-dropzone:hover,
.hmc-dropzone.dragover {
  border-color: #1E3A5F;
  border-style: dashed;
  background: #EFF4FA;
}

.hmc-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.hmc-dropzone .dropzone-icon {
  font-size: 48px;
  color: #CBD5E1;
  margin-bottom: 14px;
  display: block;
  transition: color 0.2s ease;
}

.hmc-dropzone:hover .dropzone-icon,
.hmc-dropzone.dragover .dropzone-icon {
  color: #1E3A5F;
}

.hmc-dropzone .dropzone-text {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.hmc-dropzone .dropzone-sub {
  font-size: 12px;
  color: #94A3B8;
}

.hmc-dropzone .dropzone-browse {
  color: #1E3A5F;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

/* ============================================================
   PASSWORD STRENGTH INDICATOR
   ============================================================ */
.hmc-pw-strength {
  margin-top: 8px;
}

.hmc-pw-strength .strength-bars {
  display: flex;
  gap: 4px;
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
}

.hmc-pw-strength .strength-bar-segment {
  flex: 1;
  height: 100%;
  border-radius: 2px;
  background: #E2E8F0;
  transition: background 0.3s ease;
}

.hmc-pw-strength .strength-bar-segment.filled-weak   { background: #DC2626; }
.hmc-pw-strength .strength-bar-segment.filled-fair   { background: #D97706; }
.hmc-pw-strength .strength-bar-segment.filled-good   { background: #0284C7; }
.hmc-pw-strength .strength-bar-segment.filled-strong { background: #16A34A; }

.hmc-pw-strength .strength-label {
  font-size: 11px;
  margin-top: 5px;
  font-weight: 600;
}

.hmc-pw-strength .strength-label.weak   { color: #DC2626; }
.hmc-pw-strength .strength-label.fair   { color: #D97706; }
.hmc-pw-strength .strength-label.good   { color: #0284C7; }
.hmc-pw-strength .strength-label.strong { color: #16A34A; }

/* ============================================================
   SPLIT PANEL LAYOUT
   ============================================================ */
.hmc-split-panel {
  display: flex;
  height: calc(100vh - var(--hmc-navbar-height) - 90px);
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.hmc-split-left {
  width: 300px;
  flex-shrink: 0;
  border-right: 1px solid #F1F5F9;
  background: #FFFFFF;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.hmc-split-right {
  flex: 1;
  overflow-y: auto;
  background: #F1F5F9;
  padding: 20px;
}

.hmc-split-left .split-header {
  padding: 14px 18px;
  border-bottom: 1px solid #F1F5F9;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  background: #F8FAFC;
  color: #0F172A;
}

/* ============================================================
   TIMELINE — cleaner left-border timeline
   ============================================================ */
.hmc-timeline {
  position: relative;
  padding-left: 32px;
}

.hmc-timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #F1F5F9;
  border-radius: 2px;
}

.hmc-timeline-item {
  position: relative;
  padding-bottom: 22px;
}

.hmc-timeline-item::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid #CBD5E1;
  z-index: 1;
  transition: border-color 0.2s ease;
}

.hmc-timeline-item.primary::before  { border-color: #1E3A5F;  background: #1E3A5F; }
.hmc-timeline-item.success::before  { border-color: #16A34A;  background: #16A34A; }
.hmc-timeline-item.warning::before  { border-color: #D97706;  background: #D97706; }
.hmc-timeline-item.danger::before   { border-color: #DC2626;  background: #DC2626; }
.hmc-timeline-item.info::before     { border-color: #0284C7;  background: #0284C7; }

.hmc-timeline-item .timeline-date {
  font-size: 11px;
  color: #94A3B8;
  font-weight: 600;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.hmc-timeline-item .timeline-title {
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  margin-bottom: 3px;
}

.hmc-timeline-item .timeline-body {
  font-size: 12px;
  color: #64748B;
  line-height: 1.5;
}

/* ============================================================
   MAINTENANCE ALERT BOX
   ============================================================ */
.hmc-maintenance-alert {
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  margin-bottom: 10px;
}

.hmc-maintenance-alert.overdue {
  background: #FEE2E2;
  border-left: 4px solid #DC2626;
  color: #7F1D1D;
}

.hmc-maintenance-alert.due-soon {
  background: #FEF3C7;
  border-left: 4px solid #D97706;
  color: #78350F;
}

.hmc-maintenance-alert.ok {
  background: #DCFCE7;
  border-left: 4px solid #16A34A;
  color: #14532D;
}

.hmc-maintenance-alert .alert-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.hmc-maintenance-alert.overdue  .alert-icon { color: #DC2626; }
.hmc-maintenance-alert.due-soon .alert-icon { color: #D97706; }
.hmc-maintenance-alert.ok       .alert-icon { color: #16A34A; }

.hmc-maintenance-alert .alert-title {
  font-weight: 700;
  margin-bottom: 2px;
}

/* ============================================================
   DOCUMENT TYPE BADGES — modern pill colors
   ============================================================ */
.doc-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.doc-badge-pdf   { background: #FEE2E2;  color: #B91C1C;  border: 1px solid #FECACA; }
.doc-badge-excel { background: #DCFCE7;  color: #15803D;  border: 1px solid #BBF7D0; }
.doc-badge-word  { background: #E0F2FE;  color: #0369A1;  border: 1px solid #BAE6FD; }
.doc-badge-img   { background: #FEF3C7;  color: #B45309;  border: 1px solid #FDE68A; }
.doc-badge-zip   { background: #F1F5F9;  color: #475569;  border: 1px solid #CBD5E1; }
.doc-badge-dwg   { background: #EFF4FA;  color: #1E3A5F;  border: 1px solid #DBEAFE; }

/* ============================================================
   IMPORT TYPE RADIO CARDS
   ============================================================ */
.hmc-import-card {
  background: #FFFFFF;
  border: 2px solid #E2E8F0;
  border-radius: 10px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hmc-import-card:hover {
  border-color: #DBEAFE;
  background: #EFF4FA;
}

.hmc-import-card.selected {
  border-color: #1E3A5F;
  background: #EFF4FA;
  box-shadow: 0 0 0 3px rgba(30,58,95,0.12);
}

.hmc-import-card i {
  font-size: 36px;
  color: #CBD5E1;
  display: block;
  margin-bottom: 12px;
  transition: color 0.2s ease;
}

.hmc-import-card:hover i,
.hmc-import-card.selected i {
  color: #1E3A5F;
}

.hmc-import-card .import-label {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.hmc-import-card .import-desc {
  font-size: 12px;
  color: #94A3B8;
}

.hmc-import-card.selected .import-label {
  color: #1E3A5F;
}

/* ============================================================
   TABLE ACTIONS COLUMN
   ============================================================ */
.table-actions {
  display: flex;
  gap: 4px;
  align-items: center;
  white-space: nowrap;
}

.table-actions .btn {
  padding: 4px 9px !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
}

.table-actions .btn i {
  font-size: 13px;
}

/* ============================================================
   REPORT TABLE SUMMARY ROW
   ============================================================ */
.summary-row td {
  font-weight: 700 !important;
  background-color: #F8FAFC !important;
  border-top: 2px solid #E2E8F0 !important;
}

/* ============================================================
   EMPTY STATE — modern
   ============================================================ */
.hmc-empty-state {
  text-align: center;
  padding: 64px 24px;
  color: #94A3B8;
}

.hmc-empty-state i {
  font-size: 52px;
  margin-bottom: 16px;
  opacity: 0.3;
  display: block;
  color: #CBD5E1;
}

.hmc-empty-state h5 {
  font-size: 16px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}

.hmc-empty-state p {
  font-size: 13px;
  color: #94A3B8;
  max-width: 320px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

/* ============================================================
   MODAL OVERRIDES — modern
   ============================================================ */
.modal-header {
  background: #FFFFFF !important;
  color: #0F172A !important;
  border-bottom: 1px solid #F1F5F9 !important;
  padding: 18px 24px !important;
  border-radius: 10px 10px 0 0 !important;
}

.modal-header .btn-close {
  filter: none !important;
  opacity: 0.5;
}

.modal-header .btn-close:hover {
  opacity: 1;
}

.modal-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #0F172A !important;
}

.modal-content {
  border-radius: 10px !important;
  border: none !important;
  box-shadow: 0 20px 40px rgba(0,0,0,0.12), 0 4px 10px rgba(0,0,0,0.06) !important;
}

.modal-footer {
  border-top: 1px solid #F1F5F9 !important;
  padding: 14px 24px !important;
  background: #FAFAFA !important;
  border-radius: 0 0 10px 10px !important;
}

/* ============================================================
   LOGO UPLOAD PREVIEW
   ============================================================ */
.hmc-logo-preview {
  border: 2px dashed #CBD5E1;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  background: #F8FAFC;
  max-width: 200px;
  transition: border-color 0.15s ease;
}

.hmc-logo-preview:hover {
  border-color: #1E3A5F;
}

.hmc-logo-preview img {
  max-height: 60px;
  max-width: 100%;
  object-fit: contain;
}

/* ============================================================
   SWITCH / TOGGLE OVERRIDES
   ============================================================ */
.form-check-input:checked {
  background-color: #1A1A1A;
  border-color: #1A1A1A;
}

.form-switch .form-check-input {
  width: 40px;
  height: 22px;
  cursor: pointer;
}

/* ============================================================
   BUILDING CHECKLIST
   ============================================================ */
.building-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

.building-checklist .form-check {
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 8px 12px 8px 34px;
  background: #FAFAFA;
  transition: all 0.15s ease;
  margin: 0;
}

.building-checklist .form-check:hover {
  border-color: #DBEAFE;
  background: #EFF4FA;
}

.building-checklist .form-check-input:checked ~ .form-check-label {
  color: #1E3A5F;
  font-weight: 600;
}

.building-checklist .form-check-label {
  font-size: 13px;
  cursor: pointer;
  color: #334155;
}

/* ============================================================
   INTEGRATION CARD
   ============================================================ */
.hmc-integration-card {
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 16px 20px;
  background: #FFFFFF;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
  transition: box-shadow 0.15s ease;
}

.hmc-integration-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.hmc-integration-card .integration-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  background: #F1F5F9;
}

.hmc-integration-card .integration-body {
  flex: 1;
}

.hmc-integration-card .integration-title {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 2px;
}

.hmc-integration-card .integration-desc {
  font-size: 12px;
  color: #64748B;
  margin-bottom: 10px;
}

/* ============================================================
   SMALL UTILITY CLASSES
   ============================================================ */
.text-primary-hmc   { color: #1A1A1A !important; }
.text-accent-hmc    { color: #1E3A5F !important; }
.bg-primary-hmc     { background-color: #1A1A1A !important; }
.border-primary-hmc { border-color: #1A1A1A !important; }

.fs-11 { font-size: 11px; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }

.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }

.cursor-pointer { cursor: pointer; }

/* Section divider */
.hmc-divider {
  border: none;
  border-top: 1px solid #F1F5F9;
  margin: 16px 0;
}

/* ============================================================
   BREADCRUMB SEPARATOR COLOR
   ============================================================ */
.breadcrumb-item + .breadcrumb-item::before {
  color: #CBD5E1;
}
