/* ============================================
   onshim - آن شیم
   فایل استایل اصلی
   فونت: دانا | رنگ سازمانی: #00a6ff
============================================ */

/* فونت دانا - لوکال (برای پشتیبانی موبایل) */
@font-face {
  font-family: 'Dana';
  src: url('../fonts/dana/dana-regular.woff2') format('woff2'),
       url('../fonts/dana/dana-regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Dana';
  src: url('../fonts/dana/dana-medium.woff2') format('woff2'),
       url('../fonts/dana/dana-medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Dana';
  src: url('../fonts/dana/dana-demibold.woff2') format('woff2'),
       url('../fonts/dana/dana-demibold.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Dana';
  src: url('../fonts/dana/dana-bold.woff2') format('woff2'),
       url('../fonts/dana/dana-bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Dana';
  src: url('../fonts/dana/dana-extrabold.woff2') format('woff2'),
       url('../fonts/dana/dana-extrabold.woff') format('woff');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Dana';
  src: url('../fonts/dana/dana-black.woff2') format('woff2'),
       url('../fonts/dana/dana-black.woff') format('woff');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #00a6ff;
  --primary-dark: #0088d4;
  --primary-light: #e6f6ff;
  --primary-hover: #0094e6;
  --secondary: #1a1a2e;
  --text-dark: #1a1a2e;
  --text-medium: #4a5568;
  --text-light: #a0aec0;
  --bg-main: #f5f8fc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,166,255,0.12);
  --shadow-lg: 0 8px 32px rgba(0,166,255,0.18);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Dana', 'Tahoma', sans-serif;
  background: var(--bg-main);
  color: var(--text-dark);
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}

/* ============================================
   Mobile App Shell
============================================ */
.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-main);
  position: relative;
  overflow-x: hidden;
}

/* ============================================
   Header
============================================ */
.app-header {
  background: var(--bg-card);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.header-logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.header-logo .brand-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.header-back {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 1.1rem;
}

.header-back:hover {
  background: var(--primary);
  color: white;
}

/* ============================================
   Buttons
============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Dana', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 15px rgba(0,166,255,0.3);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(0,166,255,0.4);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-light);
}

.btn-full {
  width: 100%;
}

.btn-lg {
  padding: 16px 28px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================
   Form Elements
============================================ */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-medium);
  margin-bottom: 8px;
}

.form-label.required::after {
  content: ' *';
  color: var(--error);
}

.form-control {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: 'Dana', sans-serif;
  font-size: 0.95rem;
  color: var(--text-dark);
  background: white;
  transition: var(--transition);
  outline: none;
  direction: rtl;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,166,255,0.15);
}

.form-control::placeholder {
  color: var(--text-light);
}

.form-control.error {
  border-color: var(--error);
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2300a6ff' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 16px center;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 5px;
}

.form-error {
  font-size: 0.8rem;
  color: var(--error);
  margin-top: 5px;
  display: none;
}

.form-error.visible {
  display: block;
}

/* ============================================
   Cards
============================================ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.card-elevated {
  box-shadow: var(--shadow-md);
  border: none;
}

/* ============================================
   Alerts
============================================ */
.alert {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.alert-info {
  background: var(--primary-light);
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* ============================================
   OTP Input
============================================ */
.otp-container {
  display: flex;
  gap: 12px;
  justify-content: center;
  direction: ltr;
}

.otp-input {
  width: 56px;
  height: 60px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  transition: var(--transition);
  color: var(--text-dark);
  background: white;
  font-family: 'Dana', sans-serif;
}

.otp-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,166,255,0.15);
  transform: scale(1.05);
}

.otp-input.filled {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

/* ============================================
   Progress Steps
============================================ */
.steps-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  gap: 0;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: white;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
  z-index: 1;
}

.step-circle.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  box-shadow: 0 3px 12px rgba(0,166,255,0.4);
}

.step-circle.completed {
  border-color: var(--success);
  background: var(--success);
  color: white;
}

.step-line {
  width: 48px;
  height: 2px;
  background: var(--border-color);
  transition: var(--transition);
}

.step-line.completed {
  background: var(--success);
}

.step-label {
  font-size: 0.7rem;
  color: var(--text-light);
  margin-top: 5px;
  text-align: center;
  max-width: 60px;
}

.step-item.active .step-label {
  color: var(--primary);
  font-weight: 600;
}

/* ============================================
   Skill Selector
============================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.skill-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.88rem;
  font-family: 'Dana', sans-serif;
  background: white;
  color: var(--text-dark);
}

.skill-chip:hover {
  border-color: var(--primary);
}

.skill-chip.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.skill-chip .skill-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.skill-chip.selected .skill-check::after {
  content: '';
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

/* ============================================
   Radio & Checkbox Custom
============================================ */
.custom-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.custom-radio-label {
  width:48%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
  font-family: 'Dana', sans-serif;
  background: white;
}

.custom-radio-label:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.custom-radio-label input {
  display: none;
}

/* ============================================
   File Upload
============================================ */
.file-upload-area {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  background: white;
}

.file-upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.file-upload-area.has-file {
  border-color: var(--success);
  background: #f0fdf4;
}

.file-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.file-upload-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  color: var(--primary);
}

.file-upload-text {
  font-size: 0.9rem;
  color: var(--text-medium);
}

.file-upload-hint {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 5px;
}

.file-preview {
  margin-top: 10px;
}

.file-preview img {
  max-width: 120px;
  max-height: 120px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2px solid var(--success);
}

/* ============================================
   Bottom Navigation
============================================ */
.bottom-nav {
  border-radius:30px 30px 0px 0px;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: white;
  border-top: 1px solid var(--border-color);
  padding: 10px 0;
  display: flex;
  justify-content: space-around;
  z-index: 200;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--text-light);
  transition: var(--transition);
  padding: 6px 14px;
  border-radius: var(--radius-md);
}

.nav-item.active {
  color: var(--primary);
}

.nav-item svg {
  width: 22px;
  height: 22px;
}

.nav-item span {
  font-size: 0.7rem;
  font-family: 'Dana', sans-serif;
}

/* ============================================
   Utility Classes
============================================ */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-muted { color: var(--text-light); }
.fw-bold { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.p-0 { padding: 0; }
.d-none { display: none !important; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 16px; }
.w-full { width: 100%; }

/* ============================================
   Loading Spinner
============================================ */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

.spinner-primary {
  border-color: rgba(0,166,255,0.2);
  border-top-color: var(--primary);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   Page Transitions
============================================ */
.page-fade-in {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Responsive
============================================ */
@media (max-width: 480px) {
  .app-shell {
    max-width: 100%;
  }
  
  .otp-input {
    width: 48px;
    height: 52px;
  }
}

/* ============================================
   Scrollbar Custom
============================================ */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ============================================
   Ambassador logout button
============================================ */

.btn-logout {
    width:100%;
    padding:15px;
    background:white;
    color:#ef4444;
    border:2px solid #fecaca;
    border-radius:16px;
    font-family:'Dana','Tahoma',sans-serif;
    font-size:1rem;
    font-weight:800;
    cursor:pointer;
    transition:.2s;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    margin-top:10px
}
.btn-logout:hover {
    background:#fef2f2;
    border-color:#ef4444;
    transform:translateY(-1px)
}
.btn-logout svg {
    width:18px;
    height:18px
}