/* CRM خانه کودک — استایل RTL */
* { box-sizing: border-box; }
body {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background: #fff8f0;
  color: #1f2937;
  margin: 0;
  direction: rtl;
  line-height: 1.8;
}
a { color: #0f766e; }
.topbar {
  background: #0f766e;
  color: #fff;
  padding: 14px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand { font-size: 1.25rem; font-weight: 700; }
.brand-icon { font-size: 1.4rem; }
.user-info { opacity: .95; font-size: .95rem; }
.nav {
  background: #115e59;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 14px;
}
.nav a {
  color: #d1fae5;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: .95rem;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.nav a:hover { background: #0f766e; color: #fff; }
.nav a.logout { color: #fecaca; }
.container, .wrap { max-width: 1200px; margin: 24px auto; padding: 0 16px; }
.footer { text-align: center; color: #6b7280; font-size: .85rem; padding: 20px; }

h1, h2, h3 { color: #134e4a; }
.card {
  background: #fff;
  border: 1px solid #f3e2cf;
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(15,118,110,.06);
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.stat { text-align: center; }
.stat .num { font-size: 2rem; font-weight: 700; color: #0f766e; }
.stat .lbl { color: #6b7280; font-size: .9rem; }

label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: .95rem; color: #134e4a; }
input[type=text], input[type=number], input[type=password], input[type=date],
input[type=datetime-local], input[type=search], select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e5d5c0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  background: #fffdf9;
  min-height: 48px;
}
textarea { min-height: 100px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #14b8a6; border-color: #14b8a6; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 26px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  margin-top: 12px;
}
.btn-primary { background: #0f766e; color: #fff; }
.btn-primary:hover { background: #115e59; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-secondary { background: #fde68a; color: #92400e; }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .9rem; margin-top: 0; }

table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.table-wrap { overflow-x: auto; }
th, td { padding: 10px 12px; text-align: right; border-bottom: 1px solid #f0e4d2; white-space: nowrap; }
th { background: #fef3e2; color: #134e4a; font-weight: 700; }
tr:hover td { background: #fffdf7; }

.flash { padding: 12px 18px; border-radius: 12px; margin-bottom: 16px; font-weight: 600; }
.flash-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.flash-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.flash-info { background: #e0f2fe; color: #075985; border: 1px solid #7dd3fc; }

.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-gray { background: #f3f4f6; color: #4b5563; }
.badge-amber { background: #fef3c7; color: #92400e; }

.login-wrap { display: flex; justify-content: center; align-items: center; min-height: 70vh; }
.login-card { max-width: 420px; width: 100%; text-align: center; }
.login-card form { text-align: right; }
.login-title { color: #0f766e; }
.muted { color: #6b7280; }
.small { font-size: .85rem; }

.big-input { font-size: 1.4rem; text-align: center; letter-spacing: 2px; }
.help { background: #f0fdfa; border: 1px solid #99f6e4; border-radius: 12px; padding: 12px 16px; font-size: .9rem; }
