.plan-comptable {
  padding: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.875rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.plan-comptable__card {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 12px;
  overflow: visible;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.plan-comptable__card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f0f1f3;
  border-radius: 12px 12px 0 0;
}

.plan-comptable__title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.plan-comptable__header-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.plan-comptable__search {
  position: relative;
  min-width: 14rem;
  width: 20rem;
  max-width: 100%;
}

.plan-comptable__search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 1rem;
  pointer-events: none;
}

.plan-comptable__search-input {
  width: 100%;
  height: 2.25rem;
  padding: 0 1rem 0 2.35rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  font-size: 0.875rem;
  font-weight: 400;
  color: #374151;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.plan-comptable__search-input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.plan-comptable__search-input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.plan-comptable__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.plan-comptable__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 2.25rem;
  padding: 0 0.85rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.plan-comptable__btn--outline {
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
}

.plan-comptable__btn--outline:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #374151;
}

.plan-comptable__btn--primary {
  border: none;
  background: #2563eb;
  color: #fff;
}

.plan-comptable__btn--primary:hover {
  background: #1d4ed8;
  color: #fff;
}

.plan-comptable__import-input {
  display: none;
}

.plan-comptable__btn--disabled {
  opacity: 0.6;
  pointer-events: none;
}

.plan-comptable__loading {
  display: flex;
  justify-content: center;
  padding: 4rem 0;
}

.plan-comptable__table-wrap {
  overflow-x: auto;
}

.plan-comptable__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.plan-comptable__table thead th {
  padding: 0.875rem 1.25rem;
  background: #fff;
  color: #6b7280;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid #eef0f2;
  white-space: nowrap;
}

.plan-comptable__table tbody td {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
  color: #111827;
  font-size: 0.875rem;
  font-weight: 400;
  vertical-align: middle;
}

.plan-comptable__table tbody tr:last-child td {
  border-bottom: none;
}

.plan-comptable__table tbody tr:hover td {
  background: #fafbfc;
}

.plan-comptable__account-number {
  font-weight: 700;
  font-size: 0.875rem;
  color: #111827;
  white-space: nowrap;
}

.plan-comptable__label {
  font-size: 0.875rem;
  font-weight: 400;
  color: #111827;
}

.plan-comptable__label--strong {
  font-weight: 600;
}

.plan-comptable__type {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.35;
}

.plan-comptable__type--capitaux { background: #f3f4f6; color: #4b5563; }
.plan-comptable__type--dettes { background: #f3e8ff; color: #7c3aed; }
.plan-comptable__type--creances { background: #dbeafe; color: #1d4ed8; }
.plan-comptable__type--tva { background: #f3f4f6; color: #374151; }
.plan-comptable__type--tresorerie { background: #dbeafe; color: #2563eb; }
.plan-comptable__type--charges { background: #ffedd5; color: #ea580c; }
.plan-comptable__type--produits { background: #dcfce7; color: #16a34a; }
.plan-comptable__type--autre { background: #f3f4f6; color: #6b7280; }

.plan-comptable__lettr {
  font-size: 0.875rem;
  font-weight: 500;
}

.plan-comptable__lettr--yes { color: #16a34a; }
.plan-comptable__lettr--no { color: #9ca3af; }

.plan-comptable__vat {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: #f9fafb;
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 400;
  white-space: nowrap;
}

.plan-comptable__balance {
  font-variant-numeric: tabular-nums;
  font-size: 0.875rem;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
}

.plan-comptable__col-actions {
  white-space: nowrap;
  min-width: 9rem;
}

.plan-comptable__action {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
  margin-left: 0.75rem;
  border: none;
  background: none;
  color: #2563eb;
  font-size: 0.8125rem;
  font-weight: 400;
  cursor: pointer;
  text-decoration: none;
}

.plan-comptable__action--muted {
  color: #6b7280;
}

.plan-comptable__action--muted:hover {
  color: #374151;
}

.plan-comptable__action--danger {
  color: #dc2626;
}

.plan-comptable__action--danger:hover {
  color: #b91c1c;
}

.plan-comptable__action:first-child {
  margin-left: 0;
}

.plan-comptable__action:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.plan-comptable__action--danger:hover {
  color: #b91c1c;
  text-decoration: underline;
}

.plan-comptable__empty {
  text-align: center;
  padding: 2.5rem 1rem !important;
  color: #9ca3af;
  font-size: 0.875rem;
}

.plan-comptable__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  border-top: 1px solid #f0f1f3;
  background: #fff;
  overflow: visible;
  position: relative;
  z-index: 5;
  border-radius: 0 0 12px 12px;
  font-size: 0.75rem;
}

.plan-comptable__footer > .card-footer {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  font-size: 0.75rem;
}

.plan-comptable__footer .dropdown-menu {
  z-index: 1060;
}

.plan-comptable__range {
  font-size: 0.75rem;
  font-weight: 400;
  color: #9ca3af;
}

.plan-comptable__actions .plan-comptable__toolbar-widget {
  display: inline-flex;
  align-items: center;
}

.plan-comptable__actions .plan-comptable__toolbar-widget > .d-inline-flex {
  margin: 0 !important;
}

.plan-comptable__actions .plan-comptable__toolbar-widget .dropdown > button,
.plan-comptable__actions .plan-comptable__toolbar-widget label[for="fileUpload"] {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 2.25rem;
  padding: 0 0.85rem;
  margin: 0;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  box-shadow: none;
}

.plan-comptable__actions .plan-comptable__toolbar-widget .dropdown > button:hover,
.plan-comptable__actions .plan-comptable__toolbar-widget label[for="fileUpload"]:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #374151;
}

.plan-comptable__mobile-card {
  border: 1px solid #e8eaed;
  border-radius: 10px;
  padding: 1rem;
  margin: 0.75rem 1rem;
  background: #fff;
}

.plan-comptable__mobile-card + .plan-comptable__mobile-card {
  margin-top: 0;
}
