/* ============================================================
   أكاديمية الشركة — تنسيقات خاصة بأكاديمية هذي الشركة بس
   (تعديل هذا الملف ما يأثر على باقي الشركات)
   (التنسيقات العامة في assets/css/base.css)
   ============================================================ */

body { align-items: flex-start; }
.container { gap: 24px; }

/* ---------- شريط العنوان ---------- */
.topbar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 18px;
}
.topbar-title { margin: 0; font-size: 1.3rem; text-align: center; flex: 1; }
.topbar-btn {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--btn-border);
    padding: 8px 18px;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    white-space: nowrap;
}
.topbar-btn:hover { background: var(--hover-fill); color: var(--on-hover-fill); }

/* ---------- صفحة الدخول ---------- */
.login-card {
    width: 100%;
    max-width: 420px;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8vh;
}
.login-card h1 { font-family: 'Orbitron', sans-serif; text-align: center; margin: 0; letter-spacing: 3px; }
.login-card p { text-align: center; margin: 0 0 8px; color: var(--text-2); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.9rem; color: var(--text-2); }
.field input {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text);
    padding: 12px 14px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
}
.field input:focus { outline: none; border-color: var(--accent); }
.primary-btn {
    background: var(--accent);
    color: var(--on-accent);
    border: none;
    padding: 13px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
}
.primary-btn:hover { background: var(--hover-fill); color: var(--on-hover-fill); }
.primary-btn:disabled { opacity: 0.6; cursor: wait; }
.remember {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-2);
}
.remember input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.login-error { color: var(--critical); text-align: center; min-height: 1.4em; margin: 0; }

/* ---------- الخيارات الأربعة ---------- */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
}
.option-card {
    min-height: 200px;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}
.option-card:hover { transform: translateY(-8px); background: var(--glass-hover); }
.option-num {
    font-family: var(--font-num);
    font-weight: 700;
    font-size: 2.2rem;
    line-height: 1;
    color: var(--accent);
}
.option-card h2 { margin: 0; font-size: 1.3rem; }
.option-card small { color: var(--text-3); }

.academy-intro { margin: 0; color: var(--text-2); text-align: center; }

/* ---------- الفيديو ---------- */
.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    background: var(--media-bg);
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-empty { display: flex; align-items: center; justify-content: center; color: var(--text-3); }

.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
}
.video-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.video-card h3 { margin: 0; font-size: 1.1rem; }
.video-card p { margin: 0; color: var(--text-2); font-size: 0.95rem; }

.empty-state { width: 100%; padding: 40px 20px; text-align: center; color: var(--text-3); }

/* ---------- قائمة البراندات ---------- */
.brand-list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.brand-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 16px;
}
.brand-item:hover { background: var(--glass-hover); transform: translateY(-3px); }
.brand-num {
    font-family: var(--font-num);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
    min-width: 2ch;
    text-align: center;
    font-size: 1.1rem;
}
.brand-name-text { font-family: 'Orbitron', sans-serif; font-size: 1rem; letter-spacing: 1px; direction: ltr; }
.brand-count { margin-inline-start: auto; font-size: 0.8rem; color: var(--text-3); }

