/* ==========================================
   CLINICAL VOICE COLLECTOR - STYLES (RMS V4.1)
   Beautiful, modern, mobile-first design
   ========================================== */

:root {
    --cvc-primary: #3b82f6;
    --cvc-primary-hover: #2563eb;
    --cvc-secondary: #10b981;
    --cvc-danger: #ef4444;
    --cvc-warning: #f59e0b;
    --cvc-dark: #1f2937;
    --cvc-gray: #6b7280;
    --cvc-light-gray: #f3f4f6;
    --cvc-border: #e5e7eb;
    --cvc-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --cvc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* WRAPPER & CONTAINER */
.cvc-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--cvc-dark);
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.cvc-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: var(--cvc-shadow-lg);
    overflow: hidden;
}

/* HEADER */
.cvc-header {
    background: linear-gradient(135deg, var(--cvc-primary) 0%, #6366f1 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.cvc-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}

.cvc-subtitle {
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
}

/* ALERTS */
.cvc-alert {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    margin: 20px;
    border-radius: 12px;
    animation: slideDown 0.3s ease-out;
}

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

.cvc-alert-success {
    background: #d1fae5;
    border-left: 4px solid var(--cvc-secondary);
    color: #065f46;
}

.cvc-alert-error {
    background: #fee2e2;
    border-left: 4px solid var(--cvc-danger);
    color: #991b1b;
}

.cvc-alert-icon {
    font-size: 24px;
    font-weight: bold;
}

/* FORM */
.cvc-form {
    padding: 0 0 30px 0;
}

/* SECTIONS */
.cvc-section {
    padding: 30px;
    border-bottom: 1px solid var(--cvc-border);
}

.cvc-section:last-of-type {
    border-bottom: none;
}

.cvc-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: var(--cvc-dark);
}

.cvc-section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--cvc-primary);
    color: white;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 700;
}

.cvc-hint {
    color: var(--cvc-gray);
    font-size: 14px;
    margin: 0 0 20px 0;
}

/* GRID */
.cvc-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* FIELDS */
.cvc-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cvc-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--cvc-dark);
}

.cvc-required {
    color: var(--cvc-danger);
}

.cvc-input {
    padding: 12px 16px;
    border: 2px solid var(--cvc-border);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.cvc-input:focus {
    outline: none;
    border-color: var(--cvc-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.cvc-textarea {
    padding: 12px 16px;
    border: 2px solid var(--cvc-border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.cvc-textarea:focus {
    outline: none;
    border-color: var(--cvc-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* SLIDERS */
.cvc-slider-group {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--cvc-light-gray);
    border-radius: 12px;
}

.cvc-slider-label {
    display: block;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 15px;
    color: var(--cvc-dark);
}

.cvc-slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cvc-slider-left,
.cvc-slider-right {
    font-size: 13px;
    color: var(--cvc-gray);
    font-weight: 500;
    white-space: nowrap;
    min-width: 120px;
}

.cvc-slider-left {
    text-align: right;
}

.cvc-slider-right {
    text-align: left;
}

.cvc-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: linear-gradient(to right, #3b82f6 0%, #e5e7eb 50%, #ef4444 100%);
    border-radius: 10px;
    outline: none;
    touch-action: none;
}

.cvc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: white;
    border: 3px solid var(--cvc-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.cvc-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.cvc-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: white;
    border: 3px solid var(--cvc-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.cvc-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.cvc-slider-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 14px;
}

.cvc-slider-value span:first-child {
    font-weight: 700;
    font-size: 18px;
    color: var(--cvc-primary);
}

.cvc-slider-label-text {
    color: var(--cvc-gray);
    font-weight: 500;
}

.cvc-slider-small {
    height: 6px;
}

.cvc-slider-value-small {
    text-align: center;
    margin-top: 8px;
    font-weight: 600;
    color: var(--cvc-primary);
}

/* ELEMENTS */
.cvc-element-box {
    padding: 20px;
    border: 2px solid var(--cvc-border);
    border-radius: 10px;
    margin-bottom: 15px;
    transition: all 0.2s;
}

.cvc-element-box:hover {
    border-color: var(--cvc-primary);
    box-shadow: var(--cvc-shadow);
}

.cvc-element-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.cvc-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.cvc-checkbox-wrapper input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.cvc-element-icon {
    font-size: 28px;
}

.cvc-element-name {
    font-weight: 700;
    font-size: 18px;
}

.cvc-element-slider {
    padding-top: 10px;
}

/* PRIVACY NOTICE */
.cvc-privacy-notice {
    background: #eff6ff;
    border-left: 4px solid var(--cvc-primary);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #1e40af;
}

.cvc-hint-inline {
    color: var(--cvc-gray);
    font-weight: 400;
    font-size: 12px;
    font-style: italic;
}

/* PATIENT CODE DISPLAY */
.cvc-code-display {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 2px solid #10b981;
    border-radius: 12px;
    text-align: center;
}

.cvc-code-label {
    font-size: 13px;
    color: #065f46;
    margin-bottom: 8px;
    font-weight: 600;
}

.cvc-code-value {
    font-size: 32px;
    font-weight: 800;
    color: #065f46;
    font-family: 'Courier New', monospace;
    letter-spacing: 3px;
}

/* MERIDIANS */
.cvc-meridian-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    gap: 12px;
}

.cvc-meridian-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 15px 20px;
    border: 2px solid var(--cvc-border);
    border-radius: 10px;
    transition: all 0.2s;
    background: white;
}

.cvc-meridian-item:hover {
    border-color: var(--cvc-gray);
    box-shadow: var(--cvc-shadow);
}

.cvc-meridian-item.active {
    border-color: var(--cvc-primary);
    background: #eff6ff;
}

.cvc-meridian-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.cvc-meridian-name {
    font-weight: 600;
    font-size: 15px;
}

.cvc-meridian-radios {
    display: flex;
    gap: 20px;
    align-items: center;
}

.cvc-radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
    white-space: nowrap;
}

.cvc-radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.cvc-radio-label input[type="radio"]:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

/* RECORDER */
.cvc-recorder-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 40px;
    color: white;
    text-align: center;
}

.cvc-recorder-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.cvc-recorder-icon {
    font-size: 64px;
}

.cvc-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

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

.cvc-recorder-text {
    font-size: 18px;
    margin: 0;
    font-weight: 500;
}

.cvc-audio-player {
    width: 100%;
    max-width: 400px;
    margin: 10px 0;
}

/* PAUSED ACTIONS */
.cvc-paused-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
    width: 100%;
}

.cvc-btn-resume {
    background-color: #10b981 !important;
    color: #ffffff !important;
    border: none !important;
}

.cvc-btn-resume:hover {
    background-color: #059669 !important;
}

.cvc-btn-restart {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
}

.cvc-btn-restart:hover {
    background-color: rgba(255, 255, 255, 0.25) !important;
}

/* BUTTONS */
.cvc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    box-sizing: border-box;
}

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

.cvc-btn-primary {
    background: var(--cvc-primary);
    color: white;
}

.cvc-btn-primary:hover:not(:disabled) {
    background: var(--cvc-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--cvc-shadow-lg);
}

.cvc-btn-record {
    background: white;
    color: var(--cvc-primary);
}

.cvc-btn-record:hover:not(:disabled) {
    background: #f3f4f6;
}

.cvc-btn-stop {
    background: var(--cvc-danger);
    color: white;
}

.cvc-btn-stop:hover:not(:disabled) {
    background: #dc2626;
}

.cvc-btn-secondary {
    background: white;
    color: var(--cvc-gray);
    border: 2px solid var(--cvc-border);
}

.cvc-btn-secondary:hover:not(:disabled) {
    background: var(--cvc-light-gray);
}

.cvc-btn-large {
    padding: 16px 32px;
    font-size: 17px;
}

.cvc-btn-icon {
    font-size: 20px;
}

/* SUBMIT */
.cvc-submit-wrapper {
    text-align: center;
    padding: 30px;
    box-sizing: border-box;
}

.cvc-submit-hint {
    margin: 15px 0 0 0;
    color: var(--cvc-gray);
    font-size: 14px;
}

/* RMS - AUTH & QUOTA WIDGET STYLES */
#cvc-auth-section {
    box-shadow: inset 0 0 10px rgba(0,0,0,0.02);
}

