/* ============================================================
   sessions.css — تصميم نظام إدارة الجلسات
   يغطي: جلساتي (my_sessions.php) + لوحة إدارة الجلسات (setting_chairman)
   ============================================================ */


/* ===================================================
   1. إحصائيات الجلسات (Stats Bar)
   =================================================== */
.sess-stat-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.sess-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}
.sess-stat-num { font-size: 18px; font-weight: bold; }
.num-blue  { color: #3498db; }
.num-green { color: #27ae60; }


/* ===================================================
   2. شبكة بطاقات الجلسات الشخصية (My Sessions Grid)
   =================================================== */
.sess-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    padding: 5px 0 15px 0;
}
.sess-card {
    border-radius: 10px;
    padding: 12px 10px;
    text-align: center;
    border: 2px solid transparent;
    transition: transform .15s;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.sess-card:hover               { transform: translateY(-2px); }
.sess-card.sess-current        { border-color: #3498db; background: rgba(52,152,219,.08); }
.sess-card.sess-other          { border-color: #27ae60; background: rgba(39,174,96,.07);  }
.sess-icon                     { font-size: 28px; margin-bottom: 6px; flex-shrink: 0; }
.sess-current .sess-icon       { color: #3498db; }
.sess-other   .sess-icon       { color: #27ae60; }
.sess-name {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 3px;
    word-break: break-word;
    width: 100%;
}
.sess-detail {
    font-size: 10px;
    opacity: .75;
    margin: 2px 0;
    word-break: break-all;
    width: 100%;
}


/* ===================================================
   3. شارات الجلسات (Badges)
   =================================================== */
.sess-badge {
    display: inline-block;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 20px;
    margin-bottom: 6px;
    color: #fff;
    white-space: nowrap;
}
.badge-current { background: #3498db; }
.badge-active  { background: #27ae60; }


/* ===================================================
   4. زر إنهاء الجلسة (داخل البطاقة الشخصية)
   =================================================== */
.sess-end-btn {
    margin-top: 8px;
    font-size: 11px;
    padding: 5px 0;
    width: 100%;
    cursor: pointer;
    background: rgba(231,76,60,.12);
    color: #e74c3c;
    border: 1px solid #e74c3c;
    border-radius: 5px;
    transition: background .15s;
    box-sizing: border-box;
    white-space: nowrap;
}
.sess-end-btn:hover { background: #e74c3c; color: #fff; }


/* ===================================================
   5. سجل محاولات الدخول (Login History)
   =================================================== */
.hist-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 4px;
    border-bottom: 1px solid rgba(128,128,128,.12);
    font-size: 12px;
    flex-wrap: wrap;
}
.hist-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.hist-success-wrap { background: rgba(39,174,96,.15); color: #27ae60; }
.hist-fail-wrap    { background: rgba(231,76,60,.15);  color: #e74c3c; }
.hist-info         { flex: 1; min-width: 0; }
.hist-status       { font-size: 11px; font-weight: bold; }
.hist-success-txt  { color: #27ae60; }
.hist-fail-txt     { color: #e74c3c; }
.hist-date         { font-size: 10px; white-space: nowrap; flex-shrink: 0; margin-top: 2px; opacity: .7; }


/* ===================================================
   6. شبكة جلسات الإدارة (Admin Sessions Grid)
   =================================================== */
.adm-sess-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.adm-sess-card {
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(128,128,128,.2);
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: box-shadow .15s;
}
.adm-sess-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.adm-sess-top {
    display: flex;
    align-items: center;
    gap: 10px;
}
.adm-sess-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
}
.adm-sess-avatar img { width: 100%; height: 100%; object-fit: cover; }
.adm-sess-uname {
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    word-break: break-word;
}
.adm-sess-uname:hover { text-decoration: underline; }
.adm-sess-device      { font-size: 11px; opacity: .7; }
.adm-sess-row         { font-size: 11px; opacity: .8; word-break: break-all; }
.adm-sess-row i       { opacity: .6; margin-left: 3px; }
.adm-sess-kill {
    margin-top: 5px;
    padding: 5px;
    width: 100%;
    font-size: 11px;
    cursor: pointer;
    background: rgba(231,76,60,.1);
    color: #e74c3c;
    border: 1px solid #e74c3c;
    border-radius: 5px;
    box-sizing: border-box;
    transition: background .15s;
}
.adm-sess-kill:hover { background: #e74c3c; color: #fff; }
