/* ===== پالت رنگی پنل ===== */
.clinic-panel-container {
    direction: rtl;
    font-family: inherit;
    background: linear-gradient(180deg, #eef2ff 0%, #f3f6fb 100%);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.08);
    max-width: 1000px;
    margin: 0 auto;
}

.cp-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 20px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.25);
}

.cp-eyebrow {
    display: inline-block;
    font-size: 13px;
    color: #e0e7ff;
    background: rgba(255,255,255,0.15);
    padding: 4px 14px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.cp-header h1 { font-size: 28px; margin: 5px 0; color: #fff; }
.cp-header h3 { font-size: 20px; margin: 5px 0; color: #e0e7ff; font-weight: 400; }

.cp-doctor-bio {
    margin-top: 20px;
    padding: 16px 18px;
    background-color: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 10px;
    text-align: right;
    backdrop-filter: blur(2px);
}
.cp-doctor-bio h4 { margin: 0 0 8px; font-size: 16px; color: #fff; }
.cp-doctor-bio p { color: #eef2ff; margin: 0; line-height: 1.9; }

.cp-info {
    margin-top: 22px;
    font-size: 14px;
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}
.cp-info span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    padding: 6px 14px;
    border-radius: 999px;
}

.cp-expired-box {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-radius: 12px;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* پنل انتخاب آزمون و جستجو */
.cp-panel-card {
    background: #fff;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 2px 14px rgba(79, 70, 229, 0.08);
    margin-bottom: 30px;
    border: 1px solid #eef0ff;
}

.dec-search-wrapper { margin-bottom: 25px; }
.dec-search-input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #c7d2fe;
    border-radius: 10px;
    font-size: 16px;
    box-sizing: border-box;
    background: #f8f9ff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.dec-search-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
    background: #fff;
}

.dec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.dec-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9ff 100%);
    border: 1px solid #e0e4fc;
    border-radius: 12px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.dec-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.15);
    border-color: #a5b4fc;
}

.dec-exam-code {
    display: inline-block;
    font-size: 12px;
    color: #4f46e5;
    background: #eef2ff;
    padding: 3px 12px;
    border-radius: 999px;
    margin-bottom: 8px;
    font-weight: 600;
}
.dec-card h3 { font-size: 19px; margin: 5px 0 15px; color: #1e1b4b; }
.dec-card-spacer { flex-grow: 1; }

.dec-btn {
    display: inline-block;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #fff;
    padding: 11px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}
.dec-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35);
}

/* ورود کد کاربری */
.dec-code-box {
    background: #fff;
    border-radius: 14px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.1);
    max-width: 500px;
    margin: 40px auto;
    border: 1px solid #eef0ff;
}
.dec-code-box h3 { font-size: 24px; margin: 0 0 15px; color: #312e81; }
.dec-code-box p { font-size: 15px; color: #6b7280; margin-bottom: 20px; }
.dec-code-box .dec-code-help {
    font-size: 13px;
    line-height: 1.9;
    color: #666;
}
.dec-code-error {
    color: #b91c1c !important;
    font-size: 13px !important;
    margin: 10px 0 0 !important;
}
.dec-code-input {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid #c7d2fe;
    border-radius: 10px;
    font-size: 16px;
    box-sizing: border-box;
    background: #f8f9ff;
}
.dec-code-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
    background: #fff;
}

/* استپر فرم دو مرحله‌ای */
.dec-form-shell {
    background: #fff;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.1);
    border: 1px solid #eef0ff;
}
.dec-stepper {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    padding-bottom: 18px;
    border-bottom: 1px solid #eef0ff;
}
.dec-step {
    font-size: 14px;
    color: #9ca3af;
    font-weight: 500;
    padding: 8px 18px;
    border-radius: 999px;
    background: #f3f4f6;
}
.dec-step.active {
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
}

/* نمایش خطاهای فیلدهای الزامی در فرم‌های Gravity Forms */
.clinic-panel-container .gform_wrapper .gform_validation_errors,
.clinic-panel-container .gform_wrapper .validation_error {
    margin: 0 0 24px;
    padding: 16px 18px;
    border: 1px solid #fecaca;
    border-right: 5px solid #dc2626;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff1f2, #fff7ed);
    color: #991b1b;
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.09);
}