/* ---------- مهارات المبيعات ---------- */
.sales-actions { width: 100%; display: flex; justify-content: center; }
.sales-layout {
    width: 100%;
    display: grid;
    grid-template-columns: 2fr 1fr; /* الصفحة RTL: الفيديو يمين والعناوين يسار */
    gap: 20px;
    align-items: start;
}
.player-panel { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.player-panel h2 { margin: 0; font-size: 1.2rem; }
.player-panel p { margin: 0; color: var(--text-2); }
.lesson-list {
    list-style: none;
    margin: 0;
    padding: 10px;
    max-height: 70vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.lesson-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: start;
    background: var(--panel);
    border: 1px solid transparent;
    color: var(--text);
    padding: 12px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
}
.lesson-btn:hover { background: var(--line); }
.lesson-btn.active { border-color: var(--accent); background: var(--accent-soft); }
.lesson-btn .brand-num { font-size: 0.9rem; }

/* ---------- ملخصات الكتب ---------- */
.book-list { width: 100%; display: flex; flex-direction: column; gap: 16px; }
.book-card { padding: 22px 24px; }
.book-card h2 { margin: 0 0 4px; font-size: 1.2rem; }
.book-author { color: var(--accent); font-size: 0.9rem; margin-bottom: 12px; }
.book-summary { line-height: 1.9; color: var(--text-2); white-space: pre-line; }
.book-link { display: inline-block; margin-top: 12px; color: var(--accent); text-decoration: underline; }

.book-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.book-actions .primary-btn { margin-top: 0; padding: 10px 22px; }
.book-actions .book-link { margin-top: 0; }

/* ---------- صفحة ملخص الكتاب ---------- */
.book-layout {
    width: 100%;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    align-items: start;
}
.book-toc {
    position: sticky;
    top: 20px;
    padding: 18px;
    border-radius: 18px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}
.toc-title { font-weight: 700; margin-bottom: 10px; color: var(--accent); }
.book-toc ol { margin: 0 0 14px; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 6px; }
.book-toc li { font-size: 0.88rem; line-height: 1.6; }
.book-toc li::marker { font-family: var(--font-num); color: var(--text-3); }
.book-toc a { color: var(--text-2); }
.book-toc a:hover { color: var(--text); }
.book-toc a.active { color: var(--accent); font-weight: 700; }

.book-body {
    padding: 32px 40px;
    border-radius: 18px;
    line-height: 2;
    font-size: 1.02rem;
    color: var(--text);
    min-width: 0;
}
.book-header { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 8px; }
.book-header h1 { margin: 0; font-size: 1.8rem; color: var(--text); }
.book-header .book-author { margin: 6px 0 0; }
.book-body h2 {
    font-size: 1.35rem; color: var(--text); line-height: 1.5;
    margin: 42px 0 12px; padding-top: 8px; scroll-margin-top: 20px;
}
.book-body h3 { font-size: 1.08rem; color: var(--accent); margin: 26px 0 6px; line-height: 1.5; }
.book-body p { margin: 0 0 12px; }
.book-body ul { margin: 0 0 14px; padding-inline-start: 22px; }
.book-body li { margin-bottom: 6px; }
.book-key {
    background: var(--accent-soft);
    border-inline-start: 4px solid var(--accent);
    padding: 12px 16px;
    border-radius: 10px;
    color: var(--text);
}
.book-key b { color: var(--accent); }
.book-table { width: 100%; border-collapse: collapse; margin: 6px 0 18px; font-size: 0.92rem; line-height: 1.7; }
.book-table th, .book-table td { padding: 10px 12px; border: 1px solid var(--line); text-align: start; vertical-align: top; }
.book-table th { background: var(--panel); color: var(--text); font-weight: 700; }
.table-wrap { width: 100%; overflow-x: auto; }

/* ---------- نورتنا: عارض ملف PDF ---------- */
.doc-actions { width: 100%; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.doc-viewer {
    width: 100%;
    max-width: 960px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}
.doc-page {
    width: 100%;
    background: var(--panel);
    border-radius: 10px;
    overflow: hidden;
    line-height: 0;
}
.doc-page canvas { width: 100%; height: auto; display: block; }
.doc-status { color: var(--text-3); text-align: center; padding: 30px 0; line-height: 1.6; }
.doc-frame { width: 100%; height: 80vh; border: 0; border-radius: 10px; background: #ffffff; } /* عارض PDF يبقى أبيض */

/* ---------- الجوال ---------- */
@media (max-width: 900px) {
    .options-grid, .video-grid { grid-template-columns: 1fr; }
    .brand-list { grid-template-columns: repeat(2, 1fr); }
    .sales-layout { grid-template-columns: 1fr; }
    .book-layout { grid-template-columns: 1fr; }
    .book-toc { position: static; max-height: none; }
    .book-body { padding: 22px 18px; }
}
@media (max-width: 560px) {
    .brand-list { grid-template-columns: 1fr; }
    .topbar { padding: 10px 12px; }
    .topbar-title { font-size: 1.05rem; }
    .topbar-btn { padding: 6px 12px; font-size: 0.8rem; }
}
