/* ============================================================
   style.css — نظام اختراق الوزاري
   تنسيقات كاملة لملف index.html (RTL + متجاوب + وضع ليلي)
   ============================================================ */


/* ============================================================
   1) استيراد الخطوط (Tajawal)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');


/* ============================================================
   2) متغيرات CSS العامة
   ============================================================ */
:root {
    /* ===== الألوان الأساسية ===== */
    --primary:        #10b981;
    --primary-dark:   #059669;
    --primary-light:  #34d399;
    --secondary:      #0ea5e9;
    --accent:         #f59e0b;

    /* ===== خلفيات ===== */
    --bg-light:   #f9fafb;
    --bg-dark:    #111827;

    /* ===== بطاقات ===== */
    --card-light: #ffffff;
    --card-dark:  #1f2937;

    /* ===== نصوص ===== */
    --text-light: #1f2937;
    --text-dark:  #f9fafb;
    --text-muted: #6b7280;

    /* ===== حدود ===== */
    --border-light: #e5e7eb;
    --border-dark:  #374151;

    /* ===== حالات ===== */
    --error:   #ef4444;
    --success: #10b981;
    --warning: #f59e0b;

    /* ===== ظلال ===== */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);

    /* ===== زوايا ===== */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;

    /* ===== انتقال ===== */
    --transition: all 0.3s ease;
}


/* ============================================================
   3) إعادة تعيين (Reset)
   ============================================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

img,
svg {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

table {
    border-collapse: collapse;
    width: 100%;
}


/* ============================================================
   4) الخطوط و Body
   ============================================================ */
body {
    font-family: 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    color: var(--text-light);
    background-color: var(--bg-light);
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}


/* ============================================================
   5) الوضع الليلي (body.dark-mode)
   ============================================================ */
body.dark-mode {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

body.dark-mode .app-header,
body.dark-mode .sidebar,
body.dark-mode .card,
body.dark-mode .login-box,
body.dark-mode .prompt-card {
    background-color: var(--card-dark);
    color: var(--text-dark);
}

body.dark-mode .nav-btn {
    color: var(--text-dark);
}

body.dark-mode .nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background-color: #374151;
    color: var(--text-dark);
    border-color: var(--border-dark);
}

body.dark-mode .divider {
    border-color: var(--border-dark);
}

body.dark-mode .card-desc,
body.dark-mode .prompt-desc,
body.dark-mode .footer-copy {
    color: #9ca3af;
}

body.dark-mode .habits-table th {
    background-color: var(--primary-dark);
}

body.dark-mode .habits-table td {
    border-bottom-color: var(--border-dark);
}

body.dark-mode .watermark {
    color: rgba(255, 255, 255, 0.15);
}


/* ============================================================
   6) شاشة الدخول (#loginScreen)
   ============================================================ */
.login-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.login-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}


/* ============================================================
   7) بطاقة الدخول (.login-box)
   ============================================================ */
.login-box {
    width: 90%;
    max-width: 450px;
    padding: 40px 32px;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: fadeIn 0.5s ease both;
}

/* شعار البطاقة */
.login-logo {
    width: 74px;
    height: 74px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 34px;
    color: var(--primary);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(5, 150, 105, 0.26));
    border: 2px solid rgba(16, 185, 129, 0.28);
    box-shadow: 0 10px 24px -10px rgba(16, 185, 129, 0.7);
    animation: pulse 3s ease-in-out infinite;
}

/* عنوان البطاقة */
.login-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 8px;
}

.login-subtitle {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* رسائل الدخول */
.login-error,
.login-success {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    animation: fadeIn 0.3s ease both;
}

.login-error {
    color: #991b1b;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.login-success {
    color: #065f46;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
}


/* ============================================================
   8) حقول الإدخال (Inputs / Selects / Textareas)
   ============================================================ */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 8px;
}

.form-group label i {
    color: var(--primary);
    margin-inline-end: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="date"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-light);
    background: #f9fafb;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

input::placeholder,
textarea::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #d1d5db;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

input:disabled,
select:disabled,
textarea:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* حقول inline (حقل + زر بجانبه) */
.inline-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.inline-group input {
    flex: 1;
}

/* شبكة الحقول */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}