.clinic-panel-container .gform_wrapper .gform_validation_errors > h2,
.clinic-panel-container .gform_wrapper .validation_error {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.8;
}

.clinic-panel-container .gform_wrapper .gform_validation_errors ol {
    margin: 10px 0 0;
    padding: 0 20px 0 0;
}

.clinic-panel-container .gform_wrapper .gform_validation_errors a {
    color: #b91c1c;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.clinic-panel-container .gform_wrapper .gfield.gfield_error,
.clinic-panel-container .gform_wrapper .gfield_error.cp-field-needs-attention {
    position: relative;
    margin: 18px 0;
    padding: 16px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background: #fffafa;
    box-shadow: 0 5px 16px rgba(220, 38, 38, 0.08);
}

.clinic-panel-container .gform_wrapper .gfield.gfield_error .gfield_label,
.clinic-panel-container .gform_wrapper .gfield.gfield_error legend {
    color: #b91c1c;
    font-weight: 700;
}

.clinic-panel-container .gform_wrapper .gfield.gfield_error .gfield_label::after,
.clinic-panel-container .gform_wrapper .gfield.gfield_error legend::after {
    content: 'نیاز به تکمیل';
    display: inline-block;
    margin-right: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

.clinic-panel-container .gform_wrapper .gfield.gfield_error input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.clinic-panel-container .gform_wrapper .gfield.gfield_error select,
.clinic-panel-container .gform_wrapper .gfield.gfield_error textarea,
.clinic-panel-container .gform_wrapper input[aria-invalid="true"],
.clinic-panel-container .gform_wrapper select[aria-invalid="true"],
.clinic-panel-container .gform_wrapper textarea[aria-invalid="true"] {
    border-color: #ef4444 !important;
    background-color: #fffafa !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

.clinic-panel-container .gform_wrapper .gfield.gfield_error input:focus,
.clinic-panel-container .gform_wrapper .gfield.gfield_error select:focus,
.clinic-panel-container .gform_wrapper .gfield.gfield_error textarea:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.18) !important;
}

.clinic-panel-container .gform_wrapper .gfield_validation_message,
.clinic-panel-container .gform_wrapper .validation_message {
    display: block;
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.7;
}

/* پیام پایان آزمون */
.cp-form-success {
    max-width: 560px;
    margin: 32px auto;
    padding: 36px 28px;
    border: 1px solid #bbf7d0;
    border-radius: 16px;
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    color: #166534;
    text-align: center;
    box-shadow: 0 10px 28px rgba(22, 101, 52, 0.1);
}

.cp-form-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
}

.cp-form-success h2 {
    margin: 0 0 8px;
    color: #166534;
    font-size: 22px;
}

.cp-form-success p {
    margin: 0 0 22px;
    color: #15803d;
}

.cp-form-tracking-code {
    display: inline-block;
    margin: 0 0 22px !important;
    padding: 10px 14px;
    border: 1px dashed #4ade80;
    border-radius: 10px;
    background: #fff;
    color: #166534 !important;
}

.cp-form-tracking-code strong {
    margin-right: 6px;
    color: #14532d;
    font-size: 16px;
    letter-spacing: 0.04em;
}

/* ورود و داشبورد اختصاصی متخصص */
.cp-dashboard-login-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.1));
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 5px 14px rgba(30, 27, 75, 0.18);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.cp-dashboard-login-link:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(30, 27, 75, 0.28);
}

.cp-dashboard-login-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    color: #5b21b6;
    font-size: 14px;
    line-height: 1;
}

.clinic-dashboard,
.cp-dashboard-login-box {
    direction: rtl;
    max-width: 1120px;
    margin: 0 auto;
    font-family: inherit;
}

.cp-dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 30px;
    border-radius: 18px;
    background: linear-gradient(135deg, #312e81, #6d28d9);
    color: #fff;
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.22);
}

