/* ============================================================
   CaseLink Redesign - Site Styles
   Optimized for 1920×1080 resolution
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
}

body.caselink-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #c8c8c8;
    background-image: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 4px,
        rgba(180,180,180,0.35) 4px,
        rgba(180,180,180,0.35) 5px
    );
}

/* ============================================================
   HEADER
   ============================================================ */
.caselink-header {
    background-color: #0d0d1a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 32px;
    min-height: 56px;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
}

.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}

.conduent-logo {
    display: flex;
    align-items: center;
}

.brand-conduent {
    color: #ffffff;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-right: 2px;
    opacity: 0.85;
}

.brand-caselink {
    color: #ffffff;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.welcome-text {
    color: #ffffff;
    font-size: 14px;
    white-space: nowrap;
}

.guide-icon-link {
    color: #ffffff;
    font-size: 20px;
    opacity: 0.85;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.guide-icon-link:hover {
    opacity: 1;
    color: #ffffff;
    text-decoration: none;
}

.gear-icon {
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.85;
    -webkit-text-stroke:0.5px;
}

/* Navigation Buttons */
.header-nav {
    display: flex;
    gap: 0;
}

.nav-btn {
    color: #000000;
    border: 1px solid #000000;
    background: #ffffff;
    padding: 6px 24px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    display: inline-block;
    transition: background 0.15s, color 0.15s;
    transform: skew(25deg);
    margin-right: 8px;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.5);
    color: #000;
    text-decoration: none;
}

.nav-btn > span {
    display: inline-block;
    transform: skew(-25deg);
}

.nav-btn-active {
    background: #1565c0 !important;
    border-color: #1565c0 !important;
    color: #ffffff !important;
    transform: skew(25deg);
    display: inline-block;
    margin-right: 8px;
}

/* ============================================================
   ACCOUNT MANAGER BAR
   ============================================================ */
.account-manager-bar {
    background-color: #e8e8e8;
    padding: 6px 15px;
    font-size: 13px;
    color: #333;
    border-bottom: 1px solid #ccc;
    flex-shrink: 0;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.caselink-main {
    flex: 1;
    padding: 15px 15px;
}

/* ============================================================
   WELCOME PAGE (INDEX)
   ============================================================ */
.welcome-container {
    background: #ffffff;
    border-radius: 2px;
    padding: 50px 60px 60px;
    max-width: 1400px;
    margin: 30px auto;
}

.welcome-title {
    color: #1a3a6b;
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
}

.welcome-panels {
    display: flex;
    gap: 28px;
    margin-bottom: 40px;
}

.welcome-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid #d0d0d0;
}

.panel-tab {
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    margin-top: -1px;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 95% 100%, 5% 100%);
}

