body {
  font-family: Arial, sans-serif !important;
}

.btn-primary {
  background-color: #5a6a35 !important;
  border-color: #5a6a35 !important;
}

.btn-primary:hover {
  background-color: #4d5a2f !important;
  border-color: #4d5a2f !important;
  transform: translateY(-1px) !important;
}
/* Landing */
.landing-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  padding: 4rem 6rem;
  background: #f7f5ef;
  height: 85%;
}
.hero-left {
  padding-top: 2rem;
}

.hero-image {
  width: 100%;
  border-radius: 24px;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.4rem;
  line-height: 1.4;
  max-width: 38rem;
  margin-bottom: 3rem;
}

.decor-green {
  background: #5a6a35;
  border-radius: 24px;
  position: absolute;
}

.decor-green.top {
  width: 240px;
  height: 120px;
  top: -30px;
  right: 40px;
}

.landing-footer {
  padding: 1rem 6rem;
  background: #222;
  height: 15%;
}

.tracefirst-logo {
  height: 90px;
  top: 80px !important;
}

/* Landing buttons */
.landing-btn {
  text-decoration: none;
  padding: 1rem 2rem;
  font-size: 1.5rem;
  font-weight: 600;
  border-radius: 14px;
  transition: all 0.2s ease;
}

.landing-btn-primary {
  background-color: #5a6a35;
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.landing-btn-primary:hover {
  background-color: #4d5a2f;
  transform: translateY(-1px);
}

.landing-btn-secondary {
  background-color: transparent;
  color: #3f3f3f;
  border: 1.5px solid #b9b9b9;
}

.landing-btn-secondary:hover {
  border-color: #4d5a2f;
  background-color: #f7f5ef;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

/* HomePage Components */

.main-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.signed-out .home-container {
  width: 100%;
  margin-left: 0;
}

.signed-in .home-container {
  width: 82%;
  margin-left: 18%;
  padding: 1.5rem 1rem 1rem 1rem;
}

.home-container{
  display: flex;
  flex-direction: column;
  background-color: #fff;
}

.main-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.flash-alerts {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1050;
  width: 300px;
  margin: 0;
}

.material-alert {
  padding: 12px 16px;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
  font-family: 'Roboto', sans-serif;
  transition: opacity 0.3s ease;
}

.alert-success.material-alert {
  background-color: #edf3e8;
  color: #2f4a1f;
  border-left: 4px solid #5a6a35;
}

.alert-danger.material-alert {
  background-color: #f6ecea;
  color: #6a1f16;
  border-left: 4px solid #9b4a3c;
}

.material-alert__icon {
  font-size: 20px;
  line-height: 1;
  margin-top: 2px;
  opacity: 0.85;
}

.material-alert__text {
  flex: 1;
}

button.close {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 1.25rem;
  padding: 0;
  cursor: pointer;
  margin-left: 8px;
  line-height: 1;
  opacity: 0.7;
}

button.close:hover {
  opacity: 1;
}

.alert-dismissible.fade.show {
  opacity: 1;
  visibility: visible !important;
  transition: opacity 0.3s ease;
}

/* NAVBAR LEFT */

.nav-container{
  width: 18%;
  background-color: #1f241a;
  padding: 10px;
  height: 100vh;
  position: fixed;
}

.navigation-bar{
  display: flex;
  flex-direction: column;
  height: 100%;
}
.navbar-top {
  display: flex;
  justify-content: center;
}

.navbar-title {
  color: #f7f5ef;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  font-size: 1.5rem;
  margin: 0;
}
hr.border {
  border-color: rgba(255,255,255,0.1);
}

.navbar-middle{
  flex-grow: 1;
  overflow-y: auto;
}
.nav-pills{
  padding: 0rem 0.5rem;
  margin-top: 1rem;
  list-style: none;
}
.nav-component {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.nav-actions{
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
}
.component-name {
  font-size: 1rem;
  display: inline-block;
  color: #fff; 
  margin-left: 0.5rem;
}
.component-item{
  text-decoration: none;
  color: #fff;
  background-color: #5a6a35;
  border: 1px solid #5a6a35;
  border-radius: 8px;
  padding: 0.3rem 1rem;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}
.nav-actions li:first-child .component-item.cvis, .nav-actions li:first-child .component-item.addresses, .nav-actions li:first-child .component-item.statements {
  border-radius: 8px 0 0 8px; 
  border-right: 1px solid #000;
}
.nav-actions li:last-child .component-item.cvis, .nav-actions li:last-child .component-item.addresses, .nav-actions li:last-child .component-item.statements {
  border-radius: 0 8px 8px 0px; 
  border-left: none; 
} 

.component-item:hover{
  background-color: #fff !important;
  color: #4d5a2f;
  border: 1px solid #4d5a2f;
}
.component-item.disabled {
  background-color: #9aa388;
  border-color: #9aa388;
  color: #fff;
  cursor: not-allowed;
}

.navbar-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-bottom: 1rem;
}

.profile-name-wrapper {
  cursor: pointer;
  position: relative;
}

.profile-details {
  display: flex;
  align-items: center;
}
.profile-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%; 
  border: 1px solid #fff;
}

.profile-name {
  padding: 0.5rem 1rem;
  color: #fff;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.profile-dropdown {
  display: none;
  position: absolute;
  background-color: #343a40;
  border-radius: 8px;
  text-align: center;
  width: 100%;
  bottom: 100%;
  left: 0;
  margin-bottom: 10px;
}

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

.profile-dropdown ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.profile-dropdown .dropdown-item {
  display: block;
  padding: 0.3rem 0.5rem;
  color: #fff;
  font-size: 0.9rem;
  border-radius: 8px;
}

.profile-dropdown .dropdown-item:hover{
  background-color: #4d5a2f !important;
  color: #fff;
}

.nav-item{
  display: flex;
}
.navbar-item{
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.25rem 1rem;
  text-decoration: none;
  border-radius:8px;
  transition: background-color 0.3s;
}
.navbar-item:hover {
  background-color: #4d5a2f !important;
  color: #fff;
}

/* CVI FORM */

.cvi-form {
  background-color: #f7f5ef;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  width: 80%;
  margin: 0 auto;
}
.cvi-form .form-control:focus {
  border-color: #5a6a35;
  box-shadow: 0 0 0 0.15rem rgba(90, 106, 53, 0.25);
}

.cvi-form .form-header h1 {
  font-size: 1.75rem;
  font-weight: bold;
  color: #343a40;
  text-align: center;
  margin-bottom: 1.5rem;
}
.cvi-form .form-section {
  margin-bottom: 2rem;
}
.cvi-form table thead th {
  background-color: #eef2e6;
  color: #2f3a1f;
  font-weight: 600;
  text-align: center;
}

.cvi-form .form-section h2 {
  font-size: 1.25rem;
  color: #5a6a35;
  border-bottom: 2px solid #5a6a35;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 0.5rem;
}

.form-label {
  font-weight: bold;
  color: #212529;
}

.form-control {
  border: 1px solid #ced4da;
  border-radius: 8px;
  height: 35px;
  padding: 0.5rem 1rem;
  font-size: 1rem;
}

.group-lot-fields {
  background-color: #ffffff;
  border: 1px solid #e0e5d8;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}
#add_group_lot {
  background-color: #5a6a35;
  border-color: #5a6a35;
  padding: 0.25rem 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
}
#add_group_lot:hover {
  background-color: #4d5a2f;
  border-color: #4d5a2f;
}
.remove_group_lot {
  background-color: #9b4a3c !important;
  border-color: #9b4a3c !important;
  padding: 0.25rem 0.75rem !important;
  font-size: 0.8rem !important;
  margin-top: 0.5rem !important;
  cursor: pointer;
}
.remove_group_lot:hover {
  background-color: #7d3c30 !important;
  border-color: #7d3c30 !important;
}

.animal-section {
  background-color: #ffffff;
  border: 1px solid #e0e5d8;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}
#add_animal {
  background-color: #5a6a35;
  border-color: #5a6a35;
  color: #fff;
  border-radius: 8px;
  padding: 0.35rem 1rem;
  margin-left: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
}
#add_animal:hover {
  background-color: #4d5a2f;
  border-color: #4d5a2f;
  color: #fff;
}
.remove_animal {
  background-color: #9b4a3c !important;
  border-color: #9b4a3c !important;
  border-radius: 8px !important;
  padding: 0.25rem 0.9rem !important;
  font-size: 0.85rem !important;
  margin-top: 15px;
  cursor: pointer;
}
.remove_animal:hover {
  background-color: #7d3c30 !important;
  border-color: #7d3c30 !important;
}

