/* الفرن المصري — EgyForn Design Tokens (Arabic Typography & High-Contrast Bakery Ergonomics) */
:root {
  --color-primary: #b45309;
  --color-primary-hover: #92400e;
  --color-primary-soft: #fef3c7;
  --color-accent: #c2410c;
  --color-accent-hover: #9a3412;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #0f172a;
  --color-muted: #334155;
  --color-border: #cbd5e1;
  --color-danger: #dc2626;
  --color-warning: #d97706;
  --color-success: #15803d;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-pop: 0 20px 40px rgba(180, 83, 9, 0.15);
  --font-ar: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-en: 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body {
  font-family: var(--font-ar);
  direction: rtl;
  text-align: right;
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea {
  font-family: inherit;
}
img { max-width: 100%; display: block; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--color-primary); color: #fff; border: 0; border-radius: var(--radius-md);
  padding-inline: 20px; padding-block: 12px; min-height: 48px; cursor: pointer; font-weight: 700;
  font-size: 0.95rem; letter-spacing: 0.01em;
  transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.22);
}
.btn:hover { background: var(--color-primary-hover); box-shadow: 0 4px 14px rgba(180, 83, 9, 0.3); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-accent { background: var(--color-accent); box-shadow: 0 2px 8px rgba(194, 65, 12, 0.3); }
.btn-accent:hover { background: var(--color-accent-hover); }
.btn-ghost { background: var(--color-surface); color: var(--color-text); border: 1.5px solid var(--color-border); box-shadow: none; }
.btn-ghost:hover { border-color: var(--color-primary); color: var(--color-primary-hover); background: #fff; box-shadow: var(--shadow-card); }
.btn-sm { min-height: 40px; padding-inline: 14px; padding-block: 8px; font-size: 0.88rem; }
.card { background: var(--color-surface); border: 1.5px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.field { display: grid; gap: 6px; margin-block-end: 14px; }
.field label { font-weight: 700; font-size: 0.92rem; color: var(--color-text); }
.field input, .field select, .field textarea {
  border: 1.5px solid var(--color-border); border-radius: var(--radius-md);
  padding-inline: 14px; padding-block: 12px; min-height: 48px; background: #fff; width: 100%;
  font-size: 0.95rem; color: var(--color-text);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--color-primary-soft); border-color: var(--color-primary); }
.badge { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; flex-shrink: 0; border-radius: 999px; padding-inline: 10px; padding-block: 4px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em; background: var(--color-primary-soft); color: var(--color-primary-hover); }
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; display: block; border: 1.5px solid var(--color-border); border-radius: var(--radius-md); background: #fff; }
.icon { width: 20px; height: 20px; flex: none; color: #475569; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
.stat { display: grid; gap: 8px; }
.stat-top { display: flex; align-items: center; gap: 8px; }
.stat-icon { width: 22px; height: 22px; color: #475569; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.low-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--color-border); }
.low-row:last-child { border-bottom: none; }
.spin { animation: egyforn-spin 0.9s linear infinite; }
@keyframes egyforn-spin { to { transform: rotate(360deg); } }
table.data { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.data th, table.data td { text-align: start; padding-inline: 14px; padding-block: 12px; border-block-end: 1px solid var(--color-border); word-break: normal; }
table.data th { background: #f8fafc; font-size: 0.85rem; font-weight: 800; color: #1e293b; white-space: nowrap; border-bottom: 2px solid var(--color-border); }
