*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:#f4f6f9;color:#172033}.layout{display:flex;min-height:100vh}.sidebar{width:274px;background:#101725;color:#dce3ed;padding:25px 15px;display:flex;flex-direction:column;flex-shrink:0}.shop{display:flex;align-items:center;gap:13px;padding:0 10px 30px}.shopIcon{width:48px;height:48px;border-radius:13px;background:#1c2a3f;display:grid;place-items:center;font-size:27px;color:white}.shop b{display:block;font-size:17px}.shop span,.profile span{display:block;color:#8995a7;font-size:12px;margin-top:4px}.nav{width:100%;border:0;background:transparent;color:#d1d9e4;text-align:left;padding:14px 16px;border-radius:12px;margin:3px 0;font-size:15px;display:flex;gap:17px;align-items:center;cursor:pointer}.nav:first-letter{font-size:20px}.nav.active{background:#25354d;color:white}.profile{margin-top:auto;border-top:1px solid #263246;padding:22px 10px 0;display:flex;gap:12px;align-items:center}.avatar{width:43px;height:43px;border-radius:50%;background:#27364c;display:grid;place-items:center;font-weight:800}.content{flex:1;min-width:0;padding:27px 31px}.pageHead{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:27px}.title{display:flex;gap:15px;align-items:center}.titleIcon,.modalTitleIcon{width:52px;height:52px;border-radius:14px;background:#fff1d4;color:#ee9b00;display:grid;place-items:center;font-size:27px}.title h1{font-size:29px;margin:0 0 4px;letter-spacing:-.03em}.title p{margin:0;color:#758094}.headActions{display:flex;gap:13px}.btn{border:0;border-radius:11px;color:white;font-size:14px;font-weight:800;padding:13px 18px;cursor:pointer;box-shadow:0 5px 13px #00000012}.dark{background:#202938}.blue{background:#3449df}.green{background:#08a45a}.orange{background:#ee9200}.filters{display:grid;grid-template-columns:minmax(260px,1fr) 180px 180px 180px 110px;gap:12px;margin-bottom:18px}.search,.filters select,.clear{height:47px;border:1px solid #dce2ea;border-radius:10px;background:#fff}.search{display:flex;align-items:center;padding:0 14px}.search span{font-size:25px;color:#6f7b8d}.search input{border:0;outline:0;width:100%;font-size:14px;margin-left:9px}.filters select{padding:0 12px;font-size:14px;color:#253044}.clear{border:0;color:#253044;font-weight:700}.tableCard{background:#fff;border:1px solid #e4e8ee;border-radius:15px;overflow:auto;box-shadow:0 4px 18px #00000008}table{border-collapse:collapse;width:100%;min-width:1120px}th,td{text-align:left;padding:16px 13px;border-bottom:1px solid #edf0f4;white-space:nowrap}th{font-size:11px;color:#5f6b7c;background:#fafbfc;font-weight:900}td{font-size:13px}td:nth-child(1),td:nth-child(2){font-weight:800}.qty{padding:7px 11px;border-radius:9px;background:#dff7e9;color:#09894d;font-weight:900;display:inline-block}.low{background:#ffe4e4;color:#d33434}.actionEdit,.actionDelete{border:0;border-radius:8px;width:34px;height:34px;margin-right:5px;cursor:pointer}.actionEdit{background:#edf1ff;color:#3b4ee2}.actionDelete{background:#fff0f0;color:#e33434}.empty{text-align:center;padding:45px;color:#8792a1;display:none}.pager{height:53px;padding:0 16px;display:flex;justify-content:space-between;align-items:center;color:#798495;font-size:12px}.pager select{border:1px solid #dce2ea;border-radius:8px;padding:7px;background:white}.modal{position:fixed;inset:0;background:#17203399;display:grid;place-items:center;padding:20px;z-index:20}.hidden{display:none}.modalCard{width:min(1260px,100%);background:#fff;border-radius:18px;padding:25px;box-shadow:0 25px 80px #0004}.modalCard.small{width:min(560px,100%)}.modalHead{display:flex;align-items:center;gap:13px;padding-bottom:20px;border-bottom:1px solid #e9edf2}.modalTitle{flex:1}.modalTitle h2{margin:0;font-size:23px}.modalTitle p{margin:5px 0 0;color:#738096;font-size:13px}.close{border:0;background:transparent;color:#657185;font-size:28px;cursor:pointer}.entryTable{display:grid;grid-template-columns:.65fr 1.35fr 1.1fr .65fr .75fr .95fr .95fr .75fr 1.15fr;gap:8px;padding:22px 0;border-bottom:1px solid #e9edf2;overflow-x:auto}.entryTable label,.moveGrid label{font-size:11px;font-weight:900;color:#4e5a6d;min-width:78px}.entryTable input,.moveGrid input{width:100%;margin-top:6px;border:1px solid #d8dee7;border-radius:9px;padding:11px 9px;font-size:14px;outline:0}.entryTable input:focus,.moveGrid input:focus{border-color:#5968e8}.modalActions{display:flex;justify-content:flex-end;gap:10px;padding-top:20px}.save,.cancelBtn{border:0;border-radius:10px;padding:12px 18px;font-weight:900;cursor:pointer}.save{background:#3449df;color:white}.cancelBtn{background:#eef1f5;color:#354052}.moveGrid{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:22px 0}.voiceResult{background:#f5f7fa;border-radius:12px;padding:17px;line-height:1.6;margin-top:20px}@media(max-width:1050px){.sidebar{width:220px}.filters{grid-template-columns:1fr 1fr}.search{grid-column:1/-1}.pageHead{align-items:flex-start;flex-direction:column}.headActions{width:100%}.btn{flex:1}}@media(max-width:700px){.sidebar{display:none}.content{padding:17px 12px}.title h1{font-size:24px}.headActions{display:grid;grid-template-columns:1fr}.filters{grid-template-columns:1fr}.modal{padding:10px}.modalCard{padding:18px}.entryTable{min-width:1050px}.tableCard{border-radius:12px}.moveGrid{grid-template-columns:1fr}}