#tags-container {
  border: 1px solid #e0e5d8;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background-color: #f7f5ef;
  margin-bottom: 1rem;
}
.add-tag {
  align-items: center;
  border: 1px solid #5a6a35;
  background-color: #5a6a35;
  color: #fff;
  padding: 0.25rem 0.8rem;
  cursor: pointer;
  border-radius: 10px;
}
.add-tag:hover {
  background-color: #4d5a2f;
  border-color: #4d5a2f;
}
.remove-tag{
  cursor: pointer;
  padding-top: 0.5rem;
  color: #9b4a3c !important;
}
.remove-tag:hover {
  color: #7d3c30 !important;
}

.vaccination-wrapper,
.test-result-wrapper {
  border: 1px solid #e0e5d8;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background-color: #f7f5ef;
  margin-bottom: 1rem;
}
.add-vaccination, .add-test-result{
  color: #5a6a35;
  border-color: #5a6a35;
}
.add-test-result:hover, .add-vaccination:hover {
  background-color: #5a6a35;
  color: #fff;
}
.remove-vaccination{
  cursor: pointer;
  padding-top: 0.5rem;
  color: #9b4a3c !important;
}
.remove-test-result{
  cursor: pointer;
  padding-top: 2.5rem;
  color: #9b4a3c !important;
}
.remove-vaccination:hover,
.remove-test-result:hover {
  color: #7d3c30 !important;
}

.cvi-submit{
  display: flex;
  gap: 1rem;
  justify-content: center; 
}

.submit-button{
  color: #5a6a35;
  font-weight: bold;
  font-size: 1.2rem ;
  border: 2px solid #5a6a35;
  background-color: #ffffff ;
  padding: 0.3rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  width: 20%;
  transition: all 0.25s ease;
}
.finalise-submit{
  background-color: #5a6a35 ;
  border: 2px solid #5a6a35;
  color: #fff;
}
.submit-button:hover {
  color: #fff;
  border: 2px solid #5a6a35;
  background-color: #5a6a35;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}
.finalise-submit:hover {
  background-color: #546b22;
  border: 2px solid #546b22;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.address-header h1 {
  font-size: 1.6rem;
  font-weight: bold;
  color: #2f2f2f;
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Address Suggestion in Create/Edit CVI form */

.suggestions-container {
  border: 1px solid #d6dccb;
  background-color: #fff;
  max-height: 180px;
  overflow-y: auto;
  z-index: 1050;
  position: absolute;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  margin-top: 4px;
}

.suggestion-item {
  display: block;
  width: 100%;
  text-align: left;
  background-color: #fff;
  border: none;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 0.95rem;
  color: #2f2f2f;
  border-bottom: 1px solid #f0f0f0;
}
.suggestion-item:last-child {
  border-bottom: none;
}
.suggestion-item:hover,
.suggestion-item:focus {
  background-color: #eef2e6;
  color: #2f3a1f;
}
.text-muted {
  font-size: 0.9rem;
  color: #6c757d;
}

/* CVI VIEW (completed / voided eCVI) */
.cvi-show {
  width: 96%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 0 2.5rem;
}
.cvi-show-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 1.6rem 2rem;
  margin-bottom: 1.25rem;
  border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(233, 212, 138, 0.22), transparent 45%),
    linear-gradient(135deg, #5f7136 0%, #3f4a26 100%);
  box-shadow: 0 12px 32px rgba(63, 74, 38, 0.25);
}
.cvi-show-hero__text {
  flex: 1 1 26rem;
  min-width: 0;
}
.cvi-show-hero__eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e9e2c4;
}
.cvi-show-hero__title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  font-size: 1.85rem;
  font-weight: 700;
  color: #fff;
}
.cvi-show-hero__title .fas {
  font-size: 1.4rem;
  color: #e9d48a;
}
.cvi-show-hero__route {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.35rem 0 0.8rem;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
}
.cvi-show-hero__route .fas {
  color: #e9d48a;
}
.cvi-show-hero__dot {
  color: #e9e2c4;
}
.cvi-show-hero__species {
  font-weight: 600;
  letter-spacing: 0;
  color: #eef1e6;
}
.profile-chip.cvi-chip--completed {
  color: #1f241a;
  background: #e3efc8;
  border-color: #e3efc8;
}
.profile-chip.cvi-chip--voided {
  color: #fff;
  background: #9b3a2c;
  border-color: #c96b5c;
}
.cvi-show-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.cvi-show-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.45);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.cvi-show-action:hover,
.cvi-show-action:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}
.cvi-show-action--primary,
.cvi-show-action--primary:hover,
.cvi-show-action--primary:focus-visible {
  color: #3f4a26;
  background: #fff;
  border-color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.cvi-show-action--primary:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}
