/* Thryve Brand CSS Variables */
:root {
    --thryve-primary: #F9A84D;
    --thryve-secondary: #9F1944;
    --thryve-primary-light: rgba(249, 168, 77, 0.1);
    --thryve-secondary-light: rgba(159, 25, 68, 0.1);
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
    object-fit: contain;
}

    /* .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        } */

.loading-progress-text {
    /* position: absolute; */
    text-align: center;
    font-weight: bold;
    /* inset: calc(20vh + 3.25rem) 0 auto 0.2rem; */
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}


/* Thryve Brand Button Styles */
.btn-thryve-primary {
    background-color: var(--thryve-primary);
    border-color: var(--thryve-primary);
    color: white;
}

.btn-thryve-primary:hover {
    background-color: #e08a3d;
    border-color: #e08a3d;
    color: white;
}

.btn-thryve-primary:focus {
    background-color: #e08a3d;
    border-color: #e08a3d;
    box-shadow: 0 0 0 0.25rem rgba(249, 168, 77, 0.5);
    color: white;
}

.btn-thryve-primary:active {
    background-color: #d07a2d;
    border-color: #d07a2d;
    color: white;
}

/* Smart Paste modal */
.smart-paste-launch {
    background-color: #fff1e1;
    border: 1px solid #f5c08b;
    color: #7a3f00;
}

.smart-paste-modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
}

.smart-paste-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.smart-paste-card {
    position: relative;
    z-index: 1;
    width: min(720px, 92vw);
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.smart-paste-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}

.smart-paste-card p {
    margin: 0 0 1rem 0;
    color: #495057;
}

.smart-paste-textarea {
    width: 100%;
    min-height: 180px;
    resize: vertical;
    border-radius: 12px;
    border: 1px solid #dee2e6;
    padding: 0.75rem;
}

.smart-paste-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* Global status modal */
.global-status-modal {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
}

.global-status-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.global-status-card {
    position: relative;
    z-index: 1;
    width: min(520px, 92vw);
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
}

.global-status-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}

.global-status-card p {
    margin: 0 0 1rem 0;
    color: #495057;
}

.global-status-actions {
    display: flex;
    justify-content: flex-end;
}

.ai-filled {
    border-color: #f5c08b !important;
    box-shadow: 0 0 0 0.2rem rgba(249, 168, 77, 0.35);
}

/* Thryve Form Section Styles */
.form-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--thryve-primary);
}

