:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #059669;
  --danger: #dc2626;
  --bg: #f0f7ff;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --radius: 16px;
  --shadow: 0 10px 40px -10px rgba(37, 99, 235, 0.15);
}

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

body {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
  position: relative;
  overflow-x: hidden;
}

.bg-shapes { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.shape { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.35; }
.shape1 { width: 400px; height: 400px; background: #93c5fd; top: -100px; right: -100px; }
.shape2 { width: 300px; height: 300px; background: #a5b4fc; bottom: 10%; left: -80px; }
.shape3 { width: 250px; height: 250px; background: #6ee7b7; top: 40%; left: 50%; }

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }

.header { padding: 28px 0 16px; }
.header-flex { display: flex; justify-content: space-between; align-items: center; }
.logo-area { display: flex; align-items: center; gap: 16px; }
.logo-icon {
  font-size: 42px; background: white; width: 70px; height: 70px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 20px; box-shadow: var(--shadow);
}
.header h1 { font-size: 1.5rem; font-weight: 700; color: var(--primary-dark); }
.subtitle { color: var(--muted); font-size: 0.95rem; }

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 32px; margin-bottom: 32px;
}
.form-card { margin-top: 12px; }
.card-header { margin-bottom: 28px; }
.card-header h2 { font-size: 1.35rem; margin-bottom: 6px; }
.card-header p { color: var(--muted); font-size: 0.95rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-weight: 500; font-size: 0.92rem; }
.req { color: var(--danger); font-weight: 700; }

input, select, textarea {
  font-family: inherit; font-size: 1rem; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
  background: #f8fafc; transition: border-color 0.2s, box-shadow 0.2s; width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); background: white;
}
textarea { resize: vertical; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border: none; border-radius: 12px;
  font-family: inherit; font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white; width: 100%; box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #047857; }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { background: #f1f5f9; }

.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 0.95rem; }
.alert-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert-success { background: #ecfdf5; color: var(--success); border: 1px solid #a7f3d0; }
.hidden { display: none !important; }

.success-header { text-align: center; margin-bottom: 28px; }
.success-header h2 { color: var(--success); margin-bottom: 10px; }
.intro { color: var(--muted); }
.section-box {
  background: #f8fafc; border-radius: 12px; padding: 20px;
  margin-bottom: 20px; border: 1px solid var(--border);
}
.section-box h3 { margin-bottom: 12px; color: var(--primary-dark); }
.link-list { list-style: none; }
.link-list li { margin-bottom: 10px; }
.link-list a {
  color: var(--primary); text-decoration: none; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
}
.link-list a:hover { text-decoration: underline; }
.link-list a::before { content: "🔗"; }
.notes-box {
  margin-top: 14px; padding: 12px; background: #eff6ff;
  border-radius: 8px; border-right: 4px solid var(--primary); font-size: 0.95rem;
}
.footer-note { text-align: center; color: var(--muted); margin-top: 24px; font-size: 0.9rem; }

.tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.tab {
  padding: 10px 20px; border: none; background: white; border-radius: 10px;
  font-family: inherit; font-weight: 500; cursor: pointer; color: var(--muted);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.tab.active { background: var(--primary); color: white; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 12px 10px; text-align: right; border-bottom: 1px solid var(--border); }
th { background: #f1f5f9; font-weight: 600; white-space: nowrap; }
tr:hover td { background: #f8fafc; }
.section-title { margin: 24px 0 12px; font-size: 1.1rem; color: var(--primary-dark); }
.section-editor {
  background: #f8fafc; border: 1px solid var(--border);
  border-radius: 12px; padding: 16px; margin-bottom: 16px;
}
.section-editor h4 { margin-bottom: 10px; }

.footer { text-align: center; padding: 24px 0 40px; color: var(--muted); font-size: 0.85rem; }
