@font-face {
  font-family: 'Vazir';
  src: url('https://arenapro.ir/wp-content/uploads/2026/10/Vazir-Medium.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

.ap-root {
  --ap-bg-panel: rgba(15, 23, 42, 0.92);
  --ap-bg-card: #0b1222;
  --ap-bg-input: #050914;
  --ap-border-soft: rgba(148, 163, 184, 0.2);
  --ap-text-main: #f1f5f9;
  --ap-text-muted: #94a3b8;
  --ap-sky: #38bdf8;
  --ap-indigo: #818cf8;
  --ap-emerald: #34d399;
  --ap-amber: #fbbf24;
  --ap-rose: #fb7185;
  --ap-orange: #fb923c;
  font-family: 'Vazir', Tahoma, system-ui, -apple-system, sans-serif;
  background-color: #070d1b;
  color: var(--ap-text-main);
  border-radius: 26px;
  padding: 18px;
  margin: 16px auto;
  max-width: 1180px;
  border: 1px solid var(--ap-border-soft);
  box-shadow: 0 22px 52px rgba(2, 6, 23, 0.72);
  line-height: 1.65;
  direction: rtl;
  text-align: right;
}

.ap-root * {
  box-sizing: border-box;
  font-family: 'Vazir', Tahoma, system-ui, -apple-system, sans-serif;
}

.ap-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.ap-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ap-brand-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(129, 140, 248, 0.18));
  border: 1px solid rgba(56, 189, 248, 0.36);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ap-sky);
  flex-shrink: 0;
}

.ap-brand-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.ap-brand-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--ap-text-muted);
}

.ap-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ap-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0b1222;
  border: 1px solid var(--ap-border-soft);
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 13px;
}

.ap-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ap-emerald);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.7);
}

.ap-dot.is-manager {
  background: var(--ap-amber);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.7);
}

.ap-role-tag {
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.14);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.3);
  font-weight: 700;
}

.ap-role-tag.is-manager {
  background: rgba(251, 191, 36, 0.14);
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.3);
}

.ap-panel {
  background: var(--ap-bg-panel);
  border: 1px solid var(--ap-border-soft);
  border-radius: 22px;
  padding: 18px;
  margin-bottom: 18px;
}

.ap-card {
  background: linear-gradient(180deg, rgba(22, 33, 56, 0.92), rgba(15, 23, 42, 0.96));
  border: 2px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  padding: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ap-card-interactive {
  cursor: pointer;
}

.ap-card-interactive:hover {
  transform: translateY(-3px);
  border-color: var(--ap-sky);
  box-shadow: 0 14px 30px -12px rgba(56, 189, 248, 0.35);
}

.ap-card-locked {
  background: rgba(9, 13, 24, 0.88);
  border: 1px solid rgba(244, 63, 94, 0.28);
  border-radius: 22px;
  padding: 20px;
  opacity: 0.72;
  cursor: not-allowed;
}

.ap-card-add {
  background: rgba(15, 23, 42, 0.45);
  border: 2px dashed rgba(148, 163, 184, 0.32);
  border-radius: 22px;
  padding: 22px;
  min-height: 155px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  color: var(--ap-text-main);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ap-card-add:hover {
  border-color: var(--ap-sky);
  background: rgba(56, 189, 248, 0.06);
}

.ap-grid-workshops {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

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

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

@media (max-width: 960px) {
  .ap-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .ap-grid-2,
  .ap-grid-3 {
    grid-template-columns: 1fr;
  }
}

.ap-btn {
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s ease;
  text-decoration: none;
  min-height: 46px;
  line-height: 1.3;
}

.ap-btn:active {
  transform: scale(0.98);
}

.ap-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ap-btn-primary {
  background: linear-gradient(270deg, #38bdf8, #818cf8);
  color: #060a14;
}

.ap-btn-emerald {
  background: linear-gradient(270deg, #10b981, #14b8a6);
  color: #060a14;
}

.ap-btn-indigo {
  background: linear-gradient(270deg, #6366f1, #818cf8);
  color: #ffffff;
}

.ap-btn-orange {
  background: linear-gradient(270deg, #f97316, #fb7185);
  color: #ffffff;
}

.ap-btn-secondary {
  background: #1e293b;
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.28);
}

.ap-btn-danger {
  background: rgba(244, 63, 94, 0.16);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.35);
}

.ap-btn-sm {
  padding: 7px 13px;
  font-size: 12px;
  border-radius: 12px;
  min-height: 36px;
}

.ap-main-nav-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 1024px) {
  .ap-main-nav-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .ap-main-nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .ap-main-nav-grid {
    grid-template-columns: 1fr;
  }
}

.ap-big-nav-btn {
  background: rgba(15, 23, 42, 0.94);
  border: 2px solid rgba(148, 163, 184, 0.22);
  border-radius: 22px;
  padding: 16px 12px;
  color: #e2e8f0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  transition: all 0.2s ease;
  min-height: 112px;
}

.ap-big-nav-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.5);
}

.ap-big-nav-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 41, 59, 0.95);
  color: #38bdf8;
}

