@font-face {
  font-family: "Yekan Bakh";
  src: url("/static/fonts/YekanBakh/Yekan%20Bakh%20FA%2004%20Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.app-toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.app-toast {
  width: min(420px, calc(100vw - 32px));
  border-radius: 14px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.18);
  overflow: hidden;
  pointer-events: auto;
}

.app-toast .toast-body {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
}

.app-toast-accent {
  width: 10px;
  border-radius: 8px;
  background: #94a3b8;
  margin-top: 2px;
}

.app-toast-title {
  font-weight: 900;
  margin-bottom: 2px;
}

.app-toast-message {
  color: #1a1a1a;
  white-space: pre-wrap;
}

.app-toast-progress {
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, 0.65);
  transform-origin: right;
  animation-name: appToastProgress;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.app-toast.app-toast-success {
  background: #c0f5d4;
  color: #21c45d;
  border: 1px solid #21c45d;
}

.app-toast.app-toast-success .app-toast-accent {
  background: #1a1a1a;
}

.app-toast.app-toast-danger {
  background: #ef4444;
  color: #b91c1c;
  border: 1px solid #b91c1c;
}

.app-toast.app-toast-danger .app-toast-accent {
  background: #1a1a1a; 
}

.app-toast.app-toast-warning {
  background: #f59e0b;
  color: #b45309;
  border: 1px solid #b45309;
}

.app-toast.app-toast-warning .app-toast-accent {
  background: #1a1a1a; 
}

.app-toast.app-toast-info {
  background: #38bdf8;
  color: #1d4ed8;
  border: 1px solid #1d4ed8;
}

.app-toast.app-toast-info .app-toast-accent {
  background: #1a1a1a; 
}

.app-category-list {
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.96);
  max-height: 52vh;
  overflow: auto;
}

.app-category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
}

.app-category-item:hover {
  background: rgba(15, 23, 42, 0.04);
}

.app-category-meta {
  color: #667085;
  font-size: 0.82rem;
  white-space: nowrap;
}

.app-flash {
  display: none;
}

@keyframes appToastProgress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@font-face {
  font-family: "Yekan Bakh";
  src: url("/static/fonts/YekanBakh/Yekan%20Bakh%20FA%2005%20Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Yekan Bakh";
  src: url("/static/fonts/YekanBakh/Yekan%20Bakh%20FA%2006%20Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Yekan Bakh";
  src: url("/static/fonts/YekanBakh/Yekan%20Bakh%20FA%2007%20Heavy.woff") format("woff");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

html[data-font="yekan-bakh"] body {
  font-family: "Yekan Bakh", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

html[data-font="vazirmatn"] body {
  font-family: "Tahoma", "Yekan Bakh", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

html[data-font="iransans"] body {
  font-family: "IRANSans", "Yekan Bakh", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

.app-body {
  background: radial-gradient(1200px 600px at 10% 0%, rgba(94, 114, 228, 0.08), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(45, 212, 191, 0.08), transparent 55%),
    #f7f8fc;
  color: #101828;
}

.app-shell {
  min-height: 100vh;
  display: flex;
}

.app-sidebar {
  width: 280px;
  background: linear-gradient(180deg, #111827, #0b1220);
  color: #e5e7eb;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.app-brand {
  padding: 8px 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
}

.app-brand-title {
  font-weight: 900;
  font-size: 1.15rem;
}

.app-brand-sub {
  font-size: 0.85rem;
  opacity: 0.75;
}

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

.app-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: rgba(229, 231, 235, 0.92);
  transition: background 120ms ease, transform 120ms ease;
}

.app-nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.app-nav-item.active {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.app-sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 14px;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(16, 24, 40, 0.08);
}

.app-topbar-title {
  font-weight: 800;
  font-size: 1.1rem;
}

.app-topbar-spacer {
  flex: 1;
}

.app-content {
  padding: 18px;
}

.app-card {
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.05);
}

.app-section-title {
  font-weight: 900;
}

.app-subtitle {
  font-weight: 800;
  color: #344054;
}

.app-metric-label {
  color: #475467;
  font-weight: 700;
}

.app-metric-value {
  font-size: 1.8rem;
  font-weight: 900;
  margin-top: 4px;
}

.app-revenue {
  font-size: 1.5rem;
  font-weight: 900;
}

.app-prewrap {
  white-space: pre-wrap;
  word-break: break-word;
}

.app-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.app-table-main {
  font-weight: 800;
  color: #111827;
}

.app-table-sub {
  color: #667085;
  font-size: 0.86rem;
  margin-top: 4px;
}

.app-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.app-soft-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 10px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.82rem;
  font-weight: 700;
}

.app-soft-badge-muted {
  background: #f2f4f7;
  color: #475467;
}

.app-soft-badge-success {
  background: #ecfdf3;
  color: #027a48;
}

.app-soft-badge-warning {
  background: #fffaeb;
  color: #b54708;
}

.app-soft-badge-danger {
  background: #fef3f2;
  color: #b42318;
}

.app-inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.app-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  padding: 6px 10px;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  color: #344054;
  font-size: 0.84rem;
}

.app-chip a {
  color: inherit;
  text-decoration: none;
}

.app-empty-note {
  border: 1px dashed #d0d5dd;
  border-radius: 14px;
  background: #fcfcfd;
  color: #667085;
  padding: 12px 14px;
}

.app-form-hint {
  color: #667085;
  font-size: 0.84rem;
  margin-top: 6px;
}

.app-select-panel {
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 14px;
  padding: 12px;
  background: #fcfcfd;
}

.app-select-list {
  min-height: 180px;
}

.app-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.app-status-box {
  border: 1px solid #eaecf0;
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
}

.app-status-label {
  color: #667085;
  font-size: 0.85rem;
}

.app-status-value {
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 800;
}

@media (max-width: 768px) {
  .app-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    transform: translateX(110%);
    transition: transform 160ms ease;
    z-index: 2000;
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
}
