/* ========================================
   RECORDING PAGE - HEADER
   ======================================== */

.recording-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--background-secondary) 0%, var(--background-tertiary) 100%);
}

.recording-header {
    background: var(--background-primary);
    border-bottom: 1px solid var(--border-light);
    padding: var(--space-4) var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(var(--background-primary-rgb), 0.95);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.header-logo {
    height: 36px;
    width: auto;
}

.app-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: none; /* Hidden when logo is present */
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* Header Buttons - Unified Style */
.header-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

/* Navigation buttons - minimalist style */
.header-btn.team-btn,
.header-btn.usage-btn {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    position: relative;
    padding: var(--space-2) var(--space-3);
}

.header-btn.team-btn::after,
.header-btn.usage-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--brand-primary);
    transition: all var(--transition-base);
    transform: translateX(-50%);
    border-radius: 1px;
}

.header-btn.team-btn:hover,
.header-btn.usage-btn:hover {
    background: transparent;
    color: var(--brand-dark);
}

.header-btn.team-btn:hover::after,
.header-btn.usage-btn:hover::after {
    width: 100%;
}

/* Credits button - prominent CTA */
.header-btn.credits-btn {
    background: transparent;
    color: var(--brand-primary-dark);
    border: 1.5px solid var(--brand-primary);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-weight: 600;
    transition: all var(--transition-base);
}

.header-btn.credits-btn:hover {
    background: var(--brand-primary);
    color: var(--on-brand-primary);
    border-color: var(--brand-primary);
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */

.main-content {
    flex: 1;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
}

.messages-container {
    margin-bottom: var(--space-6);
}

.messages-container .alert {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-text {
    text-align: center;
    margin-bottom: var(--space-8);
}

.welcome-text h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.welcome-text h1 span {
    color: var(--brand-primary-dark);
}

/* ========================================
   TEMPLATE SELECTOR
   ======================================== */

.template-selector-container {
    margin-bottom: var(--space-8);
    text-align: center;
}

.selector-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

.template-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
}

.template-pill {
    padding: var(--space-3) var(--space-5);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--background-primary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.template-pill:hover {
    border-color: var(--brand-dark);
    color: var(--brand-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.template-pill.active {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    color: var(--on-brand-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Template pill type indicators */
.template-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.template-pill--own {
    border-color: rgba(var(--info-500-rgb), 0.3);
}

.template-pill--own:hover {
    border-color: rgba(var(--info-500-rgb), 0.6);
}

.template-pill--shared {
    border-color: rgba(var(--purple-500-rgb), 0.3);
}

.template-pill--shared:hover {
    border-color: rgba(var(--purple-500-rgb), 0.6);
}

.template-pill--own.active,
.template-pill--shared.active {
    border-color: transparent;
}

.pill-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pill-badge--own {
    background: rgba(var(--info-500-rgb), 0.15);
    color: var(--info-500);
}

.pill-badge--shared {
    background: rgba(var(--purple-500-rgb), 0.15);
    color: var(--purple-500);
}

.template-pill.active .pill-badge--own {
    background: rgba(var(--background-primary-rgb), 0.22);
    color: var(--on-brand-primary);
}

.template-pill.active .pill-badge--shared {
    background: rgba(var(--background-primary-rgb), 0.22);
    color: var(--on-brand-primary);
}

/* ========================================
   RECORDING SECTION
   ======================================== */

.recording-section {
    position: relative;
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--space-8);
    overflow: hidden;
}

/* Subtle gradient accent at top */
.recording-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--border-gradient);
}

.recording-section.needs-attention::before {
    background: var(--border-gradient-notice);
}

/* Sound Wave Animation */
.sound-wave {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 6px;
    height: 64px;
    margin-bottom: var(--space-6);
}

.wave-bar {
    width: 8px;
    background: linear-gradient(180deg, var(--brand-accent) 0%, var(--brand-primary-light) 100%);
    border-radius: var(--radius-full);
    animation: wave 1.5s ease-in-out infinite;
    opacity: 0.3;
    transition: opacity var(--transition-base);
}

.recording .wave-bar,
.sound-wave.recording .wave-bar {
    opacity: 1;
}

/* Paused state - freeze the animation */
.sound-wave.paused .wave-bar {
    animation-play-state: paused;
    opacity: 0.6;
}

.wave-bar:nth-child(1) { height: 24px; animation-delay: 0s; }
.wave-bar:nth-child(2) { height: 40px; animation-delay: 0.1s; }
.wave-bar:nth-child(3) { height: 56px; animation-delay: 0.2s; }
.wave-bar:nth-child(4) { height: 48px; animation-delay: 0.3s; }
.wave-bar:nth-child(5) { height: 36px; animation-delay: 0.4s; }
.wave-bar:nth-child(6) { height: 28px; animation-delay: 0.5s; }
.wave-bar:nth-child(7) { height: 20px; animation-delay: 0.6s; }

@keyframes wave {
    0%, 100% { transform: scaleY(0.4); }
    50% { transform: scaleY(1); }
}

/* Timer Display */
.timer-display {
    font-size: 2.5rem;
    font-weight: 500;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--space-6);
    letter-spacing: 0.08em;
}

/* Record Button */
.record-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    width: 100%;
    max-width: 280px;
    margin: 0 auto var(--space-4);
    padding: var(--space-4) var(--space-8);
    font-family: inherit;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--on-brand-primary);
    background: var(--brand-primary);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.record-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl), var(--shadow-glow), inset 0 1px 0 rgba(var(--background-primary-rgb), 0.25);
}

