/* ==========================================
   File: static/style.css
   Role: The Paint and Decor (قسم الطلاء والألوان - النسخة المنزلقة المحدثة)
   ========================================== */

:root {
    --primary-green: #145a32;
    --secondary-green: #196f3d;
    --sidebar-bg: #1e272e;
    --bg-color: #e9ecef;
    --text-light: #ecf0f1;
    --text-muted: #bdc3c7;
    --border-color: #2f3640;
}

body {
    background-color: var(--bg-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* --- زر القائمة الجانبية وطبقة التظليل --- */
.sidebar-toggle {
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 1050;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    padding: 5px 12px;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.show {
    visibility: visible;
    opacity: 1;
}

/* --- تنسيقات الشعار --- */
.kottab-logo {
    max-width: 140px;
    max-height: 140px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    background-color: #ffffff;
    padding: 8px;
    border: 2px solid var(--primary-green);
}

.login-btn-top-right {
    position: absolute;
    top: 20px;
    right: 30px;
    z-index: 1040;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.login-btn-top-right:hover {
    transform: translateY(-2px);
}

/* --- القائمة الجانبية المنزلقة --- */
.sidebar {
    height: 100vh;
    overflow-y: auto;
    background-color: var(--sidebar-bg);
    color: var(--text-light);
    padding: 20px 0;
    position: fixed;
    right: 0;
    top: 0;
    width: 250px;
    z-index: 1060; /* أعلى من التظليل والزر */
    box-shadow: -2px 0 10px rgba(0,0,0,0.3);
    transform: translateX(100%); /* مخفية افتراضياً */
    transition: transform 0.3s ease;
}

.sidebar.open {
    transform: translateX(0); /* تظهر بالانزلاق */
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}

.sidebar h4 {
    color: #ffffff;
}

.sidebar a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 12px 20px;
    display: block;
    transition: all 0.3s ease;
    border-right: 4px solid transparent;
}

.sidebar a:hover, .sidebar a.active {
    background-color: var(--border-color);
    color: #ffffff;
    border-right-color: var(--primary-green);
}

/* --- المحتوى الرئيسي الممتد --- */
.main-content {
    margin-right: 0; /* لم يعد مدفوعاً بالقائمة الجانبية */
    padding: 80px 20px 30px 20px; /* مسافة علوية لتجنب زر القائمة */
    transition: all 0.3s ease;
}

.kottab-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    padding: 15px;
    border-top: 4px solid var(--primary-green);
    margin-bottom: 20px;
}

.table-archived {
    background-color: #e9ecef !important;
    opacity: 0.7;
}

.table-archived td {
    text-decoration: line-through;
    color: #6c757d;
}

.level-progress-container {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 5px;
}

.level-progress-bar {
    height: 100%;
    background-color: var(--primary-green);
    transition: width 0.5s ease;
}

.news-title-text {
    color: var(--primary-green);
}

.news-hero-image {
    max-height: 500px;
    width: 100%;
    object-fit: cover;
}

.news-body-text {
    text-align: justify;
    white-space: pre-line; 
}

.auth-container {
    min-height: 70vh;
}

.btn-primary-custom {
    background-color: var(--primary-green);
    color: white;
}

.btn-primary-custom:hover {
    background-color: var(--secondary-green);
    color: white;
}

.text-primary-custom {
    color: var(--primary-green);
}

.danger-card-border {
    border-top-color: #dc3545 !important;
}

