* {
  box-sizing: border-box;
}

:root {
  --btn-blue: #3f6fe5;
  --btn-blue-hover: #2f5ed0;
  --btn-green-bg: #dcfce7;
  --btn-green-border: #86efac;
  --btn-green-text: #166534;
  --btn-green-hover: #bbf7d0;
  --btn-gray-bg: #ffffff;
  --btn-gray-border: #cbd5e1;
  --btn-gray-text: #334155;
  --btn-gray-hover: #f8fafc;
  --btn-dark: #4b5563;
  --btn-dark-hover: #374151;
  --btn-orange-bg: #fef3c7;
  --btn-orange-border: #f59e0b;
  --btn-orange-text: #b45309;
  --btn-red-bg: #fee2e2;
  --btn-red-border: #fecaca;
  --btn-red-text: #991b1b;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  background: #f3f4f6;
  color: #1f2937;
  display: flex;
}

body.login-page {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background:
    radial-gradient(circle at 18% 18%, rgba(63, 111, 229, 0.12), transparent 32%),
    linear-gradient(135deg, #eef5ff 0%, #f8fbff 52%, #e7effb 100%);
}

.sidebar {
  width: 250px;
  height: 100vh;
  background: #1f3a5f;
  color: white;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: visible;
}

.sidebar-brand {
  display: block;
  color: white;
  text-decoration: none;
  margin-bottom: 32px;
  border-radius: 8px;
  padding: 8px;
}

.sidebar-brand:hover {
  background: #2f527d;
}

.sidebar-logo {
  display: block;
  width: 100%;
  max-width: 190px;
  height: auto;
  margin: 0 auto 10px;
  background: white;
  border-radius: 6px;
  padding: 8px;
}

.sidebar-brand span {
  display: block;
  font-size: 18px;
  font-weight: bold;
  white-space: nowrap;
}

.nav-btn {
  width: 100%;
  display: block;
  padding: 12px;
  margin-bottom: 8px;
  background: transparent;
  border: none;
  color: white;
  text-align: left;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
}

.nav-btn:hover,
.nav-btn.active {
  background: #2f527d;
}

.nav-flyout {
  margin-bottom: 8px;
}

.nav-parent {
  margin-bottom: 0;
}

.nav-submenu {
  display: none;
  position: absolute;
  top: 0;
  left: 250px;
  width: 230px;
  min-height: 100vh;
  padding: 24px 16px;
  background: #496ba0;
  box-shadow: 8px 0 18px rgba(15, 23, 42, 0.18);
}

.nav-flyout.open .nav-submenu {
  display: block;
}

.nav-sub-btn {
  font-size: 14px;
  padding: 12px;
  margin-bottom: 8px;
  color: white;
}

.nav-sub-btn:hover,
.nav-sub-btn.active {
  background: rgba(255, 255, 255, 0.16);
}

.sidebar-account {
  margin-top: auto;
  padding-top: 18px;
  display: grid;
  gap: 10px;
}

.sidebar-account .user-badge {
  display: block;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  text-align: center;
  line-height: 1.35;
}

.sidebar-account .user-badge-name,
.sidebar-account .user-badge-role {
  display: block;
}

.sidebar-account .user-badge-name {
  font-weight: 700;
}

.sidebar-account .user-badge-role {
  font-size: 13px;
  opacity: 0.9;
}

.sidebar-account .secondary-btn {
  width: 100%;
  background: var(--btn-gray-bg);
  color: var(--btn-gray-text);
  border-color: rgba(255, 255, 255, 0.65);
}

.sidebar-account .secondary-btn:hover {
  background: var(--btn-gray-hover);
}

.main {
  flex: 1;
  padding: 24px;
  min-width: 0;
}

.topbar {
  background: white;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 5px solid #1f3a5f;
}

.topbar h1 {
  margin: 0;
  font-size: 24px;
}

.topbar p {
  margin: 5px 0 0;
  color: #6b7280;
}

.user-badge {
  background: #e5e7eb;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 14px;
}

.user-badge.status-alert {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-weight: bold;
}

.user-badge.status-active {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  font-weight: bold;
}

.user-badge.status-inactive {
  background: #ffedd5;
  color: #ea580c;
  border: 1px solid #fed7aa;
  font-weight: bold;
}

.user-badge.status-closed {
  background: #f5e6d3;
  color: #92400e;
  border: 1px solid #e7c49d;
  font-weight: bold;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.card,
.panel {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  overflow-x: auto;
}

.panel + .panel {
  margin-top: 16px;
}

.panel h2 {
  margin: 0 0 16px;
}

.card h3 {
  margin: 0;
  color: #4b5563;
  font-size: 15px;
}

.card p {
  font-size: 32px;
  font-weight: bold;
  margin: 12px 0 0;
  color: #1f3a5f;
}

.appointment-dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}

.schedule-card {
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 8px;
  padding: 14px;
  min-height: 140px;
}

.schedule-card h3 {
  margin: 0 0 12px;
  font-size: 15px;
  color: #374151;
}

.schedule-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.schedule-card-header h3 {
  margin: 0;
}

.schedule-header-spacer {
  display: inline-block;
  min-width: 48px;
  min-height: 34px;
}

.pdf-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid #fecaca;
  background: #ffffff;
  color: #dc2626;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}

.pdf-icon-btn:hover {
  background: #fef2f2;
  border-color: #ef4444;
}

.pdf-file-icon {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  width: 22px;
  height: 27px;
  border: 2px solid currentColor;
  border-radius: 3px;
  padding-bottom: 3px;
  font-size: 7px;
  font-weight: 900;
  line-height: 1;
}

.pdf-file-icon::before {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-bottom-left-radius: 2px;
}

.pdf-icon-btn:hover .pdf-file-icon::before {
  background: #fef2f2;
}

.schedule-list {
  display: grid;
  gap: 10px;
}

.schedule-item {
  display: grid;
  grid-template-columns: 112px minmax(150px, 1fr) 100px 135px 78px;
  gap: 12px;
  align-items: center;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px;
  color: inherit;
  text-decoration: none;
}

.schedule-item[data-case-url] {
  cursor: pointer;
}

.schedule-item[data-case-url]:hover,
.schedule-item[data-case-url]:focus {
  border-color: #93c5fd;
  box-shadow: 0 1px 6px rgba(31, 58, 95, 0.18);
  outline: none;
}

.schedule-type {
  color: #1f3a5f;
  font-weight: bold;
  white-space: nowrap;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.1;
}

.schedule-type-in-person {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}

.schedule-type-call-in {
  background: #fef3c7;
  border-color: #fde68a;
  color: #92400e;
}

.schedule-item strong {
  display: block;
}

.schedule-person strong {
  color: #111827;
}

.schedule-status,
.schedule-phone {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #4b5563;
  font-size: 13px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px 10px;
}

.schedule-phone {
  color: #1f3a5f;
  font-weight: bold;
}

.schedule-email {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.schedule-email-btn {
  min-width: 72px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--btn-dark);
  color: white;
  border-radius: 7px;
  padding: 8px 12px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.schedule-email-btn:hover {
  background: var(--btn-dark-hover);
}

@media (max-width: 1200px) {
  .schedule-item {
    grid-template-columns: 112px 1fr;
  }

  .schedule-status,
  .schedule-phone,
  .schedule-email {
    justify-self: stretch;
  }
}

.empty-state {
  color: #6b7280;
  margin: 0;
  font-size: 14px;
}

.quick-links {
  display: grid;
  gap: 8px;
}

.quick-link-btn {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--btn-gray-border);
  border-radius: 8px;
  color: var(--btn-gray-text);
  cursor: pointer;
  font-weight: 700;
  padding: 11px 13px;
  text-align: left;
}

.quick-link-btn:hover {
  background: var(--btn-gray-hover);
  border-color: #93a4b8;
}

.dashboard-quick-actions-card {
  grid-column: 3;
}

.dashboard-quick-reports-card {
  grid-column: 3;
}

.quick-actions {
  display: grid;
  gap: 8px;
}

.quick-action-btn {
  width: 100%;
  border: 1px solid var(--btn-gray-border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--btn-gray-text);
  cursor: pointer;
  font-weight: 800;
  padding: 11px 13px;
  text-align: left;
}

.quick-action-btn:hover {
  background: var(--btn-gray-hover);
  border-color: #93a4b8;
}

.quick-action-primary {
  background: var(--btn-blue);
  border-color: var(--btn-blue);
  color: #ffffff;
}

.quick-action-primary:hover {
  background: var(--btn-blue-hover);
  border-color: var(--btn-blue-hover);
}

.quick-action-success {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.quick-action-success:hover {
  background: #bbf7d0;
  border-color: #4ade80;
}

.quick-action-case-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: 420px;
  overflow-y: auto;
}

.quick-action-case-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  cursor: pointer;
  text-align: left;
}