.record-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.record-btn:disabled {
    background: var(--border-light);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

.record-btn.recording {
    background: var(--error-600);
    color: var(--background-primary);
    animation: pulse-record 2s ease-in-out infinite;
}

/* Stays red while paused; only the pulse stops. */
.record-btn.paused {
    background: var(--error-600);
    color: var(--background-primary);
    animation: none;
}

@keyframes pulse-record {
    0%, 100% { box-shadow: var(--shadow-lg), 0 0 0 0 rgba(var(--error-500-rgb), 0.4); }
    50% { box-shadow: var(--shadow-lg), 0 0 0 12px rgba(var(--error-500-rgb), 0); }
}

/* Recording Buttons Container */
.recording-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    max-width: 280px;
    margin: 0 auto var(--space-4);
}

.recording-buttons .record-btn {
    margin: 0;
}

/* Pause Button */
.pause-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-3) var(--space-6);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--brand-primary-dark);
    background: var(--background-primary);
    border: 2px solid var(--brand-primary);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
}

.pause-btn:hover,
.pause-btn.paused:hover {
    background: rgba(var(--brand-primary-rgb), 0.08);
    border-color: var(--brand-primary-dark);
}

.pause-btn.paused {
    color: var(--brand-primary-dark);
    background: var(--background-primary);
    border-color: var(--brand-primary);
}

.pause-btn .pause-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.record-btn .btn-icon {
    font-size: 1.25rem;
    margin-right: 0;
}

/* Lucide mic icon in record button */
.record-btn .record-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.record-btn.recording .record-icon {
    animation: pulse-mic 1s ease-in-out infinite;
}

@keyframes pulse-mic {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.instruction-text {
    text-align: center;
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin: 0;
}

/* No Credits Message */
.no-credits-message {
    background: linear-gradient(135deg, var(--warning-100) 0%, var(--warning-200) 100%);
    border: 1px solid var(--warning-500);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-6);
    margin: var(--space-4) auto 0;
    max-width: 400px;
    color: var(--warning-800);
    font-size: 0.9375rem;
    font-weight: 500;
    text-align: center;
}

/* ========================================
   MIC SETUP MESSAGE
   ======================================== */

.mic-setup-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    background: linear-gradient(135deg, var(--info-50) 0%, var(--info-100) 100%);
    border: 1px solid var(--info-300);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin: var(--space-4) auto 0;
    max-width: 400px;
    text-align: center;
    animation: micMessageSlideIn 0.3s ease-out;
}

@keyframes micMessageSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mic-message-icon {
    width: 40px;
    height: 40px;
    background: rgba(var(--info-500-rgb), 0.15);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--info-600);
}

.mic-message-icon svg {
    width: 20px;
    height: 20px;
}

.mic-message-text {
    color: var(--info-800);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;
    width: 100%;
}

.mic-setup-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    background: var(--info-600);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    margin-top: var(--space-2);
    min-width: 200px;
}

