@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700&display=swap');

:root {
  --body: #495057;
  --muted: #9aa0ac;
  --page: #f5f7fb;
  --white: #fff;
  --blue: #467fcf;
  --green: #00874f;
  --orange: #f5a25d;
  --cyan: #4cb4df;
  --yellow: #f1cf16;
  --line: rgba(0, 40, 100, .12);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--page);
  color: var(--body);
  font-family: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--blue); }
.page-shell { min-height: 100vh; display: flex; flex-direction: column; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 12px; }

.site-header { height: 98px; background: #fff; }
.header-inner { height: 98px; display: flex; align-items: center; justify-content: space-between; }
.header-brand { display: inline-flex; align-items: center; height: 66px; text-decoration: none; }
.header-brand img { display: block; width: 216px; height: 66px; object-fit: contain; }
.secure-portal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 210px; height: 48px; line-height: 0;
}
.secure-portal img { display: block; width: 210px; height: 48px; object-fit: contain; }

.breadcrumb {
  min-height: 56px; padding: 15px 16px; border-top: 8px solid #2f80bd;
  display: flex; align-items: center; gap: 10px; background: #e9ecef;
}
.breadcrumb a { color: #343a40; }
.breadcrumb .muted { color: #90949a; }
.main-content { flex: 1; padding-top: 12px; padding-bottom: 24px; }
h1 { margin: 0 0 14px; font-size: 32px; line-height: 1.3; font-weight: 600; }
.lead { margin: 0 0 18px; font-size: 20px; line-height: 1.35; }

.card { width: 100%; background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.card + .card { margin-top: 24px; }
.card-orange { border-top: 3px solid var(--orange); }
.card-cyan { border-top: 3px solid var(--cyan); }
.card-yellow { border-top: 3px solid var(--yellow); }
.card-green { border-top: 3px solid var(--green); }
.card-body { padding: 24px; }
.card-title { padding: 13px 24px; font-size: 19px; border-bottom: 1px solid var(--line); }

.form-group { margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }
label { display: inline-block; margin-bottom: 8px; }
.form-control {
  display: block; width: 100%; height: 39px; padding: 8px 16px;
  border: 1px solid #d5d9df; border-radius: 2px; background: #fff; color: var(--body);
  font: inherit; outline: none;
}
.form-control:focus { border-color: #45aaf2; box-shadow: 0 0 0 2px rgba(69,170,242,.15); }
.form-control:disabled { background: #f2f3f5; color: #8d9298; cursor: not-allowed; }
textarea.form-control { height: auto; min-height: 90px; resize: vertical; }
.validation-grid { display: grid; grid-template-columns: 278px 254px; gap: 24px; }
.narrow-card { max-width: 858px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 39px;
  padding: 8px 16px; border: 1px solid transparent; border-radius: 3px;
  cursor: pointer; text-decoration: none; font: inherit; font-weight: 600;
}
.btn-primary { color: #fff; background: var(--green); border-color: var(--green); font-size: 19px; }
.btn-outline { color: var(--blue); background: transparent; border-color: var(--blue); }
.btn-danger { color: #fff; background: #c92a2a; border-color: #c92a2a; }
.btn-muted { color: #343a40; background: #e9ecef; border-color: #ced4da; }
.btn-sm { min-height: 29px; padding: 4px 9px; font-size: 13px; }
.action-row { margin-top: 24px; display: flex; gap: 8px; flex-wrap: wrap; }

.details-table { width: 100%; border-collapse: collapse; }
.details-table td { padding: 13px 24px; border-bottom: 1px solid var(--line); }
.details-table tr:last-child td { border-bottom: 0; }
.details-table td:first-child { width: 34%; }
.details-table td:nth-child(2) { width: 52%; }
.details-table .action-cell { width: 14%; text-align: right; }

.alert { margin-bottom: 16px; padding: 12px 16px; border: 1px solid transparent; border-radius: 3px; }
.alert-success { background: #d8f3dc; border-color: #95d5b2; color: #1b4332; }
.alert-error { background: #ffe3e3; border-color: #ffa8a8; color: #8b1e1e; }
.alert-info { background: #e7f5ff; border-color: #a5d8ff; color: #174c77; }
.error-title { font-weight: 700; color: #b02a37; }

.site-footer { margin-top: auto; padding: 20px 0; background: #fff; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-inner p { margin: 0; }

.admin-nav { background: #263238; color: #fff; }
.admin-nav-inner { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.admin-nav nav { display: flex; gap: 22px; }
.admin-nav a { color: #fff; text-decoration: none; }
.admin-main { padding-top: 28px; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; }
.admin-grid .full { grid-column: 1 / -1; }
.toolbar { margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.toolbar form { display: flex; gap: 8px; flex: 1; max-width: 520px; }
.data-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; background: #fff; }
.data-table th, .data-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.data-table th { background: #edf1f4; }
.data-table form { display: inline; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 700; }
.badge-valid { background: #d8f3dc; color: #1b4332; }
.badge-invalid { background: #ffe3e3; color: #8b1e1e; }
.login-card { max-width: 430px; margin: 48px auto; }
.help { margin-top: 5px; color: #7b8188; font-size: 13px; }
.pagination { margin-top: 18px; display: flex; gap: 8px; }

@media (max-width: 768px) {
  .site-header, .header-inner { height: 82px; }
  .header-brand img { width: 164px; height: 50px; }
  .secure-portal, .secure-portal img { width: 175px; height: 40px; }
  .breadcrumb { min-height: 52px; overflow-x: auto; white-space: nowrap; }
  h1 { font-size: 27px; }
  .lead { font-size: 18px; }
  .narrow-card { max-width: none; }
  .validation-grid, .admin-grid { grid-template-columns: 1fr; }
  .admin-grid .full { grid-column: auto; }
  .details-table td { padding: 11px 14px; }
  .details-table td:first-child { width: 42%; }
  .footer-inner, .admin-nav-inner { align-items: flex-start; flex-direction: column; }
  .admin-nav-inner { padding-top: 12px; padding-bottom: 12px; }
}

@media (max-width: 440px) {
  .secure-portal, .secure-portal img { width: 140px; height: 32px; }
  .card-body, .card-title { padding-left: 16px; padding-right: 16px; }
  .details-table td { display: block; width: 100% !important; }
  .details-table td:first-child { padding-bottom: 2px; border-bottom: 0; color: #7b8188; }
  .details-table td:nth-child(2) { padding-top: 2px; }
  .details-table .action-cell { text-align: left; padding-top: 0; }
}
