.date-filter,.document-date,.report-period label,.settings-form label,.theme-choice{display:grid;gap:6px;font-size:10px;color:#65736b;font-weight:700}
#view-stock-out .filter-row{align-items:flex-end}
.date-filter input,.document-date input,.report-period input{min-width:150px;height:37px;padding:0 10px;border:1px solid #dfe7e2;border-radius:6px;background:#fff;color:#45524b}
.document-date{margin:2px 0 14px}.report-period{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.report-period>span{padding-bottom:11px}.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.settings-panel{padding:18px}.settings-panel>.panel-heading{margin-bottom:20px}.settings-form{display:grid;gap:12px;max-width:440px}.settings-form label{font-size:11px}.settings-form input{height:40px;padding:0 10px;border:1px solid #dfe7e2;border-radius:6px}.settings-form .primary-button{justify-self:start}.theme-choice{max-width:320px;font-size:11px}.customer-history{margin-top:14px;padding:16px}.customer-history .panel-heading{margin-bottom:14px}.customer-history [data-customer-detail]{cursor:pointer}.supplier-layout{display:grid;grid-template-columns:minmax(220px,.72fr) minmax(0,1.8fr);gap:13px;margin-bottom:14px}.supplier-list-panel,.supplier-detail-panel{padding:15px;min-width:0}.supplier-list{display:grid;gap:5px;margin-top:12px;max-height:420px;overflow:auto}.supplier-row{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:10px;text-align:left;border:1px solid #e8eeea;border-radius:5px;background:#fff;color:#45524b}.supplier-row.selected{border-color:#4c9873;background:#eef6f1}.supplier-row strong,.supplier-row small{display:block}.supplier-row strong{font-size:11px}.supplier-row small{font-size:9px;color:#8a9690;margin-top:3px}.supplier-row>span:last-child{white-space:nowrap;font-size:10px}.supplier-all-movements{padding:14px}.supplier-all-movements .panel-heading{margin-bottom:12px}.edit-movement{font-size:14px}.customer-history .panel-heading .heading-actions{justify-content:flex-end}
body[data-theme="dark"]{background:#171d1a;color:#e3e9e5}
body[data-theme="dark"] .main-content,body[data-theme="dark"] .page-wrap{color:#e3e9e5}
body[data-theme="dark"] .sidebar,body[data-theme="dark"] .topbar,body[data-theme="dark"] .panel,body[data-theme="dark"] .metric,body[data-theme="dark"] .drive-card,body[data-theme="dark"] .supplier-row{background:#222b26;border-color:#35423a;color:#e3e9e5}
body[data-theme="dark"] .page-heading h1,body[data-theme="dark"] .panel-heading h2,body[data-theme="dark"] .metric-value,body[data-theme="dark"] .breadcrumb strong,body[data-theme="dark"] .table-panel td,body[data-theme="dark"] .supplier-row strong{color:#e3e9e5}
body[data-theme="dark"] .nav-link{color:#b2beb6}body[data-theme="dark"] .nav-link.active,body[data-theme="dark"] .supplier-row.selected{background:#294537;color:#d9eee2}
body[data-theme="dark"] .workspace-switch,body[data-theme="dark"] .nav-link:hover,body[data-theme="dark"] .demo-banner{background:#28322c;border-color:#39483f}
body[data-theme="dark"] table th{background:#29332d;color:#c6d0c9}body[data-theme="dark"] table td{border-color:#35423a}body[data-theme="dark"] .outline-button,body[data-theme="dark"] .icon-button,body[data-theme="dark"] .filter-select,body[data-theme="dark"] input,body[data-theme="dark"] select{background:#1b231e;color:#e3e9e5;border-color:#3b4a40}
body[data-theme="dark"] .heading-subtitle,body[data-theme="dark"] .panel-heading p,body[data-theme="dark"] .metric-foot,body[data-theme="dark"] .drive-card p{color:#a3b0a7}
@media(max-width:900px){.supplier-layout{grid-template-columns:1fr}.supplier-list{grid-template-columns:repeat(2,minmax(0,1fr));max-height:none}}
@media(max-width:650px){.settings-grid{grid-template-columns:1fr}.report-period{align-items:stretch}.report-period>span{width:100%;padding:0}.report-period label{flex:1;min-width:130px}.report-period input{min-width:0;width:100%}.date-filter{flex:1}.date-filter input{min-width:0;width:100%}.supplier-list{grid-template-columns:1fr}.supplier-detail-panel>.panel-heading{align-items:flex-start}.customer-history .panel-heading{align-items:flex-start;flex-direction:column}.customer-history .heading-actions{width:100%;justify-content:flex-start}.page-heading .heading-actions{flex-wrap:wrap}.page-heading .heading-actions .outline-button,.page-heading .heading-actions .primary-button{flex:1}}
@media(max-width:760px){.modal-actions{flex-wrap:wrap}.modal-actions button{flex:1 1 145px}.modal-actions button:first-child{flex:0 0 auto}}
@media print{.print-invoice{break-inside:avoid}.print-invoice table{page-break-inside:auto}.print-invoice tr{page-break-inside:avoid;page-break-after:auto}}
@media print{.print-invoice.report-print h2{font-size:13pt;margin:18px 0 8px}.print-invoice.report-print table{margin:8px 0 18px}.print-invoice.report-print th,.print-invoice.report-print td{padding:8px 10px;font-size:10pt}.print-invoice.report-print .report-total-table{width:80%;margin-left:auto}.print-invoice.report-print .print-date{font-weight:700}}
.history-print-button{min-height:27px;padding:5px 8px;font-size:9px;white-space:nowrap}
.inventory-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 12px}.inventory-metric{min-width:0;padding:13px 14px;border:1px solid #e8eeea;border-radius:6px;background:#fff}.inventory-metric span{display:block;margin-bottom:8px;color:#829087;font-size:9px}.inventory-metric strong{display:block;color:#334039;font-size:16px;overflow-wrap:anywhere}.inventory-supplier-panel{margin:0 0 12px;padding:14px}.inventory-supplier-panel .panel-heading{margin-bottom:10px}.inventory-supplier-panel tfoot{background:#f5f8f6}.inventory-supplier-panel tfoot th{height:42px;color:#334039;font-size:9px}
.customer-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 12px}.customer-metrics .inventory-metric{max-width:360px}
.supplier-detail-actions{display:flex;align-items:center;gap:7px;flex-shrink:0}.supplier-detail-actions .icon-button{width:39px;height:39px}
@media(max-width:760px){.inventory-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.inventory-metric{padding:11px}.inventory-metric strong{font-size:14px}.inventory-supplier-panel{padding:11px}}
@media(max-width:760px){.customer-metrics{gap:8px}.customer-metrics .inventory-metric{max-width:none;padding:11px}}
body[data-theme="dark"] .inventory-metric{background:#222b26;border-color:#35423a}body[data-theme="dark"] .inventory-metric span{color:#a3b0a7}body[data-theme="dark"] .inventory-metric strong{color:#e3e9e5}body[data-theme="dark"] .inventory-supplier-panel tfoot{background:#29332d}body[data-theme="dark"] .inventory-supplier-panel tfoot th{color:#e3e9e5}

.outline-button,.icon-button{background:var(--green);border-color:var(--green);color:#fff}
.outline-button:hover,.icon-button:hover{background:var(--green-dark);border-color:var(--green-dark);color:#fff}
.text-button,.link-button,.eye-button{color:var(--green)}
.eye-button{background:var(--green-pale);border-radius:5px}
.supplier-row{border-color:var(--green);color:var(--green)}
.supplier-row.selected{background:var(--green);border-color:var(--green);color:#fff}
.supplier-row.selected small{color:#e5f2ec}
.user-card .logout-icon{color:var(--green)}
body[data-theme="dark"] .outline-button,body[data-theme="dark"] .icon-button{background:var(--green);border-color:var(--green);color:#fff}
.record-actions{display:inline-flex;align-items:center;gap:5px}.delete-record{background:#b8463b!important;border-color:#b8463b!important;color:#fff!important}.delete-record:hover,.danger-button:hover{background:#96382f!important;border-color:#96382f!important}.danger-button{min-height:39px;padding:0 14px;border:1px solid #b8463b;border-radius:5px;background:#b8463b;color:#fff;font-size:10px;font-weight:700;cursor:pointer}.delete-confirm-message{font-size:11px;line-height:1.6;color:#66736b;margin:-8px 0 10px}
body[data-theme="dark"] .delete-confirm-message{color:#c5d0c8}
.buyer-summary-row>td{height:54px}.buyer-expand-button{display:inline-flex;align-items:center;gap:7px;padding:7px 0;border:0;background:transparent;color:#26734f;font:inherit;font-weight:700;cursor:pointer}.buyer-detail-row>td{padding:10px;background:#f7faf8}.buyer-history-table{width:100%;overflow:auto;border:1px solid #e7eeea;border-radius:5px}.buyer-history-table th{height:34px}.buyer-history-table td{height:42px}.buyer-history-table table{background:#fff}body[data-theme="dark"] .buyer-detail-row>td{background:#202a24}body[data-theme="dark"] .buyer-history-table{border-color:#35423a}body[data-theme="dark"] .buyer-history-table table{background:#1b231e}body[data-theme="dark"] .buyer-expand-button{color:#8bd4a8}
body[data-theme="dark"] .supplier-row{border-color:var(--green);color:#e3e9e5}
body[data-theme="dark"] .supplier-row.selected{background:var(--green);border-color:var(--green);color:#fff}
body[data-theme="dark"]{color-scheme:dark;background:#121815;color:#e5ede7}
body[data-theme="dark"] .main-content,body[data-theme="dark"] .page-wrap{background:#121815;color:#e5ede7}
body[data-theme="dark"] .panel,body[data-theme="dark"] .metric,body[data-theme="dark"] .movement-summary>div,body[data-theme="dark"] .report-metric,body[data-theme="dark"] .sales-panel,body[data-theme="dark"] .low-stock-panel,body[data-theme="dark"] .recent-panel,body[data-theme="dark"] .inventory-metric,body[data-theme="dark"] .settings-panel{background:#1c2520;border-color:#35443b;color:#e5ede7}
body[data-theme="dark"] .page-heading h1,body[data-theme="dark"] .panel-heading h2,body[data-theme="dark"] .metric-value,body[data-theme="dark"] .report-metric strong,body[data-theme="dark"] .inventory-metric strong,body[data-theme="dark"] .movement-summary strong,body[data-theme="dark"] .table-product-name,body[data-theme="dark"] .cell-product strong{color:#f0f5f1}
body[data-theme="dark"] .heading-subtitle,body[data-theme="dark"] .panel-heading p,body[data-theme="dark"] .metric-foot,body[data-theme="dark"] .report-metric span,body[data-theme="dark"] .report-metric small,body[data-theme="dark"] .inventory-metric span,body[data-theme="dark"] .movement-summary span,body[data-theme="dark"] .low-stock-name small,body[data-theme="dark"] .date-sub,body[data-theme="dark"] .cell-product small{color:#a8b6ac}
body[data-theme="dark"] .table-panel,body[data-theme="dark"] .table-panel table,body[data-theme="dark"] .report-panel table,body[data-theme="dark"] .inventory-supplier-panel table{background:#1c2520}
body[data-theme="dark"] table thead,body[data-theme="dark"] table th{background:#27332c;color:#d5e0d8}
body[data-theme="dark"] table td{color:#d2ddd5;border-color:#35443b}
body[data-theme="dark"] table tfoot,body[data-theme="dark"] table tfoot th{background:#27332c;color:#f0f5f1}
body[data-theme="dark"] .search-box,body[data-theme="dark"] .filter-select,body[data-theme="dark"] .date-filter input,body[data-theme="dark"] .report-period input,body[data-theme="dark"] .document-date input{background:#18211c;border-color:#405047;color:#e5ede7}
body[data-theme="dark"] .search-box input{background:transparent!important;color:#e5ede7}
body[data-theme="dark"] input::placeholder{color:#91a096}
body[data-theme="dark"] .badge-status.low,body[data-theme="dark"] .type-pill.debt{background:#443521;color:#f2c77f}
body[data-theme="dark"] .badge-status.ok,body[data-theme="dark"] .type-pill.in{background:#244332;color:#a9e0b8}
body[data-theme="dark"] .type-pill.out{background:#472b27;color:#ffb5a5}
body[data-theme="dark"] .type-pill.payment{background:#26394a;color:#add1f0}
body[data-theme="dark"] .stock-chip{background:#443521;color:#f2c77f}
body[data-theme="dark"] .stock-chip.ok{background:#244332;color:#a9e0b8}
body[data-theme="dark"] .buyer-detail-row>td{background:#202a24}
body[data-theme="dark"] .buyer-history-table table{background:#18211c}
body[data-theme="dark"] .mobile-overlay{background:#050806a6}
.nav-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 19px;width:19px;height:20px;text-align:center;font-size:inherit}
.nav-svg{display:block;width:18px;height:18px;overflow:visible}
.bottom-nav .nav-icon{width:21px;height:21px;flex-basis:21px}
.bottom-nav .nav-svg{width:20px;height:20px}
@media(max-width:760px){.bottom-nav{display:none!important}.main-content{padding-bottom:0!important}}
body[data-theme="dark"] .modal-backdrop{background:rgba(3,8,5,.78)}
body[data-theme="dark"] .modal{background:#1c2520;border:1px solid #3a4940;color:#e5ede7;box-shadow:0 22px 70px rgba(0,0,0,.55)}
body[data-theme="dark"] .modal-heading h2,body[data-theme="dark"] .modal label,body[data-theme="dark"] .form-two label,body[data-theme="dark"] .settings-form label,body[data-theme="dark"] .sale-customer-row label,body[data-theme="dark"] .receipt-header label,body[data-theme="dark"] .invoice-fields label,body[data-theme="dark"] .document-date{color:#d8e2db}
body[data-theme="dark"] .modal-heading .eyebrow{color:#91a096}
body[data-theme="dark"] .modal input,body[data-theme="dark"] .modal select,body[data-theme="dark"] .modal textarea,body[data-theme="dark"] .settings-form input,body[data-theme="dark"] .receipt-header input,body[data-theme="dark"] .inline-customer input,body[data-theme="dark"] .inline-product input,body[data-theme="dark"] .invoice-product-picker input,body[data-theme="dark"] .invoice-product-picker select,body[data-theme="dark"] .invoice-lines input,body[data-theme="dark"] .invoice-fields input,body[data-theme="dark"] .document-date input{background:#141c18!important;border-color:#405047;color:#e5ede7}
body[data-theme="dark"] .modal input::placeholder,body[data-theme="dark"] .modal textarea::placeholder,body[data-theme="dark"] .invoice-product-picker input::placeholder{color:#91a096}
body[data-theme="dark"] .close-modal{background:#29352e!important;border-color:#405047!important;color:#e5ede7!important}
body[data-theme="dark"] .modal-total,body[data-theme="dark"] .invoice-totals{background:#222d27;color:#bdc9c0}
body[data-theme="dark"] .modal-total strong,body[data-theme="dark"] .invoice-totals strong{color:#8fddb0}
body[data-theme="dark"] .invoice-lines-wrap{background:#18211c;border-color:#3a4940}
body[data-theme="dark"] #movementModal .invoice-product-picker{background:#1c2520}
body[data-theme="dark"] .invoice-lines th{background:#29352e;color:#d8e2db}
body[data-theme="dark"] .invoice-lines td{color:#d2ddd5;border-color:#35443b}
body[data-theme="dark"] .invoice-lines .line-stock,body[data-theme="dark"] .invoice-empty,body[data-theme="dark"] #invoiceEmpty{color:#a8b6ac}
body[data-theme="dark"] .code-label{background:#29352e;color:#d2ddd5}
body[data-theme="dark"] .delete-confirm-message{color:#d2ddd5}
#logoutButton .logout-icon{display:grid;place-items:center;width:27px;height:27px;border-radius:5px;background:#b8463b;color:#fff!important}
#logoutButton:hover{background:#fbede9;color:#96382f}
#logoutButton:hover .logout-icon{background:#96382f}
.delete-record,.danger-button,.remove-line{background:#b8463b!important;border-color:#b8463b!important;color:#fff!important}
.delete-record:hover,.danger-button:hover,.remove-line:hover{background:#96382f!important;border-color:#96382f!important;color:#fff!important}
body[data-theme="dark"] #logoutButton:hover{background:#472b27;color:#ffb5a5}
.sidebar{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.sidebar-bottom{flex-shrink:0}
.sidebar>.main-nav{flex:1;justify-content:space-evenly;min-height:0;padding-bottom:10px}
.sidebar>.main-nav>.nav-label{margin-bottom:4px}
.sidebar>.main-nav>.nav-label-products{margin-top:10px}
@media(max-width:760px){.sidebar>.main-nav{flex:1;justify-content:space-evenly;padding-bottom:14px}.sidebar>.main-nav>.nav-link{min-height:44px}}
@media(max-height:700px) and (min-width:761px){.sidebar>.main-nav{flex:0 0 auto;justify-content:flex-start}}
@media(max-height:900px) and (min-width:761px){.sidebar{padding-top:14px;padding-bottom:8px}.side-brand{padding-bottom:15px}.workspace-switch{margin-bottom:16px}.nav-label{margin-bottom:6px}.nav-label-products{margin-top:14px}.nav-link{min-height:37px}.drive-card{padding:10px;margin-bottom:8px}.user-card{padding-top:8px}}
.label-print-modal{width:min(100%,420px)}
.label-print-help{font-size:11px;line-height:1.6;color:#77837e;margin:-8px 0 14px}
.label-print-size{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.label-print-size label,.label-print-modal>label:not(.label-print-check){display:grid;gap:7px;margin:10px 0;font-size:11px;font-weight:700}
.label-print-check{display:flex!important;align-items:center;gap:9px;margin:14px 0!important}
.label-print-check input{width:16px!important;height:16px!important;margin:0;accent-color:var(--green)}
.label-product-picker{border:1px solid #e5ebe7;border-radius:6px;margin:10px 0;padding:9px}
.label-product-picker-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px;font-size:10px}
.label-product-picker-head label{display:flex;align-items:center;gap:6px;margin:0;font-weight:600}
.label-product-picker-head input,.label-product-option input{width:15px!important;height:15px!important;margin:0;accent-color:#167b58}
.label-product-list{display:grid;gap:4px;max-height:150px;overflow:auto}
.label-product-option{display:flex!important;align-items:center;gap:8px;padding:7px;border-radius:4px;background:#f7f9f8;cursor:pointer}
.label-product-option>span{min-width:0;display:grid;gap:2px}
.label-product-option strong,.label-product-option small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.label-product-option strong{font-size:10px}
.label-product-option small{font-size:9px;color:#7b8981}
body[data-theme="dark"] .label-product-picker{border-color:#405047}
body[data-theme="dark"] .label-product-option{background:#29352e}
body[data-theme="dark"] .label-product-option small{color:#a8b6ac}
.print-labels{display:none}
@media print{
  body.printing-labels #printInvoice{display:none!important}
  body.printing-labels #printLabels{display:block!important;width:var(--label-width);margin:0;padding:0}
  body.printing-labels #printLabels,body.printing-labels #printLabels *{visibility:visible!important}
  body.printing-labels #printLabels .print-label{box-sizing:border-box;width:var(--label-width);height:var(--label-height);overflow:hidden;display:grid;grid-template-rows:1fr .35mm 1.1fr;gap:.6mm;padding:.7mm 1mm;text-align:center;font-family:Arial,"Noto Sans Armenian",sans-serif;color:#000!important;-webkit-print-color-adjust:exact;print-color-adjust:exact;break-after:page;page-break-after:always}
  body.printing-labels #printLabels .print-label:last-child{break-after:auto;page-break-after:auto}
  body.printing-labels .label-top{min-height:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:.5mm;overflow:hidden}
  body.printing-labels .label-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;max-width:100%;font-size:10pt;font-weight:900;line-height:1.1;overflow-wrap:anywhere;color:#000!important;-webkit-text-fill-color:#000}
  body.printing-labels .label-rule{width:100%;height:.45mm;background:#000}
  body.printing-labels .label-footer{min-height:0;display:flex;align-items:center;justify-content:space-between;gap:1.2mm;overflow:hidden}
  body.printing-labels .label-code{flex:0 0 19mm;color:#000!important;-webkit-text-fill-color:#000;font-size:14pt;font-weight:900;line-height:1;overflow-wrap:anywhere}
  body.printing-labels .label-barcode{display:block;flex:1 1 auto;width:calc(100% - 20mm);height:12.5mm;color:#000;shape-rendering:crispEdges}
  body.printing-labels .label-barcode rect{fill:#000!important}
  body.printing-labels .label-price{font-size:11pt;font-weight:900;line-height:1.1;color:#000!important;-webkit-text-fill-color:#000}
}

@media(max-width:760px){
  #movementModal #inlineProduct .atg-picker-wrap{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;width:100%;min-width:0}
  #movementModal #inlineProduct .atg-picker-wrap>input{box-sizing:border-box;width:100%;min-width:0;flex:none}
  #movementModal #inlineProduct .atg-select-button{box-sizing:border-box;max-width:96px;min-width:0;padding:0 8px;white-space:normal;overflow-wrap:anywhere;font-size:10px}
}
.drive-settings-help{margin:12px 0 0;color:#78867e;font-size:10px;line-height:1.6;max-width:460px}
#driveSyncToggle:disabled{opacity:.6;cursor:not-allowed}
body[data-theme="dark"] .drive-settings-help{color:#a8b6ac}
.metric-symbol svg{width:16px;height:16px;display:block}
.drive-setup{margin-top:18px;border-top:1px solid var(--line,#e4e9e6);padding-top:14px}
.drive-setup summary{cursor:pointer;color:var(--ink,#173328);font-size:13px;font-weight:700}
.drive-setup ol{padding-left:22px;color:var(--muted,#6f7f76);font-size:12px;line-height:1.7}
.drive-setup a{color:var(--green,#167b58)}
.drive-setup code{font-size:11px}
.drive-setup .settings-form{margin-top:14px}
body[data-theme="dark"] .drive-setup{border-color:#3d4a43}
body[data-theme="dark"] .drive-setup summary{color:#e7eee9}
body[data-theme="dark"] .drive-setup ol{color:#a8b6ac}
@media(max-width:640px){.drive-setup{margin-top:14px}.drive-setup ol{padding-left:18px}}
.modal .close-modal,.modal .modal-actions [data-close-modal],.customer-history #closeCustomerHistory{background:#b8463b!important;border-color:#b8463b!important;color:#fff!important}
.modal .close-modal:hover,.modal .modal-actions [data-close-modal]:hover,.customer-history #closeCustomerHistory:hover{background:#96382f!important;border-color:#96382f!important;color:#fff!important}
#movementModal .sale-customer-row{max-width:760px}
#movementModal .sale-customer-row>label{max-width:520px}
#movementModal .receipt-header{max-width:1080px}
#movementModal .inline-customer,#movementModal .inline-product{max-width:960px}
#movementModal .invoice-product-picker{max-width:1100px;grid-template-columns:minmax(220px,1fr) minmax(260px,1.2fr) 90px auto auto}
#movementModal .invoice-fields{max-width:1100px;grid-template-columns:repeat(3,minmax(180px,320px))}
.settings-form{max-width:360px}
.theme-choice{max-width:280px}
@media(min-width:761px) and (max-width:900px){#movementModal .invoice-product-picker{grid-template-columns:minmax(160px,1fr) minmax(200px,1.2fr) 75px auto auto}#movementModal .invoice-fields{max-width:100%;grid-template-columns:repeat(3,minmax(140px,1fr))}}
@media(max-width:760px){#movementModal .sale-customer-row,#movementModal .receipt-header,#movementModal .inline-customer,#movementModal .inline-product,#movementModal .invoice-product-picker,#movementModal .invoice-fields{max-width:none;width:100%}#movementModal .sale-customer-row>label{max-width:none}}
/* ՀԴՄ ինտեգրում */
.hdm-settings-panel{grid-column:1/-1}
.hdm-settings-form{display:grid;grid-template-columns:repeat(2,minmax(240px,1fr));gap:12px 16px;max-width:920px}
.hdm-settings-form label{display:grid;gap:6px;font-size:10px;color:#526057}
.hdm-settings-form input,.hdm-settings-form select{height:39px;border:1px solid #e1e8e4;border-radius:6px;padding:0 10px;background:#fff;color:#45524b;min-width:0}
.hdm-ip-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.hdm-ip-row .outline-button{height:39px;white-space:nowrap}
.hdm-settings-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:15px}
.hdm-payment-modal{width:min(100%,560px)}
.hdm-payment-total{box-sizing:border-box;width:max-content;max-width:100%;padding:13px 14px;border:1px solid #e6ece8;border-radius:7px;background:#f7f9f8;margin:0 0 14px;color:#64726a}
.hdm-payment-total strong{color:#28714f;font-size:18px;margin-left:7px}
.hdm-payment-methods{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:min(80%,440px);gap:8px;margin-bottom:14px}
.hdm-payment-methods label{display:flex;align-items:center;gap:8px;min-height:48px;box-sizing:border-box;border:1px solid #dfe7e2;border-radius:7px;padding:8px 10px;font-size:11px;cursor:pointer;background:#fff}
.hdm-payment-methods input[type=radio]{flex:0 0 16px;width:16px;height:16px;min-width:16px;margin:0;accent-color:#287c5b}
.hdm-payment-modal>.form-two{grid-template-columns:repeat(2,minmax(0,1fr));width:min(80%,440px);gap:12px}
.hdm-payment-modal>.form-two>div{min-width:0}
.hdm-payment-modal>.form-two input{box-sizing:border-box;width:80%;max-width:100%}
.hdm-payment-help{font-size:10px;line-height:1.6;color:#7b8880;margin:10px 0 0}
#hdmDraftButton{min-height:34px}
body[data-theme="dark"] .hdm-settings-form label{color:#b9c5be}
body[data-theme="dark"] .hdm-settings-form input,body[data-theme="dark"] .hdm-settings-form select,body[data-theme="dark"] .hdm-payment-methods label{background:#141d18;border-color:#3d4a43;color:#e1e9e3}
body[data-theme="dark"] .hdm-payment-total{background:#18221d;border-color:#3d4a43;color:#a8b6ac}
@media(max-width:760px){.hdm-settings-form{grid-template-columns:1fr}.hdm-payment-methods,.hdm-payment-modal>.form-two{grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.hdm-payment-modal>.form-two input{width:100%}.hdm-settings-actions{width:100%}.hdm-settings-actions button{width:100%}}
@media(min-width:761px){
  #movementModal .document-date{width:180px}
  #movementModal .sale-customer-row{width:max-content;max-width:100%;grid-template-columns:minmax(0,260px) auto;column-gap:12px}
  #movementModal .sale-customer-row>label{max-width:none}
  #movementModal .receipt-header{grid-template-columns:270px 210px 200px}
  #movementModal .receipt-header label:first-child{max-width:270px}
  #movementModal .invoice-product-picker{grid-template-columns:242px 311px 90px 150px 150px}
  #movementModal .invoice-product-picker select{width:100%;min-width:0}
  #movementModal .invoice-product-picker #addInvoiceItem,#movementModal .invoice-product-picker #createProductFromReceipt{box-sizing:border-box;width:150px;max-width:150px;height:36px;min-height:36px;padding:0 8px;justify-self:start;align-self:end;white-space:nowrap}
  #movementModal .invoice-fields{grid-template-columns:repeat(3,minmax(0,160px))}
  #movementModal[data-type="in"] .receipt-header label:last-child{max-width:200px}
  #movementModal[data-type="in"] .invoice-lines th:nth-child(2),#movementModal[data-type="in"] .invoice-lines td:nth-child(2){width:90px;max-width:90px;white-space:normal;overflow-wrap:anywhere}
  #movementModal[data-type="in"] .invoice-lines td:nth-child(2) .table-product-name{display:block;overflow-wrap:anywhere}
}
@media(min-width:761px) and (max-width:1000px){#movementModal .receipt-header{grid-template-columns:minmax(180px,1fr) 140px 160px}#movementModal .receipt-header label:first-child{max-width:none}#movementModal .receipt-header label:last-child{max-width:none}#movementModal .invoice-product-picker{grid-template-columns:minmax(140px,1fr) minmax(170px,1.2fr) 75px 120px 120px}#movementModal .invoice-product-picker #addInvoiceItem,#movementModal .invoice-product-picker #createProductFromReceipt{width:120px;max-width:120px}}

.atg-picker-wrap{position:relative;display:flex;gap:8px;align-items:stretch}
.atg-picker-wrap>input{flex:1;min-width:0}
.atg-select-button{white-space:nowrap;padding-inline:14px}
.atg-picker{position:absolute;z-index:1200;left:0;right:0;top:calc(100% + 6px);background:var(--panel,#fff);border:1px solid rgba(20,31,35,.14);border-radius:14px;box-shadow:0 16px 40px rgba(15,25,30,.16);padding:10px}
.atg-picker-search{width:100%;box-sizing:border-box;margin-bottom:8px}
.atg-picker-list{max-height:260px;overflow:auto;display:grid;gap:4px}
.atg-option{display:grid;grid-template-columns:58px 1fr;text-align:left;gap:10px;align-items:center;border:0;background:transparent;border-radius:9px;padding:9px 10px;cursor:pointer;color:inherit}
.atg-option:hover{background:rgba(35,80,70,.07)}
.atg-option strong{font-variant-numeric:tabular-nums}
.atg-option span{font-size:13px;opacity:.82}
.atg-picker-foot{font-size:11px;line-height:1.45;opacity:.65;border-top:1px solid rgba(20,31,35,.08);margin-top:8px;padding:8px 3px 1px}
.atg-picker-foot a{color:inherit}
.atg-empty{padding:18px 8px;text-align:center;font-size:13px;opacity:.65}

/* ԱՏԳ ԱԱ ընտրիչ — մուգ թեմայի համարժեք տեսք */
.atg-picker{background:#fff;color:#173328;border:1px solid #d7e0db;box-shadow:0 18px 40px rgba(0,0,0,.14)}
.atg-picker-search{background:#fff;color:#173328;border-color:#d7e0db}
.atg-picker-list{background:#fff}
.atg-option{background:#fff;color:#173328;border-color:#edf1ee}
.atg-option:hover,.atg-option:focus{background:#eef6f1;color:#123f2c}
.atg-picker-foot{background:#f6f8f7;color:#718078;border-top-color:#e1e7e3}
body[data-theme="dark"] .atg-picker{background:#18211c;color:#e3ebe6;border-color:#405047;box-shadow:0 18px 40px rgba(0,0,0,.45)}
body[data-theme="dark"] .atg-picker-search{background:#141d18;color:#e3ebe6;border-color:#405047}
body[data-theme="dark"] .atg-picker-list{background:#18211c}
body[data-theme="dark"] .atg-option{background:#18211c;color:#e3ebe6;border-color:#334139}
body[data-theme="dark"] .atg-option:hover,body[data-theme="dark"] .atg-option:focus{background:#26352d;color:#fff}
body[data-theme="dark"] .atg-picker-foot{background:#141d18;color:#a8b6ac;border-top-color:#35443b}
body[data-theme="dark"] .atg-select-button{background:#1b2922;color:#dfe8e2;border-color:#405047}
body[data-theme="dark"] .atg-select-button:hover{background:#26382f}

.print-invoice{display:none}
@media print{
  @page{size:A4 portrait;margin:12mm}
  body *{visibility:hidden!important}
  #printInvoice,#printInvoice *{visibility:visible!important}
  #printInvoice{display:block!important;position:static!important;width:100%!important;margin:0!important;padding:0!important;color:#000!important;background:#fff!important;font-family:Arial,"Noto Sans Armenian",sans-serif;font-size:10pt}
  #printInvoice header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:8mm}
  #printInvoice header.sale-print-header{display:grid;grid-template-columns:minmax(48mm,1fr) minmax(82mm,1.6fr) auto;gap:4mm;align-items:start}
  #printInvoice .print-business-brand{display:flex;justify-content:space-between;align-items:center;gap:3mm;min-width:0;padding-top:1mm;font-size:8.5pt;line-height:1.2;font-weight:700}
  #printInvoice .print-business-details{overflow-wrap:anywhere}
  #printInvoice .print-business-logo{flex:none;font-size:14pt;font-weight:900;letter-spacing:.15mm;white-space:nowrap}
  #printInvoice .sale-print-header .print-date{white-space:nowrap;text-align:right}
  #printInvoice h1{font-size:17pt;margin:0 0 2mm}
  #printInvoice p{margin:2mm 0}
  #printInvoice table{width:100%;border-collapse:collapse;table-layout:auto}
  #printInvoice th,#printInvoice td{border:0.2mm solid #999;padding:2mm 1.5mm;text-align:left;vertical-align:top;color:#000!important}
  #printInvoice table{border:0.2mm solid #999;outline:0.2mm solid #999;outline-offset:-0.2mm}
  #printInvoice thead th{border-top:0.2mm solid #999!important;border-bottom:0.2mm solid #999!important}
  #printInvoice th:first-child,#printInvoice td:first-child{border-left:0.2mm solid #999!important}
  #printInvoice th:last-child,#printInvoice td:last-child{border-right:0.2mm solid #999!important}
  #printInvoice tbody tr:last-child td{border-bottom:0.2mm solid #999!important}
  #printInvoice th{font-weight:800;background:#eee!important}
  #printInvoice tbody td{font-weight:600}
  #printInvoice tbody td:nth-child(2){font-weight:700}
  #printInvoice .print-totals{margin-top:6mm;text-align:right;color:#000!important;font-weight:700}
  #printInvoice .print-totals strong,#printInvoice>p strong{color:#000!important;font-weight:800}
  #printInvoice footer{margin-top:5mm}
}

@media(max-width:760px){
  #movementModal{padding:0;place-items:start center}
  #movementModal .wholesale-modal{box-sizing:border-box;width:100%;max-width:100%;height:100dvh;min-height:100dvh;max-height:100dvh;margin:0;padding:12px;overflow:auto}
  #movementModal .invoice-product-picker{grid-template-columns:minmax(0,1fr) 104px}
  #movementModal .invoice-product-picker #invoiceProductSearch,
  #movementModal .invoice-product-picker #invoiceProduct,
  #movementModal .invoice-product-picker #createProductFromReceipt{grid-column:1/-1;width:100%;max-width:100%;min-width:0}
  #movementModal .invoice-product-picker #invoiceQty{grid-column:1;min-width:0;width:100%}
  #movementModal .invoice-product-picker #addInvoiceItem{grid-column:2;box-sizing:border-box;width:100%;min-width:0;max-width:100%;padding:0 6px;white-space:normal;overflow-wrap:anywhere}
  #movementModal .invoice-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
  #movementModal .invoice-fields label{min-width:0;overflow-wrap:anywhere}
  .supplier-detail-panel>.panel-heading{align-items:flex-start;flex-direction:column}
  .supplier-detail-actions{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:6px;width:100%;max-width:100%;min-width:0}
}
@media(max-width:760px){
  .page-heading>.heading-actions #printReport:not(.hidden),
  .page-heading:has(#printLastInvoice) .heading-actions #printLastInvoice:not(.hidden){display:inline-flex}
  .supplier-detail-actions .outline-button:not(.hidden){display:inline-flex;flex:1 1 120px;min-width:0;justify-content:center;white-space:normal;text-align:center}
  .supplier-detail-actions .delete-record:not(.hidden){display:inline-grid;flex:0 0 39px}
}
/* Keep numeric fields editable while hiding browser stepper arrows everywhere. */
input[type="number"]{appearance:textfield;-moz-appearance:textfield}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
@media(max-width:390px){
  #movementModal .wholesale-modal{padding:8px}
  #movementModal .invoice-product-picker{grid-template-columns:minmax(0,1fr) 92px}
  #movementModal .invoice-fields{grid-template-columns:minmax(0,1fr)}
  #movementModal .invoice-fields label:last-child{grid-column:auto}
  .page-heading:has(#printLastInvoice) .heading-actions #printLastInvoice:not(.hidden){display:inline-flex}
}
@media(min-width:1101px){
  #view-stock-out .movement-summary{grid-template-columns:repeat(6,minmax(0,1fr))}
  #view-reports .report-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:760px){
  #view-stock-out .movement-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(min-width:1001px){
  #movementModal .invoice-product-picker{grid-template-columns:170px 385px 90px 150px 150px}
}
@media(min-width:761px) and (max-width:1000px){
  #movementModal .invoice-product-picker{grid-template-columns:minmax(120px,.7fr) minmax(225px,1.5fr) 75px 120px 120px}
}

/* Ապրանքի ընտրության դաշտի տեքստը և մնացորդը՝ ավելի ընթեռնելի */
body:not([data-theme="dark"]) #movementModal .invoice-product-picker select{color:#10241a;font-weight:600}
body:not([data-theme="dark"]) #movementModal .invoice-product-picker select option{color:#10241a;font-weight:500}
body[data-theme="dark"] #movementModal .invoice-product-picker select{font-weight:600}
#movementModal .invoice-lines td.line-stock{font-size:18px;font-weight:800;color:#175f48;white-space:nowrap}
body[data-theme="dark"] #movementModal .invoice-lines td.line-stock{color:#a9e0b8}

/* Login form: field and button share one compact, equal width (desktop + mobile) */
.login-form{width:100%;max-width:340px}
.login-form .password-wrap,.login-form .login-button{width:100%;height:48px;min-height:48px}
.login-form .login-button{margin-top:16px}
@media(max-width:760px){.login-form{max-width:360px;margin-left:auto;margin-right:auto}.login-copy,.login-foot{max-width:360px;margin-left:auto;margin-right:auto;width:100%}.login-brand,.login-panel>.brand{max-width:360px;margin-left:auto;margin-right:auto;width:100%}}

.trend.negative{color:#c25142}

/* Login on phones: password field and sign-in button 30% shorter, left edge aligned with the heading block */
@media (max-width: 760px) {
  .login-form .password-wrap, .login-form .login-button { width: 70%; max-width: 100%; }
  .login-form .login-button { padding: 0 14px; }
  .login-form .password-wrap input { font-size: 16px; text-overflow: ellipsis; } /* 16px keeps iOS from zooming on focus */
  .login-form .password-wrap input::placeholder { font-size: 11px; }
}

/* Login on phones: everything centered on the page */
@media (max-width: 760px) {
  .login-panel > .brand, .login-brand { justify-content: center; }
  .login-copy { text-align: center; }
  .login-form { align-items: center; }
  .login-form label { align-self: center; width: 70%; text-align: left; } /* same width as the field, so the text starts at the field's left edge */
  .login-form .form-error { align-self: center; width: 70%; text-align: center; }
  .login-form .password-wrap, .login-form .login-button { margin-left: auto; margin-right: auto; }
  .login-foot { justify-content: center; }
}
