/* ================================================================
   الصفحات الداخلية: عن المركز، الجهات المعتمدة، المستندات، القرارات،
   تواصل معنا. يُحمَّل بعد site.css.
   ================================================================ */

body.lb-inner { background: #fff; }
body.lb-inner :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure) { margin: 0; }
body.lb-inner :where(ul, ol) { padding: 0; list-style: none; }
body.lb-inner img { max-width: 100%; }
.lb-section-tight { padding: 48px 0 80px; }

/* ---------- عن المركز ---------- */
.lb-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.lb-split .lb-section-head { margin-bottom: 24px; }
.lb-lead { margin-bottom: 16px !important; color: var(--lb-navy); font-size: 1.25rem; font-weight: 600; line-height: 1.8; }
.lb-prose p:not(.lb-lead) { color: var(--lb-muted); font-size: 1.0625rem; line-height: 1.9; max-width: 62ch; }
.lb-decree {
    position: relative;
    padding: 28px 28px 24px;
    border: 1px solid var(--lb-line);
    border-inline-start: 4px solid var(--lb-gold);
    border-radius: var(--lb-radius-lg);
    background: var(--lb-gold-soft);
}
.lb-decree-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-bottom: 14px; border-radius: 10px; background: #fff; color: var(--lb-gold-dark); font-size: 1.125rem; }
.lb-decree h3 { margin-bottom: 10px; color: var(--lb-navy); font-size: 1.1875rem; font-weight: 700; }
.lb-decree p { color: #4b4636; font-size: 1rem; line-height: 1.9; }
.lb-decree p + p { margin-top: 10px; }

.lb-vm-wide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.lb-vm-wide > div { padding-top: 20px; border-top: 2px solid var(--lb-gold); }
.lb-vm-wide dt { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--lb-navy); font-size: 1.25rem; font-weight: 700; }
.lb-vm-wide dt i { color: var(--lb-gold-dark); }
.lb-vm-wide dd { color: var(--lb-muted); font-size: 1.0625rem; line-height: 1.9; }