.quick-action-case-btn:hover {
  border-color: #3b6eea;
  background: #f8fbff;
}

.quick-action-case-btn span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.quick-action-case-btn strong {
  font-size: 15px;
}

.quick-action-case-btn small {
  color: #64748b;
}

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

th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.35;
}

th {
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

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

td[colspan] {
  color: #64748b;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.section-header h2 {
  margin: 0;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.primary-btn,
.report-btn,
.small-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--btn-blue);
  color: #ffffff;
  border: none;
  padding: 9px 14px;
  min-height: 38px;
  border-radius: 7px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.primary-btn:hover,
.report-btn:hover,
.small-btn:hover {
  background: var(--btn-blue-hover);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.danger-btn:disabled,
.small-btn:disabled,
.add-btn:disabled,
.start-check-btn:disabled,
.add-appointment-btn:disabled,
.appointment-missed-pill:disabled,
.void-appointment-btn:disabled {
  opacity: 0.62;
  cursor: wait;
}

.small-btn {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 13px;
}

.delete-user-btn,
.clear-warrant-btn,
.visit-remove-violation-btn {
  background: var(--btn-red-bg);
  color: var(--btn-red-text);
  border: 1px solid var(--btn-red-border);
}

.delete-user-btn:hover,
.clear-warrant-btn:hover,
.visit-remove-violation-btn:hover {
  background: #fecaca;
}

.receipt-btn,
.repair-case-btn,
.toggle-judge-btn,
.toggle-probation-term-btn,
.toggle-offense-btn,
.reinstate-tolling-btn,
.edit-user-btn,
.reset-password-btn {
  background: var(--btn-gray-bg);
  color: var(--btn-gray-text);
  border: 1px solid var(--btn-gray-border);
}

.receipt-btn:hover,
.repair-case-btn:hover,
.toggle-judge-btn:hover,
.toggle-probation-term-btn:hover,
.toggle-offense-btn:hover,
.edit-user-btn:hover,
.reset-password-btn:hover {
  background: var(--btn-gray-hover);
  border-color: #94a3b8;
}

.start-check-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--btn-blue);
  color: #ffffff;
  border: none;
  border-radius: 7px;
  padding: 8px 12px;
  width: 145px;
  min-height: 38px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.start-check-btn:hover {
  background: var(--btn-blue-hover);
}

.add-appointment-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--btn-green-bg);
  color: var(--btn-green-text);
  border: 1px solid var(--btn-green-border);
  border-radius: 7px;
  padding: 8px 12px;
  width: 145px;
  min-height: 38px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.add-appointment-btn:hover {
  background: var(--btn-green-hover);
}

