@font-face {
  font-family: 'Vazir';
  src: local('Tahoma');
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Vazir', Tahoma, sans-serif;
  background: #f4f6f9;
  color: #26313f;
  direction: rtl;
}
a { text-decoration: none; color: inherit; }
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px;
  background: #1b2a41;
  color: #fff;
  padding: 20px 0;
  flex-shrink: 0;
}
.sidebar .brand {
  padding: 0 20px 20px;
  font-size: 18px;
  font-weight: bold;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 10px;
}
.sidebar a.menu-item {
  display: block;
  padding: 11px 20px;
  color: #cfd8e3;
  font-size: 14px;
  border-right: 3px solid transparent;
}
.sidebar a.menu-item:hover, .sidebar a.menu-item.active {
  background: rgba(255,255,255,.06);
  color: #fff;
  border-right-color: #4c8bf5;
}
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  background: #fff;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e6e9ee;
}
.content { padding: 24px; }
.card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr 1fr; }
  .sidebar { display: none; }
}
.stat-box {
  background: #fff;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  border-right: 4px solid #4c8bf5;
}
.stat-box .num { font-size: 24px; font-weight: bold; margin-bottom: 4px; }
.stat-box .label { color: #7c8a9c; font-size: 13px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
table th, table td { padding: 10px 12px; border-bottom: 1px solid #edf0f4; text-align: right; }
table th { background: #f8f9fb; color: #56606f; font-weight: 600; }
table tr:hover td { background: #fafbfd; }

.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  background: #4c8bf5;
  color: #fff;
}
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.green { background: #2fb380; }
.btn.red { background: #e5566d; }
.btn.gray { background: #8b95a5; }
.btn.outline { background: transparent; border: 1px solid #c7cedb; color: #444; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; color: #56606f; }
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d7dce3;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 200px; }

.badge { padding: 3px 10px; border-radius: 20px; font-size: 12px; }
.badge.green { background: #e3f7ee; color: #1a8a5f; }
.badge.red { background: #fdeaec; color: #c62f45; }
.badge.gray { background: #eef0f3; color: #6b7686; }
.badge.orange { background: #fff2e0; color: #c67c15; }

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.flash.success { background: #e3f7ee; color: #1a8a5f; }
.flash.error { background: #fdeaec; color: #c62f45; }

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1b2a41, #4c8bf5);
}
.login-box {
  background: #fff;
  padding: 40px;
  border-radius: 14px;
  width: 400px;
  box-shadow: 0 10px 40px rgba(0,0,0,.2);
}
.login-box h2 { text-align: center; margin-bottom: 24px; }
.captcha-row { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.captcha-row img { max-width: 100%; height: auto; border-radius: 6px; cursor: pointer; }
.captcha-row .captcha-hint { font-size: 11px; color: #8b95a5; margin-top: -4px; }
.captcha-row input { text-align: center; letter-spacing: 4px; font-size: 18px; }