.lb-duties { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.lb-duties li { padding: 24px 0 0; border-top: 1px solid var(--lb-line); }
.lb-duties i { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-bottom: 16px; border-radius: 10px; background: var(--lb-blue-soft); color: var(--lb-blue); font-size: 1.125rem; }
.lb-duties h3 { margin-bottom: 8px; color: var(--lb-navy); font-size: 1.125rem; font-weight: 700; }
.lb-duties p { color: var(--lb-muted); font-size: 1rem; line-height: 1.85; }

.lb-cta-band { padding: 48px 0; background: var(--lb-navy); color: #fff; }
.lb-cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.lb-cta-band h2 { margin-bottom: 4px; color: #fff; font-size: 1.5rem; font-weight: 700; }
.lb-cta-band p { color: #c9d5e2; }
.lb-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- شريط البحث والتصفية ---------- */
.lb-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; margin-bottom: 24px; }
.lb-search { position: relative; flex: 1 1 360px; max-width: 520px; }
.lb-search > i { position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); color: #8695a6; pointer-events: none; }
.lb-search input,
.lb-select select {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    padding-inline-start: 44px;
    border: 1px solid #c3cdd8;
    border-radius: var(--lb-radius);
    background: #fff;
    color: var(--lb-ink);
    font-size: 1rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.lb-search input:focus, .lb-select select:focus { outline: none; border-color: var(--lb-blue); box-shadow: 0 0 0 3px rgba(0, 86, 179, .15); }
.lb-select { position: relative; flex: 0 0 220px; }
.lb-select > i { position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); color: #8695a6; pointer-events: none; }
.lb-select select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8695a6 50%), linear-gradient(135deg, #8695a6 50%, transparent 50%); background-position: 18px 22px, 23px 22px; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }

.lb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lb-chip,
.lb-chips .filter-btn {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 6px 16px;
    border: 1px solid var(--lb-line);
    border-radius: 999px;
    background: #fff;
    color: var(--lb-ink);
    font-size: .9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.lb-chip:hover, .lb-chips .filter-btn:hover { border-color: var(--lb-blue); color: var(--lb-blue); }
.lb-chip.is-active, .lb-chips .filter-btn.active { border-color: var(--lb-navy); background: var(--lb-navy); color: #fff; }

/* ---------- جدول الجهات المعتمدة ---------- */
.lb-table-card { border: 1px solid var(--lb-line); border-radius: var(--lb-radius-lg); background: #fff; overflow: hidden; }
.lb-table-card[hidden] { display: none; }
.lb-table-card .table-responsive { overflow-x: auto; }
.lb-table { width: 100%; border-collapse: collapse; font-size: .9688rem; }
.lb-table thead th { padding: 14px 18px; background: var(--lb-surface); border-bottom: 1px solid var(--lb-line); color: var(--lb-muted); font-size: .875rem; font-weight: 700; text-align: right; white-space: nowrap; }
.lb-table tbody td { padding: 16px 18px; border-bottom: 1px solid var(--lb-line); color: var(--lb-ink); vertical-align: middle; }
.lb-table tbody tr:last-child td { border-bottom: 0; }
.lb-table tbody tr:hover td { background: #fafbfd; }
.lb-table .company-ref-cell strong { color: var(--lb-navy); font-weight: 700; direction: ltr; unicode-bidi: isolate; }
.lb-table .company-name-cell { font-weight: 600; color: var(--lb-navy); }
.lb-table .company-type-cell { color: var(--lb-muted); }
.lb-table .company-date-cell { white-space: nowrap; color: var(--lb-muted); }
.lb-table .status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: .8125rem;
    font-weight: 700;
    white-space: nowrap;
}
.lb-table .status.active { background: #ecfdf3; color: #067647; }
.lb-table .status.expired { background: #fef3f2; color: #b42318; }
.lb-table .status.unknown { background: #f2f4f7; color: #475467; }
.lb-table .table-message { padding: 40px 18px; color: var(--lb-muted); text-align: center; }
.lb-table .table-message.is-error { color: #b42318; }
.lb-table .table-message i { margin-inline-end: 8px; }

/* ---------- الحالات الفارغة ---------- */
.lb-empty,
.documents-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 48px 24px;
    border: 1px dashed #c8d2dd;
    border-radius: var(--lb-radius-lg);
    background: #fff;
    color: var(--lb-muted);
    text-align: center;
    grid-column: 1 / -1;
}
.lb-empty[hidden] { display: none; }
.lb-empty i, .documents-status i { margin-bottom: 6px; color: #a3b1c0; font-size: 2rem; }
.lb-empty h3 { color: var(--lb-navy); font-size: 1.125rem; font-weight: 700; }
.lb-empty.is-error i, .documents-status-error i { color: #d1493d; }
.retry-documents-btn { margin-top: 8px; min-height: 40px; padding: 6px 18px; border: 1px solid var(--lb-blue); border-radius: 8px; background: #fff; color: var(--lb-blue); font-weight: 700; cursor: pointer; }
.lb-note { display: block; margin-top: 20px !important; color: var(--lb-muted); font-size: .9375rem; }
.lb-note i { margin-inline-end: 6px; color: var(--lb-gold-dark); }
.lb-note a { color: var(--lb-blue); font-weight: 600; }

/* ---------- المستندات ---------- */
.lb-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.lb-docs .document-card {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--lb-line);
    border-radius: var(--lb-radius-lg);
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.lb-docs .document-card:hover { border-color: rgba(0, 86, 179, .35); box-shadow: var(--lb-shadow); }
.lb-docs .doc-icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 12px; font-size: 1.375rem; }
.lb-docs .doc-info { min-width: 0; }
.lb-docs .doc-category-badge { display: inline-block; margin-bottom: 4px; padding: 2px 10px; border-radius: 999px; background: var(--lb-gold-soft); color: var(--lb-gold-dark); font-size: .75rem; font-weight: 700; }
.lb-docs .doc-info h3 { overflow: hidden; color: var(--lb-navy); font-size: 1rem; font-weight: 700; line-height: 1.6; text-overflow: ellipsis; white-space: nowrap; }
.lb-docs .doc-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; color: var(--lb-muted); font-size: .8125rem; }
.lb-docs .doc-meta i { margin-inline-end: 4px; opacity: .8; }
.lb-docs .doc-file-type { font-weight: 700; }
.lb-docs .doc-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--lb-line);
    border-radius: 10px;
    background: #fff;
    color: var(--lb-blue);
    text-decoration: none;
}
.lb-docs .doc-action-btn:hover { border-color: var(--lb-blue); background: var(--lb-blue); color: #fff; }

.lb-howto { margin-top: 56px; padding: 32px; border-radius: var(--lb-radius-lg); background: var(--lb-surface); }
.lb-howto h2 { margin-bottom: 24px; color: var(--lb-navy); font-size: 1.375rem; font-weight: 700; }
.lb-howto ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.lb-howto li { display: flex; gap: 14px; align-items: flex-start; }
.lb-howto .lb-step-num { flex: 0 0 40px; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 2px solid var(--lb-gold); border-radius: 50%; background: #fff; color: var(--lb-navy); font-weight: 700; }
.lb-howto h3 { margin-bottom: 4px; color: var(--lb-navy); font-size: 1.0625rem; font-weight: 700; }
.lb-howto p { color: var(--lb-muted); font-size: .9375rem; line-height: 1.8; }

/* ---------- القرارات ---------- */
.lb-decisions { display: flex; flex-direction: column; border: 1px solid var(--lb-line); border-radius: var(--lb-radius-lg); background: #fff; overflow: hidden; }
.lb-decisions:has(> .lb-empty) { border: 0; background: transparent; }
.lb-decisions .decision-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--lb-line);
}
.lb-decisions .decision-card:last-child { border-bottom: 0; }
.lb-decisions .decision-card:hover { background: #fafbfd; }
.lb-decisions .decision-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; background: var(--lb-gold-soft); color: var(--lb-gold-dark); font-size: 1.125rem; }
.lb-decisions .decision-info h3 { margin-bottom: 4px; color: var(--lb-navy); font-size: 1.0625rem; font-weight: 700; line-height: 1.6; }
.lb-decisions .decision-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--lb-muted); font-size: .875rem; }
.lb-decisions .decision-meta i { margin-inline-end: 4px; opacity: .8; }
.lb-decisions .decision-number { color: var(--lb-navy); font-weight: 600; }
.lb-decisions .decision-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 16px;
    border: 1px solid var(--lb-blue);
    border-radius: 8px;
    color: var(--lb-blue);
    font-size: .9375rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.lb-decisions .decision-action-btn:hover { background: var(--lb-blue); color: #fff; }
.lb-decisions .decision-action-btn.is-disabled { border-color: var(--lb-line); color: var(--lb-muted); cursor: not-allowed; }

/* ---------- صفحة تواصل معنا ---------- */
.lb-contact-page { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 32px 40px; align-items: start; }
.lb-contact-details h2, .lb-form-card h2, .lb-faq h2 { margin-bottom: 8px; color: var(--lb-navy); font-size: 1.375rem; font-weight: 700; }
.lb-detail-list li { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--lb-line); }
.lb-detail-list li > i { flex: 0 0 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--lb-blue-soft); color: var(--lb-blue); }
.lb-detail-list h3 { margin-bottom: 2px; color: var(--lb-navy); font-size: 1rem; font-weight: 700; }
.lb-detail-list p { color: var(--lb-muted); font-size: .9688rem; line-height: 1.8; }
.lb-detail-list a { color: var(--lb-blue); font-weight: 600; text-decoration: none; }
.lb-detail-list a:hover { text-decoration: underline; }
.lb-follow { margin-top: 24px; }
.lb-follow h3 { margin-bottom: 10px; color: var(--lb-navy); font-size: 1rem; font-weight: 700; }
.lb-follow-links { display: flex; gap: 10px; }
.lb-follow-links a { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid var(--lb-line); border-radius: 10px; color: var(--lb-navy); }
.lb-follow-links a:hover { border-color: var(--lb-blue); color: var(--lb-blue); }

.lb-form-card { padding: 28px; border: 1px solid var(--lb-line); border-top: 3px solid var(--lb-gold); border-radius: var(--lb-radius-lg); background: #fff; box-shadow: var(--lb-shadow); }
.lb-form-card > p { margin-bottom: 18px; color: var(--lb-muted); }
.lb-form-card select.form-control { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8695a6 50%), linear-gradient(135deg, #8695a6 50%, transparent 50%); background-position: 18px 21px, 23px 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-end: 14px; }
.lb-form-submit { width: 100%; margin-top: 6px; }
.lb-form-card .form-message:empty { display: none; }
.lb-form-card .form-message { margin-top: 14px; padding: 12px 14px; border-radius: var(--lb-radius); font-size: .9375rem; font-weight: 600; }
.lb-form-card .form-message.success { background: #ecfdf3; color: #067647; border: 1px solid #abefc6; }
.lb-form-card .form-message.error { background: #fef3f2; color: #b42318; border: 1px solid #f6c8c3; }

.lb-faq { grid-column: 1 / -1; margin-top: 24px; }
.lb-faq h2 { margin-bottom: 16px; }
.lb-faq details { border-bottom: 1px solid var(--lb-line); }
.lb-faq details:first-of-type { border-top: 1px solid var(--lb-line); }
.lb-faq summary {
    position: relative;
    padding: 18px 0;
    padding-inline-end: 32px;
    color: var(--lb-navy);
    font-size: 1.0625rem;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
}
.lb-faq summary::-webkit-details-marker { display: none; }
.lb-faq summary::after {
    content: "+";
    position: absolute;
    inset-inline-end: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--lb-gold-dark);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1;
}
.lb-faq details[open] summary::after { content: "−"; }
.lb-faq details p { padding: 0 0 18px; color: var(--lb-muted); line-height: 1.9; max-width: 72ch; }
.lb-faq details a { color: var(--lb-blue); font-weight: 600; }

/* ---------- الشاشات المتوسطة والجوال ---------- */
@media (max-width: 960px) {
    .lb-split, .lb-contact-page, .lb-vm-wide { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .lb-duties, .lb-howto ol { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 720px) {
    .lb-search, .lb-select { flex: 1 1 100%; max-width: none; }
    .lb-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-inline: -18px; padding-inline: 18px; scrollbar-width: none; }
    .lb-chips::-webkit-scrollbar { display: none; }
    .lb-chip, .lb-chips .filter-btn { flex: 0 0 auto; }

    /* الجدول يتحول إلى بطاقات: كل خانة بعنوانها من data-label */
    .lb-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .lb-table, .lb-table tbody, .lb-table tr, .lb-table td { display: block; width: 100%; }
    .lb-table tbody tr { padding: 14px 16px; border-bottom: 1px solid var(--lb-line); }
    .lb-table tbody td { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border: 0; text-align: left; }
    .lb-table tbody td::before { content: attr(data-label); flex: 0 0 auto; color: var(--lb-muted); font-size: .8125rem; font-weight: 600; text-align: right; }
    .lb-table tbody td.table-message { display: block; text-align: center; }
    .lb-table tbody td.table-message::before { content: none; }
    .lb-table tbody tr:hover td { background: transparent; }

    .lb-docs { grid-template-columns: minmax(0, 1fr); }
    .lb-decisions .decision-card { grid-template-columns: 44px minmax(0, 1fr); padding: 16px; }
    .lb-decisions .decision-action-btn { grid-column: 1 / -1; justify-content: center; }
    .lb-howto { padding: 24px 18px; }
    .lb-form-card { padding: 20px 18px; }
    .lb-cta-actions .lb-btn { flex: 1 1 100%; }
}