#cvc-login-code {
    font-family: monospace;
    font-size: 18px;
    letter-spacing: 2px;
}

#cvc-quota-bar {
    position: relative;
    overflow: hidden;
}

#cvc-quota-bar::after {
    content: "";
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
    animation: moveStripes 1s linear infinite;
}

@keyframes moveStripes {
    0% { background-position: 1rem 0; }
    100% { background-position: 0 0; }
}

/* ==========================================
   RESPONSIVE FIXES (MOBILE)
   ========================================== */
@media (max-width: 768px) {
    .cvc-wrapper {
        padding: 10px;
    }

    .cvc-header {
        padding: 30px 20px;
    }

    .cvc-title {
        font-size: 24px;
    }

    .cvc-subtitle {
        font-size: 14px;
    }

    .cvc-section {
        padding: 20px;
    }

    .cvc-section-title {
        font-size: 18px;
    }

    .cvc-grid-2 {
        grid-template-columns: 1fr;
    }

    .cvc-slider-container {
        flex-direction: column;
        gap: 10px;
    }

    .cvc-slider-left,
    .cvc-slider-right {
        min-width: auto;
        text-align: center;
    }
    
    /* Meridians Overflow Fix */
    .cvc-meridian-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px;
    }
    
    .cvc-meridian-radios {
        width: 100%;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 5px;
        justify-content: flex-start;
    }
    
    /* Recording & Paused Area Fixes */
    .cvc-recorder-box {
        padding: 30px 15px;
    }
    
    .cvc-paused-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .cvc-paused-actions .cvc-btn {
        width: 100%;
    }
    
    /* Submit Area Fixes */
    .cvc-submit-wrapper {
        padding: 20px 10px;
    }
    
    .cvc-btn-large {
        width: 100%;
    }
    
    .cvc-logged-in-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cvc-quota-info {
        max-width: 100%;
    }
    
    /* Admin/Lookup Layout fixes */
    .cvc-diagnosis-meta {
        grid-template-columns: 1fr;
    }
    
    .cvc-elements-grid {
        grid-template-columns: 1fr;
    }
    
    .cvc-meridians-display {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   DIAGNOSIS DISPLAY - BEAUTIFUL VIEWER (For Lookup)
   ========================================== */
.cvc-diagnosis-container {
    margin: 20px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--cvc-shadow-lg);
}

.cvc-diagnosis-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
}

.cvc-diagnosis-header h2 {
    margin: 0 0 20px 0;
    font-size: 28px;
    font-weight: 700;
}

.cvc-diagnosis-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.cvc-diagnosis-meta div {
    font-size: 14px;
}

.cvc-diagnosis-meta strong {
    opacity: 0.9;
}

.cvc-diagnosis-section {
    padding: 30px;
    border-bottom: 1px solid var(--cvc-border);
}

.cvc-diagnosis-section:last-child {
    border-bottom: none;
}