.cvi-show-hero__invalid {
  max-width: 22rem;
  margin: 0;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  font-size: 0.875rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.2);
}
.cvi-show-voided {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  font-weight: 600;
  color: #7a2a1f;
  background: #fbeeeb;
  border: 1px solid #ecc9c1;
}
.cvi-show-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 1.25rem;
  align-items: start;
}
.cvi-show-preview {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 2rem);
  min-height: 32rem;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e0e5d8;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 16px rgba(77, 90, 47, 0.06);
}
.cvi-show-preview__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid #eef0e8;
}
.cvi-show-preview__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #2f3a1c;
}
.cvi-show-preview__title .fas {
  color: #9b3a2c;
}
.cvi-show-preview__open {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #4d5a2f;
  text-decoration: none;
}
.cvi-show-preview__open:hover {
  color: #2f3a1c;
  text-decoration: underline;
}
.cvi-show-preview__frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: #f1f2ee;
}
.cvi-panel {
  margin-bottom: 1.25rem;
  padding: 1.4rem 1.5rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e0e5d8;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 16px rgba(77, 90, 47, 0.06);
}
.cvi-panel .profile-panel__header {
  padding-bottom: 0.9rem;
  border-bottom: 1px solid #eef0e8;
}
.cvi-dates {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}
.cvi-dates__item {
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: #f7f5ef;
  border: 1px solid #ebe8dc;
}
.cvi-dates dt,
.cvi-facts dt,
.cvi-animal__fact dt,
.cvi-place__meta-label {
  margin-bottom: 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5c6650;
}
.cvi-dates dd {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f241a;
  font-variant-numeric: tabular-nums;
}
.cvi-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
  margin: 0;
}
.cvi-facts__item--wide {
  grid-column: 1 / -1;
}
.cvi-facts dd {
  margin: 0;
  color: #1f241a;
  overflow-wrap: anywhere;
}
.cvi-empty {
  margin: 0;
  color: #6b6b6b;
  font-style: italic;
}
.cvi-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: stretch;
}
.cvi-route__arrow {
  display: grid;
  place-items: center;
  color: #7d8f4c;
}
.cvi-route__arrow .fas {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: #eef1e6;
}
.cvi-place {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: #f7f5ef;
  border: 1px solid #ebe8dc;
}
.cvi-place__heading {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4d5a2f;
}
.cvi-place__name {
  margin: 0 0 0.15rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f241a;
}
.cvi-place__line {
  margin: 0;
  color: #3b3f36;
}
.cvi-place__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  color: #1f241a;
}
.cvi-place__meta li {
  display: flex;
  flex-direction: column;
}
.cvi-place__party {
  display: flex;
  flex-direction: column;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px dashed #d9ded0;
  color: #1f241a;
}
.cvi-place > :nth-last-child(2) {
  margin-bottom: 0.75rem;
}
.cvi-animal {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: #fbfbf8;
  border: 1px solid #e6e9dc;
}
.cvi-animal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}
.cvi-animal__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #2f3a1c;
}
.cvi-animal__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cvi-tag {
  display: inline-flex;
  overflow: hidden;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid #c9d1b5;
}
.cvi-tag__type {
  padding: 0.2rem 0.55rem;
  font-weight: 700;
  color: #fff;
  background: #5a6a35;
}
.cvi-tag__number {
  padding: 0.2rem 0.6rem;
  font-weight: 600;
  color: #1f241a;
  background: #fff;
  font-variant-numeric: tabular-nums;
}
.cvi-animal__facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}
.cvi-animal__fact dd {
  margin: 0;
  color: #1f241a;
}
.cvi-subheading {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 1.1rem 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #4d5a2f;
}
.cvi-subheading .fas {
  color: #7d8f4c;
}
.cvi-subheading--section {
  margin-top: 1.5rem;
  font-size: 1rem;
  color: #2f3a1c;
}
.cvi-table {
  width: 100%;
  margin: 0;
  font-size: 0.875rem;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e6e9dc;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.cvi-table th {
  padding: 0.5rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4d5a2f;
  background: #eef1e6;
  white-space: nowrap;
}
.cvi-table td {
  padding: 0.55rem 0.7rem;
  color: #1f241a;
  border-top: 1px solid #eef0e8;
}
@media (max-width: 1199px) {
  .cvi-show-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .cvi-show-preview {
    position: static;
    height: 75vh;
  }
}
@media (max-width: 767px) {
  .cvi-show-hero {
    padding: 1.4rem;
  }
  .cvi-dates,
  .cvi-animal__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cvi-facts,
  .cvi-route {
    grid-template-columns: 1fr;
  }
  .cvi-route__arrow .fas {
    transform: rotate(90deg);
  }
}

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

/* CVIS INDEX */
.tooltip-wrapper {
  position: relative;
  display: inline-block;
}
.tooltip-wrapper .tooltip-text {
  /* opacity rather than visibility so screen readers can still read it */
  opacity: 0;
  pointer-events: none;
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 2px 8px;
  border-radius: 10px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: -150%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 12px;
}
.tooltip-wrapper:hover .tooltip-text,
.tooltip-wrapper:focus-within .tooltip-text {
  opacity: 1;
}

.text-success {
  color: #5a6a35 !important;
}

.cvi-index.btn-primary{
  text-decoration: none;
  border: 2px solid #5a6a35;
  color: #fff !important;
  font-weight: bold;
  border-radius: 10px;
  padding: 0.2rem 1rem;
  text-align: center;
  width: 15%;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
  background-color: #5a6a35 !important;
  transition: all 0.3s ease;
}

.cvi-index.btn-primary:hover {
  background-color: #fff !important;
  border-color: #4d5a2f !important;
  color: #5a6a35 !important; 
}

.cvi-index.btn-primary.disabled {
  background-color: #a3ad8c;
  border-color: #a3ad8c;
  opacity: 0.8;
}

.search-form .form-control {
  border-radius: 10px;
  padding-left: 20px;
  background-color: #f7f5ef;
  border: 1px solid #d6dccb;
}

.search-form .form-control:focus {
  border-color: #5a6a35;
  box-shadow: 0 0 0 0.15rem rgba(90, 106, 53, 0.25);
}

.clear-search {
  position: absolute;
  right: 4rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9b4a3c !important; 
  font-weight: bold;
  text-decoration: none; 
  padding: 0rem 1rem;
  display: flex;
  align-items: center;
  font-size: 0.85rem;
}

.search-btn {
  padding: 0rem 0.5rem !important;
  color: #5a6a35;
  font-weight: bold;
  display: flex;
  align-items: center;
  border: 2px solid #5a6a35;
  background-color: #ffff;
  border-top-right-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}
.search-btn:hover{
  color: #fff;
  background-color: #5a6a35;
}

.badge-success {
  background-color: #5a6a35;
  color: #fff;
}
.badge-danger {
  background-color: #9b4a3c;
  color: #fff;
}
.badge-warning {
  background-color: #d2b24c;
  color: #1f241a !important;
}

.btn-outline-info,
.btn-outline-secondary,
.btn-outline-primary {
  color: #5a6a35 !important;
  border-color: #5a6a35 !important;
}

.btn-outline-info:hover,
.btn-outline-secondary:hover,
.btn-outline-primary:hover {
  background-color: #5a6a35 !important;
  color: #fff !important;
}

.void-cvi-btn {
  background-color: #a0563f !important;
  border-color: #a0563f !important;
  color: #fff !important;
}
.void-cvi-btn:hover {
  background-color: #874635 !important;
  border-color: #874635 !important;
}

.btn-outline-danger {
  color: #7d3c30 !important;
  border-color: #7d3c30 !important;
  background-color: transparent !important;
}
.btn-outline-danger:hover {
  background-color: #7d3c30 !important;
  color: #fff !important;
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.1rem;
  border: 1px solid #d6dccb;
  border-radius: 5px;
  background-color: #f7f5ef;
}
.pagination {
  margin: 0; 
  padding-right: 0.5rem;
}
.pagination a {
  color: #5a6a35;
}
.pagination .active span {
  background-color: #5a6a35;
  border-color: #5a6a35;
  color: #fff;
}
.pagination-info p {
  margin: 0;
  padding-left: 0.5rem;
}
.pagination .page-link {
  color: #5a6a35;
  border-color: #d6dccb;
  background-color: #fff;
  border-radius: 6px;
  margin: 0 2px;
}
.pagination .page-link:hover {
  color: #fff;
  background-color: #5a6a35;
  border-color: #5a6a35;
}
.pagination .page-link:focus {
  box-shadow: 0 0 0 0.15rem rgba(90, 106, 53, 0.35);
  background-color: #5a6a35;
  color: #fff;
  border-color: #5a6a35;
}
.pagination .page-item.active .page-link {
  background-color: #5a6a35;
  border-color: #5a6a35;
  color: #fff;
}
.pagination .page-item.disabled .page-link {
  color: #9aa388;
  background-color: #f7f5ef;
  border-color: #d6dccb;
}

/* Address Book  */

/* Address Index */

.add-address {
  margin-bottom: 1rem;
}
.add-new-address {
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid #5a6a35;
  background-color: #5a6a35;
  color: #fff !important;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  transition: all 0.25s ease;
}
.add-new-address:hover {
  background-color: #4d5a2f !important;
  border-color: #4d5a2f !important;
}
.add-new-address.disabled {
  background-color: #a3ad8c;
  border-color: #a3ad8c;
  cursor: not-allowed;
  opacity: 0.8;
}
.address-table {
  border-radius: 10px;
  overflow: hidden;
}

.badge-secondary {
  background-color: #636b55;
  color: #fff;
}
.address-details-container {
  background-color: #f7f5ef;
  border: 1px solid #e0e5d8;
  border-radius: 12px;
  padding: 2rem;
  width: 70%;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.address-details-container table.table {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.address-details-container table.table th {
  width: 35%;
  background-color: #eef2e6;
}

.address-details-container table.table td {
  border-bottom: 1px solid #f0f0f0;
}

.address-container{
  padding: 1rem;
}

.address-container h1 {
  margin-bottom: 10px;
  font-size: 1.5rem;
  color: #333;
}

.header-color{
  background-color: #5f6f3a !important;
  color: #fff !important;
  font-weight: 600;
}

.actions-column {
  vertical-align: middle;
  white-space: nowrap;
}
.actions-column .actions-wrapper {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}
.address-container .table > tbody > tr.row-active > * {
  background-color: #cdddbf !important;
}
.address-container .table > tbody > tr.row-inactive > * {
  background-color: #f3f3f3 !important;
  color: #6b6b6b;
}
.btn-outline-success,
.btn-outline-warning {
  color: #7a6020 !important;
  border-color: #7a6020 !important;
}

.btn-outline-success:hover,
.btn-outline-warning:hover {
  background-color: #7a6020 !important;
  color: #fff !important;
}
.btn-outline-danger {
  color: #9b4a3c !important;
  border-color: #9b4a3c !important;
}

.btn-outline-danger:hover {
  background-color: #9b4a3c !important;
  color: #fff !important;
}
.address-limit-info {
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.badge-info {
  background-color: #5a6a35;
  color: #fff;
  padding: 0.4rem 0.9rem !important;
  font-size: 1rem !important;
}

.back-home-button {
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid #556931;
  background-color: #556931;
  color: #ffff;
  border-radius: 8px;
  padding: 0.3rem 0.8rem;
}

.back-home-button:hover {
  background-color: #ffff;
  color: #556931;
}

.address-container table td {
  font-size: 0.9rem;
  padding: 0.25rem 0.5rem;
}

.pagination-info p {
  font-size: 0.85rem;
}

/* Statements */
.statements-intro {
  color: #4a4a4a;
}
.statements-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.statements-toolbar .back-home-button {
  margin-left: auto;
}
.statements-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.statements-search .form-control {
  width: 16rem;
}
.statement-preview {
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  text-align: left;
  text-decoration: underline dotted;
  cursor: pointer;
}
.statement-preview:hover {
  color: #4d5a2f;
}
.statement-full-text {
  white-space: pre-wrap;
  margin-bottom: 0;
}
.home-panel-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.statements-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.statements-picker .form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
}
.cvi-form .statements-picker__toggle {
  height: 2rem;
  min-width: 13rem;
  padding: 0.2rem 2rem 0.2rem 0.75rem;
  font-size: 0.875rem;
  text-align: left;
  color: #333;
  cursor: pointer;
}
.cvi-form .statements-picker__toggle.show {
  border-color: #5a6a35;
  background-color: #fff;
}
.statements-picker__add {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #5a6a35;
  background-color: #fff;
  border: 1px solid #5a6a35;
  border-radius: 8px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.statements-picker__add:hover:not(:disabled),
.statements-picker__add:focus-visible {
  background-color: #5a6a35;
  color: #fff;
}
.statements-picker__add:disabled {
  color: #9aa388;
  border-color: #d9ded0;
  cursor: not-allowed;
}
.statements-picker__add i {
  font-size: 0.75rem;
}
.statements-picker__menu {
  max-height: 16rem;
  overflow-y: auto;
  min-width: 13rem;
  width: max-content;
  max-width: 24rem;
  padding: 0.35rem 0;
  border: 1px solid #d9ded0;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  font-size: 0.875rem;
}
.statements-picker__menu .form-check {
  padding: 0.35rem 0.75rem 0.35rem 2.25rem;
  margin: 0;
}
.statements-picker__menu .form-check:hover {
  background-color: #eef2e6;
}
.statements-picker__menu .form-check-label {
  cursor: pointer;
  white-space: nowrap;
}
.statements-picker__menu .form-check-input:checked {
  background-color: #5a6a35;
  border-color: #5a6a35;
}
.statements-picker__menu .form-check-input:disabled ~ .form-check-label {
  color: #6b6b6b;
  cursor: default;
}
.statements-picker__added {
  font-size: 0.8rem;
  font-style: italic;
}

/* Account Information */
.badge-full {
  background-color: #c43d00;
  font-size: 0.9rem !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  border: 1px solid #cc3700;
}

.badge-free {
  background-color: #0a58ca;
  font-size: 0.85rem !important;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
}
.delete-button {
  background-color: #9b4a3c;
  border: 2px solid #9b4a3c;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.45rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.delete-button:hover {
  background-color: #7d3c30;
  border-color: #7d3c30;
  color: #fff;
}

.profile-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.profile-edit{
  display: flex;
}

/* User Forms */

.user-form {
  background-color: #f7f5ef !important;
  padding: 1.5rem 1.5rem;
  border-radius: 15px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
  width: 85%; 
}

.user-form .form-control:focus {
  border-color: #5a6a35;
  box-shadow: 0 0 0 0.15rem rgba(90, 106, 53, 0.25);
}

.update-account-button{
  color: #fff;
  font-weight: bold;
  font-size: 1rem ;
  border: 2px solid #1a5589;
  background-color: #1a5589 ;
  padding: 0.1rem 2.5rem;
  border-radius: 5px;
  margin-top: 1rem;
}

.update-account-button:hover {
  color: #000;
  background-color: #fff;
  border-color: #000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
}

.fa-icon {
  color: #5a6a35;
  opacity: 0.85;
}

.password-toggle-btn {
  border: none !important;
  background: transparent !important;
  padding: 0 0.75rem;
  display: flex;
  align-items: center;
}

.password-toggle-btn:focus {
  box-shadow: none !important;
}

.password-toggle-btn i {
  font-size: 1.1rem;
  color: #6c757d;
}

tbody > tr.table-success > * {
  background-color: #edf3e8 !important;
}
tbody > tr.table-warning > * {
  background-color: #fbf6e8 !important;
}
tbody > tr.table-danger > * {
  background-color: #f6ecea !important;
}
tbody > tr.table-light > * {
  background-color: #ffffff !important;
}

.usage-report-page {
  width: 98%;
  margin: 0 auto;
  padding-bottom: 2rem;
}
.usage-report-intro {
  color: #4a4f42;
  max-width: 70ch;
}
.usage-report-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}
.usage-filter {
  min-width: 180px;
}
.usage-filter-actions {
  display: flex;
  gap: 0.5rem;
}
.usage-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.usage-kpi,
.usage-chart-card {
  background: #ffffff;
  border: 1px solid #e6e4dc;
  border-radius: 10px;
  padding: 1rem 1.25rem;
}
.usage-kpi-label {
  color: #4a4f42;
  font-size: 0.875rem;
}
.usage-kpi-value {
  color: #1f241a;
  font-size: 1.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.usage-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.usage-chart {
  position: relative;
  height: 280px;
}
.usage-table {
  border-radius: 10px;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}
.usage-vet-email {
  color: #5c6152;
  font-size: 0.8125rem;
}
.usage-chart-data {
  margin-top: 0.75rem;
}
.usage-chart-data summary {
  color: #5a6a35;
  cursor: pointer;
}
.usage-empty {
  color: #4a4f42;
  font-style: italic;
}
.export-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #5a6a35;
  background-color: #f7f5ef;
  color: #5a6a35;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}
.export-link:hover {
  background-color: #5a6a35;
  color: #fff;
  border-color: #5a6a35;
}

/* Footer */

.footer {
  background-color: #ffff; 
  text-align: center;
  margin-top: auto;
  padding-top: 5px;
}
.footer-text{
  font-size: 1.2rem;
}

.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(47, 58, 31, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner-wrapper {
  text-align: center;
  color: white;
  font-size: 18px;
}

.table-container {
  margin-top: 1.5rem;
}

.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.5) !important;
}

.eula-box {
  font-size: 0.9rem;
  background-color: #f9f9f9;
  border-radius: 6px;
  line-height: 1.4;
  overflow-y: auto;
  max-height: 250px;
  border: 1px solid #ccc;
}

.cvi-form .form-check-input:checked {
  background-color: #5a6a35;
  border-color: #5a6a35;
}
.cvi-form .form-check-input:focus {
  border-color: #5a6a35;
  box-shadow: 0 0 0 0.2rem rgba(90, 106, 53, 0.18);
}

.signup-form {
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.signup-login-link {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.signup-login-link:hover {
  color: #e9d48a;
}
.signup-form .eula-box {
  max-height: 260px;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: #fbfbf8;
  border: 1px solid #e0e5d8;
}

.auth-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 2.5rem 1rem;
  background:
    radial-gradient(circle at 15% 10%, rgba(233, 212, 138, 0.35), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(95, 113, 54, 0.18), transparent 45%),
    #f7f5ef;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 2.25rem 2.25rem 2rem;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #e0e5d8;
  box-shadow: 0 20px 48px rgba(63, 74, 38, 0.14);
}
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
  text-decoration: none;
}
.auth-brand__mark {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  color: #e9d48a;
  background: linear-gradient(135deg, #5f7136, #3f4a26);
  box-shadow: 0 6px 14px rgba(63, 74, 38, 0.25);
}
.auth-brand__name {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #2f3a1c;
}
.auth-card__icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  font-size: 1.2rem;
  color: #4d5a2f;
  background: #eef1e6;
}
.auth-card__title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  color: #1f241a;
}
.auth-card__subtitle {
  margin: 0.35rem 0 1.5rem;
  color: #5f5f5f;
}
.auth-card .cvi-errors {
  margin-bottom: 1rem;
}
.auth-card .cvi-errors__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: #6a1f16;
}
.auth-field {
  margin-bottom: 1rem;
}
.auth-field__label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.auth-card .form-label,
.cvi-form .auth-field .form-label {
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #3b4524;
}
.auth-card .form-control {
  height: 2.75rem;
  border: 1px solid #d9ded0;
  border-radius: 10px;
  background-color: #fbfbf8;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.auth-card .form-control:hover {
  border-color: #c3cbb0;
}
.auth-card .form-control:focus {
  border-color: #5a6a35;
  background-color: #fff;
  box-shadow: 0 0 0 0.2rem rgba(90, 106, 53, 0.18);
}
.auth-card .form-text {
  display: block;
  margin-top: 0.35rem;
  color: #5f5f5f;
}
.auth-password {
  position: relative;
}
.auth-password .form-control {
  padding-right: 3rem;
}
.auth-password .password-toggle-btn {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  border-radius: 0 10px 10px 0;
}
.auth-inline-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: #4d5a2f;
}
.auth-inline-link:hover {
  color: #2f3a1c;
}
.auth-remember {
  margin: 0.25rem 0 1.25rem;
}
.auth-card .form-check-input:checked {
  background-color: #5a6a35;
  border-color: #5a6a35;
}
.auth-submit {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #5f7136, #4d5a2f);
  box-shadow: 0 8px 18px rgba(63, 74, 38, 0.25);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(63, 74, 38, 0.32);
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b6b6b;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #e6e9dc;
}
.auth-google-form {
  margin: 0;
}
.auth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  color: #2f3a1c;
  background: #fff;
  border: 1px solid #d9ded0;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.auth-google:hover {
  border-color: #5a6a35;
  background: #f7f5ef;
}
.auth-google .fa-google {
  color: #c43d00;
}
.auth-links {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #eef0e8;
  text-align: center;
  font-size: 0.9rem;
  color: #5f5f5f;
}
.auth-links p {
  margin: 0 0 0.4rem;
}
.auth-links p:last-child {
  margin-bottom: 0;
}
.auth-links a {
  font-weight: 700;
  color: #4d5a2f;
}
.auth-links a:hover {
  color: #2f3a1c;
}
@media (max-width: 480px) {
  .auth-card {
    padding: 1.75rem 1.4rem;
  }
}

