/* Elegant and Impressive Design Enhancements */

/* Profile Page - Elegant Form Design */
.profile-screen {
    background: var(--surface-base);
    min-height: 100vh;
    padding-bottom: 80px;
}

.profile-content {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}

.form-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 16px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--gold-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(245, 200, 106, 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 767px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.save-button {
    background: linear-gradient(135deg, #F5C86A 0%, #D4C5A9 100%);
    color: var(--text-on-accent);
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 8px;
    box-shadow: 0 4px 16px rgba(245, 200, 106, 0.3);
    letter-spacing: -0.01em;
}

.save-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(245, 200, 106, 0.4);
}

.save-button:active:not(:disabled) {
    transform: translateY(0);
}

.save-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Activity Page - Elegant Activity List */
.activity-screen {
    background: var(--surface-base);
    min-height: 100vh;
    padding-bottom: 80px;
}

.activity-content {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gold-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.activity-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(245, 200, 106, 0.2);
    transform: translateX(4px);
}

.activity-item:hover::before {
    opacity: 1;
}

.activity-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 200, 106, 0.1);
    border-radius: 10px;
}

.activity-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.activity-description {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.activity-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.activity-type {
    font-size: 12px;
    font-weight: 600;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    background: rgba(245, 200, 106, 0.15);
    border-radius: 6px;
}

.activity-date {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.activity-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.activity-empty p {
    font-size: 16px;
    font-weight: 500;
}

/* Activity Mode Bar (Overall / By Case toggle) */
.activity-mode-bar {
    display: flex;
    gap: 8px;
    padding: 16px 20px 0;
    max-width: 600px;
    margin: 0 auto;
}

.activity-mode-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

.activity-mode-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.activity-mode-btn.active {
    background: rgba(245, 200, 106, 0.15);
    border-color: rgba(245, 200, 106, 0.4);
    color: var(--gold-primary);
    box-shadow: 0 2px 12px rgba(245, 200, 106, 0.15);
}

.activity-mode-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
}

/* Activity Case Filter (By Case mode) */
.activity-case-filter {
    padding: 12px 20px 0;
    max-width: 600px;
    margin: 0 auto;
}

.activity-case-filter-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.activity-case-select-wrap {
    position: relative;
}

.activity-case-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 12px 40px 12px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease;
    box-sizing: border-box;
}

.activity-case-select:focus {
    outline: none;
    border-color: rgba(245, 200, 106, 0.5);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 3px rgba(245, 200, 106, 0.08);
}

.activity-case-select option {
    background: var(--surface-card);
    color: var(--text-primary);
}

.activity-case-select-chevron {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
    stroke: currentColor;
    fill: none;
}

.activity-case-filter-empty {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Case tag shown in Overall mode */
.activity-case-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary, #9CA3AF);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

/* Documents Tab - Elegant Document List */
.documents-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.document-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.document-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gold-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.document-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(245, 200, 106, 0.2);
    transform: translateX(4px);
}

.document-item:hover::before {
    opacity: 1;
}

.document-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 200, 106, 0.1);
    border-radius: 12px;
    color: var(--gold-primary);
}

.document-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

.document-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.document-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.document-type {
    font-size: 12px;
    font-weight: 600;
    color: var(--gold-primary);
    text-transform: capitalize;
    padding: 4px 10px;
    background: rgba(245, 200, 106, 0.15);
    border-radius: 6px;
}

.document-size {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.document-actions {
    flex-shrink: 0;
}

.document-view-btn,
.document-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.document-view-btn .doc-action-icon,
.document-remove-btn .doc-action-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
}

