﻿/* ===================================================
   Lamia System â€” Tasks CSS
   Matches the main site design language
=================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Outfit', sans-serif;
    --primary: #0F172A;
    --secondary: #0ea5e9;
    --gold: #F59E0B;
    --accent: #8b5cf6;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
    --info: #3b82f6;
    --bg: #F8FAFC;
    --card-bg: rgba(255, 255, 255, 0.75);
    --topbar-bg: rgba(255, 255, 255, 0.7);
    --sidebar-bg: rgba(255, 255, 255, 0.85);
    --sidebar-text: #1E293B;
    --border: rgba(15, 23, 42, 0.06);
    --text: #334155;
    --text-light: #64748b;
    --shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 25px 50px -12px rgba(15, 23, 42, 0.15);
    --radius: 24px;
    --radius-sm: 14px;
    --input-bg: rgba(255, 255, 255, 0.95);
    --footer-bg: rgba(248, 250, 252, 0.5);
    --glass-blur: blur(24px);
    --hover: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] {
    --bg: #0B0F19;
    --card-bg: rgba(15, 23, 42, 0.55);
    --topbar-bg: rgba(15, 23, 42, 0.65);
    --sidebar-bg: rgba(15, 23, 42, 0.6);
    --sidebar-text: #f1f5f9;
    --border: rgba(255, 255, 255, 0.06);
    --text: #f1f5f9;
    --text-light: #94a3b8;
    --shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 20px rgba(14, 165, 233, 0.15);
    --primary: #1e293b;
    --heading-color: #f1f5f9;
    --input-bg: rgba(15, 23, 42, 0.8);
    --footer-bg: rgba(15, 23, 42, 0.4);
    --warning-light: rgba(246, 173, 85, 0.15);
    --danger-light: rgba(229, 62, 62, 0.15);
    --hover: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .ls-table tr:hover td {
    background: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .ls-table .overdue-row td {
    background: rgba(229, 62, 62, 0.15) !important;
}

/* FastNav Loading Bar */
#loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gold);
    z-index: 10000;
    width: 0;
    transition: width 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

/* Page Transitions */
.ls-main {
    transition: opacity 0.25s ease, transform 0.25s ease;
    opacity: 1;
    transform: translateY(0);
}

.page-transitioning {
    opacity: 0;
    transform: translateY(10px);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-ar);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(14, 165, 233, 0.04) 0%, rgba(248, 250, 252, 0) 50%),
        radial-gradient(circle at 100% 0%, rgba(139, 92, 246, 0.03) 0%, rgba(248, 250, 252, 0) 40%);
    z-index: -1;
    pointer-events: none;
}

[data-theme="dark"] body::before {
    background: radial-gradient(circle at 50% 50%, rgba(14, 165, 233, 0.08) 0%, rgba(11, 15, 25, 0) 50%),
        radial-gradient(circle at 100% 0%, rgba(139, 92, 246, 0.06) 0%, rgba(11, 15, 25, 0) 40%);
}

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0F2B46 0%, #1A6B5A 50%, #C8A26E 100%);
    padding: 20px;
}

.login-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--heading-color);
    margin-bottom: 4px;
}

.login-logo span {
    font-size: 0.9rem;
    color: var(--text-light);
}

.login-logo .logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 16px;
    color: white;
}

/* ===== LAYOUT ===== */
.ls-layout {
    display: flex;
    min-height: 100vh;
    max-width: 100vw;
    overflow-x: hidden;
}

.ls-sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-left: 1px solid var(--border);
}

[dir="ltr"] .ls-sidebar {
    right: auto;
    left: 0;
    border-left: none;
    border-right: 1px solid var(--border);
}

.ls-sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
}

.ls-sidebar-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.ls-sidebar-header p {
    font-size: 0.75rem;
    opacity: 0.7;
}

.ls-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.ls-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    border-right: 3px solid transparent;
}

.ls-nav a:hover,
.ls-nav a.active {
    color: var(--secondary);
    background: rgba(14, 165, 233, 0.06);
    border-right-color: var(--secondary);
    padding-right: 24px;
}

.ls-nav a .nav-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.ls-sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.ls-sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.ls-sidebar-footer a:hover {
    color: white;
}

.ls-main {
    margin-right: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.ls-topbar {
    background: var(--topbar-bg);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.ls-topbar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--heading-color);
}

.ls-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    /* Allow wrapping on very small screens */
    justify-content: flex-end;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    color: var(--text-light);
}

.theme-toggle:hover {
    background: var(--bg);
    color: var(--gold);
}

.ls-content {
    padding: 28px;
    flex: 1;
}