.export-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.export-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  color: #3b4524;
  background: #fff;
  border: 1px solid #d9ded0;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.export-filter:hover {
  color: #2f3a1c;
  border-color: #5a6a35;
}
.export-filter__count {
  min-width: 1.6rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  text-align: center;
  color: #3b4524;
  background: #eef1e6;
}
.export-filter--alert .export-filter__count {
  color: #fff;
  background: #9b3a2c;
}
.export-filter--active,
.export-filter--active:hover {
  color: #fff;
  background: #5a6a35;
  border-color: #5a6a35;
}
.export-filter--active .export-filter__count {
  color: #2f3a1c;
  background: #fff;
}
.export-cvis-table {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e0e5d8;
}
.export-cvis-table td {
  vertical-align: middle;
}
.export-cvi-link {
  font-weight: 700;
  color: #3f4a26;
}
.export-state {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: #3f4a26;
  background: #eef1e6;
}
.export-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.export-status--sent {
  color: #2f4a12;
  background: #e3efc8;
}
.export-status--failed {
  color: #7a2a1f;
  background: #fbe3de;
}
.export-status--voided {
  color: #5c4610;
  background: #f6ead0;
}
.export-status--pending {
  color: #3b3f36;
  background: #ecece8;
}
.export-destination {
  max-width: 22rem;
  overflow-wrap: anywhere;
}
.export-date {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.export-time {
  display: block;
  font-size: 0.8rem;
  color: #5f5f5f;
}

.compact-form {
  max-width: 880px;
  margin: 0.5rem auto 2rem;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e0e5d8;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 28px rgba(77, 90, 47, 0.08);
}
.compact-form__header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem 1.5rem;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(233, 212, 138, 0.22), transparent 50%),
    linear-gradient(135deg, #5f7136 0%, #3f4a26 100%);
}
.compact-form__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  color: #3f4a26;
  background: linear-gradient(135deg, #fbf6e4, #e9d48a);
}
.compact-form__title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}
.compact-form__subtitle {
  margin: 0.1rem 0 0;
  font-size: 0.875rem;
  color: #eef1e6;
}
.compact-form__body {
  padding: 1.1rem 1.5rem 0.4rem;
}
.compact-form__body .cvi-errors {
  margin-bottom: 1rem;
}
.compact-form__body .cvi-errors__title {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  font-weight: 700;
  color: #6a1f16;
}
.compact-form__group {
  margin: 0 0 1rem;
  padding: 0 0 1rem;
  border: 0;
  border-bottom: 1px solid #eef0e8;
}
.compact-form__group:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}
.compact-form__group legend {
  float: none;
  width: auto;
  margin: 0 0 0.15rem;
  padding: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4d5a2f;
}
.compact-form__hint {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: #5f5f5f;
}
.compact-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 1rem;
  margin-top: 0.5rem;
}
.compact-form__grid--4 {
  grid-template-columns: 1.4fr 1.2fr 0.8fr 0.9fr;
}
.compact-form__field .form-label {
  margin-bottom: 0.2rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #3b4524;
}
.compact-form .form-control,
.compact-form .form-select {
  height: 2.3rem;
  font-size: 0.9rem;
  border: 1px solid #d9ded0;
  border-radius: 9px;
  background-color: #fbfbf8;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.compact-form .form-control:hover,
.compact-form .form-select:hover {
  border-color: #c3cbb0;
}
.compact-form .form-control:focus,
.compact-form .form-select:focus {
  border-color: #5a6a35;
  background-color: #fff;
  box-shadow: 0 0 0 0.2rem rgba(90, 106, 53, 0.18);
}
.compact-form .form-text {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: #5f5f5f;
}
.compact-form__switch {
  align-self: end;
  padding-bottom: 0.1rem;
}
.compact-form__switch .form-check {
  margin: 0;
}
.compact-form__switch .form-check-label {
  font-weight: 600;
  color: #3b4524;
}
.compact-form .form-check-input:checked {
  background-color: #5a6a35;
  border-color: #5a6a35;
}
.compact-form .form-check-input:focus {
  border-color: #5a6a35;
  box-shadow: 0 0 0 0.2rem rgba(90, 106, 53, 0.18);
}
.compact-form__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: #f7f5ef;
  border-top: 1px solid #e6e9dc;
}
.compact-form__cancel {
  font-weight: 700;
  color: #4d5a2f;
}
.compact-form__cancel:hover {
  color: #2f3a1c;
}
.compact-form__submit {
  padding: 0.5rem 1.4rem;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #5f7136, #4d5a2f);
  box-shadow: 0 6px 14px rgba(63, 74, 38, 0.22);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.compact-form__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(63, 74, 38, 0.3);
}
@media (max-width: 767px) {
  .compact-form__grid,
  .compact-form__grid--4 {
    grid-template-columns: 1fr;
  }
}