/* ============================================================
   9) الأزرار (.btn)
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
    text-align: center;
}

.btn i {
    font-size: 0.95em;
}

/* زر أساسي */
.btn-primary {
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 8px 16px -8px rgba(16, 185, 129, 0.8);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -8px rgba(5, 150, 105, 0.9);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

/* زر ثانوي */
.btn-secondary {
    color: var(--primary);
    background: transparent;
    border: 2px solid var(--primary);
}

.btn-secondary:hover:not(:disabled) {
    color: #ffffff;
    background: var(--primary);
}

/* زر شفاف */
.btn-ghost {
    color: var(--text-light);
    background: transparent;
    border: 1px solid var(--border-light);
}

.btn-ghost:hover:not(:disabled) {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.06);
}

/* زر خطر */
.btn-danger {
    color: #ffffff;
    background: var(--error);
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    transform: translateY(-2px);
}

/* أحجام */
.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none;
}

/* صف الأزرار */
.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}


/* ============================================================
   10) الهيدر (Header)
   ============================================================ */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    background: var(--card-light);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-light);
}

.brand-icon {
    font-size: 1.6rem;
    color: var(--primary);
}

.brand-text {
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* أزرار الهيدر الأيقونية */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 40px;
    height: 40px;
    font-size: 1.05rem;
    color: var(--text-light);
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.icon-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.06);
}

.icon-btn .lang-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.menu-toggle {
    display: none; /* يظهر على الهاتف فقط */
}


/* ============================================================
   11) هيكل التطبيق (Layout)
   ============================================================ */
.app-layout {
    display: flex;
    min-height: calc(100vh - 70px);
}


/* ============================================================
   12) الشريط الجانبي (Sidebar)
   ============================================================ */
.sidebar {
    position: fixed;
    top: 70px;
    right: 0;
    width: 250px;
    height: calc(100vh - 70px);
    padding: 20px 0;
    background: var(--card-light);
    box-shadow: var(--shadow-md);
    overflow-y: auto;
    z-index: 90;
    transition: transform 0.3s ease;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-light);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: right;
    transition: var(--transition);
}

.nav-btn i {
    font-size: 1.05rem;
    width: 22px;
    text-align: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-btn:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.nav-btn:hover i {
    color: var(--primary);
}

.nav-btn.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 6px 14px -8px rgba(16, 185, 129, 0.9);
}

.nav-btn.active i {
    color: #ffffff;
}


/* ============================================================
   13) منطقة المحتوى الرئيسية (Main)
   ============================================================ */
.main-content {
    flex: 1;
    margin-right: 250px;
    padding: 24px;
    transition: margin-right 0.3s ease;
}


/* ============================================================
   14) الأقسام (.content-section)
   ============================================================ */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.35s ease both;
}


/* ============================================================
   15) البطاقات (.card)
   ============================================================ */
.card {
    padding: 24px;
    margin-bottom: 24px;
    background: var(--card-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 12px;
}

.card-title i {
    color: var(--primary);
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 18px;
}

.highlight {
    color: var(--primary);
    font-weight: 700;
}


/* ============================================================
   16) بطاقة الترحيب
   ============================================================ */
.welcome-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(5, 150, 105, 0.14));
    border: 1px solid rgba(16, 185, 129, 0.2);
}


/* ============================================================
   17) العداد التنازلي (Countdown)
   ============================================================ */
.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 8px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.countdown-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.countdown-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}


/* ============================================================
   18) بطاقة التحفيز
   ============================================================ */
.motivation-card {
    position: relative;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.16));
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.quote-icon {
    font-size: 2rem;
    color: var(--accent);
    opacity: 0.5;
    margin-bottom: 10px;
}

.motivation-text {
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.9;
    color: var(--text-light);
    margin-bottom: 16px;
    font-style: italic;
}


/* ============================================================
   19) بطاقة عدد الطلاب الآن
   ============================================================ */
.students-now-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(14, 165, 233, 0.16));
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.students-now-card > i {
    font-size: 2rem;
    color: var(--secondary);
}

.students-now-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary);
    font-variant-numeric: tabular-nums;
}

.students-now-label {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}


/* ============================================================
   20) الأزرار السريعة (Quick Actions)
   ============================================================ */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 12px;
}

.quick-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: right;
    transition: var(--transition);
}

.quick-btn i {
    font-size: 1.15rem;
    color: var(--primary);
    width: 22px;
    text-align: center;
}

.quick-btn:hover {
    border-color: var(--primary);
    background: #ffffff;
    transform: translateX(-3px);
    box-shadow: var(--shadow-md);
}


