/* =============== Certificate Search - Modern UI =============== */

.cm-search-wrap {
    max-width: 750px;
    margin: 50px auto;
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    direction: ltr;
}

/* Header */
.cm-search-header {
    text-align: center;
    margin-bottom: 30px;
}

.cm-search-icon-wrap {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(102,126,234,0.3);
}

.cm-search-icon-wrap svg {
    width: 42px;
    height: 42px;
    stroke: #fff;
}

.cm-search-header h2 {
    color: #1a365d;
    font-size: 28px;
    margin: 0 0 8px;
    font-weight: 700;
}

.cm-search-header p {
    color: #6b7280;
    font-size: 15px;
    margin: 0;
}

/* Search Box */
.cm-search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: #fff;
    padding: 6px;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.cm-search-box:focus-within {
    border-color: #667eea;
}

.cm-search-input {
    flex: 1;
    padding: 14px 18px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    background: transparent;
}

.cm-search-btn {
    padding: 14px 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    white-space: nowrap;
}

.cm-search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(102,126,234,0.4);
}

.cm-search-btn:active {
    transform: translateY(0);
}

/* Results */
.cm-search-results {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cm-cert-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #667eea;
    border-radius: 12px;
    padding: 18px 22px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s;
    display: block;
}

.cm-cert-card:hover {
    box-shadow: 0 8px 24px rgba(102,126,234,0.15);
    transform: translateY(-2px);
    border-left-color: #764ba2;
}

.cm-cert-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cm-cert-name {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.cm-cert-type {
    background: linear-gradient(135deg, #f0f4ff, #e0e7ff);
    color: #4338ca;
    padding: 4px 14px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
}

.cm-cert-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 10px;
}

.cm-cert-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    align-items: center;
}

.cm-cert-row span:first-child {
    color: #9ca3af;
    font-weight: 500;
}

.cm-cert-row strong {
    color: #1f2937;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.cm-cert-row span:last-child {
    color: #4b5563;
}

.cm-cert-card-footer {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}

/* Alerts */
.cm-alert {
    padding: 16px 24px;
    border-radius: 12px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
}

.cm-alert-info {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.cm-alert-warn {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    color: #92400e;
    border: 1px solid #fde68a;
}

.cm-alert-error {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Loading */
.cm-loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.cm-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: cm-spin 0.8s linear infinite;
}

@keyframes cm-spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 600px) {
    .cm-search-wrap { margin: 20px 15px; }
    .cm-search-header h2 { font-size: 22px; }
    .cm-search-box { flex-direction: column; }
    .cm-search-btn { width: 100%; }
    .cm-cert-card-header { flex-direction: column; align-items: flex-start; gap: 6px; }
    .cm-cert-row { flex-direction: column; align-items: flex-start; gap: 2px; }
}