.cvis-page__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 1 36rem;
  justify-content: flex-end;
}
.cvis-page .users-search {
  flex: 1 1 auto;
  min-width: 14rem;
}
.cvis-page .cvi-index.btn-primary {
  width: auto;
  padding: 0.45rem 1rem;
  white-space: nowrap;
}
.cvis-page .search-form {
  margin: 0;
}
.cvis-table {
  border: 1px solid #e0e5d8;
}
.cvis-table td {
  vertical-align: middle;
}
.cvis-number {
  font-weight: 700;
  color: #3f4a26;
  white-space: nowrap;
}
.cvis-number--draft {
  font-style: italic;
  font-weight: 600;
}
.cvis-date,
.cvis-count {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.cvis-route {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem 0.45rem;
}
.cvis-route__place {
  color: #1f241a;
}
.cvis-route__state {
  padding: 0 0.35rem;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #3f4a26;
  background: #eef1e6;
}
.cvis-route__state:empty {
  display: none;
}
.cvis-route__arrow {
  font-size: 0.75rem;
  color: #7d8f4c;
}
.cvis-draft-check {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: #7a2a1f;
}
.cvis-draft-check--ok {
  color: #2f4a12;
}
.cvis-empty {
  padding: 2rem 1rem !important;
  text-align: center;
  color: #5f5f5f;
}
.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
}
.row-actions form {
  margin: 0;
}
.row-action {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #4d5a2f;
  background: #fff;
  border: 1px solid #d9ded0;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.row-action:hover,
.row-action:focus-visible {
  color: #fff;
  background: #5a6a35;
  border-color: #5a6a35;
}
.row-action--danger {
  color: #9b3a2c;
}
.row-action--danger:hover,
.row-action--danger:focus-visible {
  color: #fff;
  background: #9b3a2c;
  border-color: #9b3a2c;
}
.cvis-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}
.cvis-footer__info {
  margin: 0;
  font-size: 0.85rem;
  color: #5f5f5f;
}
.cvis-footer .pagination {
  margin: 0;
}

:focus-visible {
  outline: 3px solid #1f241a !important;
  outline-offset: 2px;
}
.nav-container :focus-visible {
  outline-color: #f7f5ef !important;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 2000;
  padding: 0.5rem 1rem;
  background-color: #1f241a;
  color: #fff;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
  color: #fff;
}

.main-content:focus {
  outline: none;
}

main p a:not(.btn):not([class*="button"]),
main td a:not(.btn):not([class*="button"]):not(.export-link) {
  text-decoration: underline;
}

.btn.btn-link {
  --bs-btn-color: #5a6a35;
  --bs-btn-hover-color: #4d5a2f;
  --bs-btn-active-color: #4d5a2f;
}