.add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--btn-green-bg);
  color: var(--btn-green-text);
  border: 1px solid var(--btn-green-border);
  border-radius: 7px;
  padding: 9px 14px;
  min-height: 38px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.add-btn:hover {
  background: var(--btn-green-hover);
}

.reopen-visit-btn {
  background: var(--btn-dark);
}

.reopen-visit-btn:hover {
  background: var(--btn-dark-hover);
}

.appointment-missed-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--btn-orange-bg);
  color: var(--btn-orange-text);
  border: 1px solid var(--btn-orange-border);
  border-radius: 7px;
  width: 145px;
  min-height: 38px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

button.appointment-missed-pill {
  font-family: inherit;
}

.appointment-edit-btn,
.void-appointment-btn {
  margin-left: 8px;
  border: 1px solid var(--btn-gray-border);
  background: var(--btn-gray-bg);
  color: var(--btn-gray-text);
  border-radius: 7px;
  padding: 8px 10px;
  min-height: 38px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.appointment-edit-btn:hover {
  background: var(--btn-gray-hover);
  color: #1f2937;
}

.void-appointment-btn {
  background: var(--btn-red-bg);
  border-color: var(--btn-red-border);
  color: var(--btn-red-text);
}

.void-appointment-btn:hover {
  background: #fecaca;
  color: #991b1b;
}

.appointment-missed-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f59e0b;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.start-check-icon {
  font-size: 13px;
  line-height: 1;
}

.search-box {
  width: 100%;
  padding: 12px;
  margin: 16px 0;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

.compact-select {
  width: auto;
  min-width: 160px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  align-items: start;
}

.probation-conditions-entry {
  display: grid;
  gap: 10px;
}

.probation-condition-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.6fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fafc;
}

.remove-condition-btn {
  min-height: 42px;
  margin-bottom: 12px;
}

input,
select,
textarea {
  padding: 11px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #0f172a;
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
  outline: none;
}

.field-label {
  display: grid;
  gap: 5px;
  color: #4b5563;
  font-size: 13px;
  font-weight: bold;
}

.field-label input,
.field-label select,
.field-label textarea,
.field-label .search-select {
  width: 100%;
  font-size: 15px;
  font-weight: normal;
}

.field-label textarea {
  font-family: inherit;
}

textarea {
  min-height: 90px;
}

.full {
  grid-column: span 2;
}

.form-section-title {
  margin: 14px 0 0;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  color: #10233f;
  font-size: 16px;
  letter-spacing: 0;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 41px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.checkbox-row input {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 0;
  padding: 0;
  border-radius: 5px;
}

.setup-form {
  display: grid;
  grid-template-columns: minmax(220px, 360px) auto 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.setup-form-stacked {
  grid-template-columns: minmax(260px, 520px) auto 1fr;
  align-items: start;
}

.setup-form-stacked textarea {
  min-height: 140px;
  width: 100%;
}

.fee-breakdown {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px;
}

.fee-breakdown strong {
  color: #1f3a5f;
}

.fee-breakdown span {
  color: #4b5563;
  font-size: 14px;
}

.height-input {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) auto minmax(90px, 1fr);
  align-items: center;
  gap: 8px;
}

.search-select {
  position: relative;
}

.search-select input {
  width: 100%;
}

.search-select-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
  padding: 4px;
}

.search-select-option {
  width: 100%;
  border: none;
  background: #ffffff;
  color: #1f2937;
  padding: 9px 10px;
  text-align: left;
  border-radius: 4px;
  cursor: pointer;
}

.search-select-option:hover,
.search-select-option:focus {
  background: #eef2f7;
  outline: none;
}

.search-select-empty {
  padding: 9px 10px;
  color: #6b7280;
}

.height-input span {
  font-weight: bold;
  color: #1f3a5f;
  font-size: 18px;
}

.height-input select {
  width: 100%;
}

.email-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.email-action-row input {
  width: 100%;
}

.locked-note-text {
  white-space: pre-wrap;
  line-height: 1.4;
}

.readonly-value {
  display: block;
  min-height: 41px;
  padding: 11px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f9fafb;
  color: #111827;
  font-weight: normal;
}

.hidden {
  display: none !important;
}

.report-btn {
  justify-content: center;
  text-align: center;
}

.reports-workspace {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.reports-filter-panel {
  display: grid;
  gap: 12px;
}

.reports-filter-panel h3,
.management-reports h3 {
  margin: 0;
  color: #10233f;
}

.reports-filter-panel label {
  display: grid;
  gap: 5px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.reports-filter-panel input,
.reports-filter-panel select {
  margin: 0;
}

.print-options {
  display: grid;
  gap: 8px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 12px;
}

.print-options legend {
  color: #334155;
  font-weight: 700;
  padding: 0 4px;
}

.print-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.print-options input {
  width: auto;
}

.reports-list-panel {
  display: grid;
  gap: 22px;
}

.reports-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 16px;
}

.report-group {
  display: grid;
  gap: 7px;
  align-content: start;
}

.report-group .report-btn {
  width: 100%;
  margin: 0;
  background: var(--btn-gray-bg);
  color: var(--btn-gray-text);
  border: 1px solid var(--btn-gray-border);
  min-height: 42px;
  padding: 10px 12px;
  justify-content: flex-start;
  text-align: left;
  font-size: 14px;
  line-height: 1.25;
}

.management-reports {
  display: grid;
  gap: 10px;
  max-width: 300px;
}

.management-report-buttons {
  max-width: 260px;
}

.status-active {
  color: #16a34a;
  font-weight: bold;
}

.status-alert {
  color: #dc2626;
  font-weight: bold;
}

.status-inactive {
  color: #ea580c;
  font-weight: bold;
}

.status-closed {
  color: #92400e;
  font-weight: bold;
}

.status-select {
  min-width: 185px;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  font-weight: bold;
}

.status-select option {
  color: #111827;
  font-weight: normal;
}

.status-select option.current-status.status-active {
  color: #16a34a;
  font-weight: bold;
}

.status-select option.current-status.status-alert {
  color: #dc2626;
  font-weight: bold;
}

.status-select option.current-status.status-inactive {
  color: #ea580c;
  font-weight: bold;
}

.status-select option.current-status.status-closed {
  color: #92400e;
  font-weight: bold;
}

.status-select:disabled {
  opacity: 0.65;
  cursor: wait;
}

.status-editor {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-save-btn {
  padding: 8px 12px;
}

.status-save-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.status-message {
  display: block;
  margin-top: 6px;
  color: #6b7280;
  font-size: 13px;
}

.status-saved {
  color: #16a34a;
  font-weight: bold;
}

.status-error {
  color: #dc2626;
  font-weight: bold;
}

@media (max-width: 900px) {
  body {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    min-height: auto;
    position: relative;
  }

  .sidebar-account {
    margin-top: 18px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .dashboard-quick-actions-card {
    grid-column: auto;
  }

  .dashboard-quick-reports-card {
    grid-column: auto;
  }

  .appointment-dashboard {
    grid-template-columns: 1fr;
  }

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

  .probation-condition-row {
    grid-template-columns: 1fr;
  }

  .full {
    grid-column: span 1;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--btn-gray-bg);
  color: var(--btn-gray-text);
  border: 1px solid var(--btn-gray-border);
  padding: 9px 14px;
  min-height: 38px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.secondary-btn:hover {
  background: var(--btn-gray-hover);
  border-color: #94a3b8;
}

.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--btn-red-bg);
  color: var(--btn-red-text);
  border: 1px solid var(--btn-red-border);
  padding: 9px 14px;
  min-height: 38px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.danger-btn:hover {
  background: #fecaca;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.contact-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px;
}

.contact-card h3 {
  margin: 0 0 10px;
  color: #1f3a5f;
}

.contact-card input {
  width: 100%;
  margin-bottom: 10px;
}

.alert-settings-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.tolling-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #fdba74;
  background: #fff7ed;
  color: #9a3412;
  border-radius: 8px;
  padding: 10px 12px;
}

.flag-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #92400e;
  font-weight: bold;
}

.flag-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: #d97706;
}

.personal-summary-container {
  margin-top: 12px;
}

.summary-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.summary-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.summary-card-header h3 {
  margin: 0 0 4px;
  color: #10233f;
}

.summary-card-header p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

.summary-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.summary-action-btn {
  width: 80px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.summary-email-btn {
  background: var(--btn-dark);
}

.summary-email-btn:hover {
  background: var(--btn-dark-hover);
}

.summary-edit-btn {
  background: var(--btn-blue);
}

.summary-edit-btn:hover {
  background: var(--btn-blue-hover);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.summary-grid div {
  padding: 12px 16px;
  border-bottom: 1px solid #eef2f7;
}

.summary-grid div:nth-child(odd) {
  border-right: 1px solid #eef2f7;
}

.summary-grid strong {
  display: block;
  color: #4b5563;
  font-size: 13px;
  margin-bottom: 5px;
}

.summary-grid span {
  color: #111827;
  line-height: 1.35;
}

.summary-grid .summary-wide {
  grid-column: 1 / -1;
  border-right: none;
}

.profile-grid div {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 12px;
  border-radius: 6px;
}

.profile-grid strong {
  display: block;
  color: #4b5563;
  margin-bottom: 4px;
}

.profile-grid span {
  color: #111827;
}

.profile-grid input,
.profile-grid textarea,
.profile-grid select {
  width: 100%;
}

.profile-grid textarea {
  min-height: 76px;
}

.profile-grid .profile-wide,
.contact-grid .profile-wide {
  grid-column: span 2;
}

.contact-grid .profile-wide {
  grid-column: 1 / -1;
}

.profile-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-grid .profile-actions {
  background: transparent;
  border: none;
  padding: 4px 0 0;
}

.profile-full {
  grid-column: span 2;
  background: #ffffff !important;
  border: none !important;
  padding: 0 !important;
}

.profile-full h3 {
  margin-top: 10px;
  margin-bottom: 12px;
  color: #1f3a5f;
}

.nav-link {
  display: block;
  color: white;
  text-decoration: none;
  padding: 12px;
  border-radius: 6px;
}

.nav-link:hover {
  background: #2f527d;
}
.case-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid #d1d5db;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 12px 16px;
  cursor: pointer;
  color: #4b5563;
  font-weight: bold;
  border-bottom: 3px solid transparent;
}

.tab-btn:hover,
.tab-btn.active {
  color: #1f3a5f;
  border-bottom: 3px solid #1f3a5f;
}

.tab-page {
  display: none;
}

.tab-page.active {
  display: block;
}

.note-form {
  margin-bottom: 16px;
}

.note-form select {
  width: 100%;
  margin-bottom: 10px;
}

.note-form textarea {
  width: 100%;
  min-height: 90px;
  margin-bottom: 10px;
}

.violation-form {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.violation-form .modal-actions {
  margin-top: 4px;
}

.drug-screen-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.drug-screen-form input,
.drug-screen-form select {
  width: 100%;
}

.drug-screen-form button,
.drug-screen-form .status-message {
  grid-column: span 6;
}

.appointment-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.appointment-form textarea,
.appointment-form button,
.appointment-form .status-message {
  grid-column: span 2;
}

.appointment-form input,
.appointment-form select,
.appointment-form textarea {
  width: 100%;
}

.violation-form input,
.violation-form select {
  width: 100%;
}

.payment-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.payment-summary div {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
}

.payment-summary strong {
  display: block;
  color: #4b5563;
  margin-bottom: 6px;
}

.payment-summary span {
  font-size: 22px;
  font-weight: bold;
  color: #1f3a5f;
}

.payment-form {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.payment-form input {
  width: 100%;
}

.payment-entry-header {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.payment-entry-header label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.payment-receipt-notes-field {
  margin-bottom: 16px;
}

.payment-receipt-notes-field textarea {
  min-height: 74px;
}

.tolling-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.tolling-form-grid label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.tolling-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 12px;
  margin-bottom: 12px;
}

.payment-allocation-table-wrap {
  overflow-x: auto;
  margin-bottom: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}

.payment-allocation-table {
  margin: 0;
  min-width: 760px;
}

.payment-allocation-table th,
.payment-allocation-table td {
  vertical-align: middle;
  padding: 10px 12px;
}

.payment-allocation-table th:nth-child(2),
.payment-allocation-table th:nth-child(3),
.payment-allocation-table th:nth-child(4),
.payment-allocation-table th:nth-child(5),
.payment-allocation-table td:nth-child(2),
.payment-allocation-table td:nth-child(3),
.payment-allocation-table td:nth-child(4),
.payment-allocation-table td:nth-child(5) {
  text-align: right;
}

.payment-allocation-table tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.payment-allocation-table tbody tr:hover td {
  background: #f8fafc;
}

.payment-allocation-table tfoot td {
  background: #f8fafc;
  font-weight: 800;
}

.payment-allocation-input {
  width: 130px;
  margin: 0;
  text-align: right;
  font-weight: 700;
}

.payment-input-wrap {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.payment-input-wrap span {
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
}

[data-currency-input] {
  text-align: right;
}

#editFineAmount {
  text-align: left;
}

.payment-allocation-input:disabled {
  background: #f1f5f9;
  color: #94a3b8;
}

.payment-amount-due {
  color: #9a3412;
  font-weight: 800;
}

.payment-remaining-cell {
  color: #334155;
  font-weight: 800;
}

.payment-remaining-zero {
  color: #15803d;
}

.fixed-fee-input {
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  cursor: not-allowed;
}

.missed-appointment-content {
  max-width: 760px;
  width: min(760px, calc(100vw - 40px));
  overflow-x: hidden;
}

.missed-appointment-content textarea {
  min-height: 120px;
}

.missed-appointment-content .profile-actions {
  justify-content: flex-start;
  margin-top: 16px;
}

.missed-appointment-content #saveMissedAppointmentBtn {
  width: auto;
}

.missed-appointment-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.missed-appointment-fields {
  display: grid;
  gap: 12px;
}

.missed-contact-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
  padding: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.missed-contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: fit-content;
  max-width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
}

.missed-contact-row strong,
.missed-contact-row span {
  display: block;
}

.missed-contact-row strong {
  color: #0f172a;
  margin-bottom: 1px;
}

.missed-contact-row span {
  color: #475569;
  font-size: 13px;
  word-break: break-word;
}

.contact-attempt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid var(--btn-gray-border);
  border-radius: 8px;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
}

.contact-attempt-btn:hover {
  background: var(--btn-gray-hover);
}

.contact-attempt-btn.active {
  background: var(--btn-green-bg);
  border-color: var(--btn-green-border);
  color: var(--btn-green-text);
}

.missed-contact-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 0;
}

