:root {
  --bg: #f5f6f8;
  --white: #ffffff;
  --black: #111111;
  --muted: #6b7280;
  --border: #e8eaef;
  --accent: #d4ff00;
  --accent-soft: #f3ffb8;
  --purple: #ede9fe;
  --blue: #e0f2fe;
  --orange: #ffedd5;
  --yellow: #fef9c3;
  --green: #dcfce7;
  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 20px 60px rgba(17, 17, 17, 0.08);
  --isax-size: 20px;
  --isax-color: currentColor;
}

/* Iconsax bulk icons */
.isax {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--isax-size);
  height: var(--isax-size);
  color: var(--isax-color);
  flex-shrink: 0;
  vertical-align: middle;
}

.isax svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-icon { --isax-size: 22px; }
.brand-logo .isax { --isax-size: 24px; color: var(--black); }
.brand-logo.admin { background: #eef2ff; }

.feature-icon { --isax-size: 28px; margin-bottom: 10px; color: var(--black); }
.nav-icon { --isax-size: 20px; }
.section-icon, .card-icon, .title-icon { --isax-size: 22px; }
.pill-icon { --isax-size: 18px; margin-left: 6px; }
.empty-icon { --isax-size: 36px; color: #cbd5e1; margin-bottom: 8px; }
.modal-icon { --isax-size: 24px; margin-left: 8px; }
.upload-icon { --isax-size: 32px; color: var(--muted); margin-bottom: 8px; }

.btn-with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-with-icon .isax { --isax-size: 18px; }
.btn-primary .isax { color: #fff; }
.btn-secondary .isax, .btn-accent .isax { color: inherit; }

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tab .isax { --isax-size: 16px; }
.tab.active .isax { color: #fff; }

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.link-btn .isax { --isax-size: 16px; }

.input-with-icon {
  position: relative;
}

.input-with-icon .input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  --isax-size: 18px;
  color: var(--muted);
  pointer-events: none;
}

.input-with-icon .input {
  padding-right: 44px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-item span { flex: 1; }

.sidebar .logout {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-pill {
  display: flex;
  align-items: center;
}

.panel-card header h3,
.admin-card h2,
.section-title,
.admin-header h1 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.file-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.file-upload input[type="file"] {
  margin-top: 10px;
}

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

body {
  font-family: "Vazirmatn", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--black);
  min-height: 100vh;
}

.hidden { display: none !important; }

button, input, select, textarea {
  font: inherit;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  cursor: pointer;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn-primary { background: var(--black); color: #fff; }
.btn-primary:hover { opacity: 0.92; }
.btn-secondary { background: #eceff3; color: var(--black); }
.btn-accent { background: var(--accent); color: var(--black); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 16px;
  background: #fff;
  outline: none;
}

.input:focus { border-color: #cbd5e1; box-shadow: 0 0 0 4px rgba(212,255,0,0.25); }

.label { display: block; margin-bottom: 8px; font-size: 0.92rem; color: var(--muted); }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--black);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  z-index: 9999;
  box-shadow: var(--shadow);
}

.toast.error { background: #b91c1c; }

/* Login layout */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
}

.auth-hero {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.2rem;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.auth-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.35;
  max-width: 720px;
}

.auth-hero p { color: var(--muted); max-width: 620px; line-height: 1.9; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px;
  min-height: 120px;
  box-shadow: var(--shadow);
}

.feature-card h3 { margin-bottom: 8px; font-size: 1rem; }
.feature-card p { color: var(--muted); font-size: 0.88rem; line-height: 1.7; }

.feature-card.support { background: var(--green); }
.feature-card.invoice { background: var(--purple); }
.feature-card.projects { background: #eef2ff; }
.feature-card.report { background: var(--yellow); }
.feature-card.contract { background: var(--blue); }
.feature-card.team { background: var(--orange); }

.auth-panel {
  background: #f0f1f4;
  display: grid;
  place-items: center;
  padding: 32px;
}

.auth-card {
  width: min(420px, 100%);
  background: var(--white);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.auth-card h2 { text-align: center; margin: 12px 0 8px; }
.auth-card .subtitle { text-align: center; color: var(--muted); font-size: 0.92rem; margin-bottom: 20px; }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #f3f4f6;
  padding: 6px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.tab {
  border: none;
  background: transparent;
  padding: 10px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.tab.active { background: var(--black); color: #fff; }

.form-group { margin-bottom: 16px; }

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  margin-top: 16px;
  width: 100%;
  text-align: center;
}

.otp-inputs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.otp-inputs input {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
}

/* Dashboard */
.dashboard {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 320px 1fr;
  gap: 20px;
  padding: 20px;
}

.sidebar, .summary-panel, .main-panel {
  background: var(--white);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.sidebar {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.sidebar .brand { margin-bottom: 24px; }

.user-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.user-box small { color: var(--muted); display: block; }

.nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }

.nav-item {
  border: none;
  background: transparent;
  text-align: right;
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 600;
}

.nav-item.active, .nav-item:hover { background: #f3f4f6; }

.sidebar .logout {
  margin-top: auto;
  color: #dc2626;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 0;
  text-align: right;
  font-weight: 600;
}

.summary-panel { padding: 24px; }

.summary-card {
  background: var(--accent);
  border-radius: 24px;
  padding: 24px;
  margin: 16px 0;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.summary-card h3 { font-size: 1.8rem; }
.summary-card .amount { font-size: 2rem; font-weight: 800; margin-top: 12px; }

.stat-pill {
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 10px;
  font-weight: 700;
}

.stat-pill.dark { background: var(--black); color: #fff; }
.stat-pill.light { background: #f3f4f6; }

.main-panel { padding: 24px; display: flex; flex-direction: column; gap: 16px; }

.panel-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 20px;
  min-height: 140px;
}

.panel-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.empty-state { color: var(--muted); text-align: center; padding: 24px 0; }

/* Onboarding modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17,17,17,0.45);
  display: grid;
  place-items: center;
  z-index: 1000;
  padding: 20px;
}

.modal {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.modal h2 { margin-bottom: 8px; }
.modal p { color: var(--muted); margin-bottom: 20px; }

.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.step-dot {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #e5e7eb;
}

.step-dot.active { background: var(--accent); }
.step-dot.done { background: var(--black); }

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 20px;
}

.file-upload {
  border: 2px dashed var(--border);
  border-radius: 18px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

/* Admin settings */
.admin-page {
  min-height: 100vh;
  padding: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.admin-card {
  background: #fff;
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.admin-card h2 { margin-bottom: 16px; }

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

@media (max-width: 1100px) {
  .dashboard { grid-template-columns: 1fr; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .feature-grid { grid-template-columns: 1fr; }
}