button.profile-details {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

.icon-button {
  background: none;
  border: none;
  padding: 0.25rem 0.5rem;
  color: inherit;
  line-height: 1;
}
.icon-button.text-danger {
  color: #b02a37 !important;
}

.footer-text {
  margin-bottom: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* Links and the New eCVI dropdown button share one box so the nav buttons line up. */
.nav-actions .component-item {
  display: inline-flex;
  align-items: center;
  height: 2rem;
  line-height: 1;
  font-family: inherit;
}
.new-ecvi-menu {
  display: flex;
}
.new-ecvi-menu .dropdown-menu {
  min-width: 12rem;
}
.new-ecvi-menu .dropdown-item:hover,
.new-ecvi-menu .dropdown-item:focus {
  background-color: #eef1e6;
  color: #4d5a2f;
}
.new-ecvi-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 28rem;
}
.new-ecvi-form-row .form-select {
  flex: 1 1 12rem;
}

/* Address book state tabs */
.address-state-tabs .nav-tabs {
  border-bottom-color: #c9d1b5;
}
.address-state-tabs .nav-link {
  color: #4d5a2f;
  font-weight: 500;
}
.address-state-tabs .nav-link:hover,
.address-state-tabs .nav-link:focus {
  color: #3b4524;
  background-color: #eef1e6;
  border-color: #eef1e6 #eef1e6 #c9d1b5;
}
.address-state-tabs .nav-link .badge {
  background-color: #e3e8d5;
  color: #4d5a2f;
  padding: 0.25rem 0.55rem !important;
  font-size: 0.8rem !important;
}
.address-state-tabs .nav-link.active {
  color: #fff;
  background-color: #5a6a35;
  border-color: #5a6a35;
}
.address-state-tabs .nav-link.active .badge {
  background-color: #fff;
  color: #4d5a2f;
}
.address-state-tabs .tab-kind {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 400;
  margin-left: 0.25rem;
  opacity: 0.85;
}
.new-ecvi-menu .cvi-index.btn-primary {
  width: auto;
  min-width: 10rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.state-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.state-card {
  background: #fff;
  border: 1px solid #e0e5d8;
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 16px rgba(77, 90, 47, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.state-card:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05), 0 10px 24px rgba(77, 90, 47, 0.12);
  transform: translateY(-1px);
}
.state-card__header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.state-card__monogram {
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, #6b7d40, #4d5a2f);
}
.state-card__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  min-width: 0;
}
.state-card__name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #2f3a1c;
  margin: 0;
}
.access-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}
.access-pill--full {
  background: #4d5a2f;
  color: #fff;
}
.access-pill--full .fa-star {
  color: #e9d48a;
  font-size: 0.65rem;
}
.access-pill--free {
  background: #eef1e6;
  color: #4d5a2f;
  border: 1px solid #c9d1b5;
}
.access-pill--disabled {
  background: #f0f0f0;
  color: #595959;
}
.state-card__meters {
  display: grid;
  gap: 0.9rem;
}
.usage-meter__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.35rem;
}
.usage-meter__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #5c6650;
}
.usage-meter__value {
  font-size: 0.85rem;
  color: #2f3a1c;
}
.usage-meter__value strong {
  font-size: 1rem;
}
.usage-meter__track {
  height: 6px;
  border-radius: 999px;
  background: #e9ecdf;
  overflow: hidden;
}
.usage-meter__track--unlimited {
  background: repeating-linear-gradient(90deg, #c9d1b5 0 8px, #e9ecdf 8px 14px);
}
.usage-meter__fill {
  height: 100%;
  border-radius: inherit;
  transition: width 0.4s ease;
}
.usage-meter__fill--ok {
  background: linear-gradient(90deg, #7d8f4c, #5a6a35);
}
.usage-meter__fill--high {
  background: #c98a1b;
}
.usage-meter__fill--full {
  background: #b23a2a;
}
.usage-meter__note {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: #5f5f5f;
}
.state-card--disabled {
  background: #fafafa;
}
.state-card--disabled .state-card__monogram {
  background: #9a9a9a;
}
.state-card__disabled-note {
  margin: 0;
  font-size: 0.85rem;
  color: #5f5f5f;
}

/* Profile page */
.profile-page {
  width: 80%;
  margin: 0 auto;
  padding: 0 0 2.5rem;
}
.profile-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #4d5a2f;
  text-decoration: none;
}
.profile-back-link:hover {
  color: #2f3a1c;
  text-decoration: underline;
}
.profile-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(233, 212, 138, 0.22), transparent 45%),
    linear-gradient(135deg, #5f7136 0%, #3f4a26 100%);
  box-shadow: 0 12px 32px rgba(63, 74, 38, 0.25);
}
.profile-hero__avatar {
  flex: none;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #3f4a26;
  background: linear-gradient(135deg, #fbf6e4, #e9d48a);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18);
}
.profile-hero__identity {
  flex: 1;
  min-width: 0;
}
.profile-hero__eyebrow {
  margin: 0 0 0.15rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e9e2c4;
}
.profile-hero__name {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 700;
  color: #fff;
}
.profile-hero__meta {
  margin: 0.2rem 0 0.75rem;
  color: #eef1e6;
  overflow-wrap: anywhere;
}
.profile-hero__dot {
  margin: 0 0.4rem;
}
.profile-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.profile-hero__edit {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #3f4a26;
  background: #fff;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.profile-hero__edit:hover {
  color: #3f4a26;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}
.profile-panel {
  background: #f7f5ef;
  border: 1px solid #e0e5d8;
  border-radius: 16px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.5rem;
}
.profile-panel__header {
  margin-bottom: 1.1rem;
}
.profile-panel__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #2f3a1c;
}
.profile-panel__title .fas {
  color: #5a6a35;
  font-size: 1rem;
}
.profile-panel__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.875rem;
  color: #5f5f5f;
}
.profile-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.profile-details-grid .profile-panel {
  margin-bottom: 0;
}
.detail-list {
  display: grid;
  gap: 1rem;
  margin: 0;
}
.detail-list__item {
  padding-bottom: 1rem;
  border-bottom: 1px solid #e6e9dc;
}
.detail-list__item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}
.detail-list dt {
  margin-bottom: 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5c6650;
}
.detail-list dd {
  margin: 0;
  color: #1f241a;
  overflow-wrap: anywhere;
}
.profile-empty {
  color: #6b6b6b;
  font-style: italic;
}
.profile-danger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: #fff;
  border-color: #ecd3cd;
}
.profile-danger__button {
  padding: 0.5rem 1.1rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #9b4a3c;
  background: #fff;
  border: 2px solid #9b4a3c;
  cursor: pointer;
  transition: all 0.2s ease;
}
.profile-danger__button:hover,
.profile-danger__button:focus-visible {
  color: #fff;
  background: #9b4a3c;
}
@media (max-width: 640px) {
  .profile-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
  }
  .profile-hero__edit {
    align-self: stretch;
    justify-content: center;
  }
  .profile-details-grid {
    grid-template-columns: 1fr;
  }
}

/* Manage Users */
.users-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.users-header__title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  color: #2f3a1c;
}
.users-header__subtitle {
  margin: 0.15rem 0 0;
  color: #5f5f5f;
}
.users-search {
  flex: 0 1 26rem;
}
.users-states-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.users-states-cell .dropdown {
  flex: none;
}
.user-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.user-cell__avatar {
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #3f4a26;
  background: linear-gradient(135deg, #fbf6e4, #e9d48a);
}
.user-cell__text {
  min-width: 0;
}
.user-cell__name {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: #1f241a;
}
.user-cell__email {
  font-size: 0.85rem;
  color: #5f5f5f;
  overflow-wrap: anywhere;
}
.state-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.state-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.6rem 0.2rem 0.25rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #dfe4d2;
  font-size: 0.8rem;
  color: #2f3a1c;
}
.state-chip__code {
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
  background: #5a6a35;
}
.state-chip--free .state-chip__code {
  color: #3f4a26;
  background: #e3e8d5;
}
.state-chip__access {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4d5a2f;
}
.state-chip__usage {
  color: #555;
}
.state-chip--disabled {
  background: #f5f5f5;
}
.state-chip--disabled .state-chip__code {
  color: #fff;
  background: #8a8a8a;
}
.users-edit-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4d5a2f;
  background: #fff;
  border: 1px solid #c9d1b5;
  transition: all 0.2s ease;
}
.users-edit-button:hover,
.users-edit-button:focus-visible,
.users-edit-button[aria-expanded="true"] {
  color: #fff;
  background: #5a6a35;
  border-color: #5a6a35;
}

