body {
  font-family: "Sarabun", "Noto Sans Thai", "Segoe UI", Tahoma, sans-serif;
  background: #f4f6f9;
}

.bootstrap-duallistbox-container .box1,
.bootstrap-duallistbox-container .box2 {
  margin-bottom: 0;
}

.bootstrap-duallistbox-container label {
  font-weight: 600;
  color: #34495e;
}

.bootstrap-duallistbox-container .btn-group .btn {
  white-space: normal;
}

.bootstrap-duallistbox-container select {
  min-height: 300px;
}

.brand-link .brand-text {
  letter-spacing: 0;
}

.content-header h1 {
  font-size: 1.45rem;
  font-weight: 700;
}

.small-box .inner h3 {
  font-size: 2rem;
  font-weight: 700;
}

.modern-card {
  border-radius: 8px;
}

.manual-hero {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border: 1px solid #dde5ec;
  border-left: 5px solid #17a2b8;
  border-radius: 8px;
  background: #ffffff;
}

.manual-hero-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #ffffff;
  font-size: 1.35rem;
}

.manual-hero h2 {
  margin: 0 0 6px;
  color: #203849;
  font-size: 1.35rem;
  font-weight: 700;
}

.manual-hero p {
  margin: 0;
  color: #607481;
  line-height: 1.65;
}

.manual-link-tile {
  min-height: 92px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dde5ec;
  border-radius: 8px;
  background: #ffffff;
  color: #203849;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.manual-link-tile:hover {
  color: #203849;
  border-color: #9fc4d2;
  box-shadow: 0 8px 20px rgba(31, 45, 61, 0.08);
  transform: translateY(-1px);
  text-decoration: none;
}

.manual-link-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #ffffff;
  background: #138496;
}

.manual-link-tile strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
}

.manual-link-tile small {
  display: block;
  color: #66788a;
  line-height: 1.45;
}

.manual-section-card > .card-header {
  background: #ffffff;
}

.manual-step-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: manual-step;
}

.manual-step-list li {
  position: relative;
  min-height: 44px;
  padding: 0 0 18px 52px;
  border-left: 1px solid #dce7ee;
  counter-increment: manual-step;
}

.manual-step-list li:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.manual-step-list li::before {
  content: counter(manual-step);
  position: absolute;
  left: -18px;
  top: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  border-radius: 8px;
  background: #17a2b8;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 0 1px #c9d8e2;
}

.manual-step-title {
  display: block;
  margin-bottom: 4px;
  color: #203849;
  font-weight: 700;
}

.manual-step-text {
  color: #526879;
  line-height: 1.6;
}

.manual-step-action {
  margin-top: 8px;
}

.manual-tip-list {
  margin: 0;
  padding-left: 18px;
  color: #526879;
  line-height: 1.65;
}

.manual-tip-list li + li {
  margin-top: 8px;
}

@media (max-width: 575.98px) {
  .manual-hero {
    flex-direction: column;
  }

  .manual-step-list li {
    padding-left: 44px;
  }
}

.table td,
.table th {
  vertical-align: middle;
}

.home-visit-required-alert {
  border: 0;
  border-left: 5px solid #17a2b8;
  background: #eaf8fb;
  color: #235766;
}

.home-visit-card {
  border-top-color: #17a2b8;
}

.home-visit-card > .card-header {
  background: #ffffff;
}

.home-visit-summary-row .info-box {
  min-height: 84px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.home-visit-summary-row .info-box-icon {
  width: 74px;
  border-radius: 8px 0 0 8px;
}

.home-visit-summary-row .info-box-text {
  color: #6c757d;
  font-weight: 600;
}

.home-visit-summary-row .info-box-number {
  color: #1f2d3d;
  font-size: 1.05rem;
  white-space: normal;
}

.home-visit-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: #203849;
  font-size: 1.05rem;
  font-weight: 700;
}

.home-visit-section-title span {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #e8f6f8;
  color: #138496;
}

.home-visit-divider {
  margin: 1.3rem 0;
  border-top: 1px solid #e1ebf0;
}

.home-visit-help-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.home-visit-help-note {
  color: #607481;
  font-weight: 600;
  padding-top: 6px;
}

.visit-help-grid {
  row-gap: 14px;
}

.visit-help-group {
  height: 100%;
  padding: 0;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.08);
}

.visit-help-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f5;
  background: #f8f9fa;
  color: #203849;
  font-weight: 700;
}

.visit-help-group-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
  background: #138496;
}

.visit-help-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 14px;
}

.visit-help-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.visit-help-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 42px;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: #ffffff;
  color: #2f4354;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.visit-help-option:hover {
  border-color: #adb5bd;
  background: #f8f9fa;
}

.visit-help-option-mark {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-top: 1px;
  border-radius: 6px;
  border: 2px solid #b9c9d3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  background: #ffffff;
  font-size: 0.7rem;
}