.cvc-diagnosis-section h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: var(--cvc-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* AXIS BARS */
.cvc-axis-display {
    margin-bottom: 25px;
    padding: 15px;
    background: #fafafa;
    border-radius: 10px;
}

.cvc-axis-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cvc-axis-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--cvc-dark);
}

.cvc-axis-value {
    font-weight: 700;
    font-size: 14px;
    padding: 4px 12px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--cvc-shadow);
}

.cvc-axis-bar {
    position: relative;
    height: 12px;
    border-radius: 10px;
    margin: 12px 0 8px 0;
}

.cvc-bar-blue-red {
    background: linear-gradient(to right, #3b82f6 0%, #e5e7eb 50%, #ef4444 100%);
}

.cvc-bar-amber-blue {
    background: linear-gradient(to right, #f59e0b 0%, #e5e7eb 50%, #3b82f6 100%);
}

.cvc-bar-gray-purple {
    background: linear-gradient(to right, #6b7280 0%, #e5e7eb 50%, #a855f7 100%);
}

.cvc-bar-purple-orange {
    background: linear-gradient(to right, #a855f7 0%, #e5e7eb 50%, #f97316 100%);
}

.cvc-axis-marker {
    position: absolute;
    top: 50%;
    width: 22px;
    height: 22px;
    background: white;
    border: 3px solid var(--cvc-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cvc-axis-ends {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--cvc-gray);
    font-weight: 500;
}

/* FIVE ELEMENTS CARDS */
.cvc-elements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.cvc-element-card {
    padding: 20px;
    background: white;
    border: 3px solid;
    border-radius: 12px;
    box-shadow: var(--cvc-shadow);
}

.cvc-element-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.cvc-element-icon-large {
    font-size: 36px;
}

.cvc-element-name-large {
    font-size: 22px;
    font-weight: 700;
}

.cvc-element-status {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.cvc-element-score-display {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
}

.cvc-element-bar {
    position: relative;
    height: 14px;
    border-radius: 8px;
    margin-bottom: 8px;
    margin-top: 5px;
}

.cvc-element-bar::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -4px;
    bottom: -4px;
    width: 2px;
    background: #1f2937;
    transform: translateX(-50%);
    z-index: 2;
}

.cvc-element-marker {
    position: absolute;
    top: 50%;
    width: 22px;
    height: 22px;
    background: white;
    border: 3px solid;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    z-index: 3;
}

.cvc-element-scale {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--cvc-gray);
    font-weight: 500;
    margin-top: 5px;
}

.cvc-element-scale span:nth-child(2) {
    font-weight: 700;
    color: #374151;
}

/* MERIDIANS DISPLAY */
.cvc-meridians-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.cvc-meridian-display-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 2px solid;
    border-radius: 10px;
}

.cvc-meridian-icon {
    font-size: 24px;
}

.cvc-meridian-info {
    flex: 1;
}

.cvc-meridian-display-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--cvc-dark);
}

.cvc-meridian-display-status {
    font-weight: 600;
    font-size: 13px;
    margin-top: 2px;
}

/* CLINICAL NOTES & AUDIO */
.cvc-clinical-notes {
    padding: 20px;
    background: #f9fafb;
    border-left: 4px solid var(--cvc-primary);
    border-radius: 8px;
    line-height: 1.6;
    white-space: pre-wrap;
    font-size: 15px;
}

.cvc-audio-info {
    padding: 20px;
    background: #f3f4f6;
    border-radius: 10px;
    text-align: center;
}
/* ============================================================
   CATEGORICAL 2-STEP BUTTONS — Professional Diagnosis UI
   Each axis has unique color identity (subtle in inactive state,
   vivid when selected). Mobile-first responsive.
   ============================================================ */

.cvc-cat-axis {
    margin: 18px 0;
    padding: 18px 18px 16px 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

/* Subtle accent stripe on left side for each axis */
.cvc-cat-axis::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #cbd5e1;
    transition: background 0.3s ease;
}

.cvc-cat-axis:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
    border-color: #d1d5db;
}