.missed-contact-options label {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 34px;
  width: 100%;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #eef2f7;
  border-radius: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.missed-contact-options input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 16px;
  accent-color: #16a34a;
}

@media (max-width: 800px) {
  .reports-workspace,
  .reports-grid {
    grid-template-columns: 1fr;
  }

  .payment-summary {
    grid-template-columns: 1fr;
  }

  .payment-entry-header {
    grid-template-columns: 1fr;
  }

  .tolling-form-grid,
  .tolling-checklist {
    grid-template-columns: 1fr;
  }

  .missed-contact-options {
    grid-template-columns: 1fr;
  }

  .missed-contact-panel,
  .missed-appointment-layout {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .drug-screen-form {
    grid-template-columns: 1fr;
  }

  .drug-screen-form button,
  .drug-screen-form .status-message {
    grid-column: span 1;
  }
}

.document-form {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fee-summary-table {
  margin-bottom: 20px;
}

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

.assessment-editor-table th,
.assessment-editor-table td {
  border: 1px solid #d1d5db;
  padding: 8px;
  text-align: left;
}

.assessment-editor-table input {
  margin: 0;
  text-align: right;
}

.total-row {
  background: #f3f4f6;
  font-weight: bold;
}

.payment-form select,
.payment-form input {
  width: 100%;
}

.payment-due-summary {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.current-due-box,
.past-due-box {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 10px;
  padding: 14px 18px;
  min-width: 180px;
}

.current-due-box {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.past-due-box {
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
}

.current-due-box strong,
.past-due-box strong {
  font-size: 14px;
}

.current-due-box span,
.past-due-box span {
  font-size: 28px;
  font-weight: bold;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.modal-content > .section-header {
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.modal-content > .section-header h2 {
  color: #10233f;
  font-size: 22px;
  line-height: 1.2;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  font-size: 14px;
  min-height: 40px;
  padding: 9px 11px;
}

.modal-content textarea {
  min-height: 110px;
  resize: vertical;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
  outline: none;
}

.modal-content input::placeholder,
.modal-content textarea::placeholder {
  color: #64748b;
}

.modal-content label,
.modal-content .field-label span {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.modal-content .checkbox-row input {
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 0;
  padding: 0;
  border-radius: 5px;
}

.modal-wide {
  max-width: 900px;
}

.modal-visit {
  max-width: 1240px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  padding: 0;
}

.visit-modal-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 18px 22px;
  border-radius: 16px 16px 0 0;
}

.visit-modal-header > div:first-child {
  justify-self: start;
}

.visit-modal-header .secondary-btn {
  justify-self: end;
}

.visit-modal-header h2 {
  margin: 0;
}

.modal-kicker {
  margin: 0 0 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.visit-details {
  padding: 18px 22px 22px;
}

.visit-workspace {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}

.visit-main-card,
.visit-fees-card,
.visit-right-stack section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.visit-left-stack {
  grid-column: 1 / 2;
  display: grid;
  align-content: start;
  gap: 12px;
}

.visit-status-banner {
  display: flex;
  justify-content: center;
}

.visit-header-status {
  justify-self: center;
  min-width: 120px;
}

.visit-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  min-height: 38px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid #bbf7d0;
  background: #dcfce7;
  color: #15803d;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.visit-status-pill.status-alert,
.visit-status-pill-closed {
  border-color: #fecaca;
  background: #fee2e2;
  color: #b91c1c;
}

.visit-status-pill.status-inactive {
  border-color: #fed7aa;
  background: #ffedd5;
  color: #c2410c;
}

.visit-status-pill.status-closed {
  border-color: #d6d3d1;
  background: #f5f5f4;
  color: #92400e;
}

.visit-status-pill.visit-status-pill-closed {
  border-color: #fecaca;
  background: #fee2e2;
  color: #b91c1c;
}

.visit-right-stack {
  grid-column: 2 / 3;
  display: grid;
  align-content: start;
  gap: 14px;
}

.visit-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.visit-form-grid label {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.visit-form-grid input,
.visit-entry-table input,
.visit-entry-table select,
.visit-right-stack textarea {
  margin-top: 6px;
  margin-bottom: 0;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  min-height: 38px;
  color: #0f172a;
}

.visit-status-warrants {
  margin-top: 4px;
}

.visit-main-warrants {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}

.visit-status-warrants h3 {
  margin: 0 0 3px;
  font-size: 16px;
}

.visit-status-warrants .visit-entry-table th,
.visit-status-warrants .visit-entry-table td {
  padding: 6px 10px;
}

.visit-fee-table,
.visit-entry-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  overflow: hidden;
  border-radius: 10px;
}

.visit-fee-table th,
.visit-fee-table td,
.visit-entry-table th,
.visit-entry-table td {
  border: 1px solid #e2e8f0;
  padding: 9px 10px;
  text-align: left;
}

.visit-fee-table th,
.visit-entry-table th {
  background: #f8fafc;
  color: #334155;
}

.visit-fee-table th:not(:first-child),
.visit-fee-table td:not(:first-child) {
  text-align: right;
}

.visit-right-stack h3 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 18px;
}

.visit-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.visit-section-header h3 {
  margin: 0;
}

.visit-violation-list {
  display: grid;
  gap: 10px;
}

.visit-violation-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(130px, 0.8fr);
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
}

.visit-violation-row label {
  display: grid;
  gap: 5px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.visit-violation-row input,
.visit-violation-row select {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.visit-violation-wide,
.visit-violation-card-actions {
  grid-column: 1 / -1;
}

.visit-violation-card-actions {
  display: flex;
  justify-content: flex-end;
}

.visit-checklist {
  display: grid;
  gap: 10px;
}

.visit-checklist label {
  font-weight: 700;
}

.visit-check-row,
.visit-payment-due {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
}

.visit-check-actions {
  display: flex;
  gap: 6px;
}

.visit-payment-due > div {
  display: grid;
  gap: 3px;
}

.visit-payment-due span {
  font-weight: 700;
  color: #1f3a5f;
}

.check-toggle {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #111827;
  border-radius: 8px;
  width: 42px;
  height: 36px;
  font-weight: 800;
  cursor: pointer;
}

.check-toggle[data-check-value="true"].active {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

.check-toggle[data-check-value="false"].active {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}

.visit-inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.visit-violation-description {
  min-width: 0;
}

.visit-violation-saved {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.visit-violation-saved input,
.visit-violation-saved select {
  color: #166534;
  font-weight: 600;
}

.visit-right-stack textarea {
  min-height: 92px;
  resize: vertical;
}

.visit-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 0 0;
  border-top: 1px solid #e2e8f0;
}

@media (max-width: 1050px) {
  .visit-workspace {
    grid-template-columns: 1fr;
  }

  .visit-left-stack,
  .visit-right-stack {
    grid-column: 1;
    grid-row: auto;
  }
}

.modal-content input,
.modal-content select,
.modal-content textarea {
  width: 100%;
  margin-bottom: 12px;
}

.modal-content .field-label {
  margin-bottom: 6px;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.modal-actions .status-message {
  margin-top: 0;
}

.warrant-modal-content {
  border-top: 6px solid #dc2626;
  text-align: center;
}

.warrant-modal-title {
  color: #dc2626;
  margin-top: 0;
}

.warrant-warning-status {
  color: #dc2626;
  font-weight: bold;
}

.call-in-mail-modal-content {
  border-top: 6px solid #f59e0b;
  text-align: center;
}

.call-in-mail-modal-title,
.call-in-mail-warning-status {
  color: #b45309;
  font-weight: bold;
}

.confirm-modal-content {
  max-width: 460px;
  border-top: 5px solid #1f3a5f;
}

#discardProbationerConfirmModal {
  z-index: 1002;
}

.confirm-modal-content h2 {
  margin: 0 0 10px;
  color: #1f3a5f;
}

.confirm-modal-content p {
  margin: 0 0 18px;
  color: #4b5563;
  line-height: 1.45;
}

.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.login-container {
  width: min(460px, calc(100vw - 32px));
  background: white;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  padding: 34px;
  box-shadow: 0 24px 70px rgba(31, 58, 95, 0.18);
}

.login-brand {
  text-align: center;
  margin-bottom: 24px;
}

.login-brand img {
  display: block;
  width: min(250px, 82%);
  height: auto;
  margin: 0 auto 18px;
}

.login-brand h1 {
  margin: 0;
  color: #1f3a5f;
  font-size: 27px;
  line-height: 1.15;
}

.login-container form {
  display: grid;
  gap: 14px;
}

.login-container form[hidden] {
  display: none;
}

.login-field {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.login-field input {
  width: 100%;
  height: 50px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #f8fafc;
  padding: 0 14px;
  color: #0f172a;
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-field input:focus {
  outline: none;
  border-color: #3f6fe5;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(63, 111, 229, 0.14);
}

.login-submit {
  width: 100%;
  background: var(--btn-blue);
  color: #ffffff;
  border: none;
  padding: 12px 16px;
  min-height: 48px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.login-submit:hover {
  background: var(--btn-blue-hover);
  box-shadow: 0 10px 18px rgba(63, 111, 229, 0.22);
  transform: translateY(-1px);
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.75;
  transform: none;
  box-shadow: none;
}

.login-message {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
}

.login-message.error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.login-message.success {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.login-message[hidden] {
  display: none;
}

.login-link-button {
  width: fit-content;
  margin: 0 auto;
  padding: 3px 8px;
  border: none;
  background: transparent;
  color: #1f3a5f;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.login-link-button:hover {
  color: #3f6fe5;
  text-decoration: underline;
}

.login-link-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.login-reset-heading {
  text-align: center;
  margin-bottom: 4px;
}

.login-reset-heading h2 {
  margin: 0;
  color: #1f3a5f;
  font-size: 22px;
}

.login-reset-heading p {
  margin: 6px 0 8px;
  color: #64748b;
  font-size: 14px;
}
