:root {
    /* Logo Colors */
    --primary-color: #2b7bba; /* Dark Blue from logo */
    --secondary-color: #4dbfb9; /* Light Blue/Green from logo */
    --accent-color: #f26522; /* Orange from logo */
    --accent-red: #ed1c24; /* Red logo text */
    --text-main: #2b2b2b;
    --text-muted: #666;
    --bg-color: #f6f8fb; /* Clean light greyish blue background */
    --card-bg: #ffffff;
    --white: #ffffff;
    --radius-lg: 24px;
    --radius-md: 12px;
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.05);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Cairo', sans-serif; }
body { direction: rtl; background-color: var(--bg-color); min-height: 100vh; color: var(--text-main); }

/* Buttons */
.btn {
    padding: 12px 28px; border-radius: 30px; border: none; cursor: pointer;
    font-weight: 700; transition: var(--transition); text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 1rem;
}
.btn-lg { padding: 16px 36px; font-size: 1.1rem; }
.btn-sm { padding: 8px 16px; font-size: 0.9rem; }
.btn-primary { background: var(--primary-color); color: white; box-shadow: 0 4px 15px rgba(43, 123, 186, 0.3); }
.btn-primary:hover { background: #1a5c91; transform: translateY(-3px); box-shadow: 0 8px 20px rgba(43, 123, 186, 0.4); }
.btn-outline { background: transparent; border: 2px solid var(--primary-color); color: var(--primary-color); }
.btn-outline:hover { background: var(--primary-color); color: white; }

/* -------------------------------------
   Landing Page (Luxurious)
-------------------------------------- */
.landing-container { min-height: 100vh; display: flex; flex-direction: column; }
.landing-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #153e60 100%);
    padding: 100px 20px;
    text-align: center;
    color: white;
    border-bottom-left-radius: 50% 10%;
    border-bottom-right-radius: 50% 10%;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

/* Background Pattern */
.landing-header::before {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px; opacity: 0.5; pointer-events: none;
}

.logo-box {
    background: rgba(255,255,255,0.95);
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 30px; border-radius: var(--radius-lg); margin-bottom: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    position: relative; z-index: 1;
}
.logo-text { color: var(--accent-red); font-family: 'Aref Ruqaa', serif; font-size: 3rem; margin-top: 10px; line-height: 1; }

.hero-subtitle { font-size: 1.5rem; max-width: 600px; margin: 0 auto 40px; font-weight: 300; opacity: 0.9; position: relative; z-index: 1;}
.auth-buttons { display: flex; gap: 20px; justify-content: center; position: relative; z-index: 1;}

.stats-section {
    display: flex; justify-content: center; gap: 40px; margin: -100px auto 50px;
    position: relative; z-index: 10; max-width: 900px; padding: 0 20px;
}
.stat-box {
    background: white; padding: 30px; border-radius: var(--radius-lg); text-align: center;
    flex: 1; box-shadow: var(--shadow-soft);
}
.stat-box h3 { font-size: 3rem; color: var(--secondary-color); font-weight: 800; line-height: 1; margin-bottom: 10px; }
.stat-box p { color: var(--text-muted); font-size: 1.1rem; font-weight: 600; }

.benefits-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px;
}
.benefit-card {
    background: white; border-radius: var(--radius-lg); padding: 25px;
    box-shadow: var(--shadow-soft); position: relative;
    border-top: 5px solid var(--secondary-color);
}
.benefit-card blockquote { font-style: italic; font-size: 1.1rem; line-height: 1.8; color: #444; margin-bottom: 20px; }
.benefit-card .meta { display: flex; justify-content: space-between; font-size: 0.85rem; color: #888; }
.benefit-card .author { font-weight: bold; color: var(--primary-color); }

/* -------------------------------------
   App Dashboard
-------------------------------------- */
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }
.app-header {
    display: flex; justify-content: space-between; align-items: center; padding: 15px 25px;
    background: white; border-radius: var(--radius-md); margin-bottom: 30px; box-shadow: var(--shadow-soft);
}
.logo-area { display: flex; align-items: center; gap: 10px; }
.user-control { display: flex; align-items: center; gap: 15px; }

.badge { padding: 4px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: bold; }
.badge-admin { background: #ffebee; color: #c62828; }
.badge-user { background: #e0f2f1; color: #00695c; }

/* Grid Layouts */
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 25px; }
@media (max-width: 992px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-card { background: white; border-radius: var(--radius-md); padding: 25px; margin-bottom: 25px; box-shadow: var(--shadow-soft); }
.dash-card h2 { color: var(--primary-color); margin-bottom: 20px; border-right: 4px solid var(--accent-color); padding-right: 15px; }

/* Controls & Forms */
input, textarea, select {
    width: 100%; padding: 12px 15px; border-radius: var(--radius-md);
    border: 1px solid #ddd; margin-bottom: 15px; font-size: 1rem; background: #fafafa; transition: var(--transition);
}
input:focus, textarea:focus { outline: none; border-color: var(--secondary-color); background: white; }

/* Book Grid */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px; }
.book-card {
    background: white; padding: 10px; border-radius: var(--radius-md); text-align: center;
    border: 1px solid #eee; cursor: pointer; transition: var(--transition);
}
.book-card:hover { border-color: var(--secondary-color); transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.book-cover { height: 160px; background: #f0f0f0; border-radius: 8px; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: right; border-bottom: 1px solid #eee; }
th { color: var(--primary-color); }
.status-pending { background: #fff8e1; color: #f57f17; padding: 3px 8px; border-radius: 12px; font-size: 0.8rem; }
.status-done { background: #e8f5e9; color: #2e7d32; padding: 3px 8px; border-radius: 12px; font-size: 0.8rem; }

/* Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal { background: white; padding: 40px; border-radius: var(--radius-lg); width: 90%; max-width: 400px; transform: translateY(20px); transition: transform 0.3s; }
.modal-overlay.active .modal { transform: translateY(0); }