/* Per-axis accent stripes (subtle identity) */
.cvc-cat-axis[data-axis="strength"]::before { background: linear-gradient(180deg, #3b82f6 0%, #ef4444 100%); }
.cvc-cat-axis[data-axis="temperature"]::before { background: linear-gradient(180deg, #06b6d4 0%, #f97316 100%); }
.cvc-cat-axis[data-axis="moisture"]::before { background: linear-gradient(180deg, #d97706 0%, #14b8a6 100%); }
.cvc-cat-axis[data-axis="mobility"]::before { background: linear-gradient(180deg, #64748b 0%, #8b5cf6 100%); }
.cvc-cat-axis[data-axis="location"]::before { background: linear-gradient(180deg, #a855f7 0%, #f97316 100%); }
.cvc-cat-axis[data-axis="yin_yang"]::before { background: linear-gradient(180deg, #2563eb 0%, #eab308 100%); }
.cvc-cat-axis[data-axis="wood_score"]::before { background: #10b981; }
.cvc-cat-axis[data-axis="fire_score"]::before { background: #ef4444; }
.cvc-cat-axis[data-axis="earth_score"]::before { background: #d97706; }
.cvc-cat-axis[data-axis="metal_score"]::before { background: #94a3b8; }
.cvc-cat-axis[data-axis="water_score"]::before { background: #3b82f6; }

.cvc-cat-axis-element {
    background: linear-gradient(180deg, #ffffff 0%, #fdfdfd 100%);
}

.cvc-cat-axis-title {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 15px;
    color: #1f2937;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.cvc-cat-axis-title .cvc-element-icon {
    font-size: 22px;
    margin-right: 8px;
    line-height: 1;
    flex-shrink: 0;
}

.cvc-section-hint {
    color: #6b7280;
    font-size: 13px;
    font-style: italic;
    margin: -4px 0 18px 0;
    line-height: 1.4;
}

/* Step 1: Direction row (3 buttons) */
.cvc-cat-axis .cvc-cat-direction-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

/* Strong specificity: override WordPress theme button styles */
/* Base: subtle soft background that hints at button purpose, even before selection */
.cvc-cat-axis button.cvc-cat-btn,
.cvc-cat-axis .cvc-cat-direction-row button {
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%) !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 14px 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    cursor: pointer !important;
    transition: transform 0.12s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease !important;
    -webkit-tap-highlight-color: transparent !important;
    min-height: 64px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1.2 !important;
    position: relative !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
    text-shadow: none !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Inactive state: subtle tint hints at the button's identity */
.cvc-cat-axis button.cvc-cat-btn-neg:not(.cvc-cat-active) {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
    color: #475569 !important;
}

.cvc-cat-axis button.cvc-cat-btn-neutral:not(.cvc-cat-active) {
    background: linear-gradient(180deg, #f7fef9 0%, #ecfdf5 100%) !important;
    color: #065f46 !important;
}

.cvc-cat-axis button.cvc-cat-btn-pos:not(.cvc-cat-active) {
    background: linear-gradient(180deg, #fef9f7 0%, #fef2f2 100%) !important;
    color: #7c2d12 !important;
}

/* Per-axis inactive tints for stronger visual identity */
.cvc-cat-axis[data-axis="temperature"] button.cvc-cat-btn-neg:not(.cvc-cat-active) {
    background: linear-gradient(180deg, #f0fdff 0%, #ecfeff 100%) !important;
    color: #155e75 !important;
}
.cvc-cat-axis[data-axis="temperature"] button.cvc-cat-btn-pos:not(.cvc-cat-active) {
    background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%) !important;
    color: #9a3412 !important;
}

.cvc-cat-axis[data-axis="moisture"] button.cvc-cat-btn-neg:not(.cvc-cat-active) {
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%) !important;
    color: #92400e !important;
}
.cvc-cat-axis[data-axis="moisture"] button.cvc-cat-btn-pos:not(.cvc-cat-active) {
    background: linear-gradient(180deg, #f0fdfa 0%, #ccfbf1 100%) !important;
    color: #115e59 !important;
}

.cvc-cat-axis[data-axis="mobility"] button.cvc-cat-btn-neg:not(.cvc-cat-active) {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
    color: #475569 !important;
}
.cvc-cat-axis[data-axis="mobility"] button.cvc-cat-btn-pos:not(.cvc-cat-active) {
    background: linear-gradient(180deg, #faf5ff 0%, #f3e8ff 100%) !important;
    color: #6b21a8 !important;
}

.cvc-cat-axis[data-axis="location"] button.cvc-cat-btn-neg:not(.cvc-cat-active) {
    background: linear-gradient(180deg, #faf5ff 0%, #f3e8ff 100%) !important;
    color: #6b21a8 !important;
}
.cvc-cat-axis[data-axis="location"] button.cvc-cat-btn-pos:not(.cvc-cat-active) {
    background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%) !important;
    color: #9a3412 !important;
}

.cvc-cat-axis[data-axis="yin_yang"] button.cvc-cat-btn-neg:not(.cvc-cat-active) {
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%) !important;
    color: #1e40af !important;
}
.cvc-cat-axis[data-axis="yin_yang"] button.cvc-cat-btn-pos:not(.cvc-cat-active) {
    background: linear-gradient(180deg, #fefce8 0%, #fef9c3 100%) !important;
    color: #854d0e !important;
}

.cvc-cat-axis button.cvc-cat-btn:hover,
.cvc-cat-axis .cvc-cat-direction-row button:hover {
    border-color: #94a3b8 !important;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-1px) !important;
}

.cvc-cat-axis button.cvc-cat-btn:active {
    transform: scale(0.97) !important;
}

.cvc-cat-axis .cvc-cat-btn-main {
    font-size: 14px !important;
    font-weight: 700 !important;
    display: block !important;
    color: inherit !important;
}

.cvc-cat-btn-sub {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.7;
    margin-top: 3px;
    display: block;
}

/* ============================================================
   PER-AXIS COLOR IDENTITY (Active states)
   Each diagnostic axis has a unique color palette so the
   visual feedback echoes the clinical concept being assessed.
   Using strong specificity (button + class combo) and !important
   to override WordPress theme button styles.
   ============================================================ */

/* Default neutral (Balanced) — emerald green */
.cvc-cat-axis button.cvc-cat-btn.cvc-cat-active.cvc-cat-active-neutral,
.cvc-cat-axis .cvc-cat-direction-row button.cvc-cat-active.cvc-cat-active-neutral {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%) !important;
    border-color: #10b981 !important;
    color: #064e3b !important;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.22), inset 0 1px 0 rgba(255,255,255,0.5) !important;
}

/* Default negative (Xu / Han / etc.) — sky/cyan blue */
.cvc-cat-axis button.cvc-cat-btn.cvc-cat-active.cvc-cat-active-neg,
.cvc-cat-axis .cvc-cat-direction-row button.cvc-cat-active.cvc-cat-active-neg {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
    border-color: #3b82f6 !important;
    color: #1e3a8a !important;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.22), inset 0 1px 0 rgba(255,255,255,0.5) !important;
}

/* Default positive (Shi / Re / etc.) — warm amber-red */
.cvc-cat-axis button.cvc-cat-btn.cvc-cat-active.cvc-cat-active-pos,
.cvc-cat-axis .cvc-cat-direction-row button.cvc-cat-active.cvc-cat-active-pos {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%) !important;
    border-color: #ef4444 !important;
    color: #7f1d1d !important;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.22), inset 0 1px 0 rgba(255,255,255,0.5) !important;
}

/* Per-axis overrides */

/* Temperature: Han (icy cyan) ↔ Re (hot orange-red) */
.cvc-cat-axis[data-axis="temperature"] button.cvc-cat-btn.cvc-cat-active.cvc-cat-active-neg {
    background: linear-gradient(135deg, #cffafe 0%, #a5f3fc 100%) !important;
    border-color: #06b6d4 !important;
    color: #164e63 !important;
    box-shadow: 0 4px 10px rgba(6, 182, 212, 0.25) !important;
}
.cvc-cat-axis[data-axis="temperature"] button.cvc-cat-btn.cvc-cat-active.cvc-cat-active-pos {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%) !important;
    border-color: #f97316 !important;
    color: #7c2d12 !important;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.25) !important;
}

/* Moisture: Zao (golden brown) ↔ Damp (deep teal) */
.cvc-cat-axis[data-axis="moisture"] button.cvc-cat-btn.cvc-cat-active.cvc-cat-active-neg {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
    border-color: #d97706 !important;
    color: #78350f !important;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.22) !important;
}
.cvc-cat-axis[data-axis="moisture"] button.cvc-cat-btn.cvc-cat-active.cvc-cat-active-pos {
    background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%) !important;
    border-color: #14b8a6 !important;
    color: #134e4a !important;
    box-shadow: 0 4px 10px rgba(20, 184, 166, 0.22) !important;
}

/* Mobility: Stagnant (slate gray) ↔ Fluctuating (purple) */
.cvc-cat-axis[data-axis="mobility"] button.cvc-cat-btn.cvc-cat-active.cvc-cat-active-neg {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%) !important;
    border-color: #64748b !important;
    color: #1e293b !important;
    box-shadow: 0 4px 10px rgba(100, 116, 139, 0.25) !important;
}
.cvc-cat-axis[data-axis="mobility"] button.cvc-cat-btn.cvc-cat-active.cvc-cat-active-pos {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%) !important;
    border-color: #8b5cf6 !important;
    color: #4c1d95 !important;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.22) !important;
}
.cvc-cat-axis[data-axis="mobility"] button.cvc-cat-btn.cvc-cat-active.cvc-cat-active-neutral {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%) !important;
    border-color: #10b981 !important;
    color: #064e3b !important;
}

/* Location: Li / Interior (deep purple) ↔ Biao / Exterior (sun orange) */
.cvc-cat-axis[data-axis="location"] button.cvc-cat-btn.cvc-cat-active.cvc-cat-active-neg {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%) !important;
    border-color: #a855f7 !important;
    color: #581c87 !important;
    box-shadow: 0 4px 10px rgba(168, 85, 247, 0.22) !important;
}
.cvc-cat-axis[data-axis="location"] button.cvc-cat-btn.cvc-cat-active.cvc-cat-active-pos {
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%) !important;
    border-color: #f97316 !important;
    color: #7c2d12 !important;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.22) !important;
}

/* Yin/Yang: Yin (deep blue) ↔ Yang (golden yellow) */
.cvc-cat-axis[data-axis="yin_yang"] button.cvc-cat-btn.cvc-cat-active.cvc-cat-active-neg {
    background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%) !important;
    border-color: #2563eb !important;
    color: #1e3a8a !important;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25) !important;
}
.cvc-cat-axis[data-axis="yin_yang"] button.cvc-cat-btn.cvc-cat-active.cvc-cat-active-pos {
    background: linear-gradient(135deg, #fef3c7 0%, #fde047 100%) !important;
    border-color: #eab308 !important;
    color: #713f12 !important;
    box-shadow: 0 4px 10px rgba(234, 179, 8, 0.28) !important;
}

/* Step 2: Intensity row (2 buttons, appears when needed) */
.cvc-cat-axis .cvc-cat-intensity-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #cbd5e1;
    animation: cvc-cat-slide-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.cvc-cat-axis button.cvc-cat-int-btn,
.cvc-cat-axis .cvc-cat-intensity-row button {
    flex: 1 !important;
    background: #ffffff !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 12px 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #6b7280 !important;
    cursor: pointer !important;
    transition: transform 0.12s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease !important;
    -webkit-tap-highlight-color: transparent !important;
    min-height: 46px !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-shadow: none !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.cvc-cat-axis button.cvc-cat-int-btn:hover {
    border-color: #cbd5e1 !important;
    background: #f8fafc !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04) !important;
    color: #6b7280 !important;
}

.cvc-cat-axis button.cvc-cat-int-btn:active {
    transform: scale(0.97) !important;
}

/* Mild — softer amber */
.cvc-cat-axis button.cvc-cat-int-btn[data-intensity="mild"].cvc-cat-active {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
    border-color: #f59e0b !important;
    color: #78350f !important;
    box-shadow: 0 3px 8px rgba(245, 158, 11, 0.25) !important;
}

/* Severe — stronger red-orange */
.cvc-cat-axis button.cvc-cat-int-btn[data-intensity="severe"].cvc-cat-active {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%) !important;
    border-color: #dc2626 !important;
    color: #7f1d1d !important;
    box-shadow: 0 3px 8px rgba(220, 38, 38, 0.25) !important;
}

@keyframes cvc-cat-slide-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile responsive — extra polish for small screens */
/* Mobile responsive — tighten spacing and font sizes for narrow screens */
@media (max-width: 480px) {
    .cvc-cat-axis {
        padding: 14px 14px 12px 18px;
        margin: 14px 0;
    }
    .cvc-cat-axis::before {
        width: 3px;
    }
    .cvc-cat-axis button.cvc-cat-btn,
    .cvc-cat-axis .cvc-cat-direction-row button {
        padding: 11px 3px !important;
        min-height: 56px !important;
    }
    .cvc-cat-axis .cvc-cat-btn-main {
        font-size: 13px !important;
    }
    .cvc-cat-axis .cvc-cat-btn-sub {
        font-size: 10px !important;
    }
    .cvc-cat-axis .cvc-cat-direction-row {
        gap: 5px;
    }
    .cvc-cat-axis-title {
        font-size: 14px;
    }
    .cvc-cat-axis-title .cvc-element-icon {
        font-size: 20px;
    }
    .cvc-cat-axis button.cvc-cat-int-btn,
    .cvc-cat-axis .cvc-cat-intensity-row button {
        padding: 10px 4px !important;
        font-size: 12px !important;
        min-height: 42px !important;
    }
}

@media (max-width: 360px) {
    .cvc-cat-axis {
        padding: 12px 10px 10px 14px;
    }
    .cvc-cat-axis button.cvc-cat-btn,
    .cvc-cat-axis .cvc-cat-direction-row button {
        padding: 10px 2px !important;
        min-height: 52px !important;
    }
    .cvc-cat-axis .cvc-cat-btn-main {
        font-size: 12px !important;
    }
    .cvc-cat-axis .cvc-cat-btn-sub {
        font-size: 9px !important;
    }
    .cvc-cat-axis .cvc-cat-direction-row {
        gap: 4px;
    }
}

/* ============================================================
   WU XING PATTERNS — Ko / Sheng cycle multi-select cards
   ============================================================ */

.cvc-wuxing-cycle-block {
    margin-bottom: 24px;
}

.cvc-wuxing-cycle-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.cvc-wuxing-ko-header {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left: 4px solid #dc2626;
}

.cvc-wuxing-sheng-header {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left: 4px solid #16a34a;
}

.cvc-wuxing-cycle-icon {
    font-size: 28px;
    line-height: 1;
}

.cvc-wuxing-cycle-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
}

.cvc-wuxing-ko-header .cvc-wuxing-cycle-title {
    color: #7f1d1d;
}

.cvc-wuxing-sheng-header .cvc-wuxing-cycle-title {
    color: #064e3b;
}

.cvc-wuxing-cycle-sub {
    font-size: 12.5px;
    color: #6b7280;
    margin-top: 2px;
    font-style: italic;
}

.cvc-wuxing-pattern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px;
}

.cvc-wuxing-pattern-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}

.cvc-wuxing-pattern-card:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.cvc-wuxing-pattern-card:active {
    transform: scale(0.99);
}

.cvc-wuxing-pattern-checkbox {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin: 0;
    accent-color: #6b7280;
}

.cvc-wuxing-ko-card .cvc-wuxing-pattern-checkbox {
    accent-color: #dc2626;
}

.cvc-wuxing-sheng-card .cvc-wuxing-pattern-checkbox {
    accent-color: #16a34a;
}

/* Active (checked) state */
.cvc-wuxing-pattern-card:has(input:checked) {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.cvc-wuxing-ko-card:has(input:checked) {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #dc2626;
}

.cvc-wuxing-sheng-card:has(input:checked) {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #16a34a;
}

.cvc-wuxing-pattern-content {
    flex: 1;
    min-width: 0;
}

.cvc-wuxing-pattern-flow {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
}

.cvc-wuxing-pattern-elem {
    white-space: nowrap;
}

.cvc-wuxing-pattern-arrow {
    color: #9ca3af;
    font-size: 16px;
    font-weight: 700;
    margin: 0 2px;
}

.cvc-wuxing-ko-card:has(input:checked) .cvc-wuxing-pattern-arrow {
    color: #dc2626;
}

.cvc-wuxing-sheng-card:has(input:checked) .cvc-wuxing-pattern-arrow {
    color: #16a34a;
}

.cvc-wuxing-pattern-label {
    font-size: 11.5px;
    color: #6b7280;
    line-height: 1.3;
}

.cvc-wuxing-ko-card:has(input:checked) .cvc-wuxing-pattern-label {
    color: #7f1d1d;
}

.cvc-wuxing-sheng-card:has(input:checked) .cvc-wuxing-pattern-label {
    color: #064e3b;
}

@media (max-width: 480px) {
    .cvc-wuxing-pattern-grid {
        grid-template-columns: 1fr;
    }
    .cvc-wuxing-cycle-icon {
        font-size: 24px;
    }
    .cvc-wuxing-cycle-title {
        font-size: 14px;
    }
    .cvc-wuxing-pattern-flow {
        font-size: 13px;
    }
}

/* ============================================================
   DEMO MODE BANNER — practice page header
   ============================================================ */

.cvc-demo-banner {
    max-width: 900px;
    margin: 20px auto;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    gap: 18px;
    align-items: flex-start;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cvc-demo-banner-icon {
    font-size: 42px;
    line-height: 1;
    flex-shrink: 0;
}

.cvc-demo-banner-content {
    flex: 1;
}

.cvc-demo-banner-title {
    margin: 0 0 12px 0;
    color: #92400e;
    font-size: 22px;
    font-weight: 700;
}

.cvc-demo-quickstart {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
    color: #78350f;
}

.cvc-demo-quickstart strong {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}

.cvc-demo-quickstart ol {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.7;
}

.cvc-demo-quickstart ol li {
    margin-bottom: 4px;
}

.cvc-demo-banner-note {
    font-size: 13px;
    color: #78350f;
    font-style: italic;
    line-height: 1.5;
}

.cvc-demo-banner-note a {
    color: #1e40af;
    font-weight: 600;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .cvc-demo-banner {
        flex-direction: column;
        gap: 12px;
        padding: 18px;
    }
    .cvc-demo-banner-icon {
        font-size: 36px;
        text-align: center;
    }
    .cvc-demo-banner-title {
        font-size: 19px;
    }
}

/* ============================================================
   DEMO CTA — "Go to Official Form" button at bottom of demo page
   ============================================================ */

.cvc-demo-cta-section {
    max-width: 900px;
    margin: 30px auto;
    padding: 32px 24px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.cvc-demo-cta-title {
    margin: 0 0 8px 0;
    color: #064e3b;
    font-size: 22px;
    font-weight: 700;
}

.cvc-demo-cta-text {
    margin: 0 0 20px 0;
    color: #065f46;
    font-size: 15px;
    line-height: 1.5;
}

a.cvc-demo-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white !important;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

a.cvc-demo-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
    color: white !important;
    text-decoration: none !important;
}

a.cvc-demo-cta-button:active {
    transform: translateY(0);
}

.cvc-demo-cta-icon {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

@media (max-width: 600px) {
    .cvc-demo-cta-section {
        padding: 24px 16px;
        margin: 24px 12px;
    }
    .cvc-demo-cta-title {
        font-size: 18px;
    }
    a.cvc-demo-cta-button {
        padding: 14px 24px;
        font-size: 15px;
    }
}

/* ==========================================
   v5.6 ADDITIONS
   - Logged-in header layout (mobile-safe)
   - Workflow notice banner
   - Disconnect button styling
   ========================================== */

/* Logged-in welcome widget — flex layout that wraps cleanly on mobile */
.cvc-logged-in-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.cvc-logged-in-info {
    flex: 1;
    min-width: 220px;
}
.cvc-logged-in-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.cvc-quota-bar-wrapper {
    width: 100%;
    max-width: 300px;
    background: #dcfce7;
    height: 10px;
    border-radius: 5px;
    margin-top: 8px;
    overflow: hidden;
}

/* Lookup button (blue) and Disconnect button (white outlined) */
.cvc-btn-lookup {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: white !important;
}
.cvc-btn-lookup:hover {
    background: #2563eb !important;
    border-color: #2563eb !important;
}
.cvc-btn-disconnect {
    background: white !important;
    border-color: #16a34a !important;
    color: #16a34a !important;
}
.cvc-btn-disconnect:hover {
    background: #f0fdf4 !important;
}

/* ==========================================
   WORKFLOW NOTICE BANNER (When-to-fill instruction)
   ========================================== */
.cvc-workflow-notice {
    display: flex;
    align-items: stretch;
    gap: 18px;
    margin: 20px 0 25px 0;
    padding: 20px 22px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 5px solid #3b82f6;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
    position: relative;
    overflow: hidden;
}
.cvc-workflow-notice::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 100%;
    background: radial-gradient(circle at 100% 50%, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
    pointer-events: none;
}
.cvc-workflow-notice-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    font-size: 26px;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.15);
    border: 2px solid #bfdbfe;
}
.cvc-workflow-notice-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.cvc-workflow-notice-title {
    font-size: 12px;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.cvc-workflow-notice-text {
    font-size: 15px;
    color: #1e3a8a;
    line-height: 1.55;
}
.cvc-workflow-notice-text strong {
    color: #1e40af;
    background: rgba(255, 255, 255, 0.6);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 700;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .cvc-logged-in-header {
        flex-direction: column;
        align-items: stretch;
    }
    .cvc-logged-in-info {
        min-width: 0;
        width: 100%;
    }
    .cvc-logged-in-actions {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }
    .cvc-logged-in-actions .cvc-btn {
        width: 100%;
        text-align: center;
    }
    .cvc-quota-bar-wrapper {
        max-width: 100%;
    }

    /* Workflow notice on mobile: stack icon above content for clarity */
    .cvc-workflow-notice {
        gap: 12px;
        padding: 16px 16px;
        margin: 15px 0 20px 0;
    }
    .cvc-workflow-notice-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
    .cvc-workflow-notice-text {
        font-size: 14px;
    }
}

/* ==========================================
   v5.6: DIAGNOSIS DISPLAY (LOOKUP PAGE)
   Mirrors the admin modal design, which mirrors the form's visual language
   Uses .cvc-amod-* class names so both admin & lookup share the same look.
   ========================================== */
.cvc-amod-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 0 0 30px 0;
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-top: 20px;
}
.cvc-amod-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
}
.cvc-amod-header h2 {
    margin: 0 0 16px 0;
    font-size: 24px;
    color: white;
    font-weight: 700;
}
.cvc-amod-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    padding: 14px 18px;
    border-radius: 10px;
    color: white;
    font-size: 14px;
}
.cvc-amod-meta strong {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 2px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.cvc-amod-section {
    padding: 22px 30px;
}
.cvc-amod-section h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 14px 0;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Categorical button replication for read-only display */
.cvc-amod-axis {
    margin-bottom: 14px;
    padding: 14px 16px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.cvc-amod-axis-title {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 10px;
}
.cvc-amod-axis-title .cvc-amod-elem-icon {
    font-size: 20px;
    margin-right: 8px;
}
.cvc-amod-direction-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
}
.cvc-amod-btn {
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 6px;
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    opacity: 0.55;
}
.cvc-amod-btn-main {
    font-size: 13px;
    font-weight: 700;
    display: block;
}
.cvc-amod-btn-sub {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.75;
    margin-top: 2px;
}

/* Active states */
.cvc-amod-btn.cvc-amod-active { opacity: 1; }
.cvc-amod-btn.cvc-amod-active.cvc-amod-neutral {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #10b981;
    color: #064e3b;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.22);
}
.cvc-amod-btn.cvc-amod-active.cvc-amod-neg {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #3b82f6;
    color: #1e3a8a;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.22);
}
.cvc-amod-btn.cvc-amod-active.cvc-amod-pos {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #ef4444;
    color: #7f1d1d;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.22);
}

/* Per-axis colors */
.cvc-amod-axis[data-axis="temperature"] .cvc-amod-active.cvc-amod-neg { background: linear-gradient(135deg, #cffafe 0%, #a5f3fc 100%); border-color: #06b6d4; color: #164e63; }
.cvc-amod-axis[data-axis="temperature"] .cvc-amod-active.cvc-amod-pos { background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%); border-color: #f97316; color: #7c2d12; }
.cvc-amod-axis[data-axis="moisture"] .cvc-amod-active.cvc-amod-neg { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); border-color: #d97706; color: #78350f; }
.cvc-amod-axis[data-axis="moisture"] .cvc-amod-active.cvc-amod-pos { background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%); border-color: #14b8a6; color: #134e4a; }
.cvc-amod-axis[data-axis="mobility"] .cvc-amod-active.cvc-amod-neg { background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%); border-color: #64748b; color: #1e293b; }
.cvc-amod-axis[data-axis="mobility"] .cvc-amod-active.cvc-amod-pos { background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%); border-color: #8b5cf6; color: #4c1d95; }
.cvc-amod-axis[data-axis="location"] .cvc-amod-active.cvc-amod-neg { background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%); border-color: #a855f7; color: #581c87; }
.cvc-amod-axis[data-axis="location"] .cvc-amod-active.cvc-amod-pos { background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%); border-color: #f97316; color: #7c2d12; }
.cvc-amod-axis[data-axis="yin_yang"] .cvc-amod-active.cvc-amod-neg { background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%); border-color: #2563eb; color: #1e3a8a; }
.cvc-amod-axis[data-axis="yin_yang"] .cvc-amod-active.cvc-amod-pos { background: linear-gradient(135deg, #fef3c7 0%, #fde047 100%); border-color: #eab308; color: #713f12; }

/* Intensity row */
.cvc-amod-intensity-row {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #cbd5e1;
}
.cvc-amod-int {
    flex: 1;
    padding: 8px 6px;
    border-radius: 8px;
    border: 1.5px solid #e5e7eb;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    color: #9ca3af;
    opacity: 0.55;
}
.cvc-amod-int.cvc-amod-active { opacity: 1; }
.cvc-amod-int[data-i="mild"].cvc-amod-active {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
    color: #78350f;
}
.cvc-amod-int[data-i="severe"].cvc-amod-active {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    border-color: #dc2626;
    color: #7f1d1d;
}

/* Meridians grid */
.cvc-amod-meridians-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}
.cvc-amod-meridian {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: white;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
}
.cvc-amod-meridian-name {
    font-weight: 600;
    color: #1f2937;
}
.cvc-amod-meridian-status {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}
.cvc-amod-status-excess { background: #fee2e2; color: #991b1b; }
.cvc-amod-status-deficiency { background: #dbeafe; color: #1e40af; }
.cvc-amod-status-blocked { background: #fef3c7; color: #92400e; }

/* Wu Xing patterns */
.cvc-amod-wuxing-block { margin-bottom: 18px; }
.cvc-amod-wuxing-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 10px;
}
.cvc-amod-wuxing-ko {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left: 4px solid #dc2626;
}
.cvc-amod-wuxing-sheng {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left: 4px solid #16a34a;
}
.cvc-amod-wuxing-icon { font-size: 22px; }
.cvc-amod-wuxing-title { font-size: 14px; font-weight: 700; }
.cvc-amod-wuxing-ko .cvc-amod-wuxing-title { color: #7f1d1d; }
.cvc-amod-wuxing-sheng .cvc-amod-wuxing-title { color: #064e3b; }
.cvc-amod-pattern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}
.cvc-amod-pattern-card {
    padding: 10px 12px;
    background: white;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}
.cvc-amod-pattern-card-ko {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #dc2626;
}
.cvc-amod-pattern-card-sheng {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #16a34a;
}
.cvc-amod-pattern-arrow-ko { color: #dc2626; font-weight: 700; margin: 0 4px; }
.cvc-amod-pattern-arrow-sheng { color: #16a34a; font-weight: 700; margin: 0 4px; }
.cvc-amod-pattern-label {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.75;
    margin-top: 2px;
}

/* Notes & no-data */
.cvc-amod-notes {
    padding: 16px 18px;
    background: white;
    border-left: 4px solid #3b82f6;
    border-radius: 6px;
    line-height: 1.6;
    white-space: pre-wrap;
    font-size: 14px;
    color: #1f2937;
}
.cvc-amod-empty {
    color: #9ca3af;
    font-style: italic;
    padding: 12px;
    text-align: center;
    font-size: 13px;
}

/* Audio */
.cvc-amod-audio {
    padding: 16px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    text-align: center;
}
.cvc-amod-audio audio { width: 100%; max-width: 500px; }

/* Mobile adjustments for diagnosis display */
@media (max-width: 600px) {
    .cvc-amod-header { padding: 22px 18px; }
    .cvc-amod-header h2 { font-size: 20px; }
    .cvc-amod-section { padding: 18px 16px; }
    .cvc-amod-meta { grid-template-columns: 1fr 1fr; }
    .cvc-amod-btn { min-height: 56px; padding: 8px 4px; }
    .cvc-amod-btn-main { font-size: 12px; }
    .cvc-amod-btn-sub { font-size: 9px; }
    .cvc-amod-meridians-grid { grid-template-columns: 1fr; }
    .cvc-amod-pattern-grid { grid-template-columns: 1fr; }
}
