/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}
.modal-overlay.open {
    display: flex;
}
.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.3s ease;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}
.modal-header h3 {
    margin: 0;
}
.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}
.modal-close:hover {
    color: var(--danger);
}
.modal-body {
    padding: 24px;
}

/* ===== Subtasks ===== */
.subtask-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
}
.subtask-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ===== Comments ===== */
.comment-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}
.comment-item p {
    margin: 4px 0;
}
.comment-reply {
    margin-top: 6px;
    padding-right: 12px;
    border-right: 2px solid var(--border-color);
}

:root {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f0f2f5;
    --bg-input: #f8fafc;
    
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #8a8aaa;
    --text-light: #a0aec0;
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 4px 24px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    
    --transition: 0.25s ease;
    --transition-slow: 0.4s ease;
    
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --primary-bg: #eef2ff;
    
    --success: #22c55e;
    --success-bg: #dcfce7;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --info: #3b82f6;
    --info-bg: #dbeafe;
    
    --font: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --header-height: 64px;
    --sidebar-width: 240px;
    --sidebar-collapsed: 72px;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ===== Selection ===== */
::selection {
    background: var(--primary);
    color: #fff;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}
a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--primary-dark);
}

/* ===== Sidebar ===== */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    right: 0;
    background: var(--bg-sidebar);
    border-left: 1px solid var(--border-color);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 1000;
    transition: transform var(--transition-slow), width var(--transition-slow);
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.03);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    flex-shrink: 0;
}

.sidebar-brand i {
    font-size: 28px;
    color: var(--primary);
    background: var(--primary-bg);
    padding: 8px;
    border-radius: var(--radius-sm);
}
.sidebar-brand h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}
.sidebar-brand small {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
    display: block;
    margin-top: -2px;
}

.sidebar-nav {
    flex: 1;
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-nav li {
    margin-bottom: 2px;
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: var(--bg-hover);
    color: var(--primary);
}
.sidebar-nav a.active {
    font-weight: 600;
}
.sidebar-nav a i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
}
.sidebar-nav .nav-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 16px 14px 6px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin-top: 8px;
    flex-shrink: 0;
}
.sidebar-footer .user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}
.sidebar-footer .user-card:hover {
    background: var(--bg-hover);
}
.sidebar-footer .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}
.sidebar-footer .user-info {
    flex: 1;
    min-width: 0;
}
.sidebar-footer .user-info .name {
    font-weight: 600;
    font-size: 14px;
}
.sidebar-footer .user-info .role {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== Main Content ===== */
.main-content {
    margin-right: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    padding: 20px 28px 40px;
    transition: margin var(--transition-slow);
}

/* ===== Topbar ===== */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.topbar-left .menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.topbar-left .menu-toggle:hover {
    background: var(--bg-hover);
}
.topbar-left .page-title h1 {
    font-size: 22px;
    font-weight: 700;
}
.topbar-left .page-title p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===== Language Toggle ===== */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 4px 12px 4px 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}
.lang-toggle:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}
.lang-toggle .lang-icon {
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}
.lang-toggle .lang-label {
    display: inline;
}
.lang-toggle .lang-label-en {
    display: none;
}
body.ltr .lang-toggle .lang-label {
    display: none;
}
body.ltr .lang-toggle .lang-label-en {
    display: inline;
}

/* ===== Icon Buttons ===== */
.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--shadow);
}
.icon-btn:hover {
    background: var(--bg-hover);
    color: var(--primary);
    transform: translateY(-1px);
}
.icon-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ===== Notifications Dropdown ===== */
.notif-dropdown {
    position: absolute;
    top: 52px;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 360px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 999;
    padding: 8px 0;
}
.notif-dropdown.open {
    display: block;
}
.notif-dropdown .notif-item {
    padding: 10px 16px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
    cursor: pointer;
}
.notif-dropdown .notif-item:hover {
    background: var(--bg-hover);
}
.notif-dropdown .notif-item.unread {
    background: var(--primary-bg);
}
.notif-dropdown .notif-item .notif-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}
.notif-dropdown .notif-item .notif-text {
    font-size: 13px;
    flex: 1;
}
.notif-dropdown .notif-item .notif-text small {
    color: var(--text-muted);
    font-size: 11px;
    display: block;
    margin-top: 2px;
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}
.stat-card .stat-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}
.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-top: 4px;
}
.stat-card .stat-icon {
    position: absolute;
    top: 16px;
    left: 16px;
    font-size: 32px;
    opacity: 0.15;
}
.stat-card.primary .stat-value { color: var(--primary); }
.stat-card.success .stat-value { color: var(--success); }
.stat-card.warning .stat-value { color: var(--warning); }
.stat-card.danger .stat-value { color: var(--danger); }
.stat-card.info .stat-value { color: var(--info); }

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    margin-bottom: 24px;
}
.card:hover {
    box-shadow: var(--shadow-hover);
}
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}
.card-body {
    padding: 20px;
}

/* ===== Grids ===== */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

/* ===== Project Cards ===== */
.project-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 16px 18px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}
.project-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}
.project-card .project-color {
    width: 100%;
    height: 4px;
    border-radius: 4px;
    margin-bottom: 12px;
}
.project-card .project-name {
    font-weight: 600;
    font-size: 16px;
}
.project-card .project-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}
.project-card .project-progress {
    margin-top: 12px;
    height: 4px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}
.project-card .project-progress .bar {
    height: 100%;
    border-radius: 4px;
    background: var(--primary);
    transition: width 0.8s ease;
}