.cp-dashboard-eyebrow {
    display: inline-block;
    margin-bottom: 9px;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #e0e7ff;
    font-size: 12px;
}

.cp-dashboard-header h1 {
    margin: 0;
    color: #fff;
    font-size: 28px;
}

.cp-dashboard-header p {
    margin: 8px 0 0;
    color: #e0e7ff;
}

.cp-dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.cp-dashboard-link {
    display: inline-block;
    padding: 9px 13px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 9px;
    color: #fff !important;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}

.cp-dashboard-link:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.cp-dashboard-logout {
    border-color: rgba(254, 202, 202, 0.75);
    color: #fee2e2 !important;
}

.cp-dashboard-summary {
    margin: 22px 0;
    padding: 20px 24px;
    border: 1px solid #ddd6fe;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(79, 70, 229, 0.07);
}

.cp-dashboard-summary strong {
    display: inline-block;
    margin-left: 8px;
    color: #5b21b6;
    font-size: 30px;
    line-height: 1;
}

.cp-dashboard-summary span {
    color: #4c1d95;
    font-weight: 700;
}

.cp-dashboard-summary p {
    margin: 10px 0 0;
    color: #6b7280;
    font-size: 14px;
}

.cp-dashboard-summary p span {
    margin-right: 5px;
    color: #7c3aed;
    font-size: 12px;
}

.cp-dashboard-search-form {
    display: block;
    margin: 0 0 20px;
    padding: 16px;
    border: 1px solid #e0e7ff;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.06);
}

.cp-dashboard-search-form label {
    display: block;
    margin-bottom: 8px;
    color: #4c1d95;
    font-size: 13px;
    font-weight: 700;
}

.cp-dashboard-search-form > div {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 8px;
}

.cp-dashboard-search-form input {
    flex: 1;
    min-width: 180px;
    padding: 10px 12px;
    border: 1px solid #c7d2fe;
    border-radius: 9px;
    background: #fafaff;
    font: inherit;
}

.cp-dashboard-search-form input:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.14);
}

.cp-dashboard-search-form button,
.cp-dashboard-search-form a {
    padding: 10px 14px;
    border: 0;
    border-radius: 9px;
    background: #5b21b6;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.cp-dashboard-search-form a {
    background: #f3f4f6;
    color: #4b5563;
}

.cp-data-table-wrap,
.cp-admin-table-wrap {
    overflow-x: auto;
    border: 1px solid #e0e7ff;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.07);
}

.cp-data-table {
    width: 100%;
    min-width: 880px;
    border-collapse: collapse;
    background: #fff;
    color: #1f2937;
    text-align: right;
}

.cp-data-table th,
.cp-data-table td {
    padding: 13px 15px;
    border-bottom: 1px solid #eef2ff;
    vertical-align: top;
    font-size: 13px;
    line-height: 1.8;
}

.cp-data-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f5f3ff;
    color: #4c1d95;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.cp-data-table tbody tr:nth-child(even) {
    background: #fcfcff;
}

.cp-data-table tbody tr:hover {
    background: #f5f3ff;
}

.cp-data-table td:first-child {
    color: #5b21b6;
    font-weight: 700;
    white-space: nowrap;
}

.cp-patient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 18px;
}

.cp-patient-card {
    overflow: hidden;
    border: 1px solid #e0e7ff;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.08);
}

.cp-patient-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 17px 18px;
    border-bottom: 1px solid #e0e7ff;
    background: linear-gradient(135deg, #f5f3ff, #eef2ff);
}

.cp-patient-card-header > div:first-child > span,
.cp-patient-exam-meta span {
    display: block;
    color: #6b7280;
    font-size: 11px;
}

.cp-patient-card-header strong {
    display: block;
    margin-top: 4px;
    color: #4c1d95;
    font-size: 15px;
}

.cp-patient-exam-meta {
    max-width: 53%;
    color: #312e81;
    text-align: left;
}

.cp-patient-exam-meta span {
    color: #312e81;
    font-weight: 700;
}

.cp-patient-exam-meta time {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    font-size: 11px;
}

