/* اضافات لوحة تحكم المحل فوق ستايل لوحة تحكيم */
@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap");


/* ===== ثيم آيلا ستور (ألوان اللوجو: لافندر + بنفسجي غامق + لمسة دهبي) ===== */
:root {
    --primary-color: #6a4a9c;
    --ay-deep: #4a2f74;
    --ay-lav: #9b84c7;
    --ay-soft: #efe8f8;
    --ay-mist: #f7f3fc;
    --ay-gold: #b08a5e;
    --text-color: #2e2440;
    --bg-color: #f7f3fc;
    --border-color: #e7def3;
    --dn-ink: #3a2560;
    --dn-soft: #efe8f8;
    --dn-bg: #f7f3fc;
    --dn-border: #ebe3f5;
    --dn-muted: #7a6f8c;
    --dn-shadow: 0 1px 2px rgba(74, 47, 116, .04), 0 8px 24px rgba(74, 47, 116, .07);
}
body { background: var(--ay-mist); color: var(--text-color); }
header .header { border-bottom: 1px solid var(--border-color); }

.btn-primary, .btn-primary:focus { background: var(--primary-color); border-color: var(--primary-color); }
.btn-primary:hover, .btn-primary:active { background: var(--ay-deep) !important; border-color: var(--ay-deep) !important; }
.cl-btn--primary:hover { background: var(--ay-deep); border-color: var(--ay-deep); }
.form-control:focus, .form-select:focus { border-color: var(--ay-lav); box-shadow: 0 0 0 .2rem rgba(155, 132, 199, .25); }
.form-check-input:checked { background-color: var(--primary-color); border-color: var(--primary-color); }
a { color: var(--primary-color); }
.alert-success { background: #eef7f1; border-color: #cfe9d7; color: #24603a; }

.sb .sb-link.active .sb-icon { box-shadow: 0 4px 10px rgba(106, 74, 156, .3); }
.sb .sb-section { color: var(--ay-gold); }

.db-hero { background: linear-gradient(135deg, #3a2560 0%, #6a4a9c 60%, #9b84c7 120%); }
.db-hero h2 { font-weight: 700; }
.db-bars__bar { background: linear-gradient(180deg, var(--ay-lav), var(--primary-color)); }
.db-kpi__icon { background: var(--ay-soft) !important; color: var(--primary-color) !important; }
.db-card { border-radius: 16px; }

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.page-item.active .page-link { background: var(--primary-color) !important; border-color: var(--primary-color) !important; color: #fff !important; }
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background: var(--primary-color); }

/* اللوجو */
.st-logo img { height: 46px; width: auto; border-radius: 10px; }
.st-logo--lg img { height: 130px; border-radius: 16px; }
.st-logo__name { font-family: "Cairo", serif; color: var(--ay-deep); letter-spacing: .3px; }
.st-logo__name small { font-weight: 500; color: var(--ay-gold); margin-inline-start: 4px; font-size: .8em; }
.auth-page { background: radial-gradient(circle at 20% 10%, #efe8f8 0, #f7f3fc 45%, #e9e0f5 100%); }
.auth-card { border: 1px solid var(--border-color); box-shadow: 0 20px 50px rgba(74, 47, 116, .12); }
.auth-card .logo-cont { text-align: center; }

body, .form-control, .btn, .select2-container { font-family: "Cairo", "Open Sans", sans-serif; }

.st-logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.15rem; color: var(--text-color); text-decoration: none; }
.st-logo--lg { font-size: 1.5rem; }
.st-logo__mark { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--ay-lav), var(--ay-deep)); color: #fff; font-weight: 800; }

.st-code { display: inline-block; direction: ltr; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8rem; background: var(--ay-soft); color: var(--ay-deep); padding: 2px 8px; border-radius: 6px; white-space: nowrap; text-decoration: none; }
.st-ltr { direction: ltr; text-align: left; }
.st-title { font-weight: 700; margin: 8px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border-color); }

/* شيبس المقاسات */
.st-sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.st-size { display: inline-flex; align-items: center; gap: 4px; min-width: 32px; justify-content: center; padding: 3px 8px; border-radius: 6px; font-size: .8rem; font-weight: 700; background: #e3f2ef; color: #0f766e; border: 1px solid #b9e0d8; white-space: nowrap; }
.st-size small { font-weight: 500; opacity: .8; }
.st-size em { font-style: normal; background: rgba(255, 255, 255, .7); border-radius: 4px; padding: 0 5px; font-size: .75rem; }
.st-size.is-low { background: #fdf3e1; color: #b45309; border-color: #f6d9a8; }
.st-size.is-out { background: #fdecec; color: #c62828; border-color: #f5c2c2; text-decoration: line-through; }
.st-legend { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: #666; }

.st-product { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.st-product img, .st-product__ph { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.st-product__ph { display: inline-grid; place-items: center; background: var(--ay-soft); color: var(--ay-lav); font-size: 1.1rem; }
.st-product small.status { margin-inline-start: 6px; font-size: .7rem; }
.st-thumb { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; }

.st-table th { white-space: nowrap; font-weight: 600; color: #555; }
.st-table td, .st-table th { vertical-align: middle; }
.st-variants .form-control { min-width: 110px; }

/* الفلاتر */
.st-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.st-filters .form-control { width: auto; min-width: 170px; flex: 1 1 170px; max-width: 280px; }
.st-filters__label { display: inline-flex; align-items: center; gap: 6px; color: #555; }
.st-quick { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.st-quick a { font-size: .8rem; padding: 4px 10px; border-radius: 20px; background: var(--ay-soft); color: var(--primary-color); text-decoration: none; }

.st-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.st-summary > div { background: #fff; border: 1px solid var(--border-color); border-radius: 14px; box-shadow: var(--dn-shadow); padding: 12px 16px; }
.st-summary span { display: block; font-size: .8rem; color: #777; }
.st-summary b { font-size: 1.2rem; color: var(--ay-deep); }

/* ترتيب بالبار */
.st-rank { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.st-rank li { display: grid; grid-template-columns: minmax(70px, 160px) 1fr auto; align-items: center; gap: 10px; }
.st-rank li > .st-size { justify-self: start; }
.st-rank__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; }
.st-rank__bar { height: 10px; background: var(--ay-soft); border-radius: 10px; overflow: hidden; }
.st-rank__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--ay-lav), var(--primary-color)); border-radius: 10px; }
.st-rank b { font-size: .85rem; white-space: nowrap; }

/* صفحة المنتج */
.st-hero { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.st-hero__img { width: 160px; height: 160px; border-radius: 12px; object-fit: cover; font-size: 2.5rem; }
.st-hero__body { flex: 1; min-width: 240px; }
.st-hero__body h3 { font-weight: 700; margin-bottom: 4px; }
.st-facts { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 12px 0; }
.st-facts dt { font-size: .75rem; color: #888; font-weight: 500; }
.st-facts dd { margin: 0; font-weight: 700; }

/* شاشة البيع */
.st-pos { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.st-pos__side { position: sticky; top: 90px; }
.st-pos .select2-container .select2-selection--single { height: 46px; display: flex; align-items: center; }
.st-opt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-opt em { font-style: normal; font-size: .75rem; color: #0f766e; margin-inline-start: auto; }
.st-opt em.is-out { color: #c62828; }
.st-totals { margin: 12px 0; }
.st-totals > div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--border-color); }
.st-totals dt { font-weight: 500; color: #666; }
.st-totals dd { margin: 0; font-weight: 700; }
.st-totals .is-total dd, .st-totals .is-total dt { font-size: 1.2rem; color: var(--primary-color); }
.st-totals--end { max-width: 320px; margin-inline-start: auto; }

.st-inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 10px; }
.st-inline-form .form-group { margin-bottom: 0; }
.st-inline-form--row { margin: 0; align-items: center; flex-wrap: nowrap; }
.st-inline-form--row .form-control { max-width: 140px; }

.st-matrix td, .st-matrix th { min-width: 56px; }

.st-invoice { max-width: 900px; margin: 0 auto; }
.st-invoice__head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-bottom: 2px solid var(--border-color); padding-bottom: 12px; margin-bottom: 12px; }

@media (max-width: 991px) {
    .st-pos { grid-template-columns: 1fr; }
    .st-pos__side { position: static; }
}

@media print {
    header, .navigation-bar, .navigation-overlay, .breadcrumb-tools-cont, .alert { display: none !important; }
    .page-section { margin: 0 !important; padding: 0 !important; width: 100% !important; }
    .st-invoice { border: 0; box-shadow: none; max-width: none; }
    body { background: #fff; }
}

/* تقرير الدخل */
.st-tabs { display: inline-flex; background: var(--ay-soft); border-radius: 10px; padding: 3px; gap: 2px; }
.st-tabs a { padding: 5px 14px; border-radius: 8px; font-size: .85rem; font-weight: 600; color: var(--ay-deep); text-decoration: none; }
.st-tabs a.active { background: #fff; color: var(--primary-color); box-shadow: 0 1px 3px rgba(74, 47, 116, .15); }
.st-trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: .75rem; padding: 1px 6px; border-radius: 6px; margin-inline-start: 4px; }
.st-trend.is-up { background: #e5f4ea; color: #1f7a3f; }
.st-trend.is-down { background: #fdecec; color: #c62828; }
.st-dim td { color: #aaa; }

.st-pos > * { min-width: 0; }
.st-pos .js-qty { min-width: 70px; }
.st-pos .js-price { min-width: 100px; }
.st-table .st-sizes { min-width: 260px; }
.st-table .st-product { min-width: 170px; }

/* المرتجعات */
.st-step { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--primary-color); color: #fff; font-size: .8rem; margin-inline-end: 6px; }
.st-find { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.st-find > i { font-size: 1.4rem; color: var(--primary-color); background: var(--ay-soft); width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; }
.st-find > div { flex: 1 1 220px; }
.st-find .form-control { flex: 1 1 220px; max-width: 320px; }
.st-chip-link { display: inline-block; margin: 0 0 6px 6px; padding: 5px 12px; border-radius: 20px; background: var(--ay-soft); color: var(--ay-deep); text-decoration: none; font-size: .85rem; }
@media print { .st-noprint { display: none !important; } }
