/* Bootstrap-free bridge styles for existing tool markup */

:root {
  --bs-border: #d6e0dd;
  --bs-text: #1f2937;
  --bs-muted: #6b7280;
  --bs-bg: #ffffff;
  --bs-btn: #2f5a53;
  --bs-btn-border: #cdd9d6;
}

* {
  box-sizing: border-box;
}

.container,
.container-fluid {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

@media (min-width: 576px) {
  .container { max-width: 540px; }
}
@media (min-width: 768px) {
  .container { max-width: 720px; }
}
@media (min-width: 992px) {
  .container { max-width: 960px; }
}
@media (min-width: 1200px) {
  .container { max-width: 1140px; }
}
@media (min-width: 1400px) {
  .container { max-width: 1320px; }
}

.d-flex { display: flex !important; }
.d-none { display: none !important; }
.d-block { display: block !important; }
.flex-wrap { flex-wrap: wrap !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-end { justify-content: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.text-center { text-align: center !important; }
.text-end { text-align: right !important; }
.text-lg-end { text-align: right !important; }
.text-xl-end { text-align: right !important; }
.small { font-size: 0.875em; }
.text-muted { color: var(--bs-muted) !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.p-0 { padding: 0 !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }

.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}
.row > * {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.g-2 > * { padding-top: 0.5rem; }
.g-3 > * { padding-top: 1rem; }

.col-12 { width: 100%; }
.col-6 { width: 50%; }
.col-auto { width: auto; }
.col-lg-2, .col-lg-3, .col-lg-7, .col-xl-5, .col-xl-7, .col-xxl-2, .col-xxl-4, .col-xxl-8 { width: 100%; }

@media (min-width: 992px) {
  .col-lg-2 { width: 16.6667%; }
  .col-lg-3 { width: 25%; }
  .col-lg-7 { width: 58.3333%; }
  .d-lg-none { display: none !important; }
}

@media (min-width: 1200px) {
  .col-xl-5 { width: 41.6667%; }
  .col-xl-7 { width: 58.3333%; }
}

@media (min-width: 1400px) {
  .col-xxl-2 { width: 16.6667%; }
  .col-xxl-4 { width: 33.3333%; }
  .col-xxl-8 { width: 66.6667%; }
  .d-xxl-block { display: block !important; }
  .d-xxl-flex { display: flex !important; }
  .d-xxl-none { display: none !important; }
}

.sticky-xxl-top {
  position: sticky;
  top: 0.75rem;
}

.card {
  background: var(--bs-bg);
  border: 1px solid var(--bs-border);
  border-radius: 0.9rem;
}

.card-header {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--bs-border);
}

.card-body {
  padding: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid var(--bs-btn-border);
  border-radius: 999px;
  background: #fff;
  color: var(--bs-btn);
  padding: 0.36rem 0.85rem;
  font-size: 0.875rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  border-color: #9fb9b2;
  background: #f7fbfa;
}

.btn-sm {
  padding: 0.28rem 0.7rem;
  font-size: 0.8125rem;
}

.btn-outline-secondary,
.btn-outline-primary {
  background: #fff;
}

.btn-primary,
.btn-secondary {
  background: #2f5a53;
  color: #fff;
  border-color: #2f5a53;
}

.form-control,
.form-select {
  width: 100%;
  border: 1px solid var(--bs-border);
  border-radius: 0.6rem;
  background: #fff;
  color: var(--bs-text);
  padding: 0.42rem 0.65rem;
  font-size: 0.92rem;
}

.form-control-sm,
.form-select-sm {
  font-size: 0.82rem;
  padding: 0.3rem 0.55rem;
}

.input-group {
  display: flex;
  width: 100%;
}
.input-group > .form-control { flex: 1 1 auto; }
.input-group > .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.nav {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-tabs {
  gap: 0.35rem;
}

.nav-item { display: block; }

.nav-link {
  border: 1px solid var(--bs-btn-border);
  background: #fff;
  color: #2f5a53;
  border-radius: 999px;
  padding: 0.3rem 0.72rem;
  text-decoration: none;
  cursor: pointer;
}

.nav-link.active {
  background: #e6f3f0;
  border-color: #9ebfb7;
  color: #1f4f46;
}

.navbar {
  border: 1px solid var(--bs-border);
  border-radius: 0.9rem;
  background: #ffffff;
  margin: 0.75rem;
  padding: 0.6rem;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
}

.navbar-toggler {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--bs-btn-border);
  border-radius: 0.55rem;
  padding: 0.28rem 0.45rem;
  background: #fff;
}

.navbar-toggler-icon::before {
  content: '\2630';
  font-size: 1rem;
  line-height: 1;
}

.collapse { display: none; }
.collapse.show { display: block; }

.dropdown { position: relative; }

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 18rem;
  border: 1px solid var(--bs-border);
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 14px 28px rgba(16, 24, 40, 0.18);
  z-index: 80;
}

.dropdown-menu.show { display: block; }

@media (min-width: 992px) {
  .navbar-expand-lg .navbar-toggler {
    display: none;
  }
  .navbar-expand-lg .navbar-collapse {
    display: block;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--bs-border);
  padding: 0.16rem 0.48rem;
  font-size: 0.72rem;
}

.text-bg-light { background: #f7faf9; }
.text-bg-secondary { background: #e8f0ee; color: #29564e; }

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

.table th,
.table td {
  border-bottom: 1px solid var(--bs-border);
  padding: 0.45rem 0.55rem;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.btn-close {
  width: 1.4rem;
  height: 1.4rem;
  border: 1px solid var(--bs-border);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}

.btn-close::before {
  content: 'x';
  display: block;
  font-size: 0.9rem;
  line-height: 1.2;
  text-align: center;
  color: #60716d;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1060;
  overflow: auto;
}

.modal.show { display: block; }

.modal-dialog {
  margin: 1.2rem auto;
  max-width: 680px;
  width: calc(100% - 1.4rem);
}

.modal-dialog-centered {
  min-height: calc(100% - 2.4rem);
  display: flex;
  align-items: center;
}

.modal-content {
  background: #fff;
  border-radius: 0.9rem;
  border: 1px solid var(--bs-border);
  box-shadow: 0 18px 40px rgba(10, 22, 19, 0.24);
}

.modal-header,
.modal-body,
.modal-footer {
  padding: 0.85rem;
}

.modal-header {
  border-bottom: 1px solid var(--bs-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-footer {
  border-top: 1px solid var(--bs-border);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.46);
  z-index: 1055;
}