/* ===== Task Items ===== */
.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}
.task-item:last-child {
    border-bottom: none;
}
.task-item .task-check {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
}
.task-item .task-check:hover {
    border-color: var(--primary);
}
.task-item .task-check.checked {
    background: var(--primary);
    border-color: var(--primary);
    position: relative;
}
.task-item .task-check.checked::after {
    content: '✓';
    color: #fff;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.task-item .task-info {
    flex: 1;
    min-width: 0;
}
.task-item .task-info .title {
    font-weight: 500;
    font-size: 14px;
}
.task-item .task-info .meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.task-item .task-priority {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    flex-shrink: 0;
}
.task-priority.critical { background: #7c3aed; color: #fff; }
.task-priority.high { background: var(--danger-bg); color: var(--danger); }
.task-priority.medium { background: var(--warning-bg); color: var(--warning); }
.task-priority.low { background: var(--success-bg); color: var(--success); }

/* ===== Status Badges ===== */
.badge-status {
    font-size: 11px;
    padding: 2px 12px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: capitalize;
}
.badge-status.new { background: var(--info-bg); color: var(--info); }
.badge-status.working { background: var(--warning-bg); color: var(--warning); }
.badge-status.review { background: #fef9c3; color: #a16207; }
.badge-status.testing { background: #ede9fe; color: #7c3aed; }
.badge-status.done { background: var(--success-bg); color: var(--success); }
.badge-status.archived { background: var(--border-color); color: var(--text-muted); }

/* ===== Activity Feed ===== */
.activity-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
}
.activity-item:last-child {
    border-bottom: none;
}
.activity-item .avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-light);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.activity-item .content {
    flex: 1;
}
.activity-item .content .time {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== Mini Calendar ===== */
.mini-calendar .weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.mini-calendar .days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.mini-calendar .days span {
    text-align: center;
    padding: 6px 0;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}
.mini-calendar .days span:hover {
    background: var(--bg-hover);
}
.mini-calendar .days span.today {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}
.mini-calendar .days span.other {
    color: var(--text-muted);
}

/* ===== Buttons ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
}
.btn-primary:active {
    transform: scale(0.97);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

/* ===== Auth Pages ===== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eef2ff 0%, #f5f7fa 100%);
    padding: 20px;
}
.auth-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border-color);
}
.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin-bottom: 28px;
}
.auth-brand i {
    font-size: 32px;
    color: var(--primary);
    background: var(--primary-bg);
    padding: 10px;
    border-radius: var(--radius-sm);
}
.auth-brand h2 {
    font-size: 24px;
    font-weight: 700;
}
.auth-card h3 {
    text-align: center;
    font-size: 20px;
    margin-bottom: 24px;
}
.auth-form .form-group {
    margin-bottom: 18px;
}
.auth-form label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text-secondary);
}
.auth-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    transition: var(--transition);
    background: var(--bg-input);
}
.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}
.auth-form .btn-primary {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 16px;
}
.auth-message {
    margin-top: 12px;
    text-align: center;
    font-size: 14px;
    color: var(--danger);
}
.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
}
.auth-switch a {
    font-weight: 600;
}

/* ===== Alerts ===== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}
.alert-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid #fca5a5;
}
.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid #86efac;
}

/* ===== RTL/LTR Overrides ===== */
body.ltr {
    direction: ltr;
}
body.ltr .sidebar {
    right: auto;
    left: 0;
    border-left: none;
    border-right: 1px solid var(--border-color);
}
body.ltr .main-content {
    margin-right: 0;
    margin-left: var(--sidebar-width);
}
body.ltr .topbar-left .menu-toggle {
    order: 2;
}
body.ltr .stat-card .stat-icon {
    left: auto;
    right: 16px;
}
body.ltr .notif-dropdown {
    left: auto;
    right: 0;
}
body.ltr .sidebar-footer .user-card i.fa-chevron-left {
    transform: rotate(180deg);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .grid-2col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
        width: 280px;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-right: 0;
        padding: 16px;
    }
    body.ltr .sidebar {
        transform: translateX(-100%);
    }
    body.ltr .sidebar.open {
        transform: translateX(0);
    }
    body.ltr .main-content {
        margin-left: 0;
    }
    
    .topbar-left .menu-toggle {
        display: block;
    }
    .topbar-left .page-title p {
        display: none;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .project-grid {
        grid-template-columns: 1fr 1fr;
    }
    .notif-dropdown {
        width: 300px;
        left: -60px;
    }
    body.ltr .notif-dropdown {
        left: auto;
        right: -60px;
    }
    .auth-card {
        padding: 28px 20px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .project-grid {
        grid-template-columns: 1fr;
    }
    .topbar-right .icon-btn.hide-mobile {
        display: none;
    }
    .lang-toggle .lang-label {
        display: none;
    }
    .lang-toggle .lang-label-en {
        display: none;
    }
    .notif-dropdown {
        width: 280px;
        left: -80px;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.stat-card, .project-card, .card {
    animation: fadeInUp 0.4s ease forwards;
}
.stat-card:nth-child(2) { animation-delay: 0.05s; }
.stat-card:nth-child(3) { animation-delay: 0.10s; }
.stat-card:nth-child(4) { animation-delay: 0.15s; }

/* ===== Print ===== */
@media print {
    .sidebar, .topbar-right, .icon-btn, .menu-toggle {
        display: none !important;
    }
    .main-content {
        margin: 0 !important;
        padding: 20px !important;
    }
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }
}