/* Home dashboard */
.home-page {
  width: 80%;
  margin: 0 auto;
  padding: 0 0 2.5rem;
}
.home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 2rem 2.25rem;
  margin-bottom: 1.5rem;
  border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(233, 212, 138, 0.22), transparent 45%),
    linear-gradient(135deg, #5f7136 0%, #3f4a26 100%);
  box-shadow: 0 12px 32px rgba(63, 74, 38, 0.25);
}
.home-hero__intro {
  flex: 1 1 22rem;
  min-width: 0;
}
.home-hero__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e9e2c4;
}
.home-hero__title {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}
.home-hero__subtitle {
  margin: 0.35rem 0 0;
  color: #eef1e6;
}
.start-ecvi {
  flex: 0 1 26rem;
  padding: 1.1rem 1.25rem;
  border-radius: 14px;
  background: #fff;
  color: #1f241a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.start-ecvi__title {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #2f3a1c;
}
.start-ecvi__label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5c6650;
}
.start-ecvi__row {
  display: flex;
  gap: 0.5rem;
}
.start-ecvi__row .form-select {
  flex: 1;
  min-width: 0;
}
.start-ecvi__button {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  color: #fff;
  background: #5a6a35;
  transition: background 0.2s ease;
}
.start-ecvi__button:hover,
.start-ecvi__button:focus-visible {
  background: #3f4a26;
}
.start-ecvi__button:disabled {
  background: #9aa388;
  cursor: not-allowed;
}
.start-ecvi__note {
  margin: 0;
  color: #5f5f5f;
}
.home-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-tile {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem 1.25rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e0e5d8;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 16px rgba(77, 90, 47, 0.06);
}
.stat-tile__icon {
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #4d5a2f;
  background: #eef1e6;
}
.stat-tile__text {
  display: flex;
  flex-direction: column;
}
.stat-tile__value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  color: #1f241a;
}
.stat-tile__label {
  font-size: 0.85rem;
  color: #5c6650;
}
.stat-tile__counters {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.75rem;
  row-gap: 0.25rem;
}
.stat-tile__state {
  margin-right: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #5c6650;
}
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 1.5rem;
  align-items: start;
}
.home-grid .profile-panel {
  margin-bottom: 0;
}
.home-grid .state-cards {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.home-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.home-panel-link {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #4d5a2f;
  text-decoration: none;
}
.home-panel-link:hover {
  color: #2f3a1c;
  text-decoration: underline;
}
.recent-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e0e5d8;
  overflow: hidden;
}
.recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #eef0e8;
}
.recent-item:last-child {
  border-bottom: none;
}
.recent-item:hover {
  background: #fafbf6;
}
.recent-item__main {
  min-width: 0;
}
.recent-item__top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}
.recent-item__number {
  font-weight: 700;
  color: #1f241a;
}
.recent-item__state {
  padding: 0 0.4rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #3f4a26;
  background: #e3e8d5;
}
.recent-item__route {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  color: #2f3a1c;
  overflow-wrap: anywhere;
}
.recent-item__route .fas {
  color: #7d8f4c;
}
.recent-item__meta {
  font-size: 0.8rem;
  color: #5f5f5f;
}
.recent-item__action {
  flex: none;
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4d5a2f;
  border: 1px solid #c9d1b5;
  text-decoration: none;
  transition: all 0.2s ease;
}
.recent-item__action:hover,
.recent-item__action:focus-visible {
  color: #fff;
  background: #5a6a35;
  border-color: #5a6a35;
}
.status-pill {
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.status-pill--completed {
  color: #fff;
  background: #4d5a2f;
}
.status-pill--draft {
  color: #7a4f00;
  background: #fdf0d2;
}
.status-pill--voided {
  color: #8f2a1d;
  background: #fbe3df;
}
.status-pill--other {
  color: #444;
  background: #eee;
}
.home-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: #5f5f5f;
  border-radius: 12px;
  background: #fff;
  border: 1px dashed #c9d1b5;
}
.home-empty .fas {
  font-size: 1.75rem;
  color: #9aa388;
  margin-bottom: 0.5rem;
}
.home-empty p {
  margin: 0;
}
@media (max-width: 900px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .home-hero {
    padding: 1.5rem;
  }
  .start-ecvi {
    flex-basis: 100%;
  }
  .start-ecvi__row {
    flex-direction: column;
  }
  .recent-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* States admin */
.states-table td {
  background: #fff;
}
.states-table__row--disabled td {
  color: #5f5f5f;
}
.state-name-cell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.state-name-cell__code {
  min-width: 2.4rem;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: #3f4a26;
  background: #e3e8d5;
}
.states-table__row--disabled .state-name-cell__code {
  color: #555;
  background: #ececec;
}
.states-table__limit {
  font-variant-numeric: tabular-nums;
}
.delivery-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #3f4a26;
}
.delivery-tag .fas {
  color: #7d8f4c;
}
.delivery-tag--none,
.delivery-tag--none .fas {
  color: #8f2a1d;
}
.states-table__emails {
  max-width: 16rem;
  font-size: 0.78rem;
  color: #5f5f5f;
  overflow-wrap: anywhere;
}

/* eCVI form: card layout. Markup hooks used by cvi_animals.js are unchanged; this is styling only. */
.cvi-form {
  width: 80%;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}
.cvi-form .cvi-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(233, 212, 138, 0.22), transparent 45%),
    linear-gradient(135deg, #5f7136 0%, #3f4a26 100%);
  box-shadow: 0 12px 32px rgba(63, 74, 38, 0.25);
}
.cvi-hero__text {
  flex: 1 1 24rem;
  min-width: 0;
}
.cvi-hero__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e9e2c4;
}
.cvi-form .cvi-hero h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  text-align: left;
  color: #fff;
}
.cvi-form .cvi-hero h1 .fa-icon {
  color: #e9d48a;
}
.cvi-hero__subtitle {
  margin: 0.35rem 0 0;
  color: #eef1e6;
}
.cvi-hero__origin {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1.1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
}
.cvi-hero__origin-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e9e2c4;
}
.cvi-hero__origin-value {
  font-size: 1.05rem;
}
.cvi-hero__origin-value strong {
  margin-right: 0.35rem;
  font-size: 1.25rem;
}

/* Sections as numbered cards */
.cvi-form .form-section {
  margin-bottom: 1rem;
  padding: 1.15rem 1.35rem 0.6rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e0e5d8;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 16px rgba(77, 90, 47, 0.06);
}
.form-section__header {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #eef0e8;
}
.form-section__step {
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #6b7d40, #4d5a2f);
}
.cvi-form .form-section .form-section__header h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.15rem 0 0;
  padding: 0;
  border: none;
  font-size: 1.15rem;
  font-weight: 700;
  color: #2f3a1c;
}
.form-section__header h2 .fas {
  font-size: 0.95rem;
  color: #7d8f4c;
}
.form-section__hint {
  margin: 0.2rem 0 0;
  font-size: 0.875rem;
  color: #5f5f5f;
}

/* Fields */
.cvi-form .form-label {
  margin-bottom: 0.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #3b4524;
}
.cvi-form .form-group {
  position: relative;
  margin-bottom: 0.7rem;
}
.cvi-form .form-control,
.cvi-form .form-select {
  height: 2.4rem;
  border: 1px solid #d9ded0;
  border-radius: 10px;
  background-color: #fbfbf8;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.cvi-form textarea.form-control {
  height: auto;
  min-height: 5rem;
}
.cvi-form .form-control:hover,
.cvi-form .form-select:hover {
  border-color: #c3cbb0;
}
.cvi-form .form-control:focus,
.cvi-form .form-select:focus {
  border-color: #5a6a35;
  background-color: #fff;
  box-shadow: 0 0 0 0.2rem rgba(90, 106, 53, 0.18);
}
.cvi-form .datepicker[readonly] {
  cursor: pointer;
  background-color: #fbfbf8;
}
.cvi-form #origin-state[readonly] {
  font-weight: 700;
  color: #3f4a26;
  background-color: #eef1e6;
  border-color: #c9d1b5;
  cursor: default;
}
.cvi-form .form-text {
  color: #5f5f5f;
}
.cvi-species {
  max-width: 28rem;
  margin-bottom: 0;
}

/* "Copy to new animals" checkbox above an animal's vaccinations and test results */
.copy-records {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0.25rem 0 0.75rem;
}
.copy-records__checkbox {
  flex: none;
  margin-top: 0.2rem;
}
.copy-records__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #3b4524;
}

.cvi-animal-limit {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 1.25rem;
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  background: #eef1e6;
  border: 1px solid #c9d1b5;
  border-left: 5px solid #5a6a35;
  color: #2f3a1c;
}
.cvi-animal-limit[hidden] {
  display: none;
}
.cvi-animal-limit .fas {
  margin-top: 0.2rem;
  color: #5a6a35;
}
.cvi-animal-limit p {
  margin: 0;
}
.cvi-form .field-error {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #9b2c1f;
}
.cvi-form .form-control[aria-invalid="true"] {
  border-color: #9b2c1f;
}
#cvi-notice-modal .modal-title .fas {
  color: #9b4a3c;
}

/* Herd/Flock and other-information tables, styled as plain field groups */
.cvi-form .form-section .table {
  margin-bottom: 1rem;
}
.cvi-form .form-section .table > :not(caption) > * > * {
  padding: 0.3rem 0.5rem 0.3rem 0;
  border-width: 0;
  background-color: transparent;
  box-shadow: none;
}
.cvi-form .form-section .table thead th {
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
  color: #3b4524;
  background: transparent;
}
.cvi-form .form-section .table thead tr:first-child th[colspan] {
  padding-bottom: 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5c6650;
}

/* Address search suggestions */
.cvi-form .suggestions-container {
  left: 0;
  right: 0;
}
.cvi-form .suggestions-container:not(:has(.suggestion-item)) {
  border: 0;
  box-shadow: none;
}

/* Individual animals: numbered cards with an accent edge so each one stands apart */
.cvi-form #animals-controller {
  counter-reset: animal;
}
.cvi-form #animals-controller > .nested-fields {
  counter-increment: animal;
}
.cvi-form #animals-controller > .nested-fields .animal-section {
  border-left: 6px solid #5a6a35;
  overflow: hidden;
  padding: 0 1.25rem 1rem;
  margin-bottom: 1.5rem;
}
.cvi-form #animals-controller > .nested-fields:nth-child(even) .animal-section {
  border-left-color: #a9b48c;
  background: #f3f5ec;
}
.cvi-form .animal-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 -1.25rem 1rem;
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid #e3e8d5;
  background: #eef1e6;
}
.cvi-form .animal-section .animal-section__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
  color: #2f3a1c;
}
.cvi-form #animals-controller .animal-section__title::after {
  content: " " counter(animal);
}
.cvi-form .animal-section__header .remove_animal {
  margin-top: 0;
}
.cvi-form .animal-section .copy-records {
  margin: 0 0 0.5rem;
}
.cvi-form .animal-section #tags-container,
.cvi-form .animal-section .vaccination-wrapper,
.cvi-form .animal-section .test-result-wrapper {
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.5rem;
}
.cvi-form .animal-section .tag-group,
.cvi-form .animal-section .vaccination-entry,
.cvi-form .animal-section .test-result-entry {
  margin-bottom: 0.5rem !important;
}