/* Notification Bell */
.notif-bell {
    position: relative;
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.2s;
}

.notif-bell:hover {
    color: var(--heading-color);
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-badge-sidebar {
    background: var(--danger);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: auto;
    box-shadow: 0 2px 5px rgba(229, 62, 62, 0.4);
}

/* ===== CARDS ===== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--heading-color);
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px) scale(1.02);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-body .stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--heading-color);
    line-height: 1;
}

.stat-body .stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 2px;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text);
    background: var(--input-bg);
    direction: rtl;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(200, 162, 110, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #1a3d63;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 43, 70, 0.3);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #38a169;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #c53030;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover {
    background: #dd6b20;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--heading-color);
    color: var(--heading-color);
    background: rgba(15, 43, 70, 0.02);
}

.btn-gold {
    background: var(--gold);
    color: white;
}

.btn-gold:hover {
    background: #b8924e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(200, 162, 110, 0.3);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ===== TASK CARDS ===== */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}

.task-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.task-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px) scale(1.02);
}

.task-card.overdue {
    border-color: var(--danger) !important;
}

.task-card-header {
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.task-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--heading-color);
    flex: 1;
}

.task-card-body {
    margin: 0;
    padding: 0;
    padding: 14px 18px;
    flex: 1;
}

.task-card-footer {
    padding: 12px 18px;
    background: var(--footer-bg);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

/* ===== STATUS BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-new {
    background: #e2eaf5;
    color: #0F2B46;
}

.status-progress {
    background: #fff3cd;
    color: #856404;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-review {
    background: #ffe0b2;
    color: #e65100;
}

.status-approved {
    background: #c3e6cb;
    color: #155724;
}

.status-reopened {
    background: #f8d7da;
    color: #721c24;
}

[data-theme="dark"] .status-new {
    background: rgba(226, 234, 245, 0.15);
    color: #a3bfd9;
}

[data-theme="dark"] .status-progress {
    background: rgba(255, 243, 205, 0.15);
    color: #f6ad55;
}

[data-theme="dark"] .status-completed {
    background: rgba(212, 237, 218, 0.15);
    color: #48bb78;
}

[data-theme="dark"] .status-review {
    background: rgba(255, 224, 178, 0.15);
    color: #f6ad55;
}

[data-theme="dark"] .status-approved {
    background: rgba(195, 230, 203, 0.15);
    color: #48bb78;
}

[data-theme="dark"] .status-reopened {
    background: rgba(248, 215, 218, 0.15);
    color: #e53e3e;
}

.priority-urgent {
    background: #fde8e8;
    color: #c53030;
}

.priority-medium {
    background: #fef3c7;
    color: #92400e;
}

.priority-normal {
    background: #e6f4ea;
    color: #276749;
}

/* ===== AVATAR ===== */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.avatar-lg {
    width: 52px;
    height: 52px;
    font-size: 1.1rem;
}

/* ===== DUE DATE ===== */
.due-date {
    font-size: 0.78rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

.due-date.overdue {
    color: var(--danger);
    font-weight: 700;
}

/* ===== TABLE ===== */
.ls-table {
    width: 100%;
    border-collapse: collapse;
}

.ls-table th {
    text-align: right;
    padding: 10px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    border-bottom: 2px solid var(--border);
}

.ls-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.ls-table tr:hover td {
    background: var(--hover, #f8fafc);
}

.ls-table .overdue-row td {
    background: var(--danger-light, #fff5f5);
}

/* ===== SEARCH & FILTERS BAR ===== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-bar .form-control {
    width: auto;
    flex: 1;
    min-width: 180px;
}

.search-wrap {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.search-wrap input {
    padding-right: 38px !important;
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

/* ===== COMMENTS THREAD ===== */
.comments-thread {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.comment-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.comment-bubble {
    background: var(--card-bg);
    border-radius: 12px 0 12px 12px;
    padding: 12px 16px;
    flex: 1;
}

.comment-bubble.manager-comment {
    background: var(--warning-light, #fff3e0);
}

.comment-bubble.revision-flag {
    background: var(--danger-light, #fde8e8);
    border-right: 3px solid var(--danger);
}

.comment-meta {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 4px;
}

.comment-text {
    font-size: 0.875rem;
}

/* ===== HONOR BOARD ===== */
.honor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.honor-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(15, 43, 70, 0.25);
}

.honor-card::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
}

.honor-rank {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.honor-name {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.honor-dept {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-bottom: 16px;
}

.honor-stars {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.honor-score {
    font-size: 0.85rem;
    opacity: 0.85;
}

.honor-gold {
    background: linear-gradient(135deg, #b8860b 0%, #f4c430 50%, #b8860b 100%);
}

.honor-silver {
    background: linear-gradient(135deg, #4a4a4a 0%, #aaa 50%, #4a4a4a 100%);
}

.honor-bronze {
    background: linear-gradient(135deg, #7c4a1e 0%, #cd7f32 50%, #7c4a1e 100%);
}

/* ===== MODAL ===== */
.ls-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ls-modal-overlay.active {
    display: flex;
}

.ls-modal {
    background: var(--card-bg);
    border-radius: 18px;
    width: 100%;
    max-width: 560px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ls-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ls-modal-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--heading-color);
}

.ls-modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
    transition: color 0.2s;
}

.ls-modal-close:hover {
    color: var(--danger);
}

.ls-modal-body {
    margin: 0;
    padding: 0;
    padding: 24px;
}

.ls-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ===== NOTIFICATIONS DROPDOWN ===== */
.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--card-bg);
    border-radius: 14px;
    width: 340px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    z-index: 300;
    display: none;
    overflow: hidden;
}

.notif-dropdown.open {
    display: block;
}

.notif-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 10px;
    align-items: flex-start;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: var(--text);
}

.notif-item:hover {
    background: var(--bg);
}

.notif-item.unread {
    background: var(--footer-bg);
}

.notif-item .notif-icon {
    font-size: 1.1rem;
}

.notif-item .notif-text {
    font-size: 0.82rem;
    line-height: 1.5;
}

.notif-item .notif-time {
    font-size: 0.72rem;
    color: var(--text-light);
    margin-top: 2px;
}

.notif-header {
    padding: 14px 16px;
    font-weight: 700;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===== STAR RATING INPUT ===== */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    gap: 4px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.15s;
}

.star-rating input:checked~label,
.star-rating label:hover,
.star-rating label:hover~label {
    color: #f4c430;
}

/* ===== PERFORMANCE CHART ===== */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

/* ===== PRINT STYLES ===== */
@media print {

    .ls-sidebar,
    .ls-topbar,
    .btn,
    .filter-bar,
    .notif-bell {
        display: none !important;
    }

    .ls-main {
        margin-right: 0 !important;
    }

    .ls-content {
        padding: 0 !important;
    }

    body {
    margin: 0;
    padding: 0;
        background: var(--bg);
    }

    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    /* Table column hiding for mobile */
    .ls-table th.hide-mobile,
    .ls-table td.hide-mobile {
        display: none !important;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .ls-sidebar {
        transform: translateX(100%);
        width: 85%;
        max-width: 300px;
        backdrop-filter: blur(10px);
        background: rgba(15, 43, 70, 0.95);
    }

    .ls-sidebar.mobile-open {
        transform: translateX(0);
    }

    .ls-main {
        margin-right: 0;
    }

    .ls-topbar {
        padding: 12px 16px;
    }

    .ls-content {
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
    }

    .tasks-grid {
        grid-template-columns: 1fr;
    }

    /* Handle Button Groups on Mobile */
    .dashboard-actions {
        flex-direction: column;
        align-items: stretch !important;
        gap: 8px !important;
    }

    .dashboard-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .honor-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .ls-modal {
        max-width: 100%;
    }

    .notif-dropdown {
        width: 290px;
    }

    .charts-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 10px;
    }

    .stat-card {
        padding: 12px;
        gap: 10px;
    }

    .stat-body .stat-number {
        font-size: 1.3rem;
    }

    .ls-topbar-title {
        font-size: 0.9rem;
        max-width: 140px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ls-topbar-actions {
        gap: 6px;
    }

    .ls-topbar {
        padding: 10px 12px;
    }
}

/* Mobile toggle button */
.mobile-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--heading-color);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99;
}

@media (max-width: 768px) {
    .mobile-sidebar-toggle {
        display: flex;
        align-items: center;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

/* Misc helpers */
.text-muted {
    color: var(--text-light);
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 16px;
}

.mb-4 {
    margin-bottom: 16px;
}

.gap-4 {
    gap: 16px;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

.w-full {
    width: 100%;
}

.hidden {
    display: none;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 0.9rem;
}

.progress-bar-wrap {
    background: var(--border);
    border-radius: 20px;
    height: 8px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(90deg, var(--secondary), var(--gold));
    transition: width 0.6s ease;
}

/* LTR SUPPORT */
[dir='ltr'] body {
    margin: 0;
    padding: 0;
    font-family: var(--font-en);
}

[dir='ltr'] body {
    margin: 0;
    padding: 0;
    direction: ltr;
    text-align: left;
}

[dir='ltr'] .ls-sidebar {
    right: auto;
    left: 0;
    border-left: none;
    border-right: 1px solid var(--border);
}

[dir='ltr'] .ls-main {
    margin-right: 0;
    margin-left: 260px;
}

[dir='ltr'] .ls-nav a {
    border-right: none;
    border-left: 3px solid transparent;
}

[dir='ltr'] .ls-nav a:hover,
[dir='ltr'] .ls-nav a.active {
    border-right-color: transparent;
    border-left-color: var(--secondary);
    padding-right: 20px;
    padding-left: 24px;
}

[dir='ltr'] .notif-badge-sidebar {
    margin-right: 0;
    margin-left: auto;
}

[dir='ltr'] .notif-dropdown {
    left: auto;
    right: 0;
}

[dir='ltr'] .search-wrap input {
    padding-right: 14px !important;
    padding-left: 38px !important;
}

[dir='ltr'] .search-icon {
    right: auto;
    left: 12px;
}

[dir='ltr'] .ls-table th,
[dir='ltr'] .ls-table td {
    text-align: left;
}

[dir='ltr'] .form-control {
    direction: ltr;
}

[dir='ltr'] .comment-bubble.me {
    border-radius: var(--radius-sm) var(--radius-sm) 0 var(--radius-sm);
}

[dir='ltr'] .comment-bubble.other {
    border-radius: var(--radius-sm) var(--radius-sm) var(--radius-sm) 0;
}

@media (max-width: 768px) {
    [dir='ltr'] .ls-sidebar {
        transform: translateX(-100%);
        left: 0;
        right: auto;
        text-align: left;
    }

    [dir='ltr'] .ls-sidebar.mobile-open {
        transform: translateX(0);
    }

    [dir='ltr'] .ls-nav a {
        justify-content: flex-start;
        flex-direction: row;
        text-align: left;
    }

    [dir='ltr'] .ls-sidebar-header {
        text-align: left;
    }

    [dir='ltr'] .ls-sidebar-footer {
        justify-content: flex-start;
    }

    [dir='ltr'] .ls-main {
        margin-left: 0;
    }
}
/* ===== STAR RATING ===== */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
}

.star-rating input[type="radio"] {
    display: none;
}

.star-rating label {
    font-size: 1.8rem;
    color: #d4d4d4;
    cursor: pointer;
    transition: color 0.2s, transform 0.15s;
    line-height: 1;
}

.star-rating input[type="radio"]:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #F59E0B;
    transform: scale(1.15);
}

/* ===== MOBILE NATIVE APP BOTTOM NAVIGATION ===== */
@media (max-width: 768px) {
    body {
    margin: 0;
    padding: 0;
        overscroll-behavior-y: none;
    }
    
    .ls-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 70px;
        flex-direction: row;
        padding: 0;
        z-index: 1000;
        transform: translateX(0) !important;
        transition: none;
        background: var(--card-bg);
        border-top: 1px solid var(--border);
        border-right: none;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
        backdrop-filter: blur(20px);
        overflow: visible;
    }
    .ls-sidebar-header, .ls-sidebar-footer, .sidebar-overlay {
        display: none !important;
    }
    .ls-nav {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        scroll-snap-type: x mandatory;
        padding: 0 10px;
        align-items: center;
        -webkit-overflow-scrolling: touch;
        gap: 0;
    }
    .ls-nav::-webkit-scrollbar {
        display: none;
    }
    .ls-nav a {
        flex-direction: column;
        justify-content: center;
        padding: 8px 12px;
        margin: 0;
        font-size: 0.65rem;
        background: transparent !important;
        border-radius: 0;
        flex: 0 0 auto;
        color: var(--text-light);
        min-width: 65px;
        scroll-snap-align: center;
        text-align: center;
    }
    .ls-nav a .nav-icon {
        font-size: 1.3rem;
        margin: 0 0 6px 0;
        display: block;
        transition: transform 0.2s;
    }
    .ls-nav a.active {
        color: var(--primary);
        font-weight: 700;
    }
    .ls-nav a.active .nav-icon {
        transform: scale(1.15) translateY(-2px);
    }
    .notif-badge-sidebar {
        position: absolute;
        top: 4px;
        right: 15px;
        font-size: 0.6rem;
        padding: 2px 5px;
        border-radius: 10px;
    }
    
    .mobile-sidebar-toggle {
        display: none !important;
    }
    
    .ls-main {
        margin-left: 0 !important;
        padding-bottom: 85px !important; /* Space for bottom nav */
    }
    
    .ls-topbar {
        position: sticky;
        top: 0;
        z-index: 999;
        background: var(--card-bg);
        backdrop-filter: blur(20px);
        padding-left: 14px;
        padding-right: 14px;
        justify-content: space-between;
    }
}
@media (max-width: 768px) {
    .mobile-user-menu {
        display: block !important;
    }
    .ls-topbar .avatar {
        display: none !important;
    }
}

/* =========================================
   📱 MOBILE NATIVE APP UI FIXES (MAX-WIDTH: 768px)
   ========================================= */
@media (max-width: 768px) {
    body {
        margin: 0 !important;
        padding: 0 !important;
        padding-bottom: 80px !important; /* space for bottom nav */
    }

    /* 1. BOTTOM NAVIGATION (OVERRIDING SIDEBAR) */
    .ls-sidebar, .ls-sidebar.mobile-open {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 75px !important;
        transform: none !important;
        display: flex !important;
        flex-direction: row !important;
        background: var(--card-bg) !important;
        border: none !important;
        border-top: 1px solid var(--border) !important;
        box-shadow: 0 -4px 15px rgba(0,0,0,0.05) !important;
        z-index: 9999 !important;
        border-radius: 20px 20px 0 0 !important; /* Premium rounded top corners */
        padding: 0 !important;
    }

    /* Hide unnecessary sidebar elements */
    .ls-sidebar-header, 
    .ls-sidebar-footer, 
    .sidebar-overlay {
        display: none !important;
    }

    /* Horizontally scrollable navigation links */
    .ls-nav {
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 5px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        align-items: center !important;
        justify-content: space-around !important; /* Distribute evenly */
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important; /* Firefox */
    }
    .ls-nav::-webkit-scrollbar {
        display: none !important; /* Safari and Chrome */
    }

    .ls-nav a {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
        font-size: 0.65rem !important;
        color: var(--text-light) !important;
        background: transparent !important;
        border-radius: 0 !important;
        height: 100% !important;
        flex: 1 1 0px !important; /* Equal width */
        min-width: 65px !important;
        transition: all 0.2s ease !important;
        border: none !important;
        font-weight: 500 !important;
    }

    .ls-nav a .nav-icon {
        font-size: 1.4rem !important;
        margin: 0 0 4px 0 !important;
        display: block !important;
        transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    }

    .ls-nav a.active {
        color: var(--primary) !important;
        font-weight: 700 !important;
    }

    .ls-nav a.active .nav-icon {
        transform: translateY(-4px) scale(1.15) !important;
        filter: drop-shadow(0 4px 6px rgba(15, 43, 70, 0.2)) !important; /* Subtle shadow on active icon */
    }

    /* Reposition Notification Badge on Bottom Nav */
    .notif-badge-sidebar {
        position: absolute !important;
        top: 8px !important;
        right: 50% !important;
        transform: translateX(15px) !important;
        background: var(--danger) !important;
        color: white !important;
        font-size: 0.55rem !important;
        padding: 2px 5px !important;
        border-radius: 10px !important;
        border: 2px solid var(--card-bg) !important; /* Cutout effect */
        z-index: 10 !important;
    }

    /* 2. TOPBAR FOR MOBILE */
    .ls-main {
        margin: 0 !important;
        padding: 0 !important;
        padding-bottom: 90px !important; 
        min-height: 100vh !important;
    }

    .ls-topbar {
        position: sticky !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 9998 !important;
        background: rgba(255, 255, 255, 0.9) !important;
        backdrop-filter: blur(15px) !important;
        border-bottom: 1px solid rgba(0,0,0,0.05) !important;
        padding: 12px 16px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
    
    [data-theme="dark"] .ls-topbar {
        background: rgba(15, 43, 70, 0.9) !important;
        border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    }

    /* Hide Hamburger toggle */
    .mobile-sidebar-toggle {
        display: none !important;
    }

    .ls-topbar-title {
        font-size: 1.1rem !important;
        font-weight: 800 !important;
    }

    /* Clean up the actions area for mobile */
    .ls-topbar-actions {
        gap: 12px !important;
    }

    /* Hide Desktop Avatar */
    .ls-topbar .desktop-avatar {
        display: none !important;
    }

    /* Hide Language & Theme from Topbar on Mobile (Too Crowded) */
    .ls-topbar-actions > a[href^="?lang="],
    .ls-topbar-actions > .theme-toggle {
        display: none !important;
    }

    .mobile-user-menu {
        display: block !important;
    }
    
    .mobile-user-menu img, .mobile-user-menu .avatar-placeholder {
        width: 36px !important;
        height: 36px !important;
        border-radius: 50% !important;
        box-shadow: var(--shadow-sm) !important;
    }
}
