@font-face {
  font-family: "PeydaWeb-Regular";
  src: url("../fonts/PeydaWeb-Regular.woff2") format("woff2"),
       url("../fonts/PeydaWeb-Regular.woff") format("woff");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}



:root {
  --color-bg: #f5f7fb;
  --color-surface: #ffffff;
  --color-surface-soft: #f9fafb;
  --color-border: #e5e7eb;
  --color-border-soft: #e5e7eb;
  --color-primary: #10b981;
  --color-primary-soft: rgba(16,185,129,0.08);
  --color-primary-dark: #059669;
  --color-accent: #22c55e;
  --color-text: #111827;
  --color-text-muted: #6b7280;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 12px 28px rgba(15,23,42,0.08);
}

/* Reset basic */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  direction: rtl;
}

body {
  margin: 0;
  font-family: "IRANSans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
}

.no-select {
  user-select: none;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: var(--color-primary-dark);
}

/* Layout */

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px;
}

.main-dashboard {
  padding-top: 16px;
  padding-bottom: 32px;
}

/* Header */

.main-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}

.main-header h1 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.main-header p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Cards */

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 16px 18px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 20px;
}

.card h2 {
  margin: 0 0 10px 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.card h3 {
  margin: 0 0 6px 0;
  font-size: 0.98rem;
  font-weight: 600;
}

.mb-20 {
  margin-bottom: 20px;
}

.small {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.small-text {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.18s ease-out;
  white-space: nowrap;
  font-family: "IRANSans", system-ui, sans-serif;
}

.btn-primary {
  background: linear-gradient(to left, var(--color-primary), var(--color-accent));
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(16,185,129,0.28);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(16,185,129,0.33);
}

.btn-secondary {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  border: 1px solid rgba(16,185,129,0.4);
}

.btn-secondary:hover {
  background: rgba(16,185,129,0.12);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid #d1d5db;
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

.btn-disabled,
.btn:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  border: 1px solid #e5e7eb;
  cursor: default;
  box-shadow: none;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.78rem;
}

/* Forms */

label {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 4px;
  color: var(--color-text-muted);
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: var(--color-text);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.16s ease-out, box-shadow 0.16s ease-out, background 0.16s;
  font-family: "IRANSans", system-ui, sans-serif;
}

input::placeholder,
textarea::placeholder {
  color: #9ca3af;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(16,185,129,0.18);
  background: #ffffff;
}

textarea {
  resize: vertical;
}

/* Progress bar */

.progress-bar {
  width: 100%;
  max-width: 220px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  height: 10px;
}

.progress-bar-inner {
  height: 100%;
  background: linear-gradient(to left, var(--color-primary), var(--color-accent));
  width: 0;
  transition: width 0.3s ease-out;
}

/* Steps */

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-soft);
  background: var(--color-surface-soft);
}

.step-main {
  flex: 1;
}

.step-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.status-label {
  margin-top: 4px;
}

/* Status badges */

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
}

.badge-level {
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

.badge-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
}

.st-open {
  background: #dcfce7;
  color: #166534;
}

.st-wait {
  background: #fef9c3;
  color: #92400e;
}

.st-pass {
  background: #dbeafe;
  color: #1d4ed8;
}

.st-fail {
  background: #fee2e2;
  color: #b91c1c;
}

.st-exp {
  background: #e0e7ff;
  color: #3730a3;
}

/* Simple tables */

.simple-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  font-family: "IRANSans", system-ui, sans-serif;
}

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

.simple-table th {
  background: #f3f4f6;
  color: var(--color-text);
  font-weight: 500;
}

.simple-table tr:nth-child(even) {
  background: #f9fafb;
}

/* Alerts */

.alert {
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 0.82rem;
  margin-bottom: 6px;
  font-family: "IRANSans", system-ui, sans-serif;
}

.alert-info {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}

.alert-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

/* Quiz (step.php) */

.quiz-question {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.quiz-question p {
  margin-top: 0;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

/* Responsive */

@media (max-width: 768px) {
  .header-inner {
    padding-inline: 10px;
  }

  .card {
    padding: 14px 12px;
  }

  .step-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .step-actions {
    justify-content: flex-start;
  }

  .btn {
    font-size: 0.82rem;
  }

  .main-header h1 {
    font-size: 0.95rem;
  }
}

/* ----- Stats Grid for Admin Dashboard ----- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.stats-grid-small {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.stat-box {
  background: #f9fafb;
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.stat-box.stat-soft {
  background: #f3f4f6;
}

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

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
}

.stat-sub {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
}

.divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 16px 0;
}
/* جلوگیری از انتخاب متن */
.no-select, .no-select *{
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* جلوگیری از منوی لمس طولانی در موبایل */
.no-select{
  -webkit-touch-callout: none;
}

/* اگر بعضی ورودی‌ها/textarea لازم دارند انتخاب شوند، استثنا بگذارید */
input, textarea, [contenteditable="true"]{
  -webkit-user-select: text !important;
  user-select: text !important;
}

/* App bottom navigation */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 24px));
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 8px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(148,163,184,.32);
  box-shadow: 0 18px 40px rgba(15,23,42,.16);
  border-radius: 8px;
  padding: 8px;
  backdrop-filter: blur(16px);
  z-index: 80;
}

.bottom-nav a {
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.bottom-nav a.active {
  background: linear-gradient(135deg, #0f766e, #84cc16);
  color: #fff;
}

.has-bottom-nav {
  padding-bottom: 84px;
}