.panel-tab-green  { background: #4caf50; }
.panel-tab-orange { background: #ff8c00; }
.panel-tab-blue   { background: #4472c4; }

.panel-body {
    padding: 24px 20px;
    font-size: 13px;
    color: #444;
    text-align: center;
    line-height: 1.7;
    flex: 1;
}

.panel-body strong {
    color: #222;
}

.welcome-login-btn {
    display: block;
    width: 140px;
    margin: 0 auto;
    background: #1565c0;
    color: #ffffff;
    text-align: center;
    padding: 10px 28px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}

.welcome-login-btn:hover {
    background: #0d47a1;
    color: #ffffff;
    text-decoration: none;
}

/* ============================================================
   CASE SEARCH PAGE
   ============================================================ */
.search-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* --- Search Panel --- */
.search-panel {
    background: #ffffff;
    border: 1px solid #b0b8c8;
    width: 520px;
    flex-shrink: 0;
    position: relative;
}

.search-panel-header {
    padding: 6px 16px 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-panel-title {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin: 0;
}

.panel-icon-btn {
    color: #4472c4;
    font-size: 18px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    display:none;
}

.search-panel-subtitle {
    font-size: 12px;
    color: #555;
    padding: 0 16px 8px;
    margin: 0;
}

.search-criteria-header {
    background: linear-gradient(to right, #00285A, #0043AE, #00285A);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 16px;
    margin-bottom: 0;
}

.search-form {
    padding: 8px 0 0;
}

.search-row {
    display: flex;
    align-items: center;
    padding: 4px 16px;
    gap: 8px;
}

.search-label {
    font-size: 12px;
    color: #333;
    width: 150px;
    flex-shrink: 0;
    text-align: right;
}

.search-label.client-id-label {
    width: 62px;
    flex-shrink: 0;
}

.search-label.last-name-label {
    width: 135px;
    flex-shrink: 0;
}

.search-input.year-input {
    max-width: 80px;
}

.search-input {
    font-size: 12px;
    padding: 3px 8px;
    border: 1px solid #aaa;
    height: 24px;
    flex: 1;
    min-width: 0;
}

.search-input::placeholder {
    color: #aaa;
    font-style: italic;
    font-size: 11px;
}

.search-select {
    font-size: 12px;
    padding: 2px 6px;
    border: 1px solid #aaa;
    height: 24px;
    flex: 1;
    min-width: 0;
    background: #fff;
}

.search-checkbox-group {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.search-checkbox-group input[type="checkbox"] {
    margin: 0;
    width: 14px;
    height: 14px;
}

.search-checkbox-group label {
    font-size: 12px;
    color: #333;
    margin: 0;
    white-space: nowrap;
}

.search-actions {
    padding: 10px 16px 12px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-search {
    background: linear-gradient(180deg, #002A5F, #0147B7, #002A5F);
    color: #ffffff;
    border: none;
    padding: 5px 24px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 10px;
}

    .btn-search:hover {
        background: linear-gradient(180deg, #002A5F, #0147B7, #002A5F);
    }

.btn-clear {
    background: linear-gradient(180deg, #002A5F, #0147B7, #002A5F);
    color: #ffffff;
    border: none;
    padding: 5px 20px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 10px;
}

    .btn-clear:hover {
        color:#fff;
        background: linear-gradient(180deg, #002A5F, #0147B7, #002A5F);
    }

.btn-clear-link {
    text-decoration: none;
    display: inline-block;
    text-align: center;
    cursor: pointer;
}

/* --- Results Panel --- */
.results-panel {
    background: #ffffff;
    border: 1px solid #b0b8c8;
    flex: 1;
    min-width: 0;
    position: relative;
}

.results-panel-header {
    padding: 6px 16px 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-panel-title {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin: 0;
}

.results-panel-subtitle {
    font-size: 12px;
    color: #555;
    padding: 0 16px 8px;
    margin: 0;
}

/* Referred-cases client filter bar */
.referred-cases-filter-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px 12px;
}

/* Checkbox-dropdown wrapper — establishes the positioning context */
.client-checkbox-dropdown {
    position: relative;
    flex: 1;
    min-width: 0;
}

/* Toggle button — mirrors .search-select sizing */
.client-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    height: 24px;
    padding: 0 6px;
    font-size: 12px;
    color: #333;
    background: #fff;
    border: 1px solid #aaa;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.client-dropdown-toggle:disabled {
    background: #f5f5f5;
    color: #888;
    cursor: default;
}

.client-dropdown-arrow {
    font-size: 10px;
    flex-shrink: 0;
    color: #666;
}

/* Floating panel */
.client-dropdown-panel {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    z-index: 200;
    min-width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #aaa;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
    padding: 4px 0;
}

/* Individual checkbox row */
.client-checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 12px;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
}

.client-checkbox-item:hover {
    background: #f0f4ff;
}

.client-checkbox-item input[type="checkbox"] {
    margin: 0;
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    cursor: pointer;
}

/* Results Table */
.results-table-wrapper {
    overflow-x: auto;
    padding: 0 0 4px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.results-table thead tr {
    background: linear-gradient(to right, #00285A, #0043AE, #00285A);
    color: #ffffff;
}

.results-table thead th {
    padding: 8px 12px;
    font-weight: 600;
    white-space: nowrap;
    border-right: 1px solid #2a5090;
    font-size: 13px;
}

.results-table thead th:last-child {
    border-right: none;
}

.sort-icon {
    display: inline-block;
    margin-left: 4px;
    opacity: 0.8;
    font-size: 11px;
    user-select: none;
}

/* Sortable column headers */
th:has(.sort-icon) {
    cursor: pointer;
    white-space: nowrap;
}

th:has(.sort-icon):hover {
    background-color: rgba(0, 0, 0, 0.07);
}

.results-table tbody tr {
    border-bottom: 1px solid #e8e8e8;
}

.results-table tbody tr:nth-child(odd) {
    background: #ffffff;
}

.results-table tbody tr:nth-child(even) {
    background: #DAE2F5;
}

.results-table tbody tr:hover {
    background: #f0f4ff;
}

.results-table tbody td {
    padding: 7px 12px;
    color: #333;
    font-size: 13px;
}

.no-records-row td {
    text-align: center;
    color: #555;
    padding: 20px;
    font-style: italic;
    font-size: 13px;
}

/* Pagination */
.results-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    border-top: 1px solid #e0e0e0;
    font-size: 12px;
    color: #555;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-btn {
    background: none;
    border: 1px solid #aaa;
    padding: 3px 8px;
    font-size: 11px;
    cursor: pointer;
    color: #333;
    border-radius: 2px;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-btn:hover:not(:disabled) {
    background: #e8e8e8;
}

.pagination-page-input {
    width: 36px;
    text-align: center;
    font-size: 12px;
    border: 1px solid #aaa;
    padding: 2px 4px;
    height: 22px;
}

.pagination-per-page {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-per-page select {
    font-size: 12px;
    border: 1px solid #aaa;
    padding: 2px 4px;
    height: 22px;
}

.pagination-total {
    font-size: 12px;
    color: #555;
}

/* Panel blue top accent bar */
.panel-accent {
    content: "";
    display: block;
    width: 48px;
    height: 4px;
    margin-left: -2px;
    transition: background .3s ease;
    background: #375172;
    transform-origin: 100% 0;
    transform: skew(45deg);
    margin-left: 15px;
    margin-top:10px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.caselink-footer {
    background: #333333;
    color: #aaaaaa;
    padding: 12px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    flex-shrink: 0;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #aaaaaa;
    text-decoration: none;
}

.footer-links a:hover {
    color: #dddddd;
    text-decoration: underline;
}

.footer-sep {
    color: #666;
}

.footer-copyright {
    color: #aaaaaa;
    white-space: nowrap;
}

/* ============================================================
   CASE SEARCH - CLICKABLE LINKS
   ============================================================ */
.case-link {
    color: #1565c0;
    text-decoration: none;
    font-weight: 500;
}
.case-link:hover {
    text-decoration: underline;
    color: #0d47a1;
}

/* SIR document download links — same visual style as .case-link but
   excluded from the case-navigation click interceptor in site.js */
.sir-download-link {
    color: #1565c0;
    text-decoration: none;
    font-weight: 500;
}
.sir-download-link:hover {
    text-decoration: underline;
    color: #0d47a1;
}

/* ============================================================
   VIEW CASE PAGE
   ============================================================ */

/* Case Header Bar */
.case-header-bar {
    background: linear-gradient(to right, #00285A, #0043AE, #00285A);
    color: #ffffff;
    margin-bottom: 6px;
    padding-top: 6px;
}

.case-header-accent {
    content: "";
    display: block;
    width: 48px;
    height: 4px;
    margin-left: -2px;
    transition: background .3s ease;
    background: #fff;
    transform-origin: 100% 0;
    transform: skew(45deg);
    margin-left: 15px;
    margin-top: 5px;
}

.case-header-info {
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 7px 20px;
    flex-wrap: wrap;
}

.case-header-item {
    font-size: 14px;
    color: #ffffff;
}

.case-header-label {
    opacity: 0.8;
    margin-right: 8px;
    font-weight: 400;
}

/* Case Details Panel */
.case-details-panel {
    background: #ffffff;
    border: 1px solid #d0d0d0;
    margin-bottom: 10px;
}

.case-details-title {
    background: #f0f0f0;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    padding: 5px 16px;
    border-bottom: 1px solid #ddd;
}

.case-details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.case-details-table td {
    padding: 5px 8px;
    vertical-align: top;
}

.cd-label {
    color: #555;
    font-weight: 400;
    white-space: nowrap;
    width: 150px;
}

.cd-value {
    color: #111;
    font-weight: 500;
    min-width: 100px;
    padding-right: 20px;
}

.cd-row-odd  { background: #f9f9fb; }
.cd-row-even { background: #ffffff; }

/* Tab Navigation */
.vc-tabs-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 0;
    margin-top: 14px;
    border-bottom: none;
    margin-left: 10px;
}

.vc-tabs {
    display: flex;
    gap: 1px;
}

.vc-tab {
    display: inline-block;
    padding: 6px 20px;
    font-size: 13px;
    font-family: inherit;
    color: #333;
    background: #fff;
    border: 1px solid #ccc;
    border-bottom: none;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.1s;
    white-space: nowrap;
    transform: skew(25deg);
    margin-right: 8px;
}

.vc-tab > span {
    display: inline-block;
    transform: skew(-25deg);
}

.vc-tab:hover {
    background: #d8d8d8;
    color: #111;
    text-decoration: none;
}

.vc-tab-active {
    background: #1565c0 !important;
    color: #ffffff !important;
    border-color: #1565c0 !important;
    font-weight: 600;
}

.vc-tabs-actions {
    display: flex;
    gap: 6px;
    padding-bottom: 2px;
}

.vc-action-btn {
    background: none;
    border: 1px solid #999;
    padding: 4px 9px;
    font-size: 16px;
    cursor: pointer;
    color: #555;
    border-radius: 2px;
}

.vc-action-btn:hover {
    background: #e8e8e8;
}

/* Tab Content Area */
.vc-tab-content {
    padding: 12px 0 0;
    transition: min-height 0.15s ease-out;
}

/* Lazy tab loading state */
.tab-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 40px 20px;
    color: #555;
    font-size: 13px;
}

.tab-loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #ccd6e8;
    border-top-color: #1a3a6b;
    border-radius: 50%;
    animation: tab-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes tab-spin {
    to { transform: rotate(360deg); }
}

.tab-error {
    padding: 20px;
    color: #c0392b;
    font-size: 13px;
}

/* Summary Layout - 3 equal panels */
.vc-summary-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

/* Individual Panel */
.vc-panel {
    background: #ffffff;
    border: 1px solid #b0b8c8;
    flex: 1;
    min-width: 0;
}

.vc-full-panel {
    flex: none;
    width: 100%;
}

.vc-panel-header {
    padding: 6px 16px 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vc-panel-title {
    font-size: 15px;
    font-weight: 700;
    color: #222;
    margin: 0;
}

/* Table variant for View Case panels */
.vc-table thead th {
    padding: 7px 10px;
    font-size: 13px;
}

.vc-table tbody td {
    padding: 6px 10px;
    font-size: 13px;
}

/* ============================================================
   DOCUMENTS TAB LAYOUT  (Documents panel + Questionnaire panel side-by-side)
   ============================================================ */
.documents-tab-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

/* Left documents panel — 50 % of the tab */
.documents-images-panel {
    flex: 1 1 50%;
    max-width: 50%;
    min-width: 0;
}

/* Right questionnaire panel — 50 % of the tab */
.questionnaire-milestones-panel {
    flex: 1 1 50%;
    max-width: 50%;
    min-width: 0;
}

/* Questionnaire table — sequence column stays compact */
.questionnaire-table th {
    white-space: nowrap;
}

/* Ordinal sequence badge (1st / 2nd / 3rd / 4th) */
.questionnaire-sequence-badge {
    display: inline-block;
    min-width: 36px;
    padding: 2px 8px;
    background: #00285A;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 3px;
    text-align: center;
}

/* Response-method badges */
.questionnaire-method-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.questionnaire-method-mail        { background: #1a6bcc; }
.questionnaire-method-online      { background: #3a9c48; }
.questionnaire-method-call-center { background: #e07020; }

/* ============================================================
   CLAIMS TAB LAYOUT
   ============================================================ */

/* Two-column layout: claims table left, right sidebar */
.claims-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.claims-details-panel {
    flex: 1;
    min-width: 0;
}

.claims-right-col {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Claims table specifics */
.claims-table {
    font-size: 12px;
    white-space: nowrap;
}

.claims-table thead th {
    padding: 6px 3px;
    font-size: 12px;
    vertical-align: bottom;
    line-height: 1.2;
}

.claims-table tbody td {
    padding: 4px 7px;
    font-size: 12px;
}

.th-amount {
    text-align: right;
}

.th-proc {
    min-width: 120px;
}

.td-nowrap {
    white-space: nowrap;
}

.td-money {
    text-align: right;
    white-space: nowrap;
}

.td-proc {
    max-width: 140px;
    overflow: hidden;
}

.proc-codes-text {
    font-size: 11px;
    color: #555;
    letter-spacing: 0.5px;
    display: inline-block;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.proc-expand {
    color: #1565c0;
    font-size: 10px;
    cursor: pointer;
    margin-left: 2px;
    vertical-align: middle;
}

/* Total row */
.claims-total-row {
    background: #1a3a6b;
    color: #ffffff;
    font-weight: 600;
}

.claims-total-row td {
    padding: 5px 7px;
    font-size: 12px;
}

.claims-total-label {
    text-align: right;
    font-weight: 600;
}

/* Claim Snapshot panel */
.claim-snapshot-panel {
    background: #ffffff;
    border: 1px solid #b0b8c8;
}

.snapshot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px 12px 12px;
}

.snapshot-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    border-radius: 3px;
    text-align: center;
}

.snapshot-box-teal {
    background: #2a8a8a;
    color: #ffffff;
}

.snapshot-box-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
    opacity: 0.9;
}

.snapshot-box-value {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

/* Diagnosis Summary panel */
.diagnosis-summary-panel {
    background: #ffffff;
    border: 1px solid #b0b8c8;
}

.diagnosis-summary-panel .results-table {
    font-size: 12px;
}

.diagnosis-summary-panel .results-table thead th {
    padding: 6px 8px;
    font-size: 12px;
}

.diagnosis-summary-panel .results-table tbody td {
    padding: 4px 8px;
    font-size: 12px;
}

/* ============================================================
   ACTIVITY AND NOTES TAB LAYOUT
   ============================================================ */

/* Two-column layout: Activity left (~38%), Notes right (~62%) */
.activity-notes-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.activity-panel {
    flex: 0 0 38%;
    min-width: 0;
}

.notes-panel {
    flex: 1;
    min-width: 0;
}

/* Activity table */
.activity-table {
    font-size: 12px;
}

.activity-table thead th {
    padding: 6px 8px;
    font-size: 12px;
}

.activity-table tbody td {
    padding: 4px 8px;
    font-size: 12px;
    vertical-align: top;
}

.th-act-date {
    white-space: nowrap;
    width: 68px;
}

/* Notes table */
.notes-table {
    font-size: 12px;
}

.notes-table thead th {
    padding: 6px 8px;
    font-size: 12px;
}

.notes-table tbody td {
    padding: 4px 8px;
    font-size: 12px;
    vertical-align: top;
}

.th-note-desc {
    white-space: nowrap;
    width: 90px;
}

.th-note-date {
    white-space: nowrap;
    width: 60px;
}

.th-note-user {
    white-space: nowrap;
    width: 40px;
}

.td-note-text {
    word-break: break-word;
    white-space: normal;
    line-height: 1.35;
}

/* ============================================================
   REFERRALS PAGE — Refer A Case form
   ============================================================ */

/* The left panel keeps the same .search-panel background/border
   but the internal form is structured differently. */
.referral-form-panel .search-panel-subtitle {
    font-size: 11px;
    line-height: 1.45;
}

/* Dark-navy section headers (Case Information, Member Information …) */
.referral-section-header {
    background: #1a3a6b;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    margin-top: 2px;
}

/* Body area beneath each section header */
.referral-section-body {
    padding: 6px 10px 4px;
    background: #fff;
}

/* Generic form row inside a section */
.referral-form-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
}

/* Right-aligned label column */
.referral-label {
    font-size: 11px;
    color: #333;
    flex-shrink: 0;
    text-align: right;
    width: 110px;
}

/* Text / date inputs */
.referral-input {
    flex: 1;
    font-size: 12px;
    padding: 2px 6px;
    border: 1px solid #aaa;
    height: 22px;
    min-width: 0;
    background: #fff;
}

.referral-input::placeholder {
    color: #aaa;
    font-style: italic;
    font-size: 11px;
}

/* Select / dropdown */
.referral-select {
    flex: 1;
    font-size: 12px;
    padding: 2px 4px;
    border: 1px solid #aaa;
    height: 22px;
    min-width: 0;
    background: #fff;
}

/* Calendar icon span */
.referral-cal-icon {
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    color: #555;
}

.referral-cal-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.referral-native-date {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    border: 0;
    padding: 0;
    margin: 0;
}

/* Two-column grid row (First Name | Last Name, SSN | Member ID) */
.referral-two-col {
    gap: 10px;
    align-items: flex-start;
}

.referral-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

/* DOB row */
.referral-dob-row {
    align-items: center;
}

/* Checkbox row */
.referral-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #333;
    cursor: pointer;
    padding: 2px 0;
}

.referral-checkbox-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
}

/* Attachment rows */
.referral-attach-row {
    gap: 6px;
    padding: 3px 0;
}

.referral-filename-label {
    width: 56px;
    text-align: right;
}

.referral-file-input {
    flex: 1;
    font-size: 11px;
    min-width: 0;
}

.referral-attachtype-label {
    width: 100px;
    text-align: right;
    white-space: nowrap;
}

.referral-attachtype-select {
    flex: 1.2;
    min-width: 0;
}

/* User Notes */
.referral-notes-row {
    align-items: flex-start;
}

.referral-notes-label {
    width: 130px;
    text-align: right;
    padding-top: 3px;
    line-height: 1.3;
}

.referral-textarea {
    flex: 1;
    font-size: 12px;
    padding: 4px 6px;
    border: 1px solid #aaa;
    resize: vertical;
    min-height: 70px;
    min-width: 0;
    font-family: inherit;
    background: #fff;
}

/* Submit / Clear actions */
.referral-form-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 10px 16px 14px;
}

.btn-referral-submit {
    background: linear-gradient(180deg, #002A5F, #0147B7, #002A5F);
    color: #ffffff;
    border: none;
    padding: 5px 24px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 10px;
}

    .btn-referral-submit:hover:not(:disabled) {
        background: linear-gradient(180deg, #002A5F, #0147B7, #002A5F);
    }

    .btn-referral-submit:disabled {
        background: #a0a0a0;
        cursor: not-allowed;
        opacity: 0.65;
    }

/* Required-field asterisk — shown in red next to labels */
.referral-required {
    color: #c00;
    font-weight: bold;
    margin-left: 2px;
}

.btn-referral-clear {
    background: linear-gradient(180deg, #002A5F, #0147B7, #002A5F);
    color: #ffffff;
    border: none;
    padding: 5px 24px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 10px;
}

    .btn-referral-clear:hover {
        background: linear-gradient(180deg, #002A5F, #0147B7, #002A5F);
    }

/* Success / confirmation banner */
.referral-success-msg {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 6px 14px;
    font-size: 12px;
    margin: 4px 10px 6px;
    border-radius: 2px;
}

/* Input + calendar icon inline wrapper */
.referral-input-icon-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.referral-input-icon-row .referral-input {
    flex: 1;
}

/* Validation error banner — referrals form (mirrors .referral-success-msg) */
.referral-error-msg {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 6px 14px;
    font-size: 12px;
    margin: 4px 10px 6px;
    border-radius: 2px;
}

.referral-error-list {
    margin: 4px 0 0 16px;
    padding: 0;
}

/* Inline field-level validation error (e.g., for User Notes character limit) */
.referral-field-error {
    display: block;
    color: #721c24;
    font-size: 0.875rem;
    margin-top: 4px;
}

/* Validation error — case search panel */
.search-validation-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 6px 10px;
    font-size: 12px;
    margin: 0 0 6px;
    border-radius: 2px;
}

/* Disabled / read-only visual state for form controls */
.search-input:disabled,
.search-select:disabled,
.referral-input:disabled,
.referral-select:disabled {
    background-color: #e9ecef;
    color: #6c757d;
    opacity: 0.75;
    cursor: not-allowed;
}

.referral-input[readonly] {
    background-color: #f0f4f8;
    color: #495057;
    cursor: default;
}

/* ============================================================
   USER TRAINING GUIDE
   ============================================================ */

.ug-container {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 24px 40px;
}

/* Page header */
.ug-header {
    background: #fff;
    border-top: 4px solid #1a3a6b;
    border-radius: 4px;
    padding: 28px 32px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.ug-title {
    color: #1a3a6b;
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px;
}

.ug-subtitle {
    color: #555;
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
}

/* Table of contents */
.ug-toc {
    background: #f4f7fb;
    border: 1px solid #c8d4e8;
    border-radius: 4px;
    padding: 16px 24px;
    margin-bottom: 28px;
    display: inline-block;
    min-width: 320px;
}

.ug-toc-title {
    font-weight: 700;
    color: #1a3a6b;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.ug-toc-list {
    margin: 0;
    padding-left: 18px;
}

.ug-toc-list li {
    margin-bottom: 4px;
}

.ug-toc-link {
    color: #1a3a6b;
    font-size: 13px;
    text-decoration: none;
}

.ug-toc-link:hover {
    text-decoration: underline;
    color: #e07020;
}

/* Steps */
.ug-step {
    background: #fff;
    border-radius: 4px;
    margin-bottom: 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    overflow: hidden;
}

.ug-step-header {
    background: #1a3a6b;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 24px;
}

.ug-step-badge {
    background: #e07020;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 3px;
    white-space: nowrap;
}

.ug-step-title {
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    margin: 0;
}

.ug-step-intro {
    padding: 16px 24px 0;
    color: #444;
    font-size: 14px;
    line-height: 1.6;
}

.ug-step-body {
    display: flex;
    gap: 24px;
    padding: 20px 24px;
    align-items: flex-start;
}

.ug-content-col {
    flex: 1 1 0;
    min-width: 0;
}

.ug-screenshot-col {
    flex: 0 0 420px;
    max-width: 420px;
}

.ug-figure {
    margin: 0;
}

.ug-screenshot {
    width: 100%;
    border: 1px solid #c8d4e8;
    border-radius: 4px;
    display: block;
}

.ug-figcaption {
    font-size: 12px;
    color: #777;
    text-align: center;
    margin-top: 6px;
    font-style: italic;
}

/* Tab sub-sections inside Step 5 */
.ug-tab-section {
    border-top: 1px solid #e8edf3;
}

.ug-tab-header {
    background: #f0f4fa;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ug-tab-badge {
    background: #1a3a6b;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 3px;
}

/* Field tables */
.ug-field-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 10px 0 14px;
}

.ug-field-table th {
    background: #1a3a6b;
    color: #fff;
    padding: 7px 10px;
    text-align: left;
    font-weight: 600;
}

.ug-field-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #e8edf3;
    vertical-align: top;
    color: #444;
}

.ug-field-table tr:nth-child(even) td {
    background: #f7f9fc;
}

/* Lists */
.ug-list {
    margin: 8px 0 12px;
    padding-left: 20px;
}

.ug-list li {
    margin-bottom: 5px;
    line-height: 1.5;
    color: #444;
    font-size: 13px;
}

/* Callouts */
.ug-callout {
    border-left: 4px solid #1a3a6b;
    background: #f4f7fb;
    padding: 12px 16px;
    margin: 12px 0;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
    color: #444;
    line-height: 1.6;
}

.ug-callout-tip {
    border-left-color: #28a745;
    background: #f4fbf6;
}

.ug-callout-warning {
    border-left-color: #e07020;
    background: #fdf6f0;
}

.ug-callout strong {
    display: block;
    margin-bottom: 6px;
    color: #1a3a6b;
}

.ug-callout-tip strong {
    color: #1a6b35;
}

.ug-callout-warning strong {
    color: #b35000;
}

.ug-steps-inline {
    margin: 6px 0 0;
    padding-left: 18px;
}

.ug-steps-inline li {
    margin-bottom: 4px;
}

/* Inline content badges */
.ug-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.ug-badge-green  { background: #3a9c48; }
.ug-badge-orange { background: #e07020; }
.ug-badge-blue   { background: #1a6bcc; }

/* Subheadings */
.ug-subheading {
    color: #1a3a6b;
    font-size: 14px;
    font-weight: 700;
    margin: 14px 0 6px;
}

/* Page footer */
.ug-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 0;
    border-top: 1px solid #d0dae8;
    margin-top: 8px;
}

.ug-back-top {
    color: #1a3a6b;
    font-size: 13px;
    text-decoration: none;
    font-weight: 600;
}

.ug-back-top:hover {
    text-decoration: underline;
}

.ug-footer-note {
    color: #888;
    font-size: 12px;
}

/* ============================================================
   Session Timer Debug Panel
   ============================================================ */
.session-timer-panel {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 9999;
    background: #1a1a2e;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    min-width: 220px;
    box-shadow: 0 4px 16px rgba(0,0,0,.5);
    user-select: none;
}
.session-timer-toggle {
    width: 100%;
    background: #16213e;
    color: #a0c4ff;
    border: none;
    border-radius: 8px 8px 0 0;
    padding: 6px 10px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    letter-spacing: .03em;
}
.session-timer-toggle:hover { background: #0f3460; }
.session-timer-body { padding: 8px 12px 6px; }
.session-timer-body.collapsed { display: none; }
.session-timer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    border-bottom: 1px solid #2a2a4a;
}
.session-timer-row:last-of-type { border-bottom: none; }
.session-timer-label { color: #aaa; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-timer-value { font-weight: bold; font-size: 13px; min-width: 52px; text-align: right; }
.session-timer-ok    { color: #57e389; }
.session-timer-warn  { color: #f6d32d; }
.session-timer-danger { color: #ff7b7b; }
.session-timer-footer { margin-top: 4px; text-align: right; }
.session-timer-poll { color: #666; font-size: 10px; }