.cp-patient-fields {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 8px 18px 16px;
}

.cp-patient-fields > div {
    padding: 11px 0;
    border-bottom: 1px dashed #e5e7eb;
}

.cp-patient-fields > div:last-child {
    border-bottom: 0;
}

.cp-patient-fields dt {
    margin-bottom: 4px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.cp-patient-fields dd {
    margin: 0;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.8;
    word-break: break-word;
}

.cp-dashboard-login-box,
.cp-dashboard-empty {
    padding: 34px 28px;
    border: 1px solid #ddd6fe;
    border-radius: 16px;
    background: #fff;
    color: #312e81;
    text-align: center;
    box-shadow: 0 8px 22px rgba(79, 70, 229, 0.08);
}

.cp-dashboard-login-box {
    max-width: 520px;
    margin-top: 50px;
}

.cp-dashboard-login-box h2,
.cp-dashboard-empty h2 {
    margin: 0 0 10px;
    color: #312e81;
    font-size: 22px;
}

.cp-dashboard-login-box p,
.cp-dashboard-empty p {
    margin: 0 0 22px;
    color: #6b7280;
    line-height: 1.9;
}

.cp-dashboard-empty {
    margin-top: 20px;
}

.cp-dashboard-access-denied {
    border-color: #fecaca;
}

.cp-dashboard-access-denied h2 {
    color: #991b1b;
}

/* گزارشات مدیریتی */
.cp-admin-report {
    max-width: 1420px;
}

.cp-admin-report-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 24px 0 18px;
    padding: 24px 26px;
    border-radius: 15px;
    background: linear-gradient(135deg, #312e81, #6d28d9);
    color: #fff;
    box-shadow: 0 9px 24px rgba(79, 70, 229, 0.18);
}

.cp-admin-report-heading span {
    color: #ddd6fe;
    font-size: 12px;
}

.cp-admin-report-heading h1 {
    margin: 5px 0;
    color: #fff;
    font-size: 26px;
}

.cp-admin-report-heading p {
    margin: 0;
    color: #e0e7ff;
}

.cp-admin-report-heading .button {
    border-color: rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.cp-report-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 18px;
}

.cp-report-stat-grid > div {
    padding: 20px;
    border: 1px solid #ddd6fe;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.06);
}

.cp-report-stat-grid strong {
    display: block;
    margin-bottom: 6px;
    color: #5b21b6;
    font-size: 28px;
    line-height: 1;
}

.cp-report-stat-grid span {
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
}

.cp-report-card {
    margin: 0 0 18px;
    padding: 22px;
    border: 1px solid #e0e7ff;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(79, 70, 229, 0.06);
}

.cp-report-card h2 {
    margin: 0 0 18px;
    color: #312e81;
    font-size: 18px;
}

.cp-report-muted {
    margin: 0;
    color: #6b7280;
}

.cp-report-bars {
    display: grid;
    gap: 13px;
}

.cp-report-bar-row {
    display: grid;
    grid-template-columns: minmax(130px, 1.2fr) minmax(170px, 3fr) 42px;
    align-items: center;
    gap: 12px;
}

.cp-report-bar-label {
    overflow: hidden;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cp-report-bar-track {
    height: 12px;
    overflow: hidden;
    border-radius: 99px;
    background: #ede9fe;
}

.cp-report-bar-track span {
    display: block;
    min-width: 7%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7c3aed, #4f46e5);
}

.cp-report-bar-row strong {
    color: #4c1d95;
    text-align: center;
}

.cp-report-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.cp-report-toolbar form {
    flex: 1;
}

.cp-report-toolbar label {
    display: block;
    margin-bottom: 8px;
    color: #4c1d95;
    font-size: 13px;
    font-weight: 700;
}

.cp-report-toolbar form > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cp-report-toolbar input[type="search"] {
    flex: 1;
    min-width: 220px;
    padding: 8px 10px;
    border: 1px solid #c7d2fe;
    border-radius: 7px;
}

.clinic-dashboard .cp-report-toolbar button,
.clinic-dashboard .cp-report-toolbar form a {
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 38px;
    text-align: center;
    text-decoration: none;
}

.clinic-dashboard .cp-report-toolbar form a {
    background: #f3f4f6;
    color: #4b5563;
}

.cp-admin-data-table {
    min-width: 900px;
    margin: 0 !important;
    border: 0 !important;
}

.cp-admin-data-table th {
    color: #4c1d95 !important;
    font-weight: 800;
    white-space: nowrap;
}

.cp-admin-data-table td {
    vertical-align: top;
    line-height: 1.75;
}

.cp-dashboard-report-link {
    border-color: rgba(196, 181, 253, 0.95);
    background: rgba(255, 255, 255, 0.16);
}

.cp-specialist-report {
    max-width: 1240px;
}

.cp-specialist-report-intro {
    margin: 22px 0 18px;
    padding: 18px 22px;
    border: 1px solid #ddd6fe;
    border-right: 4px solid #7c3aed;
    border-radius: 13px;
    background: linear-gradient(135deg, #fff 0%, #faf5ff 100%);
    box-shadow: 0 5px 16px rgba(79, 70, 229, 0.06);
}

.cp-specialist-report-intro strong {
    color: #4c1d95;
    font-size: 15px;
}

.cp-specialist-report-intro p {
    margin: 7px 0 0;
    color: #6b7280;
    font-size: 14px;
}

.cp-report-stat-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cp-report-search-result {
    margin: -5px 0 18px;
    padding: 10px 13px;
    border: 1px solid #c7d2fe;
    border-radius: 9px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 13px;
    font-weight: 700;
}

.cp-report-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.cp-report-section-heading > div > span {
    display: block;
    margin-bottom: 5px;
    color: #7c3aed;
    font-size: 12px;
    font-weight: 800;
}

.cp-report-section-heading h2 {
    margin-bottom: 0;
}

.cp-report-section-heading p {
    max-width: 280px;
    margin: 2px 0 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.8;
    text-align: left;
}

.cp-report-toolbar-card {
    padding: 18px 22px;
}

.cp-report-export-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.cp-report-export-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    background: #fff;
    color: #4338ca;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: 0.2s ease;
}

.cp-report-export-actions a:first-child {
    border-color: #6d28d9;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff;
}

.cp-report-export-actions a:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(79, 70, 229, 0.18);
}

.cp-admin-report .cp-report-export-actions a.button {
    min-height: auto;
    padding: 0 10px;
}

.cp-participant-report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 16px;
}

