.references-hero {
    background: linear-gradient(135deg, #052e24, #0f172a);
    color: #fff;
    border-radius: 30px;
    padding: 38px;
    margin: 28px 0;
    border-bottom: 6px solid #d6a84f;
    box-shadow: 0 22px 60px rgba(15,23,42,.16);
}

.references-hero h1 {
    margin-top: 0;
    font-size: 34px;
}

.references-hero p {
    color: #ecfdf5;
    line-height: 2.1;
    max-width: 960px;
}

.references-page {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 28px;
    padding: 34px;
    box-shadow: 0 18px 50px rgba(15,23,42,.06);
}

.references-toolbar {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 12px;
    margin: 20px 0;
}

.references-toolbar input,
.references-toolbar select {
    border: 1px solid #cbd5e1;
    border-radius: 15px;
    padding: 12px 14px;
    font-family: inherit;
    background: #f8fafc;
}

.references-toolbar input:focus,
.references-toolbar select:focus {
    outline: none;
    background: #fff;
    border-color: #14532d;
    box-shadow: 0 0 0 4px rgba(20,83,45,.12);
}

.references-summary {
    color: #64748b;
    margin: 12px 0 20px;
    line-height: 2;
}

.reference-card-list {
    display: grid;
    gap: 18px;
}

.reference-card {
    border: 1px solid #e5e7eb;
    border-right: 6px solid #14532d;
    border-radius: 22px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 12px 35px rgba(15,23,42,.045);
}

.reference-card h2 {
    color: #052e24;
    margin: 0 0 10px;
    font-size: 21px;
}

.reference-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.reference-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 800;
}

.ref-source {
    background: #eff6ff;
    color: #1d4ed8;
}

.ref-indication {
    background: #ecfdf5;
    color: #166534;
}

.ref-strength {
    background: #fffbeb;
    color: #92400e;
}

.ref-review-draft {
    background: #f1f5f9;
    color: #334155;
}

.ref-review-needs {
    background: #fef2f2;
    color: #991b1b;
}

.ref-review-ok {
    background: #f5f3ff;
    color: #6d28d9;
}

.reference-quote {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px;
    margin-top: 14px;
    line-height: 2.2;
}

.reference-quote .arabic {
    direction: rtl;
    font-size: 18px;
    color: #111827;
    font-weight: 700;
}

.reference-quote .translation {
    color: #475569;
    margin-top: 8px;
}

.reference-analysis {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-right: 5px solid #d97706;
    border-radius: 18px;
    padding: 14px;
    margin-top: 14px;
    line-height: 2.1;
}

.reference-warning {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-right: 5px solid #dc2626;
    border-radius: 18px;
    padding: 14px;
    margin-top: 14px;
    line-height: 2.1;
}

.references-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.references-nav a {
    background: #14532d;
    color: #fff;
    border-radius: 14px;
    padding: 10px 16px;
}

/* Header search form */
.ht-search-form {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 10px;
}

.ht-search-input {
    width: 170px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 7px 11px;
    font-family: inherit;
    font-size: 13px;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.ht-search-input:focus {
    outline: none;
    width: 220px;
    background: #fff;
    border-color: #14532d;
    box-shadow: 0 0 0 3px rgba(20,83,45,.12);
}

.ht-search-button {
    border: 0;
    background: #d6a84f;
    color: #111827;
    border-radius: 12px;
    padding: 7px 12px;
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.ht-search-button:hover {
    background: #b58934;
}

@media (max-width: 1100px) {
    .ht-search-form {
        width: 100%;
        order: 3;
        margin-top: 8px;
    }

    .ht-search-input {
        flex: 1;
        width: 100% !important;
    }
}

@media (max-width: 850px) {
    .references-toolbar {
        grid-template-columns: 1fr;
    }

    .references-hero,
    .references-page {
        padding: 22px;
    }
}