@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2'); font-weight: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2'); font-weight: bold; font-display: swap; }

:root { --primary: #2563eb; --success: #10b981; --danger: #ef4444; --warning: #f59e0b; --bg-body: #f1f5f9; --bg-card: #ffffff; --text-main: #1e293b; --text-light: #64748b; --border: #e2e8f0; --radius: 12px; }

* { box-sizing: border-box; outline: none; margin: 0; padding: 0; }
body { font-family: 'Vazirmatn', Tahoma, sans-serif; background: var(--bg-body); color: var(--text-main); line-height: 1.6; }
a { text-decoration: none; color: inherit; }

.wrapper { display: flex; min-height: 100vh; }
.sidebar { width: 280px; background: var(--bg-card); border-left: 1px solid var(--border); padding: 20px; position: fixed; height: 100vh; right: 0; top: 0; z-index: 1000; }
.main-content { flex: 1; padding: 20px; margin-right: 280px; }

.brand { font-size: 1.2rem; font-weight: bold; color: var(--primary); margin-bottom: 30px; display: flex; align-items: center; gap: 10px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 12px; color: var(--text-light); border-radius: var(--radius); margin-bottom: 5px; cursor: pointer; }
.nav-item:hover, .nav-item.active { background-color: #eff6ff; color: var(--primary); }
.user-info { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }

.card { background: var(--bg-card); border-radius: var(--radius); box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1); padding: 20px; margin-bottom: 20px; border: 1px solid var(--border); }
.card-header { font-weight: bold; font-size: 1.1rem; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }

.form-group { margin-bottom: 15px; }
.form-label { display: block; margin-bottom: 5px; font-size: 0.9rem; color: var(--text-light); }
.form-control { width: 100%; padding: 10px 15px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; }
.form-control:focus { border-color: var(--primary); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: 8px; border: none; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--primary); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-secondary { background: var(--text-light); color: white; }
.btn-outline { background: transparent; border: 1px solid var(--border); }
.btn:hover { opacity: 0.9; }
.btn-sm { padding: 5px 10px; font-size: 0.85rem; }
.w-100 { width: 100%; }

.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: right; border-bottom: 1px solid var(--border); }
th { color: var(--text-light); font-weight: normal; font-size: 0.9rem; }
.badge { padding: 4px 8px; border-radius: 6px; font-size: 0.8rem; background: #eff6ff; color: var(--primary); }

.login-container { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%); }
.login-card { width: 100%; max-width: 400px; padding: 30px; }

.mobile-header { display: none; background: var(--bg-card); padding: 15px; border-bottom: 1px solid var(--border); position: fixed; top: 0; left: 0; right: 0; z-index: 999; }
.overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 998; }
.overlay.active { display: block; }

.management-list { max-height: 300px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; margin-top: 10px; }
.management-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; border-bottom: 1px solid var(--border); }
.management-item:last-child { border-bottom: none; }
.management-item:hover { background: var(--bg-body); }
.management-item-info { display: flex; flex-direction: column; gap: 3px; }
.management-item-name { font-weight: bold; }
.management-item-meta { font-size: 0.8rem; color: var(--text-light); }
.management-item-actions { display: flex; gap: 5px; }
.action-btn { padding: 5px 8px; border-radius: 6px; border: none; cursor: pointer; display: inline-flex; }
.action-btn.edit { background: #fef3c7; color: #d97706; }
.action-btn.delete { background: #fee2e2; color: #dc2626; }
.action-btn.password { background: #e0f2fe; color: #0284c7; }

.alert { padding: 12px; border-radius: 8px; margin-bottom: 15px; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-info { background: #e0f2fe; color: #075985; }

.text-center { text-align: center; }
.row { display: flex; gap: 20px; flex-wrap: wrap; }

@media (max-width: 768px) {
    .sidebar { right: -300px; }
    .sidebar.active { right: 0; }
    .mobile-header { display: flex; }
    .main-content { padding-top: 70px; margin-right: 0; }
}