.mic-setup-btn:hover {
    background: var(--info-700);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.mic-setup-btn svg {
    width: 16px;
    height: 16px;
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .mic-setup-message {
        padding: var(--space-4);
        margin-left: var(--space-2);
        margin-right: var(--space-2);
    }
}

/* ========================================
   ERROR PANEL (Processing Failures)
   ======================================== */

.error-panel {
    background: linear-gradient(135deg, var(--error-50) 0%, var(--error-100) 100%);
    border: 1px solid var(--error-200);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-bottom: var(--space-8);
    animation: errorSlideDown 0.4s ease-out;
}

@keyframes errorSlideDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-panel-content {
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
}

.error-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--error-100);
    border: 1px solid var(--error-200);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--error-600);
}

.error-icon svg {
    width: 24px;
    height: 24px;
}

.error-details {
    flex: 1;
    min-width: 0;
}

.error-details h3 {
    color: var(--error-800);
    margin: 0 0 var(--space-2) 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.error-details p {
    color: var(--error-900);
    margin: 0 0 var(--space-3) 0;
    line-height: 1.6;
    font-size: 0.9375rem;
}

.error-credit-info {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--brand-dark) !important;
    font-size: 0.875rem;
    font-weight: 500;
    background: rgba(var(--brand-dark-rgb), 0.06);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    border: 1px solid rgba(var(--brand-dark-rgb), 0.12);
}

.error-credit-info svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.error-dismiss-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-dismiss-btn:hover {
    color: var(--gray-500);
    background: rgba(var(--black-rgb), 0.05);
}

.error-dismiss-btn svg {
    width: 20px;
    height: 20px;
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
    .error-panel {
        padding: var(--space-4);
    }

    .error-panel-content {
        flex-direction: column;
        gap: var(--space-3);
    }

    .error-icon {
        width: 40px;
        height: 40px;
    }

    .error-icon svg {
        width: 20px;
        height: 20px;
    }

    .error-dismiss-btn {
        position: absolute;
        top: var(--space-3);
        right: var(--space-3);
    }

    .error-panel {
        position: relative;
    }
}

/* ========================================
   CREDITS DISPLAY
   ======================================== */

.credits-area {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    z-index: 10;
}

.credits-display {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    padding: var(--space-2) var(--space-4);
    font-size: 0.875rem;
}

.credits-display.credits-low {
    border-color: var(--warning-500);
    color: var(--warning-800);
    font-weight: 600;
}

.credits-display.credits-low .credits-icon {
    color: var(--warning-600);
}

.credits-icon {
    width: 16px;
    height: 16px;
    color: var(--brand-primary-dark);
}

.credits-count {
    font-weight: 700;
    color: var(--brand-primary-dark);
    font-size: 1rem;
}

.credits-label {
    color: var(--text-muted);
    font-weight: 500;
}

.credits-display.credits-updated {
    animation: credits-pulse 0.6s ease-out;
}

@keyframes credits-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ========================================
   MICROPHONE SETTINGS
   ======================================== */

.mic-settings-toggle {
    margin-top: var(--space-4);
    text-align: center;
}

.btn-link-clean {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: var(--space-2);
    transition: color var(--transition-fast);
}

.btn-link-clean:hover {
    color: var(--brand-primary-dark);
}

.btn-link-clean .link-icon {
    width: 16px;
    height: 16px;
}

.mic-settings-panel {
    background: var(--background-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin: var(--space-4) auto 0;
    max-width: 400px;
    text-align: left;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

.mic-settings-panel h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.mic-select {
    width: 100%;
    padding: var(--space-3);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    background: var(--background-primary);
    margin-bottom: var(--space-4);
}

.mic-test-area {
    background: var(--background-primary);
    padding: var(--space-4);
    border-radius: var(--radius-md);
}

.mic-test-area label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
    display: block;
}

.mic-meter-container {
    width: 100%;
    height: 10px;
    background: var(--border-light);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: var(--space-2);
}

.mic-meter-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
    transition: width 0.05s ease-out;
    border-radius: var(--radius-full);
}

.mic-status-text {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: var(--space-2);
    text-align: right;
}

/* ========================================
   PROCESSING ANIMATION
   ======================================== */