.visit-help-option-text {
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.visit-help-check:focus + .visit-help-option {
  box-shadow: 0 0 0 0.18rem rgba(23, 162, 184, 0.18);
}

.visit-help-check:checked + .visit-help-option {
  border-color: var(--visit-help-accent);
  background: var(--visit-help-soft);
  color: #1f2d3d;
  box-shadow: inset 3px 0 0 var(--visit-help-accent);
}

.visit-help-check:checked + .visit-help-option .visit-help-option-mark {
  border-color: var(--visit-help-accent);
  background: var(--visit-help-accent);
  color: #ffffff;
}

.visit-help-theme-blue {
  --visit-help-accent: #2f80ed;
  --visit-help-soft: #eef6ff;
}

.visit-help-theme-orange {
  --visit-help-accent: #f08a24;
  --visit-help-soft: #fff6eb;
}

.visit-help-theme-green {
  --visit-help-accent: #219653;
  --visit-help-soft: #eefbf4;
}

.visit-help-theme-purple {
  --visit-help-accent: #7b61ff;
  --visit-help-soft: #f4f1ff;
}

.visit-help-theme-red {
  --visit-help-accent: #eb5757;
  --visit-help-soft: #fff1f1;
}

.visit-help-theme-cyan {
  --visit-help-accent: #00a3a3;
  --visit-help-soft: #eafafa;
}

.visit-help-theme-pink {
  --visit-help-accent: #d63384;
  --visit-help-soft: #fff0f7;
}

.visit-help-theme-blue .visit-help-group-icon,
.visit-help-theme-orange .visit-help-group-icon,
.visit-help-theme-green .visit-help-group-icon,
.visit-help-theme-purple .visit-help-group-icon,
.visit-help-theme-red .visit-help-group-icon,
.visit-help-theme-cyan .visit-help-group-icon,
.visit-help-theme-pink .visit-help-group-icon {
  background: var(--visit-help-accent);
}

@media (max-width: 767.98px) {
  .home-visit-help-heading {
    display: block;
  }

  .visit-help-options {
    grid-template-columns: 1fr;
  }
}

.login-overview-page {
  min-height: 100vh;
  align-items: stretch;
  justify-content: stretch;
  background:
    linear-gradient(135deg, rgba(12, 83, 137, 0.92), rgba(21, 127, 97, 0.86)),
    #eef3f6;
}

.login-overview-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 0;
  align-items: stretch;
}

.login-overview-hero,
.login-panel .card {
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(15, 31, 46, 0.22);
}

.login-overview-hero {
  background: rgba(255, 255, 255, 0.96);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  border-radius: 0;
  box-shadow: none;
}

.login-brand-block {
  display: flex;
  align-items: center;
  gap: 18px;
}

.login-brand-logo {
  width: 104px;
  height: 104px;
  flex: 0 0 104px;
  border-radius: 8px;
  background: #f4f6f9;
  border: 1px solid #d9e3ea;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #708090;
  font-size: 3.5rem;
}

.login-brand-logo img {
  max-width: 92px;
  max-height: 92px;
  object-fit: contain;
}

.login-brand-block h1 {
  margin: 0 0 8px;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: #163047;
}

.login-agency {
  margin: 0 0 6px;
  font-size: 1.18rem;
  font-weight: 600;
  color: #355165;
}

.login-year {
  display: inline-block;
  margin: 0;
  padding: 6px 12px;
  border-radius: 8px;
  background: #fff3cd;
  color: #6c4a00;
  font-weight: 700;
}

.login-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.login-summary-item {
  min-height: 112px;
  border: 1px solid #dce6ed;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-summary-icon {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 46px;
  font-size: 1.2rem;
}

.login-summary-item strong {
  display: block;
  font-size: 1.95rem;
  line-height: 1.1;
  color: #1f2d3d;
}

.login-summary-item span:last-child {
  display: block;
  color: #5c6f7b;
  font-weight: 600;
}

.login-public-note {
  border-left: 4px solid #17a2b8;
  background: #eef9fb;
  color: #315b66;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 600;
}

.login-announcements {
  border: 1px solid #dce6ed;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.login-announcements-header {
  padding: 14px 16px;
  border-bottom: 1px solid #e8eef2;
  background: #f8fafc;
}

.login-announcements-header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #23384a;
}

.login-announcement-list {
  display: grid;
  gap: 0;
}

.login-announcement-item {
  padding: 14px 16px;
  border-bottom: 1px solid #edf2f5;
}

.login-announcement-item:last-child {
  border-bottom: 0;
}

.login-announcement-title {
  font-weight: 700;
  color: #21384d;
}

.login-announcement-item p {
  margin: 6px 0 0;
  color: #526776;
}

.login-announcement-item a {
  display: inline-block;
  margin-top: 8px;
  font-weight: 700;
}

.login-announcement-empty {
  padding: 16px;
  color: #6c757d;
}

.login-panel {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(255, 255, 255, 0.96);
  border-left: 1px solid #dce6ed;
}

.login-panel .card {
  width: 100%;
  max-width: 380px;
  overflow: hidden;
  border: 1px solid #dce6ed;
  box-shadow: 0 14px 34px rgba(31, 45, 61, 0.12);
}

.login-panel .card-header {
  background: #f8fafc;
  border-bottom: 1px solid #e8eef2;
  color: #163047;
  font-weight: 700;
}

.login-panel .card-body {
  padding: 24px;
}

.login-panel .form-control,
.login-panel .input-group-text {
  background: #f8fafc;
  border-color: #dce6ed;
}

.login-panel .form-control:focus {
  background: #fff;
}

.login-access-card .btn-primary {
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(0, 123, 255, 0.18);
}

@media (max-width: 1024px) {
  .login-overview-shell {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }

  .login-overview-hero {
    order: 2;
    justify-content: flex-start;
  }

  .login-panel {
    order: 1;
    align-self: stretch;
    min-height: auto;
    padding: 24px;
    border-left: 0;
    border-bottom: 1px solid #dce6ed;
  }

  .login-panel .card {
    max-width: 520px;
  }
}

@media (max-width: 767.98px) {
  .login-overview-shell {
    width: 100%;
    margin: 0;
    gap: 12px;
  }

  .login-overview-hero {
    padding: 24px 18px;
  }

  .login-brand-block {
    flex-direction: column;
    text-align: center;
  }

  .login-brand-block h1 {
    font-size: 1.65rem;
  }

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