/* V5 — product photos */
.productThumb{width:48px;height:48px;border-radius:9px;object-fit:cover;display:block;cursor:zoom-in;border:1px solid #e1e5eb;background:#f4f6f9}
.noPhoto{width:48px;height:48px;border-radius:9px;background:#eef1f5;color:#9aa3b0;display:grid;place-items:center;font-size:20px;cursor:pointer;border:1px solid #e1e5eb}
.entryTable{grid-template-columns:.55fr 1.15fr 1fr .55fr .65fr .85fr .85fr .65fr 1fr .9fr;min-width:900px}
.photoViewer{position:relative;background:#fff;border-radius:18px;padding:18px;max-width:min(900px,94vw);max-height:92vh;text-align:center;box-shadow:0 25px 80px #0006}
.photoViewer img{display:block;max-width:85vw;max-height:78vh;object-fit:contain;border-radius:10px;margin:auto}
.photoViewer div{padding-top:10px;font-weight:800;color:#273246}
.photoClose{position:absolute;right:8px;top:5px;z-index:2;background:#fff;border-radius:50%;width:38px;height:38px;box-shadow:0 2px 10px #0002}

.photoActions{display:flex;gap:6px;margin-top:6px;min-width:170px}
.photoBtn{flex:1;border:1px solid #d8dee7;background:#3449df;color:#fff;border-radius:8px;padding:9px 7px;text-align:center;font-size:11px;font-weight:900;cursor:pointer;white-space:nowrap}
.photoBtn{appearance:none;-webkit-appearance:none}
.fileInputHidden{display:none!important}
.secondaryPhoto{background:#eef1f5;color:#354052}

.stockNote{padding:11px 16px;border-top:1px solid #edf0f4;background:#fafbfc;color:#778397;font-size:11px}
.stockNote b{color:#3e4a5c}

.salesScreen{width:100%}.salesHead{margin-bottom:18px}.voiceHint{margin-top:14px;padding:12px 14px;border-radius:12px;background:#f4f7fb;color:#5d6878;font-size:13px}.voiceHint b{color:#1d2736}

.entryTable label input[readonly]{background:#f4f6f9;font-weight:700}.salesScreen .tableCard{overflow-x:auto}


.selectedPhotoPreview{display:flex;align-items:center;gap:12px;margin-top:10px;padding:8px 10px;border:1px solid #dfe3ea;border-radius:10px;background:#f8fafc;max-width:520px}.selectedPhotoPreview img{width:64px;height:64px;object-fit:cover;border-radius:8px;border:1px solid #d9dee7}.selectedPhotoPreview span{font-size:13px;color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.selectedPhotoPreview.hidden{display:none}

.movementsHead{margin-bottom:18px}.movementType{display:inline-block;padding:6px 9px;border-radius:8px;font-size:11px;font-weight:900}.movementIn{background:#dff7e9;color:#09894d}.movementOut{background:#ffe4e4;color:#d33434}.movementsScreen .tableCard{overflow-x:auto}

.categorySummary{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 18px}.categoryCard{border:1px solid #dfe5ec;background:#fff;border-radius:13px;padding:12px 16px;min-width:130px;text-align:left;cursor:pointer;box-shadow:0 3px 12px #00000008;display:grid;grid-template-columns:1fr auto;column-gap:12px;align-items:center}.categoryCard span{font-size:13px;font-weight:800;color:#334155}.categoryCard b{font-size:22px;color:#172033}.categoryCard small{grid-column:2;color:#7a8698;font-size:10px}.categoryCard:hover{border-color:#6574e8;transform:translateY(-1px)}.categoryBadge{display:inline-block;padding:6px 9px;border-radius:8px;background:#eef2ff;color:#4052d8;font-size:11px;font-weight:900}.categoryEmpty{padding:12px 4px;color:#7b8798;font-size:12px}
@media(max-width:700px){.categorySummary{overflow-x:auto;flex-wrap:nowrap;padding-bottom:3px}.categoryCard{min-width:145px}}

.btn.red{background:#d83b4b;color:#fff}.btn.purple{background:#6d4ad8;color:#fff}.addCategoryCard{border-style:dashed;background:#f8fafc}.selectedPhotoPreview{display:flex;align-items:center;gap:10px;margin-top:8px;padding:8px;border:1px solid #d8dee7;border-radius:10px;background:#f8fafc}.selectedPhotoPreview img{width:70px;height:70px;object-fit:cover;border-radius:8px}.selectedPhotoPreview span{font-size:12px;color:#475569;word-break:break-all}

.categoryHelp{font-size:12px;color:#7a8698;margin:-10px 0 16px}.btn.red{background:#d83b4b;color:#fff}.btn.purple{background:#6d4ad8;color:#fff}.addCategoryCard{border-style:dashed;background:#f8fafc}.selectedPhotoPreview{display:flex;align-items:center;gap:10px;margin-top:8px;padding:8px;border:1px solid #d8dee7;border-radius:10px;background:#f8fafc}.selectedPhotoPreview img{width:70px;height:70px;object-fit:cover;border-radius:8px}.selectedPhotoPreview span{font-size:12px;color:#475569;word-break:break-all}


.homeCards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:20px 0}
.homeCard{background:#fff;border:1px solid #e4e8ef;border-radius:18px;padding:24px;box-shadow:0 8px 24px rgba(20,30,50,.05);display:flex;flex-direction:column;gap:6px}
.homeCard span{font-weight:700;color:#263246}.homeCard b{font-size:34px;color:#101725}.homeCard small{color:#8a96a8}
.homeWelcome{background:#fff;border:1px solid #e4e8ef;border-radius:20px;padding:30px;box-shadow:0 8px 24px rgba(20,30,50,.05)}
.homeWelcome h2{margin:0 0 8px}.homeWelcome p{color:#718096;margin:0 0 20px}
@media(max-width:900px){.homeCards{grid-template-columns:1fr}}
/* Описание в склада – максимум 3 реда */
.tableCard table{
  table-layout:fixed;
  min-width:0;
  width:100%;
}

.tableCard th,
.tableCard td{
  white-space:nowrap;
}

.tableCard th:nth-child(1),
.tableCard td:nth-child(1){
  width:70px;
}

.tableCard th:nth-child(2),
.tableCard td:nth-child(2){
  width:260px;
  max-width:260px;
}

.tableCard td:nth-child(2) .productDescription{
  white-space:normal;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  overflow:hidden;
  line-height:1.25;
  max-height:3.75em;
  font-weight:600;
  color:#253044;
  margin-top:4px;
}

.tableCard th:nth-child(3),
.tableCard td:nth-child(3){
  width:120px;
}

.tableCard th:nth-child(4),
.tableCard td:nth-child(4),
.tableCard th:nth-child(5),
.tableCard td:nth-child(5){
  width:90px;
}

.tableCard th:nth-child(6),
.tableCard td:nth-child(6){
  width:70px;
}

.tableCard th:nth-child(7),
.tableCard td:nth-child(7){
  width:105px;
}

.tableCard th:nth-child(8),
.tableCard td:nth-child(8){
  width:70px;
}

.tableCard th:nth-child(9),
.tableCard td:nth-child(9){
  width:110px;
}

.tableCard th:nth-child(10),
.tableCard td:nth-child(10){
  width:90px;
}
/* ===== Компактна таблица склад ===== */

.tableCard{
  overflow:hidden;
}

.tableCard table{
  width:100%;
  min-width:0;
  table-layout:fixed;
}

.tableCard th,
.tableCard td{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  padding:12px 10px;
}

.tableCard th:nth-child(1),
.tableCard td:nth-child(1){
  width:64px;
}

.tableCard th:nth-child(2),
.tableCard td:nth-child(2){
  width:78px;
}

.tableCard th:nth-child(3),
.tableCard td:nth-child(3){
  width:220px;
}

.tableCard th:nth-child(4),
.tableCard td:nth-child(4){
  width:115px;
}

.tableCard th:nth-child(5),
.tableCard td:nth-child(5),
.tableCard th:nth-child(6),
.tableCard td:nth-child(6){
  width:95px;
}

.tableCard th:nth-child(7),
.tableCard td:nth-child(7){
  width:65px;
}

.tableCard th:nth-child(8),
.tableCard td:nth-child(8){
  width:95px;
}

.tableCard th:nth-child(9),
.tableCard td:nth-child(9){
  width:80px;
}

.tableCard th:nth-child(10),
.tableCard td:nth-child(10){
  width:105px;
}

.tableCard th:nth-child(11),
.tableCard td:nth-child(11){
  width:90px;
}

/* Описание – максимум 3 реда */
.tableCard td:nth-child(3) .productDescription{
  white-space:normal;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  overflow:hidden;
  line-height:1.25;
  max-height:3.75em;
  font-weight:600;
  color:#253044;
}

/* Код да е компактен */
.tableCard td:nth-child(2){
  font-weight:900;
}

/* Малко по-компактни редове */
.tableCard td{
  vertical-align:middle;
}
.logoutBtn{
  width:calc(100% - 28px);
  margin:0 14px 18px;
  padding:11px 14px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:10px;
  background:transparent;
  color:#aeb9cc;
  font-weight:700;
  cursor:pointer;
  text-align:left;
}

.logoutBtn:hover{
  background:rgba(255,255,255,.06);
  color:#fff;
}