.processing-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
    background: linear-gradient(135deg, var(--background-secondary) 0%, rgba(var(--brand-accent-rgb), 0.14) 100%);
    border-radius: var(--radius-lg);
    margin: var(--space-4) 0;
    border: 2px solid var(--brand-accent-dark);
}

.relay-dots {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: var(--space-4);
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--brand-accent);
    animation: relay-pass 2s ease-in-out infinite;
}

.dot-1 { animation-delay: 0s; }
.dot-2 { animation-delay: 0.7s; }
.dot-3 { animation-delay: 1.4s; }

@keyframes relay-pass {
    0% { transform: scale(1); background: var(--brand-accent); box-shadow: 0 0 0 0 rgba(var(--brand-accent-rgb), 0.4); }
    25% { transform: scale(1.3); background: var(--brand-primary-light); box-shadow: 0 0 0 8px rgba(var(--brand-accent-rgb), 0.3); }
    50% { transform: scale(1); background: var(--brand-accent); box-shadow: 0 0 0 0 rgba(var(--brand-accent-rgb), 0.4); }
    100% { transform: scale(1); background: var(--brand-accent); box-shadow: 0 0 0 0 rgba(var(--brand-accent-rgb), 0.4); }
}

.processing-text {
    color: var(--brand-secondary);
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
}

/* ========================================
   RESULTS SECTION
   ======================================== */

.results-card {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-lg);
}

.results-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-6);
    text-align: center;
}

.result-sections {
    display: grid;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.result-section {
    background: var(--background-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    transition: all var(--transition-fast);
}

.result-section:hover {
    border-color: var(--border-medium);
}

/* --- Grouped sections (e.g. Historie, Persoonlijk) --- */
.result-group {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    background: var(--background-primary);
}

.result-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    margin-bottom: var(--space-4);
}

.result-group-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.result-group-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.result-group-body.is-collapsed {
    display: none;
}

/* Child sections inside a group: lighter, no outer border */
.result-group .result-section {
    background: var(--background-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-4);
}

.result-group .result-header h3 {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Select dropdown styled as a result field */
.result-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--background-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    appearance: auto;
}

.result-select:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.15);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
}

.result-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.result-actions {
    display: flex;
    gap: var(--space-2);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--background-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-muted);
}

.action-btn [data-lucide] {
    width: 18px;
    height: 18px;
}

.action-btn:hover {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: var(--on-brand-primary);
}

.result-textarea {
    width: 100%;
    min-height: 120px;
    padding: var(--space-4);
    font-family: inherit;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--background-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    resize: vertical;
    transition: all var(--transition-fast);
}

.result-textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.15);
}

.result-textarea::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* --- NRS (Numeric Rating Scale) compact row --- */
.nrs-field {
    padding: var(--space-3) var(--space-4);
}

/* Place consecutive NRS fields side-by-side inside a group */
.result-group-body > .nrs-field {
    flex: 1 1 0;
    min-width: 180px;
}

.nrs-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.nrs-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.nrs-label::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand-primary);
    margin-right: var(--space-2);
    vertical-align: middle;
}

/* NRS pair wrapper — side-by-side layout */
.nrs-pair {
    display: flex;
    gap: var(--space-4);
}

.nrs-pair > .nrs-field {
    flex: 1;
    background: var(--background-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
}

/* --- PSK (Patiënt Specifieke Klachten) compound fields --- */
.psk-field {
    padding: var(--space-3) var(--space-4);
}

.psk-row {
    display: flex;
    align-items: flex-end;
    gap: var(--space-4);
}

.psk-activity {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.psk-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.psk-activity-input {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--background-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.psk-activity-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.15);
}

.psk-activity-input::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.psk-score {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    flex-shrink: 0;
}

.psk-score-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.psk-scale-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.psk-score-input {
    width: 56px;
    padding: var(--space-2) var(--space-2);
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--background-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    text-align: center;
    transition: all var(--transition-fast);
    -moz-appearance: textfield;
}

.psk-score-input::-webkit-outer-spin-button,
.psk-score-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.psk-score-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.15);
}

.psk-score-input::placeholder {
    color: var(--text-muted);
}

.result-actions-bottom {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
}

.btn-green {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
    color: var(--on-brand-primary);
    border: none;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.btn-green:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn-green svg,
.btn-green [data-lucide] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: currentColor;
}