.cp-participant-report-card {
    overflow: hidden;
    border: 1px solid #ddd6fe;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(79, 70, 229, 0.07);
}

.cp-participant-report-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 17px 17px 15px;
    border-bottom: 1px solid #ede9fe;
    background: linear-gradient(135deg, #faf5ff, #eef2ff);
}

.cp-participant-report-header > div:first-child > span {
    display: block;
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
}

.cp-participant-report-header > div:first-child > strong {
    display: block;
    margin-top: 4px;
    color: #312e81;
    font-size: 18px;
}

.cp-participant-report-header small {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 11px;
}

.cp-participant-test-total {
    flex: 0 0 auto;
    min-width: 66px;
    padding: 8px 7px;
    border-radius: 10px;
    background: #fff;
    color: #5b21b6;
    text-align: center;
    box-shadow: 0 2px 8px rgba(91, 33, 182, 0.09);
}

.cp-participant-test-total strong,
.cp-participant-test-total span,
.cp-participant-test-total small {
    display: block;
}

.cp-participant-test-total strong {
    font-size: 22px;
    line-height: 1;
}

.cp-participant-test-total span {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 800;
}

.cp-participant-test-total small {
    margin-top: 4px;
    color: #7c3aed;
    font-size: 10px;
}

.cp-participant-exam-summary {
    padding: 15px 17px;
}

.cp-participant-exam-summary > span {
    display: block;
    margin-bottom: 9px;
    color: #4c1d95;
    font-size: 12px;
    font-weight: 800;
}

