* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --background: #f5f7fb;
    --white: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
}

body {
    font-family: Arial, sans-serif;
    background: var(--background);
    color: var(--text);
}

/* =========================
   LOGIN
========================= */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    position: relative;
}

.login-card {
    width: 100%;
    max-width: 430px;
    background: var(--white);
    padding: 42px;
    border-radius: 20px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.08);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    width: 55px;
    height: 55px;
    margin: 0 auto 18px;
    border-radius: 15px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    font-weight: bold;
}

.login-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--muted);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    outline: none;
    font-size: 15px;
}

.form-group input:focus {
    border-color: var(--primary);
}

.login-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.login-btn:hover {
    background: var(--primary-dark);
}

.login-error {
    color: var(--danger);
    text-align: center;
    margin-top: 14px;
    font-size: 14px;
}

.language-btn {
    position: absolute;
    top: 25px;
    right: 30px;
    padding: 9px 16px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 9px;
    cursor: pointer;
    font-weight: bold;
}

html[dir="rtl"] .language-btn {
    right: auto;
    left: 30px;
}

/* =========================
   DEMO ACCOUNTS
========================= */

.demo-accounts {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.demo-accounts h3 {
    font-size: 14px;
    margin-bottom: 15px;
}

.demo-account {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    font-size: 13px;
}

.demo-account span {
    color: var(--muted);
}

.demo-accounts small {
    display: block;
    margin-top: 10px;
    color: var(--muted);
}

/* =========================
   DASHBOARD
========================= */

.dashboard {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 240px;
    min-height: 100vh;
    background: #111827;
    color: white;
    padding: 25px 15px;
    display: flex;
    flex-direction: column;
}

html[dir="rtl"] .sidebar {
    order: 2;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px 30px;
    font-size: 20px;
    font-weight: bold;
}

.brand-logo {
    width: 38px;
    height: 38px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.nav-item {
    width: 100%;
    border: none;
    background: transparent;
    color: #d1d5db;
    padding: 13px 12px;
    border-radius: 9px;
    text-align: start;
    cursor: pointer;
    font-size: 14px;
}

.nav-item:hover,
.nav-item.active {
    background: #1f2937;
    color: white;
}

.logout-btn {
    margin-top: auto;
    border: none;
    background: #1f2937;
    color: #d1d5db;
    padding: 13px;
    border-radius: 9px;
    cursor: pointer;
}

.main-content {
    flex: 1;
    padding: 30px;
    overflow-x: hidden;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.topbar h1 {
    font-size: 28px;
    margin-bottom: 6px;
}

.topbar p {
    color: var(--muted);
}

.profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.profile small {
    display: block;
    color: var(--muted);
    margin-top: 3px;
}

/* =========================
   STATS
========================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--border);
}

.stat-icon {
    width: 45px;
    height: 45px;
    border-radius: 11px;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-card span {
    color: var(--muted);
    font-size: 13px;
}

.stat-card h2 {
    margin-top: 5px;
}

/* =========================
   PANELS
========================= */

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 22px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.panel-header h2 {
    font-size: 18px;
    margin-bottom: 5px;
}

.panel-header p {
    color: var(--muted);
    font-size: 13px;
}

.view-btn {
    border: none;
    background: #eef2ff;
    color: var(--primary);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

/* =========================
   TABLE
========================= */

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 10px;
    text-align: start;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

th {
    color: var(--muted);
    font-weight: 600;
}

.status {
    display: inline-block;
    padding: 6px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
}

.completed {
    background: #dcfce7;
    color: var(--success);
}

.progress {
    background: #fef3c7;
    color: var(--warning);
}

.pending {
    background: #fee2e2;
    color: var(--danger);
}

/* =========================
   EMPLOYEES
========================= */

.employee-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.employee-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.employee-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #eef2ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.employee-info {
    flex: 1;
}

.employee-info strong {
    display: block;
    font-size: 14px;
}

.employee-info span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px;
}

.rating {
    font-size: 13px;
    font-weight: bold;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1000px) {

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {

    .dashboard {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
    }

    .brand {
        padding-bottom: 15px;
    }

    .nav {
        flex-direction: row;
        overflow-x: auto;
    }

    .nav-item {
        white-space: nowrap;
    }

    .logout-btn {
        margin-top: 15px;
    }

    .main-content {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 500px) {

    .login-card {
        padding: 30px 22px;
    }

    .language-btn {
        top: 15px;
        right: 15px;
    }

    html[dir="rtl"] .language-btn {
        right: auto;
        left: 15px;
    }
}
.form-group select {
    width: 100%;
    padding: 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    outline: none;
    font-size: 15px;
    background: white;
    color: #1f2937;
    cursor: pointer;
}

.form-group select:focus {
    border-color: var(--primary);
}

.demo-accounts {
    text-align: center;
}

.demo-accounts p {
    color: var(--muted);
    font-size: 13px;
    margin-top: 8px;
}
