/* تصميم عام */
.tcm-search-wrapper {
    direction: rtl;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    max-width: 90%;
    margin: 30px auto;
    background: #f8f9fb;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.tcm-search-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 20px;
    margin-bottom: 20px;
}

.tcm-search-row {
    display: flex;
    flex-direction: column;
}

.tcm-search-row label {
    font-weight: 600;
    margin-bottom: 5px;
}

.tcm-search-row input[type="text"] {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccd0d5;
    background: #fff;
}

.tcm-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s ease;
}

.tcm-btn-primary {
    color: #fff;
    background-color: #0052cc;
    border-color: #0052cc;
}

.tcm-btn-outline {
    color: #0052cc;
    background: #fff;
    border-color: #0052cc;
}

.tcm-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
w}

.tcm-search-form .tcm-btn-primary {
    grid-column: 1 / -1;
    justify-content: center;
}

/* رسالة لا توجد نتائج */
.tcm-no-results {
    margin-top: 20px;
    padding: 12px 15px;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    color: #856404;
}

/* بطاقة الشهادة */
.tcm-certificate-card {
    background: #ffffff;
    margin-top: 25px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    border: 1px solid #e1e4ea;
}

.tcm-card-header {
    padding: 12px 18px;
    color: #fff;
    background: #0052cc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tcm-card-header h2 {
    margin: 0;
    font-size: 18px;
}

.tcm-card-header i {
    font-size: 20px;
}

/* الأقسام */
.tcm-section {
    padding: 18px 18px 5px;
}

.tcm-section h3 {
    font-size: 16px;
    margin: 0 0 12px;
    padding-right: 26px;
    position: relative;
}

.tcm-section h3:before {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    width: 18px;
    height: 3px;
    border-radius: 999px;
    transform: translateY(-50%);
    background: #0052cc;
}

.tcm-section-info .tcm-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
    gap: 8px 18px;
    font-size: 14px;
}

.tcm-info-grid div span {
    color: #6c757d;
    margin-left: 4px;
}

.tcm-info-grid div strong {
    color: #111827;
}

/* الأداء */
.tcm-performance-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.tcm-perf-item { }

.tcm-perf-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #374151;
    margin-bottom: 4px;
}

.tcm-perf-value {
    font-weight: 600;
}

.tcm-progress-bar {
    background: #e5e7eb;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.tcm-progress-bar span {
    display: block;
    height: 100%;
    background: #0052cc;
}

/* الأزرار والمعاينة */
.tcm-section-actions {
    padding-bottom: 18px;
}

.tcm-actions-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.tcm-certificate-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #4b5563;
    background: #f9fafb;
    border-radius: 8px;
    padding: 10px 12px;
}

.tcm-certificate-preview i {
    font-size: 18px;
}

/* طباعة – نُخفي كل شيء ما عدا الشهادة */
@media print {
    body * {
        visibility: hidden;
    }
    .tcm-print-target,
    .tcm-print-target * {
        visibility: visible;
    }
    .tcm-print-target {
        position: absolute;
        inset: 0;
        margin: 0 !important;
        box-shadow: none !important;
    }
}

/* استجابة للموبايل */
@media (max-width: 700px) {
    .tcm-search-form {
        grid-template-columns: 1fr;
    }
    .tcm-actions-buttons {
        flex-direction: column;
    }
}
