/* arabic */
@font-face {
  font-family: 'Bee Baby Cairo';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/bee-baby-fonts-20261018/cairo-0.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
/* latin-ext */
@font-face {
  font-family: 'Bee Baby Cairo';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/bee-baby-fonts-20261018/cairo-1.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Bee Baby Cairo';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/bee-baby-fonts-20261018/cairo-2.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Bee Baby visual refinements. Added after the existing stylesheets. */
/* This stylesheet changes presentation only; the React bundle and API stay intact. */
:root {
  --bb-ui-ink: #38291f;
  --bb-ui-muted: #655e56;
  --bb-ui-gold: #9c7228;
  --bb-ui-focus: #9b701f;
  --bb-ui-border: #e2d9cc;
  --bb-ui-soft: #fbf7ee;
  --bb-ui-radius-sm: 10px;
  --bb-ui-radius-md: 14px;
  --bb-ui-radius-lg: 20px;
  --bb-ui-shadow: 0 3px 14px #49342609;
}

body, .invoice-public, .customer-export {
  font-family: "Bee Baby Cairo", Tahoma, Arial, sans-serif;
}
body { line-height: 1.7; }
button, input, select, textarea { font-family: inherit; }
button, a, summary { -webkit-tap-highlight-color: #c49a3826; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--bb-ui-focus);
  outline-offset: 3px;
}

/* The surrounding search box owns the focus ring, not its borderless input. */
.search {
  border-color: var(--bb-ui-border);
  border-radius: var(--bb-ui-radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.search:focus-within {
  border-color: var(--bb-ui-focus);
  box-shadow: 0 0 0 3px #b38a3829;
  background-color: #fffdf7;
}
main .search input:not([type="checkbox"]):not([type="radio"]) {
  min-width: 0;
  min-height: 40px;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  outline: none;
  box-shadow: none;
}
main input:not([type="checkbox"]):not([type="radio"]),
main select, main textarea {
  border-radius: var(--bb-ui-radius-sm);
  color: var(--bb-ui-ink);
}
main input:focus, main select:focus, main textarea:focus {
  border-color: var(--bb-ui-focus);
  box-shadow: 0 0 0 3px #b38a3829;
}
main input::placeholder, main textarea::placeholder {
  color: #756d64;
  opacity: 1;
}
main input[type="checkbox"], main input[type="radio"],
.modal input[type="checkbox"], .modal input[type="radio"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  padding: 0;
  flex: 0 0 20px;
  accent-color: #875f25;
}
.orders-bulk > label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 44px;
  width: auto;
  white-space: nowrap;
}
main select:not([multiple]):not([size]) {
  appearance: none;
  -webkit-appearance: none;
  padding-inline-end: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23836336' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  background-size: 16px;
}
main input[aria-invalid="true"], main select[aria-invalid="true"],
main textarea[aria-invalid="true"], main input:user-invalid,
main select:user-invalid, main textarea:user-invalid {
  border-color: #a6332e;
  background-color: #fff8f7;
  box-shadow: 0 0 0 3px #a6332e18;
}

/* Keep muted text legible on the existing light surfaces. */
.card span, .card small, .row small, td small,
.contact p, .contact small, .user-row small, .activity-list small,
.reminder-list small, .ready-days small, .order-card-head small,
.orders-table small, .bb-shortcut-copy small, .bb-suggestion small,
.bb-search-hint, .bb-empty, .bb-discount-field small, .bb-help {
  color: var(--bb-ui-muted);
}
.card, .panel, .contact, .bb-invoice-shortcut,
.damage-form, .damage-history, .damage-stats > div {
  border-radius: var(--bb-ui-radius-md);
  box-shadow: var(--bb-ui-shadow);
}
.table, .orders-table-wrap, .bb-table-scroll {
  max-width: 100%;
  min-width: 0;
  border-radius: var(--bb-ui-radius-md);
}
.table { display: block; }
.modal, .workspace-menu nav { border-radius: var(--bb-ui-radius-lg); }
main :is(.primary, .save) {
  background-image: linear-gradient(125deg, #5d4030, #493426);
  color: #fff;
}
.stats > .card strong, .report-stats b, .invoice-summary b, .line-total strong {
  font-variant-numeric: tabular-nums;
}
.stats > .card strong { overflow-wrap: anywhere; }
/* This is the existing gross-profit card; its label and calculation are unchanged. */
.stats > .card:nth-child(2) {
  color: #fff;
  background: linear-gradient(135deg, #5c4030, #3d2a21);
  border-color: #9b7844;
}
.stats > .card:nth-child(2) :is(span, small) { color: #f1e3ca; }
.stats > .card:nth-child(2) strong { color: #fff; }
.stats > .card:nth-child(2) i { color: #f0d18c; background: #ffffff12; }

/* Purely visual row numbers; adding/removing lines keeps the sequence current. */
.invoice-lines { counter-reset: bb-invoice-line; }
.invoice-lines > .invoice-line {
  counter-increment: bb-invoice-line;
  padding-block-start: 49px;
  border-radius: var(--bb-ui-radius-md);
}
.invoice-lines > .invoice-line::before {
  content: "الصنف " counter(bb-invoice-line);
  position: absolute;
  inset-block-start: 11px;
  inset-inline-start: 16px;
  color: #735323;
  background: #f5ebd5;
  border: 1px solid #e6d4ac;
  border-radius: 7px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.8;
  pointer-events: none;
}
.stock-warning {
  color: #205b3c;
  background: #eaf6ee;
  border: 1px solid #b9d8c5;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.8;
  padding: 10px 12px;
}
.stock-warning::before { content: "✓ "; font-weight: 800; }
.stock-warning.bad { color: #922f2b; background: #fff0ee; border-color: #e5b6b1; }
.stock-warning.bad::before { content: "! "; }
.invoice-summary .grand {
  gap: 8px;
  flex-wrap: wrap;
  margin-block-start: 14px;
  padding: 16px 12px;
  border: 1px solid #e7d7b3;
  border-radius: var(--bb-ui-radius-sm);
  color: var(--bb-ui-ink);
  background: var(--bb-ui-soft);
}
.invoice-summary .grand b { font-size: clamp(22px, 2vw, 28px); line-height: 1.6; }

/* Reuse the app's existing empty/loading/error messages without changing their text. */
.activity-empty, .activity-loading, .activity-error,
.empty-orders, .bb-empty {
  line-height: 1.9;
  font-size: 14px;
}
.activity-empty, .activity-loading, .activity-error, .empty-orders {
  padding: 24px 18px;
  border: 1px solid var(--bb-ui-border);
  border-radius: var(--bb-ui-radius-md);
  background: #fcfaf6;
}
.activity-error, .form-error { color: #922f2b; background-color: #fff0ee; }
.activity-empty::before, .empty-orders::before { content: "◇ "; color: #9c7228; font-size: 22px; }
.activity-error::before { content: "! "; font-weight: 800; }

.orders-table :is(.pill, .draft-status) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-style: normal;
  white-space: nowrap;
}
.orders-table :is(.pill, .draft-status)::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: currentColor;
}
@media (hover: hover) and (pointer: fine) {
  :is(.table, .orders-table-wrap, .bb-table-scroll) tbody tr:hover > td {
    background-color: #fcf8ef;
  }
  main :is(.primary, .save):not(:disabled):hover { background-image: linear-gradient(125deg, #6b4a35, #503729); }
}
html, .table, .orders-table-wrap, .bb-table-scroll, .bb-suggestions,
.workspace-menu nav, aside { scrollbar-width: thin; scrollbar-color: #b5965e #f5f0e7; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: #f5f0e7; }
::-webkit-scrollbar-thumb { background: #b5965e; border: 2px solid #f5f0e7; border-radius: 20px; }

.invoice-public > h2 { padding-block-end: 12px; border-block-end: 1px solid #dfd2b8; }
.invoice-public > p:nth-of-type(4) { padding-block-start: 15px; margin-block-start: 18px; border-block-start: 1px solid #dfd2b8; }
.invoice-public header h1 { font-size: 24px; font-weight: 800; }
.invoice-public header p { margin: 4px 0; font-size: 13px; line-height: 1.6; }
.invoice-public .invoice-totals { border-block-start: 1px solid #dfd2b8; padding-block-start: 14px; margin-block-start: 18px; }
.invoice-public .invoice-totals h3 { font-size: 24px; font-weight: 800; line-height: 1.8; color: #493426; }
.invoice-public table { font-variant-numeric: tabular-nums; }
.invoice-public figure > img { display: block; margin-inline: auto; }

@media (max-width: 700px) {
  main input:not([type="checkbox"]):not([type="radio"]), main select, main textarea { font-size: 16px; }
  .stats > .card { min-width: 0; padding: 16px 13px; }
  .stats > .card span { font-size: 12px; line-height: 1.8; }
  .stats > .card strong { font-size: 21px; line-height: 1.7; }
  .invoice-lines > .invoice-line { padding-block-start: 48px; }
  .bb-shortcut-copy strong { font-size: 17px; }
  .bb-shortcut-copy small { line-height: 1.9; }
  .table::before, .orders-table-wrap::before,
  .bb-table-scroll:has(.bb-contacts-table)::before {
    content: "↔ اسحب يمينًا ويسارًا لعرض بقية الأعمدة";
    position: sticky;
    inset-inline-start: 0;
    display: block;
    width: fit-content;
    max-width: 100%;
    padding: 9px 12px;
    color: #765622;
    background: #fbf6e9;
    border-block-end: 1px solid #eadfc8;
    font-size: 12px;
    line-height: 1.8;
  }
  .invoice-public { padding: 18px 14px; margin: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .search, .bb-invoice-shortcut, main input, main select, main textarea { transition: none; }
}
@media print {
  .table::before, .orders-table-wrap::before, .bb-table-scroll::before { content: none; }
  .invoice-public { position: relative; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; font-size: 12px; line-height: 1.6; }
  .invoice-public p { margin-block: 7px; }
  .invoice-public header p { margin-block: 3px; }
  .invoice-public::before {
    content: "";
    position: fixed;
    top: 42%;
    left: 50%;
    width: 180px;
    height: 180px;
    transform: translate(-50%, -50%);
    background: url("/bee-baby-logo.jpg") center / contain no-repeat;
    opacity: .035;
    pointer-events: none;
  }
  .invoice-public .invoice-totals h3 { font-size: 22px; margin-block: 10px; }
  .invoice-public table { min-width: 0; }
  .invoice-public :is(header, h2, h3, figure) { break-inside: avoid; }
}