.ap-big-nav-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.ap-big-nav-btn.is-active[data-nav="stock"] {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.24), rgba(15, 23, 42, 0.96));
  border-color: #38bdf8;
  color: #ffffff;
}
.ap-big-nav-btn.is-active[data-nav="stock"] .ap-big-nav-icon {
  background: #38bdf8;
  color: #060a14;
}

.ap-big-nav-btn.is-active[data-nav="materials"] {
  background: linear-gradient(180deg, rgba(129, 140, 248, 0.24), rgba(15, 23, 42, 0.96));
  border-color: #818cf8;
  color: #ffffff;
}
.ap-big-nav-btn.is-active[data-nav="materials"] .ap-big-nav-icon {
  background: #818cf8;
  color: #060a14;
}

.ap-big-nav-btn.is-active[data-nav="convert"] {
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.24), rgba(15, 23, 42, 0.96));
  border-color: #34d399;
  color: #ffffff;
}
.ap-big-nav-btn.is-active[data-nav="convert"] .ap-big-nav-icon {
  background: #34d399;
  color: #060a14;
}

.ap-big-nav-btn.is-active[data-nav="outbound"] {
  background: linear-gradient(180deg, rgba(251, 146, 60, 0.26), rgba(15, 23, 42, 0.96));
  border-color: #fb923c;
  color: #ffffff;
}
.ap-big-nav-btn.is-active[data-nav="outbound"] .ap-big-nav-icon {
  background: #fb923c;
  color: #060a14;
}

.ap-big-nav-btn.is-active[data-nav="report"] {
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.24), rgba(15, 23, 42, 0.96));
  border-color: #fbbf24;
  color: #ffffff;
}
.ap-big-nav-btn.is-active[data-nav="report"] .ap-big-nav-icon {
  background: #fbbf24;
  color: #060a14;
}

.ap-stock-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
  gap: 14px;
}

.ap-stock-card {
  background: #060a14;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.ap-stepper-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ap-step-btn {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #1e293b;
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ap-step-btn:hover {
  border-color: #38bdf8;
  background: #334155;
}

.ap-step-input {
  flex: 1;
  height: 48px;
  background: #0b1120 !important;
  border: 2px solid rgba(56, 189, 248, 0.4) !important;
  border-radius: 14px;
  color: #ffffff !important;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  outline: none;
  width: 100%;
}

.ap-field {
  margin-bottom: 13px;
}

.ap-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 6px;
}

.ap-root .ap-input,
.ap-root .ap-select,
.ap-root .ap-textarea {
  width: 100%;
  background-color: var(--ap-bg-input) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  border-radius: 14px;
  padding: 11px 13px;
  font-size: 13.5px;
  outline: none;
}

.ap-root .ap-input:focus,
.ap-root .ap-select:focus,
.ap-root .ap-textarea:focus {
  border-color: var(--ap-sky) !important;
}

.ap-invoice-box {
  background: rgba(5, 9, 20, 0.85);
  border: 1px dashed rgba(148, 163, 184, 0.32);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 14px;
}

.ap-file-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border: 1px dashed rgba(56, 189, 248, 0.45);
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.05);
  color: #bae6fd;
  font-size: 12.5px;
  cursor: pointer;
  text-align: center;
}

.ap-file-drop:hover {
  background: rgba(56, 189, 248, 0.1);
}

.ap-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
}

.ap-root .ap-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  text-align: right;
  font-size: 13px;
  margin: 0;
}

.ap-root .ap-table th {
  background: #060a14;
  color: #94a3b8;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  font-weight: 700;
}

.ap-root .ap-table td {
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  color: #f1f5f9;
  vertical-align: middle;
}

.ap-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.ap-badge-sky {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.ap-badge-indigo {
  background: rgba(129, 140, 248, 0.15);
  color: #c7d2fe;
  border: 1px solid rgba(129, 140, 248, 0.3);
}

.ap-badge-emerald {
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.ap-badge-orange {
  background: rgba(251, 146, 60, 0.16);
  color: #fdba74;
  border: 1px solid rgba(251, 146, 60, 0.35);
}

.ap-badge-rose {
  background: rgba(251, 113, 133, 0.15);
  color: #fda4af;
  border: 1px solid rgba(251, 113, 133, 0.3);
}

.ap-info-banner {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #bae6fd;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  margin-bottom: 14px;
}

.ap-error-banner {
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fecdd3;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 13px;
  margin-bottom: 14px;
}

.ap-login-wrap {
  max-width: 460px;
  margin: 24px auto;
}

.ap-demo-accounts {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.ap-demo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

@media (max-width: 460px) {
  .ap-demo-grid {
    grid-template-columns: 1fr;
  }
}

.ap-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ap-modal-backdrop.is-open {
  display: flex;
}

.ap-modal-box {
  width: 100%;
  max-width: 460px;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

.ap-toast-stack {
  position: fixed;
  bottom: 18px;
  left: 18px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 350px;
  pointer-events: none;
}

.ap-toast {
  pointer-events: auto;
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.55);
  color: #f8fafc;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.55);
}

.ap-toast.is-error {
  border-color: rgba(251, 113, 133, 0.7);
  color: #fecdd3;
}

.ap-toast.is-success {
  border-color: rgba(52, 211, 153, 0.7);
  color: #a7f3d0;
}

.ap-hidden {
  display: none !important;
}