.cvi-form .animal-section .form-group {
  margin-bottom: 0;
}
.cvi-form .age-units {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.2rem 0.6rem;
  margin-top: 0.45rem;
  font-size: 0.75rem;
}
.cvi-form .age-unit {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  white-space: nowrap;
}
.cvi-form .animal-section .age-unit label {
  margin: 0;
  font-weight: 500;
  color: #2f3a1c;
}
.cvi-form .animal-section .age-unit input[type="radio"] {
  width: 0.85rem;
  height: 0.85rem;
  margin: 0;
}
.cvi-form .age-hint {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.75rem;
  line-height: 1.3;
}

/* Group lots and individual animals */
.cvi-form .group-lot-fields,
.cvi-form .animal-section {
  padding: 1.25rem;
  margin-bottom: 1rem;
  border-radius: 14px;
  background: #fafbf6;
  border: 1px solid #e3e8d5;
  box-shadow: none;
}
.cvi-form .animal-section h4.animal-section__subhead {
  margin: 1rem 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4d5a2f;
}
.cvi-form #tags-container,
.cvi-form .vaccination-wrapper,
.cvi-form .test-result-wrapper {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e3e8d5;
}
.cvi-form #tags-container strong,
.cvi-form .vaccination-wrapper strong {
  font-size: 0.8rem;
  font-weight: 600;
  color: #5c6650;
}
.cvi-form .animal-section input[type="radio"] {
  accent-color: #5a6a35;
}
.cvi-form .animal-section input[type="radio"] + .form-label {
  margin: 0 0.85rem 0 0.25rem;
  font-weight: 500;
  color: #2f3a1c;
}
.cvi-form #add_group_lot,
.cvi-form #add_animal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin: 0.5rem 0 0;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  border: 1.5px dashed #a9b48c;
  background: #fafbf6;
  color: #4d5a2f;
  font-size: 0.95rem;
  font-weight: 600;
}
.cvi-form #add_group_lot::before,
.cvi-form #add_animal::before {
  content: "\2b";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}
.cvi-form #add_group_lot:hover,
.cvi-form #add_group_lot:focus-visible,
.cvi-form #add_animal:hover,
.cvi-form #add_animal:focus-visible {
  border-color: #5a6a35;
  background: #eef1e6;
  color: #3f4a26;
}
.cvi-form .remove_group_lot,
.cvi-form .remove_animal {
  margin-top: 1rem;
  border-radius: 8px !important;
  background: #fff !important;
  border: 1px solid #d7b3ab !important;
  color: #9b4a3c !important;
  font-weight: 600;
}
.cvi-form .remove_group_lot:hover,
.cvi-form .remove_group_lot:focus-visible,
.cvi-form .remove_animal:hover,
.cvi-form .remove_animal:focus-visible {
  background: #9b4a3c !important;
  border-color: #9b4a3c !important;
  color: #fff !important;
}
.cvi-form .add-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 50%;
}
.cvi-form .add-vaccination,
.cvi-form .add-test-result {
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Sticky action bar */
.cvi-form .cvi-submit {
  position: sticky;
  bottom: 1rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0 1rem;
  padding: 0.85rem 1.25rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #e0e5d8;
  box-shadow: 0 10px 30px rgba(31, 36, 26, 0.15);
  backdrop-filter: blur(8px);
}
.cvi-submit__hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.85rem;
  color: #5f5f5f;
}
.cvi-submit__hint .fas {
  color: #7d8f4c;
}
.cvi-submit__buttons {
  display: flex;
  gap: 0.75rem;
}
.cvi-form .submit-button {
  width: auto;
  min-width: 9rem;
  padding: 0.55rem 1.25rem;
  font-size: 1rem;
  border-radius: 10px;
}
@media (max-width: 640px) {
  .cvi-form .cvi-hero {
    padding: 1.4rem;
  }
  .cvi-form .form-section {
    padding: 1.15rem;
  }
  .cvi-submit__buttons {
    width: 100%;
  }
  .cvi-form .submit-button {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 1100px) {
  .home-page,
  .profile-page,
  .cvi-form {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.cvi-errors {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
  padding: 1.1rem 1.25rem;
  border-radius: 14px;
  background: #fdf3f1;
  border: 1px solid #ecc8c0;
  border-left: 5px solid #9b4a3c;
  box-shadow: 0 6px 18px rgba(155, 74, 60, 0.12);
}
.cvi-errors[hidden] {
  display: none;
}
.cvi-errors:focus {
  outline: 2px solid #9b4a3c;
  outline-offset: 2px;
}
.cvi-errors__icon {
  flex: none;
  font-size: 1.4rem;
  color: #9b4a3c;
}
.cvi-errors__body {
  flex: 1;
  min-width: 0;
}
.cvi-form .cvi-errors__title {
  margin: 0;
  padding: 0;
  border: none;
  font-size: 1.05rem;
  font-weight: 700;
  color: #6a1f16;
}
.cvi-errors__intro {
  margin: 0.2rem 0 0.6rem;
  font-size: 0.875rem;
  color: #6a3a32;
}
.cvi-errors__list {
  margin: 0;
  padding-left: 1.1rem;
  color: #4a1a12;
}
.cvi-errors__list li + li {
  margin-top: 0.25rem;
}
.cvi-errors__close {
  flex: none;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #6a1f16;
}
.cvi-errors__close:hover,
.cvi-errors__close:focus-visible {
  background: #f6dcd6;
}

/* Info icon with a tooltip shown on hover or keyboard focus */
.address-limit-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.info-tip {
  position: relative;
  display: inline-flex;
}
.info-tip__button {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #4d5a2f;
  font-size: 1rem;
  cursor: help;
}
.info-tip__button:hover,
.info-tip__button:focus-visible {
  background: #eef1e6;
}
.info-tip__text {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  width: max-content;
  max-width: min(22rem, 80vw);
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #f7f5ef;
  background: #1f241a;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;
}

.info-tip__text::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 6px;
}
.info-tip:hover .info-tip__text,
.info-tip__button:focus-visible + .info-tip__text {
  opacity: 1;
  visibility: visible;
}
.info-tip.is-dismissed .info-tip__text {
  opacity: 0;
  visibility: hidden;
}

/* Bulk animal entry (#184) */
.bulk-animal-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.bulk-animal-links .form-section__hint { flex-basis: 100%; margin: 0; }
.bulk-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.bulk-header h1 { margin-bottom: 0.25rem; }
.bulk-header__meta { color: #495057; margin: 0; }
.bulk-header__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.bulk-tab-content { padding: 1.25rem 0; }
.bulk-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; margin-bottom: 1rem; }
.bulk-toolbar .button_to { margin: 0; }
.bulk-toolbar__group .form-label { display: block; margin-bottom: 0.25rem; font-size: 0.875rem; }
.bulk-toolbar__group .form-control { width: 8rem; }
.bulk-tags { border: 0; padding: 0; margin: 0; }
.bulk-tag { margin-bottom: 0.25rem; }
.bulk-tag__incr { display: flex; align-items: center; gap: 0.35rem; padding-bottom: 0.5rem; }
.bulk-records-note { margin: 1.5rem 0 0; }
.bulk-animal { border: 1px solid #dee2e6; border-radius: 0.375rem; background: #f8f9fa; padding: 0.75rem 1rem 1rem; margin-bottom: 0.75rem; }
.bulk-animal--invalid { border-color: #b02a37; box-shadow: 0 0 0 1px #b02a37; }
.bulk-animal__title { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; float: none; }
.bulk-animal__errors { font-weight: 600; margin-bottom: 0.5rem; }
.bulk-pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1rem; }
.bulk-empty { color: #495057; padding: 1rem 0; }
.bulk-saved caption { caption-side: top; color: #495057; }
.bulk-submit { margin-top: 1.5rem; }
.bulk-info { background: #f1f3f5; border: 1px solid #dee2e6; border-radius: 0.375rem; padding: 1rem 1.25rem; }
.bulk-import-file { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.bulk-import-file .button_to { margin: 0; }
.bulk-preview { max-height: 32rem; overflow: auto; }
.bulk-preview td { white-space: nowrap; }
