@font-face {
    font-family: system-ui-fa;
    src: local("Tahoma");
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Tahoma, Arial, sans-serif;
    direction: rtl;
    background: #f3f4f6;
    color: #111827;
    font-size: 14px;
}

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

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #111827;
    color: #f9fafb;
    padding: 20px 16px;
}

.brand {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 6px;
}

.brand-subtitle {
    color: #9ca3af;
    font-size: 12px;
    margin-bottom: 28px;
}

.nav a {
    display: block;
    padding: 11px 12px;
    border-radius: 10px;
    margin-bottom: 6px;
    color: #e5e7eb;
}

.nav a:hover,
.nav a.active {
    background: #1f2937;
}

.main {
    flex: 1;
    padding: 24px;
}

.topbar {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 16px 18px;
    border-radius: 14px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 22px;
    font-weight: bold;
}

.user-box {
    color: #4b5563;
    font-size: 13px;
}

.card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 18px;
}

.grid {
    display: grid;
    gap: 16px;
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
}

.stat-label {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
}

.form-container {
    max-width: 520px;
    margin: 70px auto;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 28px;
}

.form-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
}

.form-subtitle {
    color: #6b7280;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 7px;
    color: #374151;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 14px;
}

textarea {
    min-height: 130px;
}

.btn {
    display: inline-block;
    border: 0;
    border-radius: 10px;
    padding: 11px 16px;
    cursor: pointer;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 14px;
}

.btn-primary {
    background: #2563eb;
    color: #ffffff;
}

.btn-secondary {
    background: #e5e7eb;
    color: #111827;
}

.btn-danger {
    background: #dc2626;
    color: #ffffff;
}

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

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

.table th,
.table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: right;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #e5e7eb;
    font-size: 12px;
}

.muted {
    color: #6b7280;
}

@media (max-width: 900px) {
    .layout {
        display: block;
    }

    .sidebar {
        width: 100%;
    }

    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}