body {
    background-color: #111 !important;
    color: #eee !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    text-align: right;
    margin: 0;
    padding: 0;
}

.navbar, .main-header {
    background-color: #1c1c1c !important;
    border-bottom: 1px solid #333;
}

.navbar a, .nav-link {
    color: #00ffff !important;
}

.content-wrapper {
    margin-right: 140px;
    width: calc(100% - 140px);
    padding: 20px;
}

.content-wrapper, .content-header, .content {
    background-color: #111 !important;
    text-align: center;
}

.content, .card, .small-box {
    background-color: #1c1c1c !important;
    color: #eee !important;
}

.small-box h3, .small-box p {
    color: #fff !important;
    word-break: break-word;
}

.small-box .inner h3 {
    font-size: 1.5rem;
    word-break: break-word;
}

.card-header, .card-body, .card-footer {
    background-color: #1c1c1c !important;
    color: #eee !important;
}

.table {
    color: #eee !important;
}

.table th, .table td {
    border-color: #444 !important;
}

h1, h2, h3, h4, h5, h6 {
    color: #00ffff !important;
}

a {
    color: #00ffff !important;
}

.btn {
    background-color: #00ffff !important;
    color: #111 !important;
    border: none;
}

.btn:hover {
    background-color: #00cccc !important;
}

.sidebar {
    background-color: #111 !important;
    width: 140px;
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    padding: 10px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar a {
    color: #000 !important;
    text-align: center;
    padding: 8px;
    margin: 2px 0;
}

.row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

canvas {
    width: 100% !important;
    height: 400px !important;
    max-width: 100%;
}

.row > div {
    padding: 20px;
}

.small-box {
    padding: 20px;
    box-sizing: border-box;
    min-height: 100px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100%;
    text-align: center;
}

/* أجهزة الحاسوب */
@media (min-width: 768px) {
    .small-box {
        width: calc(25% - 10px);
    }
}

/* شاشات كبيرة */
@media (min-width: 1600px) {
    .small-box h3 {
        font-size: 2.8rem;
    }

    .small-box p {
        font-size: 1.5rem;
    }

    .small-box {
        min-height: 160px;
    }
}

/* شاشات متوسطة */
@media (min-width: 1200px) and (max-width: 1600px) {
    .small-box h3 {
        font-size: 2.2rem;
    }

    .small-box p {
        font-size: 1.2rem;
    }
}

/* 📱 شاشات الهواتف */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        border-bottom: 1px solid #444;
        padding: 10px 0;
    }

    .sidebar a {
        flex: 1 1 45%;
        margin: 5px;
        font-size: 14px;
    }

    .content-wrapper {
        margin-right: 0;
        width: 100%;
        padding: 10px;
    }

    .row {
        flex-direction: column;
    }

    .row > div {
        width: 100%;
        padding: 10px 0;
    }

    canvas {
        height: 300px !important;
    }

    .small-box h3 {
        font-size: 1.3rem;
    }

    .small-box p {
        font-size: 1rem;
    }
}