/* ============================================================
   21) فلتر الشرائح (Chips)
   ============================================================ */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.chip {
    padding: 8px 16px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.chip:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.chip.active {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
}


/* ============================================================
   22) بطاقات الأوامر (.prompt-card)
   ============================================================ */
.prompts-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.prompt-card {
    padding: 20px;
    background: var(--card-light);
    border-right: 4px solid var(--primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.prompt-card:hover {
    transform: translateX(-4px);
    box-shadow: var(--shadow-md);
}

.prompt-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prompt-title i {
    color: var(--primary);
}

.prompt-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 12px;
}

.prompt-text {
    padding: 12px 14px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    color: var(--text-light);
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 12px;
    direction: ltr;
    text-align: left;
    word-break: break-word;
    line-height: 1.6;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
}


/* ============================================================
   23) المؤقت (Focus Timer)
   ============================================================ */
.focus-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
}

.focus-timer-ring {
    position: relative;
    width: 220px;
    height: 220px;
    display: grid;
    place-items: center;
}

.focus-timer-svg {
    position: absolute;
    inset: 0;
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.focus-timer-track {
    fill: none;
    stroke: var(--border-light);
    stroke-width: 10;
}

.focus-timer-progress {
    fill: none;
    stroke: url(#timerGradient);
    stroke: var(--primary);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.6s ease;
}

.focus-timer-display {
    position: relative;
    z-index: 1;
    font-size: 44px;
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
    direction: ltr;
}

.focus-timer-status {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
}

.focus-session-info {
    display: flex;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    padding: 6px 16px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50px;
}


/* ============================================================
   24) قوائم المراجعة (Memory)
   ============================================================ */
.memory-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.memory-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border-right: 4px solid var(--primary);
    transition: var(--transition);
}

.memory-item:hover {
    transform: translateX(-3px);
    box-shadow: var(--shadow-sm);
}

.memory-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.memory-subject {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-light);
}

.memory-lesson {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.memory-date {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
}

.memory-delete {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.memory-delete:hover {
    color: #ffffff;
    background: var(--error);
}


/* ============================================================
   25) مخطط الدراسة (Planner)
   ============================================================ */
.planner-container {
    margin-top: 20px;
    overflow-x: auto;
}

.planner-container table {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.planner-container th {
    padding: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    background: var(--primary);
    text-align: center;
}

.planner-container td {
    padding: 12px;
    font-size: 0.85rem;
    color: var(--text-light);
    border-bottom: 1px solid var(--border-light);
    text-align: center;
    background: var(--card-light);
}

.planner-container tr:hover td {
    background: var(--bg-light);
}


/* ============================================================
   26) حاسبة المعدل (GPA)
   ============================================================ */
.gpa-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.gpa-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 10px;
    align-items: center;
}

.gpa-row input {
    font-size: 0.9rem;
    padding: 10px 12px;
}

.gpa-row .gpa-remove {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.gpa-row .gpa-remove:hover {
    color: #ffffff;
    background: var(--error);
}

.gpa-result {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 18px;
    margin-top: 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.16));
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-md);
}

.gpa-result-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
}

.gpa-result-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.gpa-result-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}


/* ============================================================
   27) جدول العادات (Habits)
   ============================================================ */
.habits-table-wrap {
    margin-top: 16px;
    overflow-x: auto;
    border-radius: var(--radius-md);
}

.habits-table th {
    padding: 10px 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
    background: var(--primary);
    text-align: center;
    white-space: nowrap;
}

.habits-table td {
    padding: 10px 8px;
    font-size: 0.85rem;
    color: var(--text-light);
    border-bottom: 1px solid var(--border-light);
    text-align: center;
}

.habits-table tbody tr:hover td {
    background: var(--bg-light);
}

/* خانة التأشير */
.habit-check {
    width: 22px;
    height: 22px;
    accent-color: var(--primary);
    cursor: pointer;
}

.habit-name {
    font-weight: 600;
    text-align: right;
}

.habit-delete {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.habit-delete:hover {
    color: #ffffff;
    background: var(--error);
}

/* شريط التقدم */
.progress-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}

.progress-bar {
    flex: 1;
    height: 10px;
    background: var(--border-light);
    border-radius: 50px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 50px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 44px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}


/* ============================================================
   28) شارات الإنجازات (.badge)
   ============================================================ */
.achievements-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 10px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition);
}

.badge-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.badge {
    width: 80px;
    height: 80px;
    display: grid;
    place-items: center;
    font-size: 32px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.badge.locked {
    opacity: 0.3;
    filter: grayscale(1);
    background: linear-gradient(135deg, #9ca3af, #d1d5db);
}

.badge-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
}

.badge-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
}


/* ============================================================
   29) قائمة الإعدادات
   ============================================================ */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
