/* ================================================
   לוח בקרה - סוכנות שיווק דיגיטלי
   עיצוב מותאם אישי RTL
   ================================================ */

/* --- יבוא גופן --- */
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700;800&display=swap');

/* --- בסיס --- */
* { box-sizing: border-box; }

body {
    font-family: 'Heebo', 'Segoe UI', Arial, sans-serif;
    font-size: 15px;
    color: #1e293b;
    background: #f0f2f5;
    direction: rtl;
}

/* --- סיידבר --- */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.sidebar-link i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sidebar-link:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.sidebar-link.active {
    background: linear-gradient(135deg, #e94560, #c0392b);
    color: #fff;
    box-shadow: 0 4px 15px rgba(233,69,96,0.35);
}

/* --- כרטיסי סטטיסטיקה --- */
.stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.stat-label {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.1;
    margin-bottom: 4px;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

/* --- כרטיסים כלליים --- */
.card {
    border: none !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s;
}

.card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.09); }

/* --- טאבים --- */
.nav-tabs .nav-link {
    color: #64748b;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 8px 16px;
    font-size: 0.88rem;
    transition: all 0.2s;
}

.nav-tabs .nav-link:hover { color: #1e293b; }

.nav-tabs .nav-link.active {
    color: #e94560;
    border-bottom-color: #e94560;
    background: none;
    font-weight: 600;
}

.nav-tabs { border-bottom: 2px solid #e9ecef; }

/* --- טפסים --- */
.form-control, .form-select {
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    padding: 0.6rem 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: 'Heebo', sans-serif;
}

.form-control:focus, .form-select:focus {
    border-color: #e94560;
    box-shadow: 0 0 0 3px rgba(233,69,96,0.12);
}

textarea.form-control { resize: vertical; min-height: 80px; }

.form-label { font-weight: 600; font-size: 0.88rem; color: #374151; margin-bottom: 6px; }

/* --- כפתורים --- */
.btn { border-radius: 10px; font-family: 'Heebo', sans-serif; font-weight: 600; transition: all 0.2s; }
.btn-sm { border-radius: 8px; font-size: 0.82rem; }

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    color: #fff !important;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(245,158,11,0.35);
    color: #fff !important;
}

.btn-danger { background: linear-gradient(135deg, #e94560, #c0392b); border: none; }
.btn-danger:hover { background: linear-gradient(135deg, #c0392b, #a93226); transform: translateY(-1px); }

/* --- טבלאות --- */
.table { font-size: 0.88rem; }
.table thead th {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    border-bottom: 2px solid #e9ecef;
    padding: 10px 12px;
}
.table td { padding: 12px; vertical-align: middle; }
.table-hover tbody tr:hover { background: #f8fafc; cursor: pointer; }

/* --- Pagination --- */
.pagination .page-link {
    border-radius: 8px !important;
    margin: 0 2px;
    border: 1.5px solid #e2e8f0;
    color: #64748b;
    font-weight: 600;
    font-size: 0.88rem;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #e94560, #c0392b);
    border-color: #e94560;
}

/* --- כרטיסי סרטונים בקנבן --- */
.video-card {
    border: 1.5px solid #e9ecef;
    transition: all 0.2s;
    cursor: default;
}

.video-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    transform: translateY(-2px);
}

/* --- Badge --- */
.badge { font-family: 'Heebo', sans-serif; }

/* --- Alert --- */
.alert { border-radius: 12px; border: none; }

/* --- Dropdown --- */
.dropdown-menu {
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12) !important;
    border: 1px solid rgba(0,0,0,0.05) !important;
    padding: 8px;
}

.dropdown-item {
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.15s;
}

.dropdown-item:hover { background: #f1f5f9; }

/* --- Toast --- */
.toast { border-radius: 12px !important; }

/* --- Modal --- */
.modal-content { box-shadow: 0 25px 60px rgba(0,0,0,0.2) !important; }
.modal-header { border-bottom: 1px solid #f1f5f9 !important; }
.modal-footer { border-top: 1px solid #f1f5f9 !important; }

/* --- תוכן תוצאות --- */
.result-content {
    max-height: 380px;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.8;
}

/* --- סקרולבר מותאם --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 10px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* --- RTL תיקונים --- */
.input-group > .form-control:not(:last-child) {
    border-radius: 0 10px 10px 0;
}
.input-group > .form-control:not(:first-child) {
    border-radius: 10px 0 0 10px;
}
.input-group > .input-group-text:first-child {
    border-radius: 0 10px 10px 0;
}
.input-group > .input-group-text:last-child {
    border-radius: 10px 0 0 10px;
}

/* --- ריספונסיבי --- */
@media (max-width: 992px) {
    .main-content { margin-right: 0 !important; }
    .stat-value { font-size: 1.6rem; }
}

@media (max-width: 576px) {
    body { font-size: 14px; }
    .card-body.px-4 { padding-right: 1rem !important; padding-left: 1rem !important; }
}

/* --- אנימציות --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card, .stat-card {
    animation: fadeIn 0.3s ease forwards;
}

/* --- הדגשת אינפוט פעיל --- */
.form-control:not(:placeholder-shown),
.form-select:not(:first-child) {
    border-color: #cbd5e1;
}

/* --- טיפ-טול --- */
[title] { cursor: help; }

/* --- סטיקי כרטיס צד --- */
@media (min-width: 992px) {
    .sticky-top { top: 80px !important; }
}
