/* public/assets/css/app.css */
/* AdminLTE RTL already handles layout, keep overrides minimal */

:root{
  --app-font: 'Cairo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

html, body { font-family: var(--app-font); }
h1,h2,h3,h4,h5 { font-weight: 700; }

.small-box { border-radius: 14px; }
.card { border-radius: 14px; }
.btn, .form-control, .form-select { border-radius: 12px; }

.nav-sidebar .nav-link p,
.sidebar-menu .nav-link p { font-size: .98rem; }
.brand-text { font-weight: 700; letter-spacing: .2px; }

/* Make table headers clearer */
.table thead th { font-weight: 700; }

/* Fix footer spacing */
.app-footer { padding: .75rem 1rem; }

/* Content spacing */
.app-content { padding: 1rem 0 2rem; }
.app-content-header { padding: 1rem 0 .5rem; }

/* Better tables */
.table thead th { white-space: nowrap; }
.table td, .table th { vertical-align: middle; }

/* Forms */
.form-label { font-weight: 700; }

/* Page title sizing */
.app-content-header h1{ font-size: 1.6rem; line-height: 1.2; }

.card-title{ font-size: 1.05rem; }

/* v2 UI: unify buttons and typography */
.btn { font-weight: 700; }
.btn-primary{ box-shadow: 0 6px 14px rgba(13,110,253,.15); }
.btn-success{ box-shadow: 0 6px 14px rgba(25,135,84,.15); }
.card-header{ padding: .85rem 1rem; }
.card-body{ padding: 1rem; }
.table td, .table th{ padding: .6rem .75rem; }


/* Sidebar: collapsible 'Warehouses' menu caret */
.sidebar-wrapper .submenu-caret { transition: transform .18s ease; }
.sidebar-wrapper a[aria-expanded="true"] .submenu-caret { transform: rotate(-90deg); }
.sidebar-wrapper a[aria-expanded="false"] .submenu-caret { transform: rotate(0deg); }

/* Nested menu spacing */
.sidebar-wrapper #menu-warehouses .nav-link, .sidebar-wrapper #menu-sales .nav-link { padding-top: .35rem; padding-bottom: .35rem; }


:root{
  --app-bg:#f4f7fb;
  --app-card:#ffffff;
  --app-border:#dbe4f0;
  --app-primary:#243447;
  --app-primary-soft:#eef3f8;
  --app-accent:#0d6efd;
  --app-muted:#6b7a90;
  --app-radius:18px;
  --app-shadow:0 14px 34px rgba(36,52,71,.08);
}
body{ background:var(--app-bg); color:#16202c; }
.app-content{ padding:1.15rem 0 2rem; }
.page-shell{ display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; padding:.4rem 0 .85rem; }
.page-shell__title{ font-size:2rem; font-weight:800; color:var(--app-primary); letter-spacing:-.02em; }
.page-shell__breadcrumb{ background:transparent; padding:0; margin-top:.35rem; color:var(--app-muted); font-size:.95rem; }
.page-shell__breadcrumb a{ text-decoration:none; }
.page-shell__actions{ display:flex; gap:.5rem; flex-wrap:wrap; }
.card, .small-box, .content-card, .filter-card, .summary-card{ background:var(--app-card); border:1px solid var(--app-border); box-shadow:var(--app-shadow); border-radius:var(--app-radius); overflow:hidden; }
.card-header{ background:#fff; border-bottom:1px solid var(--app-border); font-weight:800; color:var(--app-primary); }
.card-body{ padding:1.15rem; }
.filter-card .card-body, .content-card .card-body { padding:1rem 1.15rem; }
.table{ --bs-table-bg:transparent; }
.table thead th{ background:#f8fafc; color:var(--app-primary); font-size:.92rem; border-bottom-width:1px; }
.table tbody tr:hover{ background:#fafcff; }
.form-label{ color:var(--app-primary); margin-bottom:.45rem; }
.form-control, .form-select{ min-height:46px; border-color:#cfd9e6; }
.form-control:focus, .form-select:focus{ border-color:#86b7fe; box-shadow:0 0 0 .2rem rgba(13,110,253,.12); }
.btn{ min-height:44px; padding:.625rem 1rem; }
.btn-outline-secondary{ border-color:#cad5e2; color:var(--app-primary); }
.app-sidebar{ border-left:1px solid rgba(255,255,255,.06); }
.sidebar-search-box{ position:relative; display:flex; align-items:center; gap:.45rem; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.08); border-radius:14px; padding:.45rem .6rem; }
.sidebar-search-box i{ color:rgba(255,255,255,.75); }
.sidebar-search-box input{ background:transparent; border:0; color:#fff; min-height:auto; padding:0; box-shadow:none !important; }
.sidebar-search-box input::placeholder{ color:rgba(255,255,255,.55); }
.sidebar-search-shortcut{ border:0; background:rgba(255,255,255,.14); color:#fff; border-radius:8px; min-width:28px; height:28px; font-size:.8rem; }
.sidebar-empty{ color:rgba(255,255,255,.55); font-size:.83rem; text-align:center; padding:.75rem 1rem; }
.sidebar-menu .nav-link{ border-radius:12px; margin:.1rem .65rem; }
.sidebar-menu .nav-link p{ font-weight:700; }
.sidebar-menu .nav-link.active, .sidebar-menu .nav-link:hover{ background:rgba(255,255,255,.11); }
.sidebar-menu .nav-header{ font-size:.76rem; font-weight:800; letter-spacing:.04em; }
.section-title{ font-size:1.2rem; font-weight:800; color:var(--app-primary); margin-bottom:1rem; }
.stat-card{ padding:1rem 1.1rem; }
.stat-card__label{ color:var(--app-muted); font-size:.9rem; }
.stat-card__value{ font-size:1.6rem; font-weight:800; color:var(--app-primary); }
.shortcut-hint{ font-size:.78rem; opacity:.7; margin-inline-start:.35rem; }
.alert{ border-radius:16px; }
@media (max-width: 991.98px){ .page-shell{ flex-direction:column; } .page-shell__title{ font-size:1.7rem; } }


.page-actions-bar{display:flex;justify-content:flex-end;gap:.5rem;flex-wrap:wrap;margin-bottom:1rem;}
.form-shell{display:flex;flex-direction:column;gap:1rem;}
.form-section-title{font-size:1rem;font-weight:800;color:var(--app-primary);margin-bottom:.85rem;}
.form-subtle{color:var(--app-muted);font-size:.9rem;}
.summary-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin-bottom:1rem;}
.summary-strip .summary-card .card-body{padding:1rem 1.1rem;}
.summary-strip .label{color:var(--app-muted);font-size:.86rem;margin-bottom:.2rem;}
.summary-strip .value{font-size:1.35rem;font-weight:800;color:var(--app-primary);}
.embedded-light{background:#f8fafc;border:1px solid var(--app-border);border-radius:14px;padding:1rem;}
.sticky-actions{position:sticky;top:.75rem;z-index:10;}
@media (max-width: 767.98px){.summary-strip{grid-template-columns:1fr;}}


.content-card,.filter-card,.summary-card{border:0; border-radius:18px; box-shadow:0 10px 26px rgba(15,23,42,.06);}
.content-card .card-header,.filter-card .card-header,.summary-card .card-header{background:transparent; border-bottom:1px solid rgba(15,23,42,.06); padding:1rem 1.15rem; font-weight:700;}
.content-card .card-body,.filter-card .card-body,.summary-card .card-body{padding:1.1rem 1.15rem;}
.page-actions-bar{display:flex; gap:.65rem; flex-wrap:wrap; margin-bottom:1rem;}
.embedded-light{background:#f8fafc; border:1px solid rgba(15,23,42,.06); border-radius:16px; padding:1rem;}
.table tbody td{vertical-align:middle;}


/* Global autocomplete/suggestion layers: keep visible above cards and tables */
.card, .content-card, .filter-card, .summary-card,
.card-body, .embedded-light, .row, [class*="col-"]{
  overflow: visible;
}
.table-responsive{ overflow:auto; }

.list-group.position-absolute.w-100,
.suggest-box,
#party_results,
#customer_results,
#supplier_suggest,
#item_suggest{
  z-index: 1085 !important;
  max-height: 260px;
  overflow: auto !important;
  margin-top: .3rem;
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  box-shadow: 0 18px 36px rgba(15,23,42,.14);
}

.list-group.position-absolute.w-100 .list-group-item,
.suggest-item{
  border: 0;
  border-bottom: 1px solid rgba(15,23,42,.06);
  padding: .7rem .85rem;
  cursor: pointer;
}
.list-group.position-absolute.w-100 .list-group-item:last-child,
.suggest-item:last-child{ border-bottom: 0; }
.list-group.position-absolute.w-100 .list-group-item:hover,
.suggest-item:hover{ background: #f8fafc; }


.parties-list-card .card-header{padding:1rem 1rem .5rem}
.parties-search-form .form-label{font-weight:700;margin-bottom:.35rem}
.party-modal-dialog{max-width:min(1320px,98vw);margin:.75rem auto}
.party-modal-content{height:min(92vh,980px);display:flex;flex-direction:column}
.party-modal-content .modal-header{flex:0 0 auto}
.party-modal-content .modal-body{padding:1rem 1.25rem 1.5rem;flex:1 1 auto;overflow:auto;min-height:0}
.party-modal-content .modal-footer{border-top:1px solid rgba(15,23,42,.08);padding:.875rem 1.25rem;flex:0 0 auto}
.table-clean th,.table-clean td{vertical-align:middle}

.party-modal-content .party-form{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;height:100%}
.party-modal-content .modal-body{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}
.party-modal-content .modal-footer{position:sticky;bottom:0;z-index:2}


/* compact dashboard cards */
.dashboard-cards-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.85rem;align-items:stretch;}
.dashboard-card{position:relative;padding:.9rem 1rem;border-radius:20px;color:#fff;box-shadow:0 12px 24px rgba(15,23,42,.10);overflow:hidden;min-height:168px;display:flex;flex-direction:column;}
.dashboard-card::after{content:"";position:absolute;inset:auto -24px -48px auto;width:130px;height:130px;border-radius:50%;background:rgba(255,255,255,.08);}
.dashboard-card__icon{font-size:1.6rem;line-height:1;opacity:.95;margin-bottom:.45rem;position:relative;z-index:1;}
.dashboard-card__title{font-size:1rem;font-weight:800;line-height:1.2;position:relative;z-index:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.dashboard-card__value{font-size:2.55rem;font-weight:900;line-height:1;margin-top:.25rem;position:relative;z-index:1;}
.dashboard-card__desc{font-size:.92rem;opacity:.96;margin-top:.4rem;position:relative;z-index:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.dashboard-card__action{margin-top:auto;display:flex;align-items:center;justify-content:space-between;gap:.6rem;background:rgba(255,255,255,.16);color:#fff;text-decoration:none;padding:.62rem .85rem;border-radius:16px;font-weight:800;font-size:.95rem;position:relative;z-index:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.dashboard-card__action:hover{color:#fff;background:rgba(255,255,255,.22);}
.dashboard-card--primary{background:linear-gradient(135deg,#2b6ef3,#2f5fda);}
.dashboard-card--success{background:linear-gradient(135deg,#199450,#219b56);}
.dashboard-card--info{background:linear-gradient(135deg,#25b7d8,#1b8bb0);}
.dashboard-card--danger{background:linear-gradient(135deg,#e7346b,#cd274f);}
.dashboard-card--warning{background:linear-gradient(135deg,#ffc400,#ecb300);color:#16202c;}
.dashboard-card--warning .dashboard-card__action{background:rgba(0,0,0,.12);color:#16202c;}
.dashboard-card--warning .dashboard-card__action:hover{background:rgba(0,0,0,.16);color:#16202c;}
.alerts-summary-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:.9rem;}
.alerts-summary-item{background:#f8fafc;border:1px solid var(--app-border);border-radius:18px;padding:1rem 1.1rem;display:flex;flex-direction:column;gap:.35rem;}
.alerts-summary-item span{color:var(--app-muted);font-size:.92rem;}
.alerts-summary-item strong{font-size:1.9rem;color:var(--app-primary);font-weight:900;}
@media (max-width:1399.98px){.dashboard-cards-grid{grid-template-columns:repeat(4,minmax(0,1fr));}}
@media (max-width:1199.98px){.dashboard-cards-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.alerts-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media (max-width:767.98px){.dashboard-cards-grid,.alerts-summary-grid{grid-template-columns:1fr;}.dashboard-card{min-height:unset;}}

/* two-column login */
body.login-page-body{background:linear-gradient(180deg,#d6ebe5 0,#edf4f2 260px,#eef3f7 260px,#eef3f7 100%);min-height:100vh;}
.login-split-page{max-width:1120px;margin:3rem auto;padding:0 1rem;display:grid;grid-template-columns:1fr 1fr;gap:1.25rem;align-items:stretch;}
.login-split-card{background:#fff;border-radius:28px;box-shadow:0 20px 48px rgba(15,23,42,.12);overflow:hidden;}
.login-split-card--brand{background:linear-gradient(180deg,#123b6f,#1a4a84);color:#fff;padding:2.5rem 2.25rem;display:flex;flex-direction:column;justify-content:center;text-align:center;}
.login-brand-mark{width:110px;height:110px;margin:0 auto 1.2rem;border-radius:28px;background:rgba(255,255,255,.96);display:flex;align-items:center;justify-content:center;box-shadow:0 12px 30px rgba(0,0,0,.18);}
.login-brand-mark img{max-width:82px;max-height:82px;object-fit:contain;}
.login-brand-title{font-size:2.3rem;font-weight:900;margin:0 0 .5rem;}
.login-brand-meta{font-size:1.18rem;opacity:.95;line-height:1.9;margin-bottom:1rem;}
.login-brand-copy{font-size:1.02rem;opacity:.88;line-height:1.9;max-width:440px;margin:0 auto;}
.login-split-card--form{padding:2.5rem 2.25rem;display:flex;flex-direction:column;justify-content:center;}
.login-form-title{font-size:2.15rem;font-weight:900;color:var(--app-primary);text-align:center;margin-bottom:2rem;}
.login-form-shell{display:flex;flex-direction:column;gap:1rem;}
.login-field{display:flex;align-items:center;border:1px solid #d8e1ec;border-radius:18px;overflow:hidden;background:#f7fbff;}
.login-field__icon{width:60px;display:flex;align-items:center;justify-content:center;color:#123b6f;font-size:1.3rem;background:#eef4fb;height:100%;border-left:1px solid #d8e1ec;}
.login-field .form-control{border:0;box-shadow:none !important;background:transparent;height:62px;font-size:1.05rem;padding-inline:1rem;}
.login-submit{height:58px;border-radius:18px;font-size:1.3rem;font-weight:900;box-shadow:0 16px 34px rgba(13,110,253,.22);margin-top:.35rem;}
@media (max-width:991.98px){.login-split-page{grid-template-columns:1fr;max-width:680px;}}


/* Sales board refresh */
.sales-kpis-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.75rem;align-items:stretch;}
.sales-kpi-card{background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:18px;padding:.9rem 1rem;box-shadow:0 8px 22px rgba(15,23,42,.06);min-height:112px;display:flex;flex-direction:column;justify-content:center;}
.sales-kpi-card__label{font-size:.92rem;font-weight:800;color:#334155;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.sales-kpi-card__value{font-size:2rem;line-height:1.05;font-weight:900;margin:.35rem 0 .2rem;}
.sales-kpi-card__meta{font-size:.82rem;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.sales-kpi-card--primary{background:linear-gradient(135deg,#eff6ff,#dbeafe);color:#1d4ed8;}
.sales-kpi-card--success{background:linear-gradient(135deg,#ecfdf5,#d1fae5);color:#047857;}
.sales-kpi-card--info{background:linear-gradient(135deg,#f5f3ff,#ede9fe);color:#6d28d9;}
.sales-kpi-card--warning{background:linear-gradient(135deg,#fffbeb,#fef3c7);color:#b45309;}
.sales-kpi-card--neutral{background:linear-gradient(135deg,#f8fafc,#e2e8f0);color:#0f172a;}
.sales-quick-links{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:.7rem;}
.sales-quick-link{display:flex;align-items:center;gap:.6rem;padding:.85rem 1rem;border-radius:16px;background:#fff;border:1px solid rgba(15,23,42,.08);box-shadow:0 8px 22px rgba(15,23,42,.05);color:#0f172a;text-decoration:none;font-weight:700;}
.sales-quick-link i{width:1.2rem;text-align:center;color:#2563eb;}
.sales-quick-link:hover{color:#2563eb;background:#f8fbff;border-color:#cfe0ff;}
.sales-suspended-list{display:grid;gap:.75rem;}
.sales-suspended-item{display:flex;justify-content:space-between;gap:1rem;align-items:center;padding:.85rem .95rem;border:1px solid #eef2f7;border-radius:14px;background:#fff;}
@media (max-width:1399.98px){.sales-kpis-grid{grid-template-columns:repeat(3,minmax(0,1fr));}.sales-quick-links{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media (max-width:991.98px){.sales-kpis-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.sales-quick-links{grid-template-columns:repeat(2,minmax(0,1fr));}.sales-suspended-item{flex-direction:column;align-items:flex-start;}}
@media (max-width:575.98px){.sales-kpis-grid,.sales-quick-links{grid-template-columns:1fr;}.sales-kpi-card__value{font-size:1.7rem;}}


.app-searchable-select{position:relative;display:flex;flex-direction:column;gap:.45rem;}
.app-searchable-select__input{min-height:44px;}
.app-searchable-select__native{display:none;}
.app-searchable-select__results{position:absolute;top:calc(100% - .2rem);left:0;right:0;z-index:1085;background:#fff;border:1px solid var(--app-border);border-radius:14px;box-shadow:0 18px 36px rgba(15,23,42,.14);max-height:280px;overflow:auto;padding:.35rem;}
.app-searchable-select__item{display:block;width:100%;text-align:right;background:#fff;border:0;border-radius:10px;padding:.7rem .85rem;font-weight:700;color:var(--app-primary);}
.app-searchable-select__item:hover{background:#f8fafc;}
.app-searchable-select__item.is-empty{color:var(--app-muted);font-weight:600;cursor:default;}

/* Sales invoice form UI refresh */
.sales-invoice-page{gap:1.2rem;}
.sales-invoice-page__actions{margin-bottom:.65rem;}
.sales-invoice-hero{border-radius:22px;padding:1.15rem 1.15rem 1.35rem!important;overflow:visible;}
.sales-invoice-hero__head{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;flex-wrap:wrap;margin-bottom:.75rem;}
.sales-invoice-hero__eyebrow{font-size:.84rem;font-weight:800;color:#64748b;text-transform:uppercase;letter-spacing:.08em;margin-bottom:.25rem;}
.sales-invoice-hero__title{font-size:1.65rem;font-weight:900;color:var(--app-primary);}
.sales-invoice-hero__hint{font-size:.95rem;color:var(--app-muted);}
.sales-invoice-hero__quick-summary{display:grid;grid-template-columns:repeat(3,minmax(170px,1fr));gap:.75rem;min-width:min(100%,560px);}
.sales-invoice-pill{background:linear-gradient(135deg,#f8fbff,#eef4fb);border:1px solid #dce7f3;border-radius:18px;padding:.8rem .95rem;display:flex;flex-direction:column;gap:.25rem;min-height:82px;}
.sales-invoice-pill span{font-size:.82rem;color:#64748b;font-weight:700;}
.sales-invoice-pill strong{font-size:1.03rem;color:var(--app-primary);font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.sales-invoice-pill--accent{background:linear-gradient(135deg,#e9f2ff,#dce9ff);border-color:#bfd4ff;}
.sales-invoice-pill--accent strong{font-size:1.35rem;color:#1d4ed8;}
.sales-customer-box,.sales-item-field{position:relative;}
.sales-customer-box__input,.sales-item-field .item-search{padding-inline-end:1rem;}

.sales-invoice-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:1rem;align-items:start;}
.sales-lines-card,.sales-side-card,.sales-notes-card{border-radius:22px;overflow:visible;}
.sales-section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;flex-wrap:wrap;margin-bottom:1rem;}
.sales-section-head__title{font-size:1.15rem;font-weight:900;color:var(--app-primary);}
.sales-section-head__meta{font-size:.9rem;color:var(--app-muted);}
.sales-add-line-btn{min-width:145px;}

.sales-lines-wrap{overflow:visible;position:relative;}
#linesTable{table-layout:fixed;}
.sales-lines-table thead th{background:#f8fafc;border-bottom:1px solid #e2e8f0;font-size:.9rem;}
.sales-lines-table tbody td{padding:.72rem .55rem;vertical-align:middle;border-color:#eef2f7;overflow:visible;}
.sales-line-row{position:relative;}
.sales-line-row:hover{background:#fbfdff;}
.sales-line-total-box{background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:.72rem .8rem;min-height:48px;display:flex;align-items:center;justify-content:flex-end;font-weight:900;color:#0f172a;}
.sales-line-actions{display:flex;justify-content:center;gap:.45rem;}
.sales-line-action{min-height:38px;min-width:38px;padding:.35rem .55rem;border-radius:12px;box-shadow:none;}
.sales-lines-table .form-control{min-height:48px;border-radius:14px;}
.sales-lines-table .qty,.sales-lines-table .price{font-weight:800;}
.sales-lines-table .item-search{font-weight:700;}

.sales-side-panel{position:sticky;top:1rem;display:flex;flex-direction:column;gap:1rem;}
.sales-side-card__title{font-size:1rem;font-weight:900;color:var(--app-primary);margin-bottom:.8rem;}
.sales-side-card--totals{background:linear-gradient(180deg,#fbfdff,#f4f8ff);border-color:#d8e5fb;}
.sales-total-row{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.42rem 0;color:#334155;}
.sales-total-row span{font-weight:700;}
.sales-total-row strong{font-weight:900;color:#0f172a;}
.sales-total-divider{height:1px;background:#d9e4f1;margin:.45rem 0;}
.sales-total-row--grand{font-size:1.08rem;}
.sales-total-row--grand strong{font-size:1.45rem;color:#1d4ed8;}
.sales-total-row--due strong{color:#dc2626;}

.sales-notes-card textarea{min-height:110px;border-radius:16px;resize:vertical;}
.sales-submit-bar{position:sticky;bottom:0;z-index:15;display:flex;justify-content:flex-end;gap:.75rem;flex-wrap:wrap;padding:.9rem 1rem;border:1px solid rgba(36,52,71,.08);background:rgba(255,255,255,.92);backdrop-filter:blur(10px);border-radius:20px;box-shadow:0 10px 28px rgba(15,23,42,.08);}
.sales-submit-bar .btn{min-width:160px;}

.sales-autocomplete{position:absolute;top:calc(100% + .35rem);left:0;right:0;z-index:1200;background:#fff;border:1px solid #d7e3ef;border-radius:16px;box-shadow:0 20px 42px rgba(15,23,42,.16);max-height:280px;overflow:auto;padding:.35rem;}
.sales-autocomplete[hidden]{display:none!important;}
.sales-autocomplete__item{display:flex;flex-direction:column;align-items:flex-start;width:100%;background:#fff;border:0;border-radius:12px;padding:.75rem .85rem;text-align:right;gap:.15rem;}
.sales-autocomplete__item + .sales-autocomplete__item{margin-top:.2rem;}
.sales-autocomplete__item:hover,.sales-autocomplete__item.is-active{background:#edf4ff;}
.sales-autocomplete__title{font-weight:800;color:#0f172a;line-height:1.35;white-space:normal;word-break:break-word;}
.sales-autocomplete__meta{font-size:.82rem;color:#64748b;line-height:1.35;white-space:normal;word-break:break-word;}
.sales-item-field .sales-autocomplete{min-width:100%;max-width:100%;}
.sales-lines-card,.sales-lines-wrap,.sales-lines-table,.sales-lines-table tbody,.sales-lines-table tr,.sales-lines-table td{overflow:visible!important;}

@media (max-width:1199.98px){
  .sales-invoice-grid{grid-template-columns:1fr;}
  .sales-side-panel{position:static;}
}
@media (max-width:991.98px){
  .sales-invoice-hero__quick-summary{grid-template-columns:1fr;min-width:0;width:100%;}
}
@media (max-width:767.98px){
  .sales-invoice-hero__title{font-size:1.35rem;}
  .sales-section-head,.sales-submit-bar{flex-direction:column;align-items:stretch;}
  .sales-submit-bar .btn,.sales-add-line-btn{width:100%;}
  .sales-lines-wrap{overflow-x:auto!important;overflow-y:visible!important;}
  #linesTable{min-width:760px;}
}

.print-template-preview .preview-zone{min-height:100%;}
.print-template-preview .preview-chip{border:1px solid #e5e7eb;border-radius:14px;padding:.7rem .8rem;background:#fff;}
.print-template-preview .preview-chip.is-disabled{background:#f8fafc;border-style:dashed;opacity:.78;}
.print-template-preview .preview-chip.is-enabled{box-shadow:0 1px 0 rgba(15,23,42,.03);}