.cp-exam-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.cp-exam-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 9px;
    border: 1px solid #ddd6fe;
    border-radius: 999px;
    background: #faf5ff;
    color: #5b21b6;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.cp-exam-chip b {
    color: #4338ca;
    font-size: 11px;
}

.cp-participant-report-details {
    border-top: 1px solid #ede9fe;
    background: #fcfcff;
}

.cp-participant-report-details summary,
.cp-all-records-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 17px;
    color: #4338ca;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    list-style: none;
}

.cp-participant-report-details summary::-webkit-details-marker,
.cp-all-records-details summary::-webkit-details-marker {
    display: none;
}

.cp-participant-report-details summary::before,
.cp-all-records-details summary::before {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 8px;
    border-radius: 50%;
    background: #ede9fe;
    color: #5b21b6;
    font-size: 16px;
    line-height: 1;
}

.cp-participant-report-details[open] summary::before,
.cp-all-records-details[open] summary::before {
    content: "−";
}

.cp-participant-detail-content {
    padding: 0 17px 17px;
}

.cp-participant-test-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cp-participant-test-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
    background: #fff;
}

.cp-participant-test-list strong,
.cp-participant-test-list time {
    display: block;
}

.cp-participant-test-list strong {
    color: #312e81;
    font-size: 12px;
}

.cp-participant-test-list time {
    margin-top: 3px;
    color: #6b7280;
    font-size: 10px;
}

.cp-participant-test-list code {
    direction: ltr;
    max-width: 46%;
    overflow: hidden;
    color: #5b21b6;
    font-size: 10px;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cp-participant-entry-fields {
    display: grid;
    gap: 0;
    margin: 13px 0 0;
    border-top: 1px dashed #d1d5db;
}

.cp-participant-entry-fields > div {
    display: grid;
    grid-template-columns: minmax(90px, 0.85fr) minmax(0, 1.6fr);
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed #e5e7eb;
}

.cp-participant-entry-fields dt {
    color: #6b7280;
    font-size: 11px;
    font-weight: 800;
}

.cp-participant-entry-fields dd {
    margin: 0;
    color: #1f2937;
    font-size: 12px;
    line-height: 1.7;
}

.cp-all-records-card {
    padding: 0;
}

.cp-all-records-details summary {
    padding: 19px 22px;
    font-size: 14px;
}

.cp-all-records-details summary b {
    color: #6b7280;
    font-size: 12px;
}

.cp-all-records-details .cp-admin-table-wrap {
    margin: 0;
    border-top: 1px solid #e0e7ff;
    border-radius: 0;
}

@media (max-width: 640px) {
    .clinic-panel-container .gform_wrapper .gform_validation_errors,
    .clinic-panel-container .gform_wrapper .validation_error,
    .clinic-panel-container .gform_wrapper .gfield.gfield_error {
        padding: 14px;
    }

    .cp-dashboard-header,
    .cp-patient-card-header {
        flex-direction: column;
    }

    .cp-dashboard-header {
        padding: 24px 20px;
    }

    .cp-dashboard-actions {
        width: 100%;
    }

    .cp-dashboard-link {
        flex: 1;
        text-align: center;
    }

    .cp-patient-exam-meta {
        max-width: none;
        text-align: right;
    }

    .cp-dashboard-search-form,
    .cp-dashboard-search-form > div,
    .cp-report-toolbar,
    .cp-report-toolbar form > div {
        align-items: stretch;
        flex-direction: column;
    }

    .cp-dashboard-search-form input,
    .cp-report-toolbar input[type="search"] {
        min-width: 0;
    }

    .cp-report-stat-grid {
        grid-template-columns: 1fr;
    }

    .cp-report-stat-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cp-report-bar-row {
        grid-template-columns: 1fr 44px;
    }

    .cp-report-bar-label {
        grid-column: 1 / -1;
    }

    .cp-admin-report-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .cp-report-section-heading {
        flex-direction: column;
    }

    .cp-report-section-heading p {
        max-width: none;
        text-align: right;
    }

    .cp-report-export-actions {
        justify-content: stretch;
    }

    .cp-report-export-actions a {
        flex: 1;
    }

    .cp-participant-entry-fields > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