.document-view-btn {
    padding: 8px 16px;
    background: rgba(245, 200, 106, 0.15);
    color: var(--gold-primary);
    border: 1px solid rgba(245, 200, 106, 0.3);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.document-view-btn:hover {
    background: rgba(245, 200, 106, 0.25);
    border-color: rgba(245, 200, 106, 0.5);
    transform: translateY(-1px);
}

.documents-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.documents-placeholder-text {
    font-size: 16px;
    font-weight: 500;
}

/* Document Scan Screen - Premium document list footer */
.document-scan-screen .doc-scan-documents-footer {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.document-scan-screen .doc-scan-documents-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.document-scan-screen .doc-scan-documents-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.document-scan-screen .doc-scan-documents-count {
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: var(--success);
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.document-scan-screen .documents-list {
    gap: 8px;
}

.document-scan-screen .document-item {
    background: var(--surface-card);
    border-color: var(--border-card);
}

.document-scan-screen .document-item:hover {
    border-color: var(--gold-border-hover);
    transform: translateX(4px);
}

.document-scan-screen .doc-scan-view-btn {
    padding: 6px 16px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid rgba(245, 200, 106, 0.6);
    color: var(--gold-primary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.document-scan-screen .doc-scan-view-btn:hover {
    background: var(--gold-bg-subtle);
    box-shadow: 0 0 0 1px var(--gold-border);
}

.document-scan-screen .document-remove-btn {
    margin-left: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid rgba(248, 113, 113, 0.6);
    color: #fecaca;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.document-scan-screen .document-remove-btn:hover {
    background: rgba(248, 113, 113, 0.12);
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.6);
}

/* Premium single-uploader box styling */
.document-scan-screen .capture-uploader-box {
    cursor: pointer;
    background: var(--surface-hover);
    border: 2px dashed var(--gold-border);
    box-shadow: var(--shadow-md);
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.document-scan-screen .capture-uploader-box .placeholder-icon {
    opacity: 0.9;
}

.document-scan-screen .capture-uploader-box .placeholder-icon svg {
    width: 48px;
    height: 48px;
    color: rgba(245, 200, 106, 0.9);
    stroke: currentColor;
}

.document-scan-screen .capture-uploader-box .placeholder-text {
    color: var(--text-secondary, #E5E5E7);
}

.document-scan-screen .capture-card:hover .capture-uploader-box {
    border-color: var(--gold-border-hover);
    box-shadow: var(--shadow-gold);
    background: var(--gold-bg-subtle);
}

.document-scan-screen .capture-uploader-box.uploading {
    opacity: 0.8;
    border-style: dashed;
    border-color: rgba(245, 200, 106, 0.7);
}

@media (max-width: 767px) {

    /* Make document cards more compact and scrollable on mobile */
    .document-scan-screen .capture-card {
        padding: 20px 16px;
    }

    .document-scan-screen .capture-preview {
        height: 170px;
    }

    /* On mobile, once a card is in the captured state, hide the large hero preview
       and rely on the "Documents added" list + chip-style rows instead. */
    .document-scan-screen .capture-card.captured .capture-preview {
        display: none;
    }

    .document-scan-screen .doc-scan-documents-footer {
        margin-top: 12px;
        padding: 10px 12px;
    }

    .document-scan-screen .doc-scan-documents-footer .documents-list {
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
    }

    /* Mobile: keep rows readable and prevent clipped content */
    .document-scan-screen .document-item {
        flex-direction: row;
        align-items: center;
        overflow: visible;
        min-height: 56px;
    }

    .document-scan-screen .document-info {
        margin-right: 8px;
        min-width: 0;
    }

    .document-scan-screen .document-actions {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
    }

    .document-scan-screen .document-item {
        padding: 10px 12px;
    }

    .document-scan-screen .document-name {
        font-size: 14px;
        line-height: 1.3;
    }

    /* Mobile: icon-only buttons (hide labels) */
    .document-scan-screen .doc-scan-view-btn .doc-action-label,
    .document-scan-screen .document-remove-btn .doc-action-label {
        display: none;
    }

    .document-scan-screen .doc-scan-view-btn,
    .document-scan-screen .document-remove-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        padding: 0;
        border-radius: 12px;
        margin-left: 0;
    }

    .document-scan-screen .doc-scan-view-btn .doc-action-icon,
    .document-scan-screen .document-remove-btn .doc-action-icon {
        width: 20px;
        height: 20px;
        margin: 0;
    }
}

/* ── Single-uploader redesign ──────────────────────────────────────── */

/* Page subtitle */
.doc-scan-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 400;
    margin: -8px 0 24px;
    line-height: 1.55;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

/* Accepted-format pill row */
.doc-format-pills {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.doc-format-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(245, 200, 106, 0.08);
    border: 1px solid rgba(245, 200, 106, 0.2);
    color: var(--gold-primary);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.doc-format-pill-icon {
    font-size: 15px;
    line-height: 1;
}

/* Outer card shell */
.doc-single-card {
    background: var(--surface-card, #141414);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.doc-single-card--drag {
    border-color: rgba(245, 200, 106, 0.5);
    box-shadow: 0 0 0 3px rgba(245, 200, 106, 0.12);
}

/* The clickable / drop-target label */
.doc-drop-zone {
    display: block;
    width: 100%;
    min-height: 220px;
    background: rgba(15, 23, 42, 0.55);
    border: 2px dashed rgba(245, 200, 106, 0.22);
    border-radius: 18px;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    box-sizing: border-box;
}

.doc-drop-zone:hover,
.doc-drop-zone--active {
    background: rgba(245, 200, 106, 0.05);
    border-color: rgba(245, 200, 106, 0.5);
    box-shadow: 0 8px 32px rgba(245, 200, 106, 0.12);
}

/* Content centred inside the drop zone */
.doc-drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 32px 24px;
    text-align: center;
    gap: 10px;
}

/* Animated icon ring */
.doc-drop-icon-wrapper {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.doc-drop-icon {
    width: 72px;
    height: 72px;
    color: var(--gold-primary);
    stroke: currentColor;
    fill: none;
    transition: transform 0.3s ease;
}

.doc-drop-zone:hover .doc-drop-icon {
    transform: translateY(-4px);
}

.doc-drop-primary {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.doc-drop-secondary {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin: 0;
}

.doc-drop-hint {
    font-size: 12px;
    color: var(--text-disabled, #636366);
    font-weight: 400;
    margin: 4px 0 0;
}

/* Upload spinner animation */
.doc-upload-anim {
    margin-bottom: 12px;
}

.doc-upload-spin {
    width: 56px;
    height: 56px;
    animation: docSpinRot 0.9s linear infinite;
}

@keyframes docSpinRot {
    to {
        transform: rotate(360deg);
    }
}

/* Chunked-upload progress bar */
.doc-chunk-progress {
    width: 100%;
    max-width: 260px;
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 6px;
}

.doc-chunk-bar {
    height: 100%;
    background: linear-gradient(90deg, #F5C86A 0%, #F8D89A 100%);
    border-radius: 999px;
    transition: width 0.25s ease;
    box-shadow: 0 0 8px rgba(245, 200, 106, 0.5);
}

/* File-type icon colour variants */
.doc-type-icon.doc-icon--image {
    background: rgba(99, 179, 237, 0.12);
    color: #63b3ed;
}

.doc-type-icon.doc-icon--video {
    background: rgba(246, 135, 85, 0.12);
    color: #f68755;
}

.doc-type-icon.doc-icon--pdf {
    background: rgba(252, 129, 129, 0.12);
    color: #fc8181;
}

.doc-type-icon.doc-icon--word {
    background: rgba(100, 155, 245, 0.12);
    color: #649bf5;
}

/* Mobile tweaks for single uploader */
@media (max-width: 767px) {
    .doc-drop-zone {
        min-height: 180px;
    }

    .doc-drop-content {
        min-height: 180px;
        padding: 24px 16px;
        gap: 8px;
    }

    .doc-drop-icon-wrapper {
        width: 64px;
        height: 64px;
    }

    .doc-drop-icon {
        width: 58px;
        height: 58px;
    }

    .doc-drop-primary {
        font-size: 15px;
    }

    .doc-format-pills {
        gap: 8px;
    }

    .doc-format-pill {
        font-size: 12px;
        padding: 5px 12px;
    }

    .doc-scan-subtitle {
        font-size: 14px;
    }
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.loading-spinner p {
    font-size: 16px;
    font-weight: 500;
    margin-top: 16px;
}

/* Enhanced Treatment Plan Display */
.treatment-plan-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.treatment-plan-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(245, 200, 106, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.treatment-plan-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.treatment-plan-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.treatment-icon {
    width: 24px;
    height: 24px;
    color: var(--gold-primary);
}

.treatment-plan-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.ai-generated-badge {
    padding: 6px 12px;
    background: rgba(245, 200, 106, 0.15);
    color: var(--gold-primary);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.progress-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.progress-months {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #F5C86A 0%, #D4C5A9 100%);
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(245, 200, 106, 0.5);
}

.progress-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.metric-item {
    text-align: center;
}

.metric-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.metric-value.gold {
    color: var(--gold-primary);
}

.metric-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Treatment Cost Card Enhancement */
.treatment-cost-card {
    background: var(--surface-card);
    border: 1px solid var(--gold-border);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.treatment-cost-card:hover {
    transform: translateY(-2px);
    border-color: var(--gold-border-hover);
    box-shadow: var(--shadow-gold);
}

.cost-icon-wrapper {
    width: 56px;
    height: 56px;
    background: rgba(245, 200, 106, 0.15);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cost-icon {
    font-size: 28px;
    font-weight: 700;
    color: var(--gold-primary);
}

.cost-value {
    flex: 1;
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.cost-arrow {
    font-size: 24px;
    color: var(--gold-primary);
    font-weight: 700;
}

/* Treatment Phases Enhancement */
.treatment-phases-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
}

.phases-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.phases-icon {
    width: 24px;
    height: 24px;
    color: var(--gold-primary);
}

.phases-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.phase-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    transition: all 0.3s ease;
}

.phase-item:last-child {
    border-bottom: none;
}

.phase-item:hover {
    padding-left: 8px;
}

.phase-period {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.phase-cost {
    font-size: 16px;
    font-weight: 700;
    color: var(--gold-primary);
    letter-spacing: -0.01em;
}

.phase-indicator {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--gold-primary);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.phase-item:hover .phase-indicator {
    opacity: 1;
}

/* Responsive Enhancements */
@media (max-width: 767px) {

    .profile-content,
    .activity-content {
        padding: 16px;
    }

    .form-group input {
        padding: 12px 14px;
        font-size: 15px;
    }

    .activity-item,
    .document-item {
        padding: 14px 16px;
    }

    .progress-metrics {
        gap: 12px;
    }

    .metric-value {
        font-size: 18px;
    }

    .cost-value {
        font-size: 28px;
    }
}

/* Smooth Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.activity-item,
.document-item,
.phase-item {
    animation: fadeIn 0.4s ease-out;
}

/* Elegant Scrollbar */
.activity-content::-webkit-scrollbar,
.profile-content::-webkit-scrollbar {
    width: 6px;
}

.activity-content::-webkit-scrollbar-track,
.profile-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.activity-content::-webkit-scrollbar-thumb,
.profile-content::-webkit-scrollbar-thumb {
    background: rgba(245, 200, 106, 0.3);
    border-radius: 3px;
}

.activity-content::-webkit-scrollbar-thumb:hover,
.profile-content::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 200, 106, 0.5);
}

/* ========== Premium Confirmation Modal (reusable app-wide) ========== */
.premium-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11000;
    padding: 24px;
    animation: premiumConfirmFadeIn 0.25s ease;
}

@keyframes premiumConfirmFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.premium-confirm-modal {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: linear-gradient(165deg, var(--surface-card) 0%, rgba(20, 20, 22, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(245, 200, 106, 0.08),
        0 0 80px rgba(245, 200, 106, 0.06);
    overflow: hidden;
    animation: premiumConfirmSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes premiumConfirmSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.premium-confirm-glow {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 120px;
    background: radial-gradient(ellipse, rgba(245, 200, 106, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.premium-confirm-header {
    padding: 28px 24px 16px;
    text-align: center;
}

.premium-confirm-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(245, 200, 106, 0.2) 0%, rgba(245, 200, 106, 0.08) 100%);
    border: 2px solid rgba(245, 200, 106, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-primary);
}

.premium-confirm-icon svg {
    width: 28px;
    height: 28px;
    stroke: currentColor;
    fill: none;
}

.premium-confirm-icon-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.08) 100%);
    border-color: rgba(239, 68, 68, 0.4);
    color: #EF4444;
}

.premium-confirm-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.premium-confirm-body {
    padding: 8px 24px 24px;
    text-align: center;
}

.premium-confirm-message {
    font-size: 16px;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0;
}

.premium-confirm-actions {
    display: flex;
    gap: 12px;
    padding: 0 24px 28px;
    justify-content: center;
    flex-wrap: wrap;
}

.premium-confirm-btn {
    min-width: 120px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-family: inherit;
}

.premium-confirm-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.premium-confirm-cancel:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.premium-confirm-ok {
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    color: var(--text-on-accent);
    box-shadow: 0 4px 16px rgba(245, 200, 106, 0.35);
}

.premium-confirm-ok:hover {
    box-shadow: 0 6px 24px rgba(245, 200, 106, 0.45);
    transform: translateY(-2px);
}

.premium-confirm-ok-danger {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
}

.premium-confirm-ok-danger:hover {
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.45);
}

/* ========== LIGHT THEME – Premium Confirm Modal ========== */

/* Backdrop: warm dark overlay so modal stands out */
[data-theme="light"] .premium-confirm-overlay {
    background: rgba(44, 31, 14, 0.6);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* Modal card: replace dark gradient with warm ivory */
[data-theme="light"] .premium-confirm-modal {
    background: linear-gradient(165deg, var(--surface-elevated) 0%, var(--surface-card) 100%);
    border: 1px solid var(--border-subtle);
    box-shadow:
        0 24px 64px rgba(160, 120, 64, 0.18),
        0 0 0 1px rgba(200, 169, 110, 0.12);
}

/* Glow: warm gold tint */
[data-theme="light"] .premium-confirm-glow {
    background: radial-gradient(ellipse, rgba(200, 169, 110, 0.15) 0%, transparent 70%);
}

/* Cancel button: warm surface instead of white-glass */
[data-theme="light"] .premium-confirm-cancel {
    background: var(--surface-hover);
    color: var(--text-secondary);
    border: 1.5px solid var(--border-card);
}

[data-theme="light"] .premium-confirm-cancel:hover {
    background: var(--gold-bg-subtle);
    border-color: var(--gold-border);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* =====================================================================
   PREMIUM ACTIVITY PAGE  (act-* namespace)
   ===================================================================== */

/* Page wrapper */
.act-page {
    min-height: 100vh;
    background: var(--surface-base, #0B0F1A);
    padding-bottom: 100px;
    display: flex;
    flex-direction: column;
}

/* ── Header ──────────────────────────────────────────────────────────── */
.act-header {
    padding: 28px 20px 0;
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.act-header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

.act-header-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(245, 200, 106, 0.18) 0%, rgba(212, 197, 169, 0.12) 100%);
    border: 1px solid rgba(245, 200, 106, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #F5C86A;
}

.act-header-icon svg {
    width: 22px;
    height: 22px;
}

.act-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary, #F0F0F0);
    letter-spacing: -0.04em;
    line-height: 1;
    margin: 0 0 4px;
}

.act-subtitle {
    font-size: 13px;
    color: var(--text-muted, #6B7280);
    font-weight: 500;
    letter-spacing: 0.01em;
    margin: 0;
}

/* ── Segment Control ─────────────────────────────────────────────────── */
.act-segment-wrap {
    padding: 20px 20px 0;
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.act-segment {
    position: relative;
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 4px;
    gap: 0;
    overflow: hidden;
}

/* Sliding indicator pill */
.act-seg-pill {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(245, 200, 106, 0.2) 0%, rgba(212, 197, 169, 0.12) 100%);
    border: 1px solid rgba(245, 200, 106, 0.35);
    box-shadow: 0 2px 12px rgba(245, 200, 106, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1), width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.act-seg-pill.act-seg-pill-right {
    left: calc(50%);
}

.act-seg-btn {
    flex: 1;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 8px;
    border: none;
    background: transparent;
    color: var(--text-muted, #6B7280);
    font-size: 13.5px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
    cursor: pointer;
    border-radius: 10px;
    transition: color 0.22s ease;
    white-space: nowrap;
}

.act-seg-btn.act-seg-active {
    color: #F5C86A;
}

.act-seg-btn:not(.act-seg-active):hover {
    color: var(--text-primary, #F0F0F0);
}

.act-seg-icon {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
    transition: stroke 0.22s ease;
}

/* ── Case Chips ──────────────────────────────────────────────────────── */
.act-case-chips-wrap {
    padding: 14px 20px 0;
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.act-case-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.act-case-chips::-webkit-scrollbar {
    display: none;
}

.act-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted, #6B7280);
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.act-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary, #F0F0F0);
    border-color: rgba(255, 255, 255, 0.18);
}

.act-chip.act-chip-active {
    background: rgba(245, 200, 106, 0.15);
    border-color: rgba(245, 200, 106, 0.45);
    color: #F5C86A;
    box-shadow: 0 0 0 3px rgba(245, 200, 106, 0.06), 0 2px 10px rgba(245, 200, 106, 0.12);
}

.act-chip-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.4;
    transition: opacity 0.22s ease;
    flex-shrink: 0;
}

.act-chip-dot.act-chip-dot-active {
    opacity: 1;
    background: var(--gold-primary);
    box-shadow: 0 0 6px rgba(245, 200, 106, 0.6);
}

/* Skeleton chips */
.act-case-chips-loading {
    display: flex;
    gap: 8px;
}

.act-chip-skeleton {
    display: inline-block;
    height: 36px;
    width: 90px;
    border-radius: 999px;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.04) 0%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.04) 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.4s ease-in-out infinite;
}

.act-chip-skeleton--wide {
    width: 130px;
}

.act-case-empty {
    font-size: 13px;
    color: var(--text-muted, #6B7280);
    margin: 8px 0 0;
}

/* ── Count Banner ────────────────────────────────────────────────────── */
.act-count-bar {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 16px 20px 0;
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.act-count-label {
    font-size: 13px;
    color: var(--text-muted, #6B7280);
    font-weight: 500;
}

.act-count-num {
    font-size: 20px;
    font-weight: 800;
    color: #F5C86A;
    letter-spacing: -0.04em;
    margin-right: 2px;
}

.act-count-mode {
    font-size: 13px;
    color: var(--text-muted, #6B7280);
    font-weight: 400;
}

/* ── Skeleton List ───────────────────────────────────────────────────── */
.act-skeleton-list {
    padding: 16px 20px 0;
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.act-skeleton-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.act-skeleton-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    flex-shrink: 0;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.04) 0%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.04) 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.4s ease-in-out infinite;
}

.act-skeleton-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding-top: 5px;
}

.act-skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.04) 0%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.04) 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.4s ease-in-out infinite;
}

.act-skeleton-line--wide {
    width: 75%;
}

.act-skeleton-line--med {
    width: 48%;
}

/* ── Timeline ────────────────────────────────────────────────────────── */
.act-timeline {
    padding: 14px 20px 0;
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.act-timeline-item {
    display: flex;
    gap: 0;
    align-items: stretch;
}

/* Left column: icon bubble + connector */
.act-tl-icon-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 52px;
    flex-shrink: 0;
}

.act-tl-icon-bubble {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    transition: background 0.22s ease, border-color 0.22s ease;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.act-timeline-item:hover .act-tl-icon-bubble {
    background: rgba(245, 200, 106, 0.12);
    border-color: rgba(245, 200, 106, 0.28);
}

.act-tl-emoji {
    font-size: 17px;
    line-height: 1;
}

/* Connector line */
.act-tl-line {
    flex: 1;
    width: 1px;
    background: rgba(255, 255, 255, 0.07);
    margin: 5px 0;
}

/* Right: card */
.act-tl-card {
    flex: 1;
    margin: 0 0 14px 12px;
    min-width: 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left-width: 2px;
    border-left-color: rgba(245, 200, 106, 0.25);
    border-radius: 14px;
    padding: 12px 16px 14px;
    transition: background 0.22s ease, border-color 0.22s ease,
        transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.22s ease;
}

.act-timeline-item:hover .act-tl-card {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: #F5C86A;
    border-color: rgba(245, 200, 106, 0.2);
    transform: translateX(3px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

/* Per-type left border colour overrides */
.act-type--scorecalculated .act-tl-card {
    border-left-color: rgba(251, 191, 36, 0.4);
}

.act-type--document .act-tl-card,
.act-type--upload .act-tl-card {
    border-left-color: rgba(96, 165, 250, 0.4);
}

.act-type--pain .act-tl-card {
    border-left-color: rgba(248, 113, 113, 0.4);
}

.act-type--injury .act-tl-card,
.act-type--extract .act-tl-card {
    border-left-color: rgba(167, 139, 250, 0.4);
}

.act-type--match .act-tl-card,
.act-type--partner .act-tl-card {
    border-left-color: rgba(52, 211, 153, 0.4);
}

.act-type--scorecalculated:hover .act-tl-card {
    border-left-color: #fbbf24;
}

.act-type--upload:hover .act-tl-card,
.act-type--document:hover .act-tl-card {
    border-left-color: #60a5fa;
}

.act-type--pain:hover .act-tl-card {
    border-left-color: #f87171;
}

.act-type--injury:hover .act-tl-card,
.act-type--extract:hover .act-tl-card {
    border-left-color: #a78bfa;
}

.act-type--match:hover .act-tl-card,
.act-type--partner:hover .act-tl-card {
    border-left-color: #34d399;
}

.act-tl-desc {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #F0F0F0);
    line-height: 1.45;
    letter-spacing: -0.01em;
    margin: 0 0 10px;
}

.act-tl-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.act-tl-tag {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 999px;
    line-height: 1.4;
}

.act-tl-tag--case {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted, #9CA3AF);
}

.act-tl-tag--type {
    background: rgba(245, 200, 106, 0.12);
    border: 1px solid rgba(245, 200, 106, 0.22);
    color: #F5C86A;
}

.act-tl-date {
    display: inline-flex;
    align-items: center;
    font-size: 11.5px;
    color: var(--text-muted, #6B7280);
    font-weight: 500;
    letter-spacing: 0.01em;
    margin-left: auto;
}

/* Per-type icon bubble tint */
.act-type--scorecalculated .act-tl-icon-bubble {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.2);
}

.act-type--upload .act-tl-icon-bubble,
.act-type--document .act-tl-icon-bubble {
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.2);
}

.act-type--pain .act-tl-icon-bubble {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.2);
}

.act-type--injury .act-tl-icon-bubble,
.act-type--extract .act-tl-icon-bubble {
    background: rgba(167, 139, 250, 0.1);
    border-color: rgba(167, 139, 250, 0.2);
}

.act-type--match .act-tl-icon-bubble,
.act-type--partner .act-tl-icon-bubble {
    background: rgba(52, 211, 153, 0.1);
    border-color: rgba(52, 211, 153, 0.2);
}

/* ── Empty State ─────────────────────────────────────────────────────── */
.act-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px 40px;
    text-align: center;
    animation: premiumFadeIn 0.5s ease-out;
}

.act-empty-icon {
    width: 72px;
    height: 72px;
    color: var(--text-muted, #6B7280);
    margin-bottom: 20px;
    opacity: 0.6;
}

.act-empty-icon svg {
    width: 100%;
    height: 100%;
}

.act-empty-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary, #F0F0F0);
    letter-spacing: -0.02em;
    margin: 0 0 8px;
}

.act-empty-sub {
    font-size: 13.5px;
    color: var(--text-muted, #6B7280);
    line-height: 1.55;
    max-width: 260px;
    margin: 0;
    font-weight: 400;
}

/* ── Fade-in animation for list items ───────────────────────────────── */
.act-timeline-item.premium-fade-in {
    animation: actItemIn 0.38s ease-out both;
}

.act-timeline-item:nth-child(1) {
    animation-delay: 0.00s;
}

.act-timeline-item:nth-child(2) {
    animation-delay: 0.05s;
}

.act-timeline-item:nth-child(3) {
    animation-delay: 0.10s;
}

.act-timeline-item:nth-child(4) {
    animation-delay: 0.15s;
}

.act-timeline-item:nth-child(5) {
    animation-delay: 0.20s;
}

.act-timeline-item:nth-child(6) {
    animation-delay: 0.25s;
}

.act-timeline-item:nth-child(n+7) {
    animation-delay: 0.30s;
}

@keyframes actItemIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== LIGHT THEME – Document Scan Page Overrides ========== */

/* Drop zone: replace dark slate with warm ivory */
[data-theme="light"] .doc-drop-zone {
    background: rgba(251, 246, 239, 0.8);
    border-color: rgba(200, 169, 110, 0.35);
}

[data-theme="light"] .doc-drop-zone:hover,
[data-theme="light"] .doc-drop-zone--active {
    background: var(--gold-bg-subtle);
    border-color: var(--gold-border-hover);
    box-shadow: 0 8px 32px rgba(200, 169, 110, 0.15);
}

/* Outer card shell: warm border instead of white-5% */
[data-theme="light"] .doc-single-card {
    background: var(--surface-card);
    border-color: var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .doc-single-card--drag {
    border-color: var(--gold-border-hover);
    box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.15);
}

/* Format pills: slightly warmer tint */
[data-theme="light"] .doc-format-pill {
    background: var(--gold-bg-subtle);
    border-color: var(--gold-border);
    color: var(--gold-dark);
}

/* Uploaded docs footer panel */
[data-theme="light"] .document-scan-screen .doc-scan-documents-footer {
    background: var(--surface-card);
    border-color: var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

/* Remove button: fix invisible light-pink text → warm red */
[data-theme="light"] .document-scan-screen .document-remove-btn {
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.4);
}

[data-theme="light"] .document-scan-screen .document-remove-btn:hover {
    background: rgba(220, 38, 38, 0.08);
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.4);
}

/* Chunked upload progress track */
[data-theme="light"] .doc-chunk-progress {
    background: rgba(160, 120, 64, 0.12);
}

/* Treatment plan cards (shown in dashboard Treatment tab) */
[data-theme="light"] .treatment-plan-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .treatment-plan-card:hover {
    background: var(--surface-elevated);
    border-color: var(--gold-border);
    box-shadow: var(--shadow-md);
}

[data-theme="light"] .treatment-phases-card {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .phase-item {
    border-bottom-color: var(--border-subtle);
}

[data-theme="light"] .progress-bar-container {
    background: rgba(160, 120, 64, 0.15);
}

/* Back / Skip buttons: warm outline instead of dark-glass */
[data-theme="light"] .document-navigation .btn-back,
[data-theme="light"] .pain-navigation .btn-back,
[data-theme="light"] .score-navigation .btn-back,
[data-theme="light"] .match-navigation .btn-back,
[data-theme="light"] .form-actions .btn-back,
[data-theme="light"] .form-actions .btn-skip {
    background: var(--surface-hover);
    color: var(--gold-dark);
    border-color: var(--gold-border);
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .document-navigation .btn-back:hover,
[data-theme="light"] .pain-navigation .btn-back:hover,
[data-theme="light"] .score-navigation .btn-back:hover,
[data-theme="light"] .match-navigation .btn-back:hover {
    background: var(--gold-bg-subtle);
    border-color: var(--gold-border-hover);
    color: var(--gold-dark);
    box-shadow: var(--shadow-gold);
}

/* OCR processing indicator */
[data-theme="light"] .ocr-processing {
    background: var(--surface-hover);
    border-color: var(--border-subtle);
    color: var(--text-secondary);
}

/* Image viewer modal – full light-theme override */

/* Backdrop: proper dark semi-transparent so image pops – not beige */
[data-theme="light"] .image-viewer-overlay {
    background: rgba(44, 31, 14, 0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* Modal card: warm ivory */
[data-theme="light"] .image-viewer-modal {
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    box-shadow:
        0 20px 60px rgba(160, 120, 64, 0.2),
        0 0 0 1px rgba(200, 169, 110, 0.15);
}

/* Header bar: replace the dark near-black gradient with warm ivory */
[data-theme="light"] .image-viewer-header {
    background: var(--surface-card);
    border-bottom: 1px solid var(--gold-border);
}

/* Title text */
[data-theme="light"] .image-viewer-title {
    color: var(--text-primary);
}

/* Content area: replace dark-30% with warm cream */
[data-theme="light"] .image-viewer-content {
    background: var(--surface-base);
}

/* Viewer image: clear background */
[data-theme="light"] .viewer-image {
    background: transparent;
    box-shadow: 0 8px 32px rgba(160, 120, 64, 0.15);
}

/* Close X button: ivory with warm border, visible on light bg */
[data-theme="light"] .image-viewer-close {
    background: var(--surface-card);
    border: 1.5px solid var(--border-card);
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .image-viewer-close:hover {
    background: var(--gold-bg-subtle);
    border-color: var(--gold-border);
    color: var(--gold-dark);
    transform: scale(1.1);
}