/* ===== سیستەمى فۆرمى قوتابیان — رووکارى مۆدێرن ===== */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;700;800&display=swap');

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #eef2ff;
  --success: #10b981;
  --danger: #ef4444;
  --text: #1e293b;
  --muted: #64748b;
  --bg: #f1f5f9;
  --card: #ffffff;
  --border: #e2e8f0;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(2, 6, 23, .08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Vazirmatn', 'Noto Sans Arabic', Tahoma, sans-serif;
  background: linear-gradient(135deg, #eef2ff 0%, #f1f5f9 50%, #ecfeff 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
}

.container { max-width: 860px; margin: 0 auto; padding: 24px 16px 60px; }
.container.wide { max-width: 1250px; }

/* ===== Header ===== */
.site-header {
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: #fff;
  padding: 26px 20px;
  text-align: center;
  border-radius: 0 0 28px 28px;
  box-shadow: var(--shadow);
}
.site-header h1 { font-size: 1.6rem; font-weight: 800; }
.site-header p { opacity: .85; font-size: .95rem; margin-top: 4px; }

/* ===== Cards ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  margin-top: 26px;
  border: 1px solid var(--border);
}
.card h2 {
  font-size: 1.25rem; font-weight: 800; margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}
.card h2::before {
  content: ''; width: 6px; height: 26px; border-radius: 6px;
  background: linear-gradient(var(--primary), #7c3aed);
}

/* ===== Instructions ===== */
.instructions {
  background: var(--primary-light);
  border: 1px dashed var(--primary);
  border-radius: 12px;
  padding: 20px;
  white-space: pre-line;
  font-size: 1.05rem;
}
.agree-row {
  display: flex; align-items: center; gap: 10px;
  margin-top: 22px; font-weight: 700; cursor: pointer;
  user-select: none;
}
.agree-row input { width: 20px; height: 20px; accent-color: var(--primary); cursor: pointer; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; font-family: inherit;
  font-size: 1.05rem; font-weight: 700;
  padding: 13px 34px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff; transition: .25s;
  text-decoration: none;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(79,70,229,.35); }
.btn:disabled { background: #cbd5e1; cursor: not-allowed; color: #94a3b8; }
.btn.block { width: 100%; }
.btn.green { background: linear-gradient(135deg, #059669, #10b981); }
.btn.red { background: linear-gradient(135deg, #dc2626, #ef4444); }
.btn.gray { background: #64748b; }
.btn.sm { padding: 8px 16px; font-size: .9rem; border-radius: 9px; }
.btn-row { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ===== Banner ===== */
.banner {
  width: 100%; max-height: 320px; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow);
  margin-top: 26px; display: block;
}
.big-text {
  text-align: center; font-size: 1.3rem; font-weight: 800;
  color: var(--primary-dark);
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; margin-top: 18px;
}

/* ===== Form ===== */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .95rem; }
.field label span.req { color: var(--danger); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-family: inherit; font-size: 1rem; background: #f8fafc;
  transition: .2s; color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary);
  background: #fff; box-shadow: 0 0 0 4px rgba(79,70,229,.12);
}

/* ===== Grades table ===== */
.grades-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.grades-table th, .grades-table td {
  border: 1px solid var(--border); padding: 10px 12px; text-align: center;
}
.grades-table th { background: var(--primary-light); font-weight: 800; color: var(--primary-dark); }
.grades-table input {
  width: 110px; padding: 8px; text-align: center;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 1rem;
}
.grades-table input:focus { outline: none; border-color: var(--primary); }

/* ===== Alerts ===== */
.alert { border-radius: 12px; padding: 16px 18px; margin-top: 20px; font-weight: 700; }
.alert.error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert.success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.alert ul { margin: 8px 20px 0 0; font-weight: 500; }

/* ===== Success screen ===== */
.success-box { text-align: center; padding: 50px 30px; }
.success-box .icon {
  width: 90px; height: 90px; margin: 0 auto 20px;
  background: linear-gradient(135deg, #059669, #34d399);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 46px; color: #fff; box-shadow: 0 12px 30px rgba(16,185,129,.35);
}
.success-box h2 { font-size: 1.5rem; justify-content: center; }
.success-box h2::before { display: none; }

/* ===== Steps indicator ===== */
.steps { display: flex; justify-content: center; gap: 0; margin-top: 26px; }
.step {
  display: flex; align-items: center; gap: 8px; font-weight: 700;
  color: var(--muted); font-size: .95rem;
}
.step .dot {
  width: 34px; height: 34px; border-radius: 50%;
  background: #e2e8f0; color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-weight: 800;
}
.step.active { color: var(--primary-dark); }
.step.active .dot { background: var(--primary); color: #fff; }
.step-line { width: 60px; height: 3px; background: #e2e8f0; margin: 0 10px; align-self: center; border-radius: 3px; }

/* ===== Admin ===== */
.admin-nav {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 18px; margin-top: 24px;
}
.admin-nav a {
  text-decoration: none; color: var(--text); font-weight: 700;
  padding: 8px 16px; border-radius: 10px; transition: .2s; font-size: .95rem;
}
.admin-nav a:hover, .admin-nav a.active { background: var(--primary-light); color: var(--primary-dark); }
.admin-nav .spacer { flex: 1; }

.table-wrap { overflow-x: auto; margin-top: 14px; border-radius: 12px; border: 1px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; white-space: nowrap; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: center; }
.data-table th { background: var(--primary-light); color: var(--primary-dark); font-weight: 800; position: sticky; top: 0; }
.data-table tr:hover td { background: #f8fafc; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-top: 24px; }
.stat {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; text-align: center;
}
.stat .num { font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat .lbl { color: var(--muted); font-weight: 700; font-size: .9rem; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 420px; }

.search-row { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.search-row input { flex: 1; min-width: 200px; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 10px; font-family: inherit; font-size: 1rem; }

footer.site-footer { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 40px; }
