/* PerformX shared design system. Keep legacy forms and Bootstrap tables compatible. */
:root {
  --ink: #173747;
  --muted: #657a87;
  --navy: #103c52;
  --teal: #117f78;
  --teal-dark: #09645f;
  --canvas: #f4f7f8;
  --line: #dfe7eb;
  --soft: #eaf4f1;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(21, 55, 72, .04);
}
* { box-sizing: border-box; }
html { background: var(--canvas); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; color: var(--ink); background: var(--canvas); font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif; font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
body > br, body > hr { display: none; }
[hidden] { display: none !important; }
a { color: var(--teal-dark); text-decoration: none; transition: color .15s, background .15s; }
a:hover { color: var(--navy); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 3px solid #148c82; outline-offset: 4px; }
h1, h2, h3, h4, h5, h6 { color: var(--ink); line-height: 1.2; font-weight: 650; letter-spacing: -.025em; margin: 0 0 16px; }
h1 { font-size: clamp(28px, 3vw, 38px); }
h2 { font-size: 23px; }
h3 { font-size: 18px; }
p { margin: 0 0 16px; }
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.container { width: calc(100% - 80px); max-width: 1280px; margin: 38px auto 56px; flex: 1 0 auto; padding: 0; }
.container .container { width: 100%; margin: 24px 0; }
.eyebrow { display: block; color: var(--teal-dark); font-size: 10px; font-weight: 750; letter-spacing: .15em; margin-bottom: 12px; }
.helper-text, .text-muted { color: var(--muted) !important; font-size: 13px; }
.helper-text { display: block; }
.text-light { color: var(--muted) !important; }
.text-link { font-weight: 600; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #229685; margin-right: 7px; }
.inline-divider, .footer-divider { margin: 0 12px; color: #b8c6ce; }
.skip-link { position: absolute; top: -80px; left: 20px; z-index: 2000; padding: 12px 20px; background: white; border: 2px solid var(--teal); border-radius: 8px; }
.skip-link:focus { top: 10px; }
/* Navigation */
.app-header { position: sticky; top: 0; z-index: 100; width: 100%; background: rgba(255,255,255,.98); border-bottom: 1px solid var(--line); }
.app-nav { max-width: 1440px; margin: auto; min-height: 86px; padding: 16px 40px; display: flex; align-items: center; gap: 24px; }
.app-brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; color: var(--navy); }
.app-brand-logo { display: block; width: 224px; height: 64px; object-fit: contain; }
.brand-symbol { display: flex; align-items: center; justify-content: center; width: 42px; height: 44px; background: var(--navy); color: white; border-radius: 11px; font-size: 25px; font-weight: 700; letter-spacing: -3px; padding-right: 3px; }
.brand-symbol span { color: #82d2bf; font-weight: 400; font-size: 26px; margin-top: 8px; }
.app-nav-links { display: flex; flex-wrap:wrap; min-width:0; align-items: center; justify-content:flex-end; gap: 6px; flex: 1; }
.app-nav .nav-link { padding: 10px 13px; color: #526b7a; font-size: 13px; font-weight: 600; white-space: nowrap; border-radius: 8px; }
.app-nav .nav-link i { margin-right: 7px; font-size: 13px; }
.app-nav .nav-link:hover, .app-nav .nav-link[aria-current="page"] { color: var(--teal-dark); background: var(--soft); }
.nav-utilities { margin-left: auto; display: flex; flex-wrap:wrap; align-items: center; gap: 19px; max-width:100%; }
.install-button { border: 1px solid var(--line); border-radius: 8px; padding: 9px 13px; background: white; color: var(--ink); font-size: 12px; font-weight: 600; white-space: nowrap; }
.install-button:hover { background: var(--soft); border-color: #b4d5cc; }
.install-button i { margin-right: 6px; }
.support-link { font-size: 19px; color: var(--muted); }
.logout-link { font-size: 12px; color: var(--muted); white-space: nowrap; }
.logout-link i { margin-left: 5px; }
.menu-toggle { display: none; background: white; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; min-height: 44px; padding: 8px 12px; align-items: center; gap: 8px; }
.administration-menu { position:relative; min-width:0; }
.administration-menu > summary { display:flex; align-items:center; list-style:none; cursor:pointer; border:1px solid var(--line); }
.administration-menu > summary::-webkit-details-marker { display:none; }
.administration-menu > summary .administration-chevron { margin:0 0 0 8px; font-size:10px; }
.administration-menu[open] > summary, .administration-menu > summary.is-current { background:var(--soft); color:var(--teal-dark); }
.administration-menu[open] .administration-chevron { transform:rotate(180deg); }
.administration-menu-panel { position:absolute; right:0; top:calc(100% + 10px); z-index:110; width:340px; max-width:calc(100vw - 40px); max-height:70vh; overflow:auto; padding:10px; background:white; border:1px solid var(--line); border-radius:12px; box-shadow:0 12px 32px rgba(21,55,72,.15); }
.administration-menu-panel section { padding:8px; }
.administration-menu-panel section + section { margin-top:6px; border-top:1px solid var(--line); }
.administration-menu-panel h2 { color:var(--muted); font-size:12px; letter-spacing:.04em; line-height:1.5; margin:0 0 8px; overflow-wrap:anywhere; }
.administration-menu-panel nav { display:grid; gap:2px; }
.administration-menu-panel a { display:block; border-radius:6px; padding:8px 10px; color:var(--ink); font-size:13px; font-weight:600; }
.administration-menu-panel a:hover, .administration-menu-panel a[aria-current=page] { color:var(--teal-dark); background:var(--soft); }
.administration-menu-panel .helper-text { margin:8px 0; }
.connection-banner { padding: 12px 24px; color: #694c12; background: #fff1ce; text-align: center; }
/* Inputs and shared legacy form styling */
label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 8px; color: var(--ink); }
input:not([type=radio]):not([type=checkbox]):not([type=hidden]):not([type=submit]):not([type=button]), select, textarea, .form-control { width: 100%; min-height: 48px; height: auto; border: 1px solid #ccd9df; border-radius: 8px; padding: 11px 14px; margin: 0; background: white; color: var(--ink); font-size: 14px; text-align: left; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #7a8f9a; opacity: 1; }
input:focus, select:focus, textarea:focus, .form-control:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(17,127,120,.12); outline: none; }
input[type=radio], input[type=checkbox] { accent-color: var(--teal); }
input[type=radio]:focus-visible, input[type=checkbox]:focus-visible { outline: 3px solid var(--teal); }
input[type=submit], input[type=button], .btn { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 44px; border-radius: 8px; padding: 11px 20px; font-size: 13px; font-weight: 600; border: 1px solid transparent; line-height: 1.5; text-decoration: none; white-space: normal; transition: background .15s, border-color .15s; }
.btn-primary, input[type=submit], input[type=button] { color: white; background: var(--teal); border-color: var(--teal); }
.btn-primary:hover, .btn-primary:focus, input[type=submit]:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: white; }
.btn-primary:not(:disabled):not(.disabled):active, .btn-primary:not(:disabled):not(.disabled).active { background: var(--navy); border-color: var(--navy); }
.btn-secondary { background: white; color: var(--ink); border-color: #ccd9df; }
.btn-secondary:hover { background: var(--soft); border-color: #a5cfc4; color: var(--ink); }
.btn-white { background: white; color: var(--navy); }
.btn-white:hover { background: #dff2ed; color: var(--navy); }
.btn-block { display: flex; width: 100%; }
.form-group { margin: 0 0 22px; }
.form-group .helper-text { margin-top: 7px; }
.form-row { display: flex; flex-wrap: wrap; margin: 0 -8px; }
.form-row > .col, .form-row > [class*=col-] { padding: 0 8px; }
fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
legend { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.wrapper { width: calc(100% - 40px); max-width: 760px; margin: 44px auto 56px; flex: 1 0 auto; }
#formContent { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: white; padding: 32px; box-shadow: var(--shadow); color: var(--ink); }
#formHeader { border-bottom: 1px solid var(--line); margin: 0 0 24px; padding: 0 0 20px; }
#formTitle, .iu-form-title { font-size: 24px; color: var(--ink); font-weight: 600; }
#formContent form > input:not([type=hidden]):not([type=checkbox]) { margin-bottom: 20px; }
#formContent form > input[type=submit] { margin: 16px 0 0; }
#formContent .form-group input { margin-bottom: 0; }
.iu-form-icon { color: var(--teal); font-size: 32px; margin-bottom: 20px; }
.iu-chkbox-label, .iu-h5, .iu-h6 { color: var(--ink); }
.form-control-plaintext, input.iu-readonly-input { background: var(--canvas) !important; }
.form-check input { margin-top: 6px; }
/* Login */
.login-page { background: #fff; }
.login-layout { display: grid; grid-template-columns: 1fr 1fr; flex: 1; width: 100%; max-width: 1600px; margin: 0 auto; padding: 24px; gap: 24px; }
.login-story { position: relative; overflow: hidden; min-height: 650px; background: var(--navy); color: white; border-radius: 20px; padding: 40px 52px; display: flex; flex-direction: column; justify-content: space-between; }
.story-top, .story-bottom { position: relative; z-index: 1; font-size: 10px; letter-spacing: .12em; color: #c0d7df; }
.story-top .status-dot { background: #8bd2be; }
.story-copy { position: relative; z-index: 1; padding: 60px 0; max-width: 460px; }
.story-copy .eyebrow { color: #8cd4c0; }
.story-copy h1 { color: white; font-size: clamp(36px, 3.6vw, 56px); line-height: 1.12; letter-spacing: -.045em; margin: 23px 0; font-weight: 600; }
.story-copy > p { color: #c2d6df; font-size: 16px; max-width: 340px; line-height: 1.8; }
.story-features { margin-top: 34px; display: grid; gap: 16px; font-size: 13px; color: #e1edef; }
.story-features i { margin-right: 12px; color: #a5ddcb; background: #295567; border-radius: 50%; padding: 6px; font-size: 8px; }
.story-bottom { letter-spacing: 0; display: flex; align-items: center; gap: 12px; font-size: 11px; }
.story-line { width: 28px; height: 1px; background: #85b8ba; }
.story-orbit { position: absolute; border: 1px solid rgba(153, 211, 202, .12); width: 550px; height: 550px; border-radius: 50%; right: -340px; bottom: -160px; }
.orbit-two { width: 700px; height: 700px; right: -415px; bottom: -235px; }
.login-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 30px 20px; }
.login-card { width: 100%; max-width: 380px; }
.health-logo { width: 190px; margin-bottom: 42px; }
.login-card h2 { font-size: 30px; letter-spacing: -.04em; margin-bottom: 12px; }
.login-intro { color: var(--muted); margin-bottom: 30px; font-size: 14px; }
.login-submit { width: 100%; min-height: 49px; justify-content: space-between; margin-top: 4px; }
.login-support { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 25px; margin-top: 28px; }
.login-support a { font-weight: 600; margin-left: 5px; }
.login-caption { margin: 48px 0 0; font-size: 11px; color: var(--muted); }
.login-caption i { margin-right: 6px; }
/* Overview */
.page-intro { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 30px; }
.page-intro h1 { margin-bottom: 12px; }
.page-intro p { color: var(--muted); font-size: 13px; margin: 0; }
.page-intro .btn { flex-shrink: 0; }
.workspace-hero { display: flex; align-items: center; justify-content: space-between; gap: 32px; background: var(--navy); color: #d4e4e9; border-radius: var(--radius); padding: 34px 40px; overflow: hidden; margin-bottom: 28px; }
.workspace-hero .eyebrow { color: #9bdac9; }
.workspace-hero h2 { font-size: 32px; color: white; margin-bottom: 10px; }
.workspace-hero p { font-size: 14px; }
.hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 23px; flex-wrap: wrap; }
.hero-link { color: #d5e9eb; font-size: 13px; }
.hero-link:hover { color: white; }
.hero-mark { border: 1px solid #467484; border-radius: 28px; padding: 28px; margin-right: 30px; color: #b4e1d2; background: #244f62; transform: rotate(-8deg); font-size: 64px; line-height: 1; }
.notice-panel { display: flex; gap: 18px; padding: 22px 24px; background: #eaf3ef; border: 1px solid #d2e6dd; border-radius: 12px; margin-bottom: 30px; }
.notice-panel > i { color: var(--teal); margin-top: 5px; }
.notice-panel .eyebrow { margin-bottom: 5px; }
.notice-message { font-size: 14px; overflow-wrap: anywhere; }
.notice-message p:last-child { margin: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 30px 0 16px; }
.section-heading h2 { margin: 0; font-size: 20px; }
.section-heading > span { font-size: 11px; color: var(--muted); }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.stat-card { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; box-shadow: var(--shadow); }
.stat-top { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.stat-top i { background: var(--soft); border-radius: 8px; color: var(--teal); padding: 10px; }
.stat-card > strong { display: block; font-size: 38px; font-weight: 650; line-height: 1.2; letter-spacing: -.04em; margin: 8px 0; }
.stat-card > strong small { color: var(--muted); font-size: 15px; font-weight: 400; letter-spacing: 0; margin-left: 7px; }
.stat-card .helper-text { font-size: 11px; }
.overview-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; margin-top: 28px; align-items: start; }
.surface-panel { border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); min-width: 0; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 24px; gap: 12px; }
.panel-heading .eyebrow { margin-bottom: 8px; }
.panel-heading h2 { font-size: 20px; margin: 0; }
.icon-tile { display: inline-flex; justify-content: center; align-items: center; flex-shrink: 0; width: 42px; height: 42px; color: var(--teal); background: var(--soft); border-radius: 11px; }
.icon-tile.warm { background: #fbf3df; color: #967323; }
.rank-badge { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; color: var(--muted); border-radius: 6px; font-size: 12px; }
.rank-top { background: #edf5f1; color: var(--teal-dark); font-weight: 700; }
/* Tables and administration */
.table, table.dataTable { color: var(--ink); background: white; font-size: 13px; margin-bottom: 0; width: 100%; }
.table th, .table td { border-color: #e7edef; padding: 15px 18px; vertical-align: middle; color: var(--ink); }
.table thead th { background: #f8fafb; color: #607784; font-size: 11px; font-weight: 600; border-bottom: 1px solid var(--line); }
.table-striped tbody tr:nth-of-type(odd) { background: #f7fafb; }
.table caption { padding: 14px 0; font-size: 12px; }
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.surface-panel .table th:first-child, .surface-panel .table td:first-child { padding-left: 24px; }
.surface-panel .table-responsive { border-radius: 0 0 var(--radius) var(--radius); }
.empty-state { text-align: center; color: var(--muted) !important; padding: 40px 24px !important; line-height: 1.8; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 30px; }
.incidental-findings { max-width: 1100px; }
.incidental-findings form { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: white; margin-top: 28px; }
.incidental-findings input[type=number] { min-width: 96px; }
.incidental-findings .table thead { background: #f8fafb; }
.incidental-findings th[scope=row] { min-width: 140px; }
.incidental-findings td { position: relative; }
.incidental-findings .btn { margin-top: 24px; }
.dataTables_wrapper { width: 100%; min-width: 0; }
.dataTables_wrapper .row { margin: 0; }
.dt-buttons { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; }
.dataTables_length select { width: auto; min-height: 36px; }
.dataTables_filter input { width: auto !important; }
.dataTables_wrapper > .clear { clear: both; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.dashboard-panel { padding: 20px; overflow: hidden; }
.dashboard-panel:last-child { grid-column: 1 / -1; }
.iu-notfound-icon { color: var(--teal); font-size: 64px; }
/* Complete administration and reporting workspace */
.admin-workspace { max-width: 1280px; }
.admin-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 32px; }
.admin-card { display: block; padding: 26px; color: var(--ink); }
.admin-card:hover { border-color: #9bcbbf; background: #fcfefd; }
.admin-card .icon-tile { margin-bottom: 24px; }
.admin-card h2 { font-size: 19px; }
.admin-card p { font-size: 13px; color: var(--muted); min-height: 62px; }
.admin-card .text-link { font-size: 12px; }
.list-panel { overflow: hidden; }
.table-tools { padding: 24px; display: flex; justify-content: space-between; align-items: end; gap: 20px; border-bottom: 1px solid var(--line); }
.table-search { width: 100%; max-width: 360px; }
.table-tool-actions { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.table-tools .btn { white-space: nowrap; }
.table tbody th { font-size: 13px; font-weight: 600; }
.cell-detail { display: block; font-weight: 400; color: var(--muted); font-size: 11px; margin-top: 4px; }
.status-pill { display: inline-block; background: var(--soft); color: var(--teal-dark); padding: 4px 10px; border-radius: 20px; font-size: 11px; white-space: nowrap; }
.status-neutral { background: #eef1f4; color: #607784; }
.row-actions { white-space: nowrap; }
.action-link { display: inline-block; padding: 8px 10px; border-radius: 6px; font-weight: 600; font-size: 12px; }
.action-link:hover { background: var(--soft); }
.danger-link { color: #a14146; }
.danger-link:hover { color: #803137; background: #fceeee; }
.table-icon { color: var(--teal); margin-right: 12px; }
.message-cell { min-width: 220px; max-width: 420px; overflow-wrap: anywhere; }
.message-cell p:last-child { margin: 0; }
.admin-form-panel { max-width: 760px; padding: 32px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 24px; margin-top: 28px; border-top: 1px solid var(--line); }
.check-row { display: flex; gap: 12px; align-items: start; margin: 8px 0 24px; }
.check-row input { width: 18px; height: 18px; margin-top: 4px; flex-shrink: 0; }
.check-row small { display: block; font-weight: 400; color: var(--muted); margin-top: 3px; }
.field-legend { font-size: 15px; margin-bottom: 8px; }
.hours-entry { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 36px; gap: 16px; align-items: center; }
.remove-hours { border: 1px solid var(--line); border-radius: 8px; background: white; color: #a14146; width: 36px; height: 44px; margin-top: 5px; }
.section-space { margin-top: 28px; }
.dashboard-panel .panel-heading { padding: 8px 4px 24px; }
.dashboard-panel:last-child { grid-column: auto; }
.chart-bars { padding: 4px; }
.chart-row { margin-bottom: 24px; }
.chart-row > div:first-child { display: flex; align-items: start; justify-content: space-between; gap: 20px; font-size: 13px; margin-bottom: 10px; }
.chart-track { height: 12px; border-radius: 6px; background: var(--soft); overflow: hidden; }
.chart-track span { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.goal-content { padding: 4px; }
.revenue-value { font-size: 38px; line-height: 1.2; font-weight: 650; letter-spacing: -.04em; }
.revenue-value span { display: block; font-size: 12px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin: 10px 0 24px; }
progress { display: block; appearance: none; width: 100%; height: 12px; border: 0; border-radius: 6px; overflow: hidden; background: var(--soft); accent-color: var(--teal); margin-bottom: 12px; }
progress::-webkit-progress-bar { background: var(--soft); }
progress::-webkit-progress-value { background: var(--teal); border-radius: 6px; }
progress::-moz-progress-bar { background: var(--teal); }
.goal-list { margin: 28px 0 0; }
.goal-list > div { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding: 14px 0; font-size: 13px; }
.goal-list dt { font-weight: 400; color: var(--muted); }
.goal-list dd { margin: 0; font-weight: 600; }
.report-summary { align-items: center; }
.report-filters { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr)) auto; align-items: end; gap: 18px; padding: 24px; margin-bottom: 28px; }
.report-filters .form-group { margin: 0; }
.report-filters > p { grid-column: 1 / -1; margin: 0; }
.report-summary p { margin: 4px 0 0; }
.report-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.report-table th { white-space: nowrap; }
.status-workspace { display: flex; align-items: center; justify-content: center; }
.status-panel { max-width: 620px; width: 100%; padding: 48px; }
.status-icon { margin-bottom: 32px; width: 56px; height: 56px; font-size: 22px; }
.status-panel h1 { font-size: clamp(28px, 3vw, 38px); }
.status-panel > p { color: var(--muted); font-size: 14px; }
.status-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
/* Task tracker */
.tracker-workspace { max-width: 1180px; }
.tracker-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 28px; align-items: start; }
.tracker-form { padding: 28px 32px; }
.tracker-person { display: flex; gap: 13px; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.tracker-person strong { display: block; font-size: 14px; }
.tracker-person div > span { display: block; color: var(--muted); font-size: 12px; }
.session-badge { margin-left: auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
.tracker-step { padding: 28px 0; border-bottom: 1px solid var(--line); }
.tracker-step legend { float: left; width: 100%; display: flex; align-items: center; gap: 12px; font-size: 18px; margin-bottom: 12px; }
.tracker-step legend + * { clear: both; }
.step-number { color: var(--teal); border: 1px solid #c6e0d7; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; font-size: 11px; }
.category-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.category-button { background: white; border: 1px solid #ccd9df; color: #526b7a; padding: 10px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; min-height: 44px; }
.category-button i { font-size: 10px; margin-left: 12px; }
.category-button:hover, .category-button[aria-pressed=true] { background: var(--navy); border-color: var(--navy); color: white; }
.task-group { margin: 20px 0 0; }
.task-group h3 { font-size: 13px; margin: 0 0 12px; font-weight: 600; letter-spacing: 0; }
.task-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice-card { display: flex; gap: 10px; align-items: center; padding: 12px 14px; margin: 0; min-height: 48px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-weight: 400; cursor: pointer; }
.choice-card:hover { border-color: #9bcbbf; background: #f8fbf9; }
.choice-card:has(input:checked) { border-color: var(--teal); background: #edf7f2; color: var(--teal-dark); }
.choice-card input { width: 16px; height: 16px; margin: 0; flex-shrink: 0; }
.choice-card:focus-within { outline: 2px solid var(--teal); outline-offset: 2px; }
.study-field { margin: 20px 0 0; }
.study-field label .helper-text { display: inline; font-weight: 400; }
.duration-options { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.duration-choice { flex-direction: column; justify-content: center; text-align: center; padding: 12px 4px; gap: 8px; }
.duration-choice span { font-size: 15px; font-weight: 600; }
.duration-choice small { display: block; font-size: 10px; font-weight: 400; color: var(--muted); }
.optional-label { margin-left: auto; font-size: 11px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.tracker-step textarea { display: block; }
#comments-help { margin: 9px 0 0; font-size: 11px; }
#comments-help i { margin-right: 4px; }
.tracker-submit { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; }
.tracker-submit p { margin: 0; }
.aside-note { background: #e9f1ef; border: 1px solid #d9e6e1; border-radius: var(--radius); padding: 28px; }
.aside-note .icon-tile { background: white; margin-bottom: 26px; }
.aside-note h2 { font-size: 23px; }
.aside-note p { font-size: 13px; color: #56726f; }
.aside-note p:last-child { margin: 0; }
.aside-note hr { border-color: #ceded8; }
.aside-link { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.aside-link > span { font-size: 13px; font-weight: 600; }
.aside-link small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 4px; }
.aside-link > span:last-child { margin-left: auto; }
.alert { border-radius: 10px; padding: 16px 20px; font-size: 14px; margin-bottom: 24px; }
.alert-success { color: #22604c; background: #e7f4eb; border-color: #c9e8d3; }
.alert-danger { color: #973f40; background: #fceeee; border-color: #f0cccc; }
.alert i { margin-right: 8px; }
/* Footer, install dialog, and offline screen */
.footer { margin-top: auto; width: 100%; background: white; border-top: 1px solid var(--line); padding: 20px 40px; }
.footer-inner { max-width: 1360px; margin: auto; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.footer-partner { display: flex; align-items: center; gap: 20px; }
.footer-partner img { display: block; width: 132px; height: 50px; object-fit: contain; flex-shrink: 0; }
.footer-partner span, .footer p { color: var(--muted); font-size: 10px; margin: 0; }
.install-dialog { width: calc(100% - 32px); max-width: 460px; border: 1px solid var(--line); border-radius: 18px; padding: 36px; color: var(--ink); box-shadow: 0 24px 80px #103c5233; }
.install-dialog::backdrop { background: #0a283866; backdrop-filter: blur(3px); }
.install-dialog h2 { margin-top: 20px; }
.install-dialog > p { font-size: 14px; }
.dialog-close { position: absolute; top: 10px; right: 10px; background: transparent; border: 0; font-size: 24px; color: var(--muted); width: 40px; height: 40px; }
.app-toast { position: fixed; z-index: 200; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 16px 24px; background: var(--navy); color: white; border-radius: 12px; box-shadow: var(--shadow); font-size: 13px; max-width: calc(100% - 32px); }
.offline-page { justify-content: center; align-items: center; padding: 24px; }
.offline-card { max-width: 460px; padding: 40px; background: white; border: 1px solid var(--line); border-radius: 20px; }
.offline-icon { display: block; margin-bottom: 32px; }
.offline-card p { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 1200px) {
  .app-nav { gap: 24px; padding: 16px 24px; }
  .app-nav .nav-link { padding: 10px; font-size: 12px; }
  .app-nav .nav-link i { display: none; }
  .nav-utilities { gap: 12px; }
  .login-story { padding: 36px; }
}
@media (max-width: 1000px) {
  .admin-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-nav { flex-wrap: wrap; justify-content: space-between; gap: 0; min-height: 76px; }
  .menu-toggle { display: inline-flex; }
  .app-nav-links { display: none; width: 100%; flex-basis: 100%; padding-top: 16px; }
  .app-nav-links.is-open { display: flex; flex-direction: column; flex-wrap:nowrap; justify-content:flex-start; align-items: stretch; gap: 4px; max-height:calc(100dvh - 100px); overflow-y:auto; overscroll-behavior:contain; }
  .app-nav-links.is-open > * { flex-shrink:0; }
  .app-nav .nav-link { padding: 12px; font-size: 14px; }
  .app-nav .nav-link i { display: inline; }
  .administration-menu { width:100%; }
  .administration-menu > summary { justify-content:space-between; }
  .administration-menu-panel { position:static; width:100%; max-width:none; max-height:none; margin-top:8px; box-shadow:none; }
  .nav-utilities { margin: 10px 0 0; padding: 16px 10px 0; border-top: 1px solid var(--line); }
  .logout-link { margin-left: auto; }
  .container { width: calc(100% - 48px); margin-top: 30px; }
  .overview-grid { grid-template-columns: 1fr; }
  .tracker-layout { grid-template-columns: minmax(0, 1fr) 220px; gap: 20px; }
  .tracker-form { padding: 24px; }
  .aside-note { padding: 22px; }
  .duration-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .duration-choice { flex-direction: row; gap: 10px; }
  .login-story { min-height: 610px; padding: 30px; }
  .story-copy h1 { font-size: 40px; }
  .login-panel { padding: 30px 18px; }
  .login-card h2 { font-size: 27px; }
}
@media (max-width: 760px) {
  .report-filters { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .table-tools { flex-direction: column; align-items: stretch; padding: 20px; gap: 14px; }
  .table-search { max-width: none; }
  .table-tool-actions { justify-content: space-between; }
  .admin-form-panel { padding: 24px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .status-panel { padding: 28px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .app-nav { padding: 12px 20px; }
  .brand-symbol { width: 36px; height: 38px; font-size: 23px; }
  .app-brand-logo { width: 185px; height: 48px; }
  .login-layout { display: flex; flex-direction: column-reverse; padding: 0; gap: 0; }
  .login-panel { padding: 40px 24px; }
  .login-card { max-width: 420px; }
  .health-logo { margin-bottom: 32px; width: 170px; }
  .login-caption { margin-top: 30px; }
  .login-story { min-height: 0; border-radius: 0; padding: 32px 24px; }
  .story-copy { padding: 24px 0; max-width: 100%; }
  .story-copy h1 { font-size: 36px; }
  .story-copy > p { max-width: 420px; font-size: 14px; }
  .story-features { gap: 12px; margin-top: 24px; }
  .story-bottom { margin-top: 12px; }
  .container { width: calc(100% - 32px); margin: 26px auto 36px; }
  .page-intro { flex-wrap: wrap; gap: 18px; margin-bottom: 24px; }
  .page-intro h1 { font-size: 29px; }
  .page-intro > .btn { width: 100%; }
  .workspace-hero { padding: 28px 24px; }
  .workspace-hero h2 { font-size: 28px; }
  .hero-mark { display: none; }
  .hero-actions { gap: 18px; }
  .stats-grid { gap: 12px; }
  .stat-card { padding: 18px; }
  .stat-top { flex-direction: column-reverse; gap: 12px; }
  .stat-top i { align-self: flex-start; }
  .stat-card > strong { font-size: 31px; }
  .section-heading { align-items: start; flex-direction: column; gap: 8px; }
  .tracker-layout { grid-template-columns: minmax(0, 1fr); }
  .tracker-aside { display: none; }
  .tracker-form { padding: 22px; }
  .tracker-step legend { font-size: 16px; }
  .session-badge { display: none; }
  .wrapper { width: calc(100% - 32px); margin: 26px auto 36px; }
  #formContent { padding: 24px; }
  .footer { padding: 20px 24px; }
  .footer-inner { flex-direction: column; gap: 12px; align-items: start; }
  .footer-partner { gap: 16px; }
  .footer p { align-self: flex-end; }
  .incidental-findings form { padding: 20px; }
}
@media (max-width: 420px) {
  .admin-card-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-card p { min-height: 0; }
  .hours-entry { gap: 8px; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 30px; }
  .hours-entry input { padding: 10px 6px !important; font-size: 12px !important; }
  .remove-hours { width: 30px; }
  .form-actions .btn { width: 100%; }
  .report-stats { grid-template-columns: minmax(0, 1fr); }
  .app-brand-logo { width: 170px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-top { flex-direction: row; align-items: center; }
  .stat-card > strong { margin-top: -4px; }
  .task-options { grid-template-columns: 1fr; }
  .tracker-form { padding: 18px; }
  .tracker-step legend { flex-wrap: wrap; }
  .optional-label { margin-left: 42px; margin-top: -8px; }
  .category-grid { gap: 6px; }
  .category-button { padding: 10px; }
  .tracker-submit p { display: none; }
  .tracker-submit .btn { width: 100%; }
  .panel-heading { padding: 20px; }
  .footer-partner span { max-width: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .report-filters { display: none; }
  .table-tools, .row-actions, [data-print], .status-actions, .connection-banner { display: none !important; }
  .table-responsive { overflow: visible; }
  .surface-panel { box-shadow: none; break-inside: avoid; }
  .report-table { font-size: 9px; }
  .report-table th, .report-table td { padding: 6px; }
  .app-header, .footer, .tracker-aside, .install-dialog { display: none; }
  body { background: white; }
  .container { width: 100%; margin: 0; }
}
.site-switcher,.logout-form { display:flex; align-items:center; gap:.5rem; margin:0; }
.site-switcher select { min-width:5rem; width:auto; padding:.5rem .75rem; }
.logout-form button { border:0; background:transparent; font:inherit; cursor:pointer; }
.row-actions form { display:inline-flex; margin:0; }
.row-actions button { border:0; background:transparent; font:inherit; cursor:pointer; padding:0; }
.account-panel { margin-block:1rem; }
.account-panel details { margin-top:1rem; }
.account-panel summary { cursor:pointer; font-weight:600; }
.account-panel form { display:grid; align-content:start; gap:.75rem; min-width:0; }
.account-panel label { display:grid; gap:.35rem; }
.account-panel .overview-grid { margin-top:1rem; }
@media(max-width:700px) { .site-switcher { width:100%; } .site-switcher select { flex:1; } .logout-form { width:100%; } }
.workspace > .overview-grid > .surface-panel,
.workspace > .surface-panel,
.form-panel { padding:clamp(1.25rem,2vw,2rem); }
.workspace > .overview-grid > .surface-panel form { display:grid; gap:.75rem; }
.workspace > .overview-grid > .surface-panel button { justify-self:start; }
.form-panel { max-width:860px; }
.site-switcher .btn { white-space:nowrap; padding:.5rem .75rem; }
.workflow-filters { display:flex; flex-wrap:wrap; gap:1rem; align-items:end; margin-bottom:1.5rem; padding:1.25rem; }
.workflow-filters .form-group { flex:1 1 160px; margin:0; min-width:0; }
.workflow-filters input,.workflow-filters select { width:100%; min-width:0; }
.workflow-announcement { white-space:pre-wrap; overflow-wrap:anywhere; padding:1rem 0; border-bottom:1px solid var(--border-color,#dce6eb); }
.stat-card strong { overflow-wrap:anywhere; }
/* Personal achievements */
.badge-editor-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.badge-editor { padding:24px; min-width:0; }
.badge-editor .panel-heading { margin-bottom:16px; padding:0; flex-wrap:wrap; align-items:center; }
.badge-editor .panel-heading h3 { margin:0; }
.badge-editor-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 16px; }
.badge-editor input,.badge-editor select,.achievement-level-row input { min-width:0; width:100%; }
.achievement-level-editor { padding:28px; margin:24px 0; }
.achievement-level-row { display:grid; grid-template-columns:80px minmax(0,1fr) minmax(120px,180px); gap:20px; align-items:center; border-top:1px solid var(--line); padding-top:18px; }
.achievement-settings-form .form-actions { flex-wrap:wrap; }
@media(max-width:700px) {
  .badge-editor-grid,.badge-editor-fields,.achievement-level-row { grid-template-columns:minmax(0,1fr); }
  .achievement-level-row { gap:0; }
  .achievement-level-row > strong { margin-bottom:12px; }
}
.achievement-preview { display:flex; align-items:center; gap:24px; margin:24px 0; padding:28px; }
.achievement-preview > div { flex:1; min-width:0; }
.achievement-preview h2 { margin-bottom:8px; }
.achievement-preview p { margin-bottom:4px; }
.achievement-emblem { flex-shrink:0; display:grid; place-items:center; width:72px; height:72px; border-radius:22px; background:#fff1cf; color:#805a0a; font-size:32px; }
.achievement-hero { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:28px; padding:36px; border-radius:22px; background:var(--navy); color:white; }
.achievement-hero-main { display:flex; align-items:center; gap:24px; }
.achievement-hero .eyebrow { color:#b6dfcf; }
.achievement-hero h2 { color:white; font-size:clamp(26px,3vw,36px); margin-bottom:10px; }
.achievement-hero p { color:#dce8ed; margin:0; }
.achievement-points { display:grid; grid-template-columns:auto auto; align-content:center; align-items:center; gap:0 12px; }
.achievement-points i { color:#ffd16b; font-size:28px; }
.achievement-points strong { color:white; font-size:46px; line-height:1.2; }
.achievement-points span { grid-column:1 / -1; text-align:center; color:#dce8ed; font-size:13px; }
.achievement-level-progress { grid-column:1 / -1; }
.achievement-level-progress label { color:#dce8ed; font-size:13px; margin-bottom:10px; }
.achievement-hero progress,.achievement-card progress { display:block; width:100%; height:8px; border:0; border-radius:999px; overflow:hidden; background:#e6edef; accent-color:var(--teal); }
.achievement-hero progress { background:#386075; accent-color:#ffd16b; }
.achievement-hero progress::-webkit-progress-bar { background:#386075; }
.achievement-hero progress::-webkit-progress-value { background:#ffd16b; border-radius:999px; }
.achievement-hero progress::-moz-progress-bar { background:#ffd16b; }
.achievement-card progress::-webkit-progress-bar { background:#e6edef; }
.achievement-card progress::-webkit-progress-value { background:var(--teal); border-radius:999px; }
.achievement-card progress::-moz-progress-bar { background:var(--teal); }
.achievement-summary { display:flex; justify-content:space-around; flex-wrap:wrap; gap:16px; padding:24px 0; }
.achievement-summary p { margin:0; color:var(--muted); font-size:13px; }
.achievement-summary strong { color:var(--ink); font-size:18px; margin-right:6px; }
.achievement-next { padding:26px; }
.achievement-next h2 { margin-bottom:18px; }
.achievement-next-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.achievement-next-grid p { display:grid; gap:4px; }
.achievement-next-grid span { color:var(--muted); font-size:13px; }
.achievement-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px; }
.achievement-card { display:flex; flex-direction:column; padding:24px; min-width:0; }
.achievement-card-top { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:24px; }
.achievement-icon { width:48px; height:48px; display:grid; place-items:center; border-radius:15px; background:#f0f3f5; color:#687b87; font-size:22px; flex-shrink:0; }
.achievement-state { color:var(--muted); font-size:11px; white-space:nowrap; }
.achievement-card.is-earned { border-color:#b8d6c8; }
.achievement-card.is-earned .achievement-icon { background:#fff1cf; color:#805a0a; }
.achievement-card.is-earned .achievement-state { color:var(--teal-dark); }
.achievement-card h3 { font-size:18px; margin-bottom:8px; }
.achievement-card p { color:var(--muted); font-size:13px; flex:1; }
.achievement-card-progress { display:flex; justify-content:space-between; gap:10px; font-size:12px; margin:8px 0; color:var(--muted); }
.achievement-card-progress strong { color:var(--teal-dark); }
.achievement-rules { margin-top:28px; padding:24px; }
.achievement-rules summary { cursor:pointer; font-weight:600; }
.achievement-rules p { margin:16px 0 0; max-width:850px; color:var(--muted); font-size:13px; }
@media(max-width:1100px) { .achievement-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:700px) {
  .achievement-preview { flex-wrap:wrap; gap:16px; padding:24px; }
  .achievement-preview .achievement-emblem { width:48px; height:48px; font-size:24px; border-radius:15px; }
  .achievement-preview > div { flex-basis:calc(100% - 64px); }
  .achievement-preview > a { width:100%; }
  .achievement-hero { grid-template-columns:minmax(0,1fr); padding:26px; gap:24px; }
  .achievement-hero-main { align-items:flex-start; gap:16px; }
  .achievement-hero .achievement-emblem { width:50px; height:50px; border-radius:16px; font-size:26px; }
  .achievement-points { justify-content:start; }
  .achievement-points span { text-align:left; }
  .achievement-summary { justify-content:flex-start; gap:8px 24px; }
  .achievement-next-grid,.achievement-grid { grid-template-columns:minmax(0,1fr); }
}
.workspace > .site-management-panel { padding:0; overflow:hidden; }
.site-management-panel .table-responsive { overflow-y:hidden; }
.site-management-table th[scope=row] { min-width:140px; overflow-wrap:break-word; }
.site-code { display:block; margin-top:.25rem; color:var(--muted); font-size:12px; font-weight:400; }
.site-status { display:inline-flex; align-items:center; gap:.45rem; padding:.35rem .65rem; border-radius:999px; font-size:12px; font-weight:600; white-space:nowrap; }
.site-status::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; }
.site-status.is-active { color:var(--teal-dark); background:var(--soft); }
.site-status.is-inactive { color:#596975; background:#edf1f4; }
.site-access-action summary { list-style:none; cursor:pointer; white-space:nowrap; }
.site-access-action summary::-webkit-details-marker { display:none; }
.site-access-prompt { padding:1.5rem; max-width:480px; white-space:normal; }
.site-access-prompt form { display:grid; gap:1rem; }
.site-access-prompt h2 { margin:0; font-size:22px; overflow-wrap:anywhere; }
.site-access-prompt p { margin:0; font-size:14px; color:var(--muted); }
.site-access-prompt label { margin:0; }
.site-access-buttons { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:.75rem; }
.site-access-dialog { width:calc(100% - 32px); max-width:480px; max-height:calc(100dvh - 32px); overflow-y:auto; padding:0; border:1px solid var(--line); border-radius:18px; color:var(--ink); box-shadow:0 24px 80px #103c5233; }
.site-access-dialog::backdrop { background:#0a283866; backdrop-filter:blur(3px); }
@media(max-width:600px) {
  .site-management-table th,.site-management-table td { padding:12px 10px; }
  .site-management-panel .table th:first-child,.site-management-panel .table td:first-child { padding-left:12px; }
  .site-management-table th[scope=row] { min-width:108px; }
  .site-management-table .site-status { padding:.35rem .5rem; font-size:11px; }
  .site-access-action summary.btn { padding:10px; font-size:12px; }
}
@media(max-width:600px) { .workflow-filters { display:grid; grid-template-columns:minmax(0,1fr); } .workflow-filters button { width:100%; } }
