/* Application presentation. Vendor styles and their license notices are retained. */
:root {
  --portal-blue: #1763ad;
  --portal-muted: #596b80;
  --portal-surface: #ffffff;
  --portal-soft: #f2f6fb;
  --portal-line: #dce5ef;
  --tblr-sidebar-width: 264px;
  --tblr-font-sans-serif: 'Segoe UI', Arial, sans-serif;
}
html[data-bs-theme='light'] { color-scheme: light; --tblr-body-bg: #f3f6fa; --tblr-body-color: #203149; --tblr-bg-surface: #fff; --tblr-border-color: #dce5ef; }
html[data-bs-theme='dark'] {
  color-scheme: dark;
  --portal-blue: #77b5f6;
  --portal-muted: #a9b9cc;
  --portal-surface: #1b293c;
  --portal-soft: #22334a;
  --portal-line: #34465e;
  --tblr-body-bg: #111d2e;
  --tblr-body-color: #e5edf7;
  --tblr-bg-surface: #1b293c;
  --tblr-border-color: #34465e;
}
body.portal-page { font-family: var(--tblr-font-sans-serif); background: var(--tblr-body-bg); color: var(--tblr-body-color); font-size: 14px; line-height: 1.55; }
.portal-page .text-secondary, .portal-page .card-subtitle, .portal-page .form-hint { color: var(--portal-muted) !important; }
.portal-page .page-body { margin: 28px 0; }
.portal-page .container-xl { max-width: 1480px; padding-left: 28px; padding-right: 28px; }
.portal-page .page-intro { gap: 20px; padding: 10px 0 24px; border-bottom: 1px solid var(--portal-line); }
.portal-page .page-title, .portal-page .dashboard-heading { font-size: clamp(24px, 2.3vw, 32px); letter-spacing: -.035em; line-height: 1.25; margin-bottom: 7px; font-weight: 700; }
.portal-page .page-intro .small.text-uppercase { letter-spacing: .1em; font-size: 11px; margin-bottom: 9px !important; }
.portal-page .btn { border-radius: 8px; font-weight: 600; min-height: 40px; box-shadow: none; }
.portal-page .btn-primary { background: #1763ad; border-color: #1763ad; color: #fff; box-shadow: 0 3px 7px #1763ad18; }
.portal-page .btn-primary:hover { background: #104f90; border-color: #104f90; }
.portal-page .btn-outline-primary { color: var(--portal-blue); border-color: color-mix(in srgb, var(--portal-blue) 45%, var(--portal-line)); }
.portal-page .btn-outline-primary:hover { background: var(--portal-soft); }
.portal-page .btn-sm { min-height: 32px; border-radius: 6px; }
.portal-page :is(a,button,input,select,textarea):focus-visible { outline: 3px solid #77b5f6; outline-offset: 3px; }
.portal-page .card { border: 1px solid var(--portal-line); border-radius: 12px; background: var(--portal-surface); box-shadow: 0 3px 12px #172f4b05; }
.portal-page .card-header { padding: 19px 22px; border-color: var(--portal-line); min-height: 72px; }
.portal-page .card-title { font-size: 16px; font-weight: 650; }
.portal-page .card-body { padding: 22px; }
.portal-page .card-subtitle { font-size: 13px; margin-top: 5px; }
.portal-page .stat-card { border-top: 3px solid #5192d2; position: relative; }
.portal-page .stat-card:has(.danger) { border-top-color: #d95656; }
.portal-page .stat-card:has(.success) { border-top-color: #339881; }
.portal-page .stat-card:has(.warning) { border-top-color: #d49b2b; }
.portal-page .stat-card:hover { transform: none; }
.portal-page a:hover .stat-card { border-color: var(--portal-blue); box-shadow: 0 5px 16px #1763ad12; transform: translateY(-2px); }
.portal-page .stat-label { color: var(--portal-muted); font-size: 13px; font-weight: 600; }
.portal-page .stat-number { font-size: 34px; letter-spacing: -.04em; margin: 18px 0 10px; font-variant-numeric: tabular-nums; }
.portal-page .stat-dot { margin-top: 5px; box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 5%, transparent); }
.portal-page .table { --tblr-table-hover-bg: var(--portal-soft); }
.portal-page .table th { color: var(--portal-muted); background: var(--portal-soft); font-size: 11px; letter-spacing: .055em; padding: 14px 18px; font-weight: 700; }
.portal-page .table td { padding: 17px 18px; border-color: var(--portal-line); }
.portal-page .table tbody tr:hover { background: var(--portal-soft); }
.portal-page .mother-table-wrap { max-height: 65vh; overflow: auto; border-radius: 0 0 12px 12px; }
.portal-page .mother-table { min-width: 920px; table-layout: fixed; }
.portal-page .mother-sub, .portal-page .mother-meta { color: var(--portal-muted); line-height: 1.6; }
.portal-page .mother-name { font-weight: 650; }
.portal-page .badge { border-radius: 5px; padding: 5px 8px; letter-spacing: .015em; }
.portal-page .form-control, .portal-page .form-select { min-height: 44px; border-radius: 7px; border-color: var(--portal-line); background-color: var(--portal-surface); color: var(--tblr-body-color); }
.portal-page .form-control:focus, .portal-page .form-select:focus { border-color: #528bc7; box-shadow: 0 0 0 3px #1763ad15; }
.portal-page .form-label { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.portal-page .section-number { display: inline-grid; place-items: center; width: 33px; height: 33px; border-radius: 9px; background: var(--portal-soft); color: var(--portal-blue); font-size: 12px; }
.portal-page .section-number + span { display: none; }
.portal-page .section-number { margin-right: 12px; }
.portal-page .mother-form .card-header, .portal-page.portal-detail .card-header { background: color-mix(in srgb, var(--portal-soft) 55%, var(--portal-surface)); border-radius: 12px 12px 0 0; }
.portal-page .mother-form .risk-option { background: var(--portal-surface); border-radius: 8px; }
.portal-page .mother-form .risk-option:has(input:checked) { border-color: var(--portal-blue); background: var(--portal-soft); }
.portal-page .detail-item { min-height: 78px; }
.portal-page .detail-label { font-size: 11px; letter-spacing: .065em; color: var(--portal-muted); }
.portal-page .detail-value { font-size: 15px; font-weight: 600; }
.portal-page .modal-content { border-radius: 14px; border-color: var(--portal-line); }
.portal-page .modal-header, .portal-page .modal-footer { background: var(--portal-soft); }
.portal-page .footer { padding: 22px 0; font-size: 12px; border-top: 1px solid var(--portal-line); }
.portal-page .portal-sidebar { background: var(--portal-surface); border-right: 1px solid var(--portal-line); box-shadow: none; }
.portal-sidebar .navbar-brand { min-height: 96px; border-bottom: 1px solid var(--portal-line); }
.portal-sidebar .navbar-brand a { color: var(--tblr-body-color); gap: 10px; }
.portal-sidebar .navbar-brand-image { width: 50px; height: 50px; max-height: none; flex: 0 0 50px; object-fit: contain; background: #fff; padding: 3px; border-radius: 50% !important; filter: none !important; }
.portal-sidebar .nav-section-title { font-size: 10px; letter-spacing: .1em; color: var(--portal-muted); padding: 24px 20px 10px; font-weight: 700; }
.portal-sidebar .navbar-nav .nav-link { margin: 3px 12px; padding: 12px !important; border-radius: 8px; color: var(--tblr-body-color); }
.portal-sidebar .nav-item.active > .nav-link { color: var(--portal-blue); background: var(--portal-soft); box-shadow: inset 3px 0 var(--portal-blue); font-weight: 650; }
.portal-sidebar .nav-link:hover { background: var(--portal-soft); }
.portal-sidebar .nav-link-icon { color: var(--portal-muted); }
.portal-sidebar .dropdown-menu .dropdown-item { padding: 10px 16px; border-radius: 6px; }
.portal-sidebar .navbar-footer { padding-bottom: 12px !important; }
.portal-page #desktop_page_header { display: block !important; margin: 0; padding: 14px 0 !important; background: var(--portal-surface); border-color: var(--portal-line) !important; }
.portal-header-content { min-height: 34px; }
.portal-header-label { font-size: 12px; font-weight: 600; color: var(--portal-muted); }
.portal-page .portal-sidebar-toggle { display: none; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 2000; padding: 12px 20px; background: var(--portal-surface); color: var(--portal-blue); }
.skip-link:focus { top: 12px; }
@media (min-width: 992px) {
  .portal-page #desktop_page_header { margin-left: var(--tblr-sidebar-width); }
  .portal-page .portal-sidebar-toggle { display: inline-flex; }
  .portal-page.sidebar-collapsed .portal-sidebar { visibility: hidden; transform: translateX(-100%); }
  .portal-page.sidebar-collapsed .page-wrapper, .portal-page.sidebar-collapsed #desktop_page_header { margin-left: 0 !important; }
}
@media (max-width: 991.98px) {
  .portal-page .container-xl { padding-left: 18px; padding-right: 18px; }
  .portal-sidebar .navbar-brand { min-height: 76px; border: 0; padding: 12px; }
  .portal-sidebar .navbar-footer { display: none; }
  .portal-sidebar .navbar-collapse { padding-bottom: 16px; }
  .portal-sidebar .navbar-brand-image { width: 44px; height: 44px; flex-basis: 44px; }
  .portal-page .page-body { margin-top: 20px; }
}
@media (max-width: 767.98px) {
  .portal-page .page-intro { flex-wrap: wrap; align-items: flex-start !important; gap: 16px; }
  .portal-page .page-intro .btn-list { margin-top: 0; gap: 8px; }
  .portal-page .mother-table .hide-mobile { display: table-cell; }
  .portal-page .card-body, .portal-page .card-header { padding: 18px; }
  .portal-page .detail-item { min-height: auto; padding-bottom: 14px; border-bottom: 1px solid var(--portal-line); }
  .portal-header-label { display: none; }
  .portal-page #current_time { margin-right: auto; font-size: 11px; }
}
/* Login uses the same blue identity and saved appearance as the register. */
body.portal-login { --login-teal: #1763ad; --login-teal-dark: #104f90; --login-page: var(--tblr-body-bg); }
.portal-login .login-story { background: radial-gradient(ellipse at 0% 100%, #245f9355, transparent 65%), #143553; }
.portal-login .brand-short, .portal-login .story-kicker { color: #b2d7fa; }
.portal-login .story-title { font-size: clamp(2.5rem, 4.3vw, 4rem); line-height: 1.1; letter-spacing: -.045em; }
.portal-login .story-text { color: #d0dfed; }
.portal-login .login-access { background: var(--tblr-body-bg); }
.portal-login .login-box { padding: 36px; max-width: 475px; background: var(--portal-surface); border: 1px solid var(--portal-line); border-radius: 18px; box-shadow: 0 12px 45px #142d4710; }
.portal-login .brand-logo { width: 82px; height: 82px; flex-basis: 82px; }
.portal-login .login-submit { background: #1763ad; }
.portal-login .login-eyebrow { color: var(--portal-blue); }
@media (max-width: 575.98px) {
  .portal-login .login-box { padding: 24px 20px; }
  .portal-login .brand-logo { width: 58px; height: 58px; flex-basis: 58px; }
}
@media (prefers-reduced-motion: reduce) {
  .portal-page *, .portal-page *::before, .portal-page *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .portal-sidebar, #desktop_page_header, .page-intro .btn-list, .page-intro > .btn { display: none !important; }
  .portal-page .page-wrapper { margin: 0 !important; }
  .portal-page .card { break-inside: avoid; box-shadow: none; }
  .portal-page .mother-table-wrap { max-height: none; overflow: visible; }
}