.form-section-title {
    color: var(--thryve-secondary);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Status Badge - Purple for Converted */
.bg-purple {
    background-color: #6f42c1 !important;
}

/* Clinical Section Styling */
.clinical-section {
    border-left-color: var(--thryve-secondary) !important;
    background-color: rgba(159, 25, 68, 0.03);
}

.safety-assessment-box {
    background-color: #fff8e6;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    padding: 1.25rem;
    margin-top: 1rem;
}

.safety-title {
    color: var(--thryve-secondary);
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

/* Enhanced Form Section Styling */
.form-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--thryve-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.form-section-title {
    color: var(--thryve-secondary);
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(249, 168, 77, 0.3);
}

/* Form Controls Theming */
.form-control:focus,
.form-select:focus {
    border-color: var(--thryve-primary);
    box-shadow: 0 0 0 0.2rem rgba(249, 168, 77, 0.25);
}

.form-label {
    font-weight: 500;
    color: #444;
}

/* Button Outline Thryve */
.btn-outline-thryve {
    color: var(--thryve-primary);
    border-color: var(--thryve-primary);
}

.btn-outline-thryve:hover {
    background-color: var(--thryve-primary);
    border-color: var(--thryve-primary);
    color: white;
}

/* Success Card Styling */
.card.shadow {
    border: none;
    border-radius: 12px;
}

.text-success {
    color: var(--thryve-primary) !important;
}

/* ============================================
   SUBMISSIONS DEMO PAGE STYLES
   ============================================ */

.demo-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
}

/* Hero Header */
.demo-header {
    background: linear-gradient(135deg, var(--thryve-secondary) 0%, #7a1436 100%);
    padding: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(159, 25, 68, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-icon {
    width: 56px;
    height: 56px;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.demo-header h1 {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.demo-header .org-name {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    margin: 0;
}

.header-actions .btn-light {
    background: white;
    border: none;
    color: var(--thryve-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.header-actions .btn-light:hover {
    background: var(--thryve-primary);
    color: white;
    transform: translateY(-1px);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-total .stat-icon { background: rgba(159, 25, 68, 0.1); color: var(--thryve-secondary); }
.stat-new .stat-icon { background: rgba(108, 117, 125, 0.1); color: #6c757d; }
.stat-review .stat-icon { background: rgba(13, 202, 240, 0.1); color: #0dcaf0; }
.stat-approved .stat-icon { background: rgba(25, 135, 84, 0.1); color: #198754; }
.stat-converted .stat-icon { background: rgba(111, 66, 193, 0.1); color: #6f42c1; }

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 280px;
    max-width: 400px;
    position: relative;
}

.search-box svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: white;
}

.search-box input:focus {
    outline: none;
    border-color: var(--thryve-primary);
    box-shadow: 0 0 0 4px rgba(249, 168, 77, 0.15);
}

.filter-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.filter-select {
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--thryve-primary);
}

.btn-icon {
    width: 44px;
    height: 44px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6c757d;
}

.btn-icon:hover {
    border-color: var(--thryve-primary);
    color: var(--thryve-primary);
}

/* Submissions List */
.submissions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.submission-card {
    background: white;
    border-radius: 16px;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin: 5px;
}

.submission-card:hover {
    border-color: var(--thryve-primary);
    box-shadow: 0 4px 16px rgba(249, 168, 77, 0.15);
    transform: translateX(4px);
}

.submission-card.selected {
    border-color: var(--thryve-secondary);
    background: linear-gradient(135deg, rgba(159, 25, 68, 0.02) 0%, white 100%);
}

.submission-main {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.patient-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    color: white;
}

.avatar-default { background: linear-gradient(135deg, var(--thryve-primary) 0%, #e08a3d 100%); }
.avatar-success { background: linear-gradient(135deg, #198754 0%, #157347 100%); }
.avatar-danger { background: linear-gradient(135deg, #dc3545 0%, #bb2d3b 100%); }
.avatar-warning { background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%); color: #1a1a2e; }

.submission-info {
    display: flex;
    flex-direction: column;
}

.patient-name {
    font-weight: 600;
    color: #1a1a2e;
    font-size: 1rem;
}

.submission-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.separator {
    color: #dee2e6;
}

.submission-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chevron {
    color: #adb5bd;
    transition: transform 0.2s ease;
}

.submission-card:hover .chevron {
    transform: translateX(4px);
    color: var(--thryve-primary);
}

/* Status Badges */
.status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-new { background: #e9ecef; color: #495057; }
.status-review { background: rgba(13, 202, 240, 0.15); color: #0aa2c0; }
.status-needs-info { background: rgba(255, 193, 7, 0.2); color: #997404; }
.status-approved { background: rgba(25, 135, 84, 0.15); color: #146c43; }
.status-rejected { background: rgba(220, 53, 69, 0.15); color: #b02a37; }
.status-converted { background: rgba(111, 66, 193, 0.15); color: #59359a; }

/* Detail Panel */
.detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.detail-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 480px;
    max-width: 100vw;
    background: white;
    z-index: 1001;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.detail-header {
    background: linear-gradient(135deg, var(--thryve-secondary) 0%, #7a1436 100%);
    padding: 1.5rem;
    position: relative;
}

.btn-close-panel {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: background 0.2s ease;
}

.btn-close-panel:hover {
    background: rgba(255, 255, 255, 0.3);
}

.detail-patient-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.patient-avatar-large {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
    color: white;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.detail-header h2 {
    color: white;
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
}

.ref-display {
    color: rgba(255, 255, 255, 0.8);
    margin: 0.25rem 0 0 0;
    font-size: 0.9rem;
    font-family: monospace;
}

.status-badge-large {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 24px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--thryve-secondary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--thryve-primary-light);
}

/* Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.timeline-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-step:last-child {
    padding-bottom: 0;
}

.timeline-step::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 20px;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.timeline-step:last-child::before {
    display: none;
}

.timeline-step.completed::before {
    background: var(--thryve-primary);
}

.timeline-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e9ecef;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #e9ecef;
    flex-shrink: 0;
    z-index: 1;
}

.timeline-step.completed .timeline-dot {
    background: var(--thryve-primary);
    box-shadow: 0 0 0 2px var(--thryve-primary);
}

.timeline-step.current .timeline-dot {
    background: var(--thryve-secondary);
    box-shadow: 0 0 0 2px var(--thryve-secondary), 0 0 0 6px rgba(159, 25, 68, 0.2);
}

.timeline-content {
    display: flex;
    flex-direction: column;
    padding-top: 0;
}

.timeline-title {
    font-weight: 500;
    color: #1a1a2e;
}

.timeline-step:not(.completed) .timeline-title {
    color: #adb5bd;
}

.timeline-date {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.125rem;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.info-value {
    font-weight: 500;
    color: #1a1a2e;
}

.notes-text {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 12px;
    color: #495057;
    line-height: 1.6;
    margin: 0;
    border-left: 3px solid var(--thryve-primary);
}

/* ============================================
   PATIENT SUBMISSION PAGE STYLES
   ============================================ */

.partner-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
}

.partner-page-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.partner-page-icon {
    width: 44px;
    height: 44px;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.partner-page-title-text {
    color: white;
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0;
}

.partner-page-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    margin: 0;
}

.partner-page-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.partner-hero {
    background: linear-gradient(135deg, var(--thryve-secondary) 0%, #7a1436 100%);
    padding: 1.4rem 0;
    box-shadow: 0 6px 20px rgba(159, 25, 68, 0.25);
}

.partner-hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.partner-hero-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.partner-hero-icon {
    width: 52px;
    height: 52px;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.partner-hero h1 {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.partner-hero-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
}

.partner-hero-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.partner-hero-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    color: white;
}

.partner-hero-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.partner-hero-user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.partner-hero-user-name {
    font-weight: 600;
}

.partner-hero-user-org {
    font-size: 0.85rem;
    opacity: 0.85;
}

.submission-form-body {
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.submission-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
}

/* Submission Header */
.submission-header {
    background: linear-gradient(135deg, var(--thryve-secondary) 0%, #7a1436 100%);
    padding: 1.25rem 0;
    box-shadow: 0 4px 20px rgba(159, 25, 68, 0.25);
}

.submission-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.submission-header .brand-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.submission-header .brand-icon {
    width: 48px;
    height: 48px;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.submission-header h1 {
    color: white;
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0;
}

.submission-header .org-name {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    margin: 0;
}

.submission-header .header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-left: auto;
    justify-content: flex-end;
}

.btn-header {
    background: white;
    border: none;
    color: var(--thryve-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-header:hover {
    background: var(--thryve-primary);
    color: white;
    transform: translateY(-1px);
}

.btn-header-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    font-weight: 500;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-header-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Success Page */
.submission-success-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.success-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    max-width: 480px;
    width: 100%;
    padding: 3rem 2.5rem;
    text-align: center;
}

.success-icon-wrapper {
    margin-bottom: 1.5rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #198754 0%, #157347 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.success-title {
    color: var(--thryve-secondary);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.success-subtitle {
    color: #6c757d;
    font-size: 0.95rem;
    margin: 0 0 2rem 0;
}

.success-details {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 2rem;
    text-align: left;
}

.success-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.success-detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: #6c757d;
    font-size: 0.85rem;
}

.detail-value {
    font-weight: 600;
    color: #1a1a2e;
}

.detail-value.ref-id {
    font-family: monospace;
    color: var(--thryve-secondary);
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.success-btn-primary {
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, var(--thryve-primary) 0%, #e08a3d 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.success-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 168, 77, 0.35);
}

.success-btn-secondary {
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    color: #495057;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.success-btn-secondary:hover {
    border-color: var(--thryve-secondary);
    color: var(--thryve-secondary);
}

@media (max-width: 640px) {
    .submission-form-body {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* Error Banner */
.error-banner {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border: 1px solid #f5c2c7;
    border-radius: 16px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.error-icon {
    color: #dc3545;
    flex-shrink: 0;
    margin-top: 2px;
}

.error-content {
    flex: 1;
    color: #842029;
}

.error-list {
    margin: 0.5rem 0 0 0;
    padding-left: 1.25rem;
}

.error-list li {
    margin-bottom: 0.25rem;
}

.error-close {
    background: none;
    border: none;
    color: #842029;
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.error-close:hover {
    opacity: 1;
}

/* Form Cards */
.form-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease;
    scroll-margin-top: 5.5rem;
}

.form-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.form-card-clinical {
    border-left: 4px solid var(--thryve-secondary);
}

.form-card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.form-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--thryve-secondary) 0%, #7a1436 100%);
    color: white;
    flex-shrink: 0;
}

.form-card-icon.icon-teal {
    background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%);
}

.form-card-icon.icon-green {
    background: linear-gradient(135deg, #198754 0%, #157347 100%);
}

.form-card-icon.icon-purple {
    background: linear-gradient(135deg, #6f42c1 0%, #59359a 100%);
}

.form-card-icon.icon-orange {
    background: linear-gradient(135deg, var(--thryve-primary) 0%, #e08a3d 100%);
}

.form-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
}

.form-card-body {
    padding: 1.5rem;
}

/* Form Elements */
.form-label {
    font-weight: 500;
    color: #444;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.required {
    color: #dc3545;
}

.field-error {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

.form-control,
.form-select {
    padding: 0.65rem 0.9rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--thryve-primary);
    box-shadow: 0 0 0 4px rgba(249, 168, 77, 0.12);
}

.form-control::placeholder {
    color: #adb5bd;
}

/* Insurance Group */
.insurance-group {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.25rem;
}

.insurance-title {
    color: var(--thryve-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--thryve-primary-light);
}

/* Safety Box */
.safety-box {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
    border-radius: 16px;
    padding: 1.25rem;
    margin-top: 1rem;
}

.safety-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #92400e;
    margin-bottom: 1rem;
}

.safety-header h6 {
    margin: 0;
    font-weight: 600;
    font-size: 1rem;
}

.urgent-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fca5a5;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    color: #991b1b;
}

.urgent-alert svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 0 2rem;
}

.btn-cancel {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    color: #495057;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel:hover:not(:disabled) {
    border-color: #adb5bd;
    color: #212529;
}

.btn-cancel:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-submit {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--thryve-primary) 0%, #e08a3d 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 168, 77, 0.35);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Stats grid 4-column variant */
.stats-grid.stats-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
    .stats-grid.stats-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   STICKY SECTION NAVIGATION
   ============================================ */

.section-nav-sticky {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 0.75rem 1rem;
}

.section-nav-inner {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.section-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    color: #6c757d;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    cursor: pointer;
    background: #f8f9fa;
    border: 2px solid transparent;
}

.section-nav-link:hover {
    color: var(--thryve-secondary);
    background: var(--thryve-secondary-light);
}

.section-nav-link.active {
    color: white;
    background: linear-gradient(135deg, var(--thryve-secondary) 0%, #7a1436 100%);
    border-color: var(--thryve-secondary);
}

.section-nav-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.section-nav-link.active .section-nav-icon {
    background: rgba(255, 255, 255, 0.25);
}

.section-nav-text {
    display: inline;
}

@media (max-width: 640px) {
    .section-nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .section-nav-text {
        display: none;
    }

    .section-nav-icon {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
}

/* ============================================
   FORM NAVIGATION SHOWCASE PAGE
   ============================================ */

.showcase-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
}

.showcase-header {
    background: linear-gradient(135deg, var(--thryve-secondary) 0%, #7a1436 100%);
    padding: 2rem 0;
    color: white;
    text-align: center;
}

.showcase-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    font-weight: 600;
}

.showcase-header p {
    margin: 0;
    opacity: 0.85;
}

/* Pattern Tabs */
.pattern-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pattern-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: white;
    color: #495057;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pattern-tab:hover {
    border-color: var(--thryve-primary);
    color: var(--thryve-secondary);
}

.pattern-tab.active {
    background: linear-gradient(135deg, var(--thryve-secondary) 0%, #7a1436 100%);
    border-color: var(--thryve-secondary);
    color: white;
}

.pattern-tab-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.pattern-tab.active .pattern-tab-number {
    background: rgba(255, 255, 255, 0.25);
}

/* Pattern Description */
.pattern-description {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.pattern-description h3 {
    margin: 0 0 0.75rem 0;
    color: var(--thryve-secondary);
    font-size: 1.25rem;
}

.pattern-description p {
    margin: 0 0 1rem 0;
    color: #495057;
}

.pattern-description ul {
    margin: 0;
    padding-left: 1.25rem;
    color: #6c757d;
}

.pattern-description li {
    margin-bottom: 0.35rem;
}

/* Demo Container */
.demo-container {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    min-height: 400px;
}

/* Shared Demo Styles */
.demo-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.demo-section h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: var(--thryve-secondary);
    font-weight: 600;
}

.demo-field {
    margin-bottom: 1rem;
}

.demo-field:last-child {
    margin-bottom: 0;
}

.demo-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #444;
    margin-bottom: 0.35rem;
}

.demo-field input,
.demo-field select,
.demo-field textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.demo-field input:focus,
.demo-field select:focus,
.demo-field textarea:focus {
    outline: none;
    border-color: var(--thryve-primary);
    box-shadow: 0 0 0 3px rgba(249, 168, 77, 0.15);
}

.demo-field input.error {
    border-color: #dc3545;
}

.demo-field-error {
    display: block;
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.demo-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.demo-checkbox input {
    width: auto;
}

.required {
    color: #dc3545;
}

.demo-btn-primary {
    padding: 0.65rem 1.5rem;
    background: linear-gradient(135deg, var(--thryve-primary) 0%, #e08a3d 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.demo-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 168, 77, 0.3);
}

.demo-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.demo-btn-primary.demo-btn-success {
    background: linear-gradient(135deg, #198754 0%, #157347 100%);
}

.demo-btn-secondary {
    padding: 0.65rem 1.5rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    color: #495057;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.demo-btn-secondary:hover:not(:disabled) {
    border-color: #adb5bd;
}

.demo-btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Sticky Nav Demo */
.demo-sticky-wrapper {
    display: flex;
    flex-direction: column;
    height: 400px;
}

.demo-sticky-nav {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.demo-sticky-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    text-decoration: none;
    color: #6c757d;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.demo-sticky-link:hover {
    background: var(--thryve-primary-light);
    color: var(--thryve-secondary);
}

.demo-sticky-link.active {
    background: var(--thryve-secondary);
    color: white;
}

.demo-sticky-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.demo-sticky-link.active .demo-sticky-num {
    background: rgba(255, 255, 255, 0.25);
}

.demo-form-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Wizard Demo */
.demo-wizard-wrapper {
    display: flex;
    flex-direction: column;
}

.demo-wizard-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.demo-wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.demo-wizard-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.2s ease;
}

.demo-wizard-step.completed .demo-wizard-step-circle {
    background: var(--thryve-primary);
    color: white;
}

.demo-wizard-step.current .demo-wizard-step-circle {
    background: var(--thryve-secondary);
    color: white;
    box-shadow: 0 0 0 4px rgba(159, 25, 68, 0.2);
}

.demo-wizard-step-label {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}

.demo-wizard-step.current .demo-wizard-step-label {
    color: var(--thryve-secondary);
    font-weight: 600;
}

.demo-wizard-line {
    flex: 1;
    max-width: 80px;
    height: 3px;
    background: #e9ecef;
    margin: 0 0.75rem;
    margin-bottom: 1.5rem;
    border-radius: 2px;
}

.demo-wizard-line.active {
    background: var(--thryve-primary);
}

.demo-wizard-content {
    min-height: 200px;
}

.demo-wizard-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* Accordion Demo */
.demo-accordion-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.demo-accordion-item {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.demo-accordion-item.expanded {
    border-color: var(--thryve-primary);
    background: white;
}

.demo-accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.demo-accordion-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.demo-accordion-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: #6c757d;
}

.demo-accordion-icon .check-icon {
    color: #198754;
}

.demo-accordion-title {
    font-weight: 600;
    color: #1a1a2e;
}

.demo-accordion-chevron {
    color: #6c757d;
    transition: transform 0.2s ease;
}

.demo-accordion-item.expanded .demo-accordion-chevron {
    transform: rotate(180deg);
    color: var(--thryve-primary);
}

.demo-accordion-content {
    padding: 0 1.25rem 1.25rem 1.25rem;
}

.demo-accordion-summary {
    padding: 0 1.25rem 1rem 3.75rem;
    font-size: 0.85rem;
    color: #6c757d;
}

/* Tabs Demo */
.demo-tabs-wrapper {
    display: flex;
    flex-direction: column;
}

.demo-tabs-header {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.demo-tab {
    position: relative;
    padding: 0.75rem 1.25rem;
    background: none;
    border: none;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
}

.demo-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    border-radius: 2px 2px 0 0;
    transition: background 0.2s ease;
}

.demo-tab:hover {
    color: var(--thryve-secondary);
}

.demo-tab.active {
    color: var(--thryve-secondary);
}

.demo-tab.active::after {
    background: var(--thryve-secondary);
}

.demo-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 0.35rem;
}

.demo-tab-badge.error {
    background: #dc3545;
    color: white;
}

.demo-tabs-content {
    min-height: 220px;
}

.demo-tabs-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* Progress Demo */
.demo-progress-wrapper {
    display: flex;
    flex-direction: column;
    height: 420px;
}

.demo-progress-bar-container {
    margin-bottom: 1.25rem;
}

.demo-progress-bar {
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.demo-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--thryve-primary) 0%, #e08a3d 100%);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.demo-progress-text {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.demo-progress-percent {
    font-weight: 600;
    color: var(--thryve-secondary);
}

.demo-floating-submit {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.demo-btn-large {
    width: 100%;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .submission-header .header-content {
        flex-direction: column;
        text-align: center;
    }

    .submission-header .brand-section {
        flex-direction: column;
    }

    .submission-header .header-actions {
        width: 100%;
        justify-content: center;
    }

    .form-card-body {
        padding: 1rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-cancel,
    .btn-submit {
        width: 100%;
    }
}

/* ============================================
   AUTH PAGES (Login, Register, AcceptInvite)
   ============================================ */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    padding: 2rem 1rem;
}

.auth-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    max-width: 440px;
    width: 100%;
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--thryve-secondary) 0%, var(--thryve-primary) 100%);
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.auth-brand-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--thryve-secondary) 0%, #7a1436 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 12px rgba(159, 25, 68, 0.3);
}

.auth-brand-icon img {
    width: 40px;
    height: 40px;
    filter: brightness(0) invert(1);
}

.auth-title {
    color: var(--thryve-secondary);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    text-align: center;
}

.auth-subtitle {
    color: #6c757d;
    font-size: 0.95rem;
    margin: 0;
    text-align: center;
}

.auth-form {
    margin-top: 1.5rem;
}

.auth-form-group {
    margin-bottom: 1.25rem;
}

.auth-form-group label {
    display: block;
    font-weight: 500;
    color: #444;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.auth-form-group .form-control {
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    width: 100%;
}

.auth-form-group .form-control:focus {
    border-color: var(--thryve-primary);
    box-shadow: 0 0 0 4px rgba(249, 168, 77, 0.12);
    outline: none;
}

.auth-form-group .form-control::placeholder {
    color: #adb5bd;
}

.auth-form-group .form-text {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.35rem;
}

.auth-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 480px) {
    .auth-form-row {
        grid-template-columns: 1fr;
    }
}

.auth-btn-primary {
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, var(--thryve-primary) 0%, #e08a3d 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.auth-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 168, 77, 0.35);
}

.auth-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-btn-secondary {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    color: #495057;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.auth-btn-secondary:hover {
    border-color: var(--thryve-secondary);
    color: var(--thryve-secondary);
    text-decoration: none;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #adb5bd;
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e9ecef;
}

.auth-divider span {
    padding: 0 1rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
}

.auth-footer p {
    margin: 0 0 0.75rem 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--thryve-secondary);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-support {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: #adb5bd;
}

.auth-support a {
    color: #6c757d;
}

.auth-support a:hover {
    color: var(--thryve-secondary);
}


/* Auth Success/Alert States */
.auth-alert {
    padding: 1.25rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.auth-alert-success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #6ee7b7;
}

.auth-alert-success .auth-alert-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 auto 1rem;
}

.auth-alert-success h5 {
    color: #065f46;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    text-align: center;
}

.auth-alert-success p {
    color: #047857;
    font-size: 0.9rem;
    margin: 0;
    text-align: center;
}

.auth-alert-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
}

.auth-alert-warning h5 {
    color: #92400e;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.auth-alert-warning p {
    color: #a16207;
    font-size: 0.9rem;
    margin: 0;
}

.auth-alert-error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fca5a5;
    padding: 1rem;
}

.auth-alert-error p {
    color: #991b1b;
    font-size: 0.9rem;
    margin: 0;
}

/* Logged-in state card */
.auth-logged-in {
    text-align: center;
}

.auth-logged-in .auth-user-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 1.5rem;
}

.auth-logged-in .auth-user-badge strong {
    color: var(--thryve-secondary);
}

.auth-actions-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ============================================
   DASHBOARD HOME PAGE
   ============================================ */

.dashboard-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
}

.dashboard-hero {
    background: linear-gradient(135deg, var(--thryve-secondary) 0%, #7a1436 100%);
    padding: 2rem 0;
    box-shadow: 0 6px 20px rgba(159, 25, 68, 0.25);
}

.dashboard-hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.dashboard-hero-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.dashboard-hero-icon {
    width: 56px;
    height: 56px;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.dashboard-hero h1 {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.dashboard-hero-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0.25rem 0 0 0;
}

.dashboard-hero-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
}

.dashboard-hero-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.dashboard-hero-user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.dashboard-hero-user-name {
    font-weight: 600;
}

.dashboard-hero-user-org {
    font-size: 0.85rem;
    opacity: 0.85;
}

.dashboard-content {
    padding: 2rem 0;
}

.dashboard-welcome {
    text-align: center;
    margin-bottom: 2.5rem;
}

.dashboard-welcome h2 {
    color: var(--thryve-secondary);
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.dashboard-welcome p {
    color: #6c757d;
    font-size: 1rem;
    margin: 0;
}

.dashboard-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.dashboard-action-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.dashboard-action-card:hover {
    transform: translateY(-4px);
    border-color: var(--thryve-primary);
    box-shadow: 0 8px 32px rgba(249, 168, 77, 0.2);
    text-decoration: none;
}

.dashboard-action-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    color: white;
}

.dashboard-action-icon.icon-primary {
    background: linear-gradient(135deg, var(--thryve-primary) 0%, #e08a3d 100%);
}

.dashboard-action-icon.icon-secondary {
    background: linear-gradient(135deg, var(--thryve-secondary) 0%, #7a1436 100%);
}

.dashboard-action-card h3 {
    color: #1a1a2e;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.dashboard-action-card p {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

@media (max-width: 768px) {
    .dashboard-hero-content {
        flex-direction: column;
        text-align: center;
    }

    .dashboard-hero-left {
        flex-direction: column;
    }

    .dashboard-hero-user {
        width: 100%;
        justify-content: center;
    }

    .dashboard-actions {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
}

.address-suggestions {
    margin-top: 0.5rem;
    border: 1px solid #d8dee8;
    border-radius: 0.5rem;
    background: #fff;
    max-height: 14rem;
    overflow-y: auto;
}

.address-suggestion-item {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #eef2f6;
    background: #fff;
    text-align: left;
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
    color: #1f2a37;
}

.address-suggestion-item:hover {
    background: #f5f8fc;
}

.address-suggestion-item:last-child {
    border-bottom: 0;
}

.medications-panel {
    border: 1px solid #d8dee8;
    border-radius: 0.6rem;
    padding: 0.75rem;
    background: #fff;
}

.medications-selected-tray {
    border: 1px solid #e6edf5;
    border-radius: 0.55rem;
    background: #fbfdff;
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.65rem;
}

.medications-selected-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.medications-selected-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    max-height: 6.5rem;
    overflow-y: auto;
}

.medications-selected-chip {
    border: 1px solid #cfd9e5;
    background: #fff;
    color: #1f2a37;
    border-radius: 999px;
    padding: 0.2rem 0.5rem;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.medications-selected-chip-x {
    color: #7c8796;
    font-weight: 700;
}

.medications-clear-btn {
    border: 0;
    background: transparent;
    color: #516071;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: underline;
    padding: 0;
}

.medications-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
    margin-bottom: 0.55rem;
}

.medications-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: #546374;
    white-space: nowrap;
}

.medications-panel-disabled {
    opacity: 0.65;
}

.medications-options {
    max-height: 12rem;
    overflow-y: auto;
    border: 1px solid #eef2f6;
    border-radius: 0.5rem;
    padding: 0.4rem 0.55rem;
    background: #fbfdff;
}

.medication-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #1f2a37;
    margin-bottom: 0.35rem;
}

.medication-option:last-child {
    margin-bottom: 0;
}

.medication-option-other {
    margin-top: 0.65rem;
}

.sticky-validation-banner {
    position: fixed;
    top: 5rem;
    right: 1rem;
    z-index: 160;
    width: min(32rem, calc(100vw - 2rem));
    margin: 0;
    background: #fff6f6;
    border: 1px solid #efb3b3;
    border-radius: 0.75rem;
    padding: 0.75rem 0.9rem;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    justify-content: space-between;
}

@media (max-width: 768px) {
    .sticky-validation-banner {
        top: 4.5rem;
        right: 0.75rem;
        width: calc(100vw - 1.5rem);
    }
}

.sticky-validation-content {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.sticky-validation-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.sticky-validation-link {
    border: 1px solid #e38f8f;
    background: #fff;
    color: #8f2f2f;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.sticky-validation-close {
    border: 0;
    background: transparent;
    color: #8f2f2f;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0;
}

.section-nav-icon-alert {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.section-nav-icon-alert .section-nav-icon-num,
.section-nav-icon-alert .section-nav-icon-warn {
    position: absolute;
    inset: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    line-height: inherit;
}

.section-nav-icon-alert .section-nav-icon-num {
    animation: section-nav-num-blink 1.1s linear infinite;
}

.section-nav-icon-alert .section-nav-icon-warn {
    color: #f4b400;
    animation: section-nav-warn-blink 1.1s linear infinite;
}

@keyframes section-nav-num-blink {
    0%, 45% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

@keyframes section-nav-warn-blink {
    0%, 45% { opacity: 0; }
    50%, 100% { opacity: 1; }
}
