*{
    margin:0;
    padding: 0;
}

:root{
    --background:#FFFBF5;
    --color:#674188;
    --button_color:#674188;
    --item_color:#C3ACD0;
    --item_text_color:black;
    --dubl_bg_color:#F7EFE5;

}

body{
    background: #FFFBF5;
}
.logo{
    display: flex;
    justify-content: space-between;
    background: var(--button_color);
}
.logo .my_logo{
    font-size: 45px;
    color: var(--background);
    margin-left: 25px;

}
.menyu{
    display: flex;
    justify-content: center;
}

.menyu .item{
    padding: 5px;
    margin: 10px;
    /* border:1px solid black; */
    border-radius: 10px;
    font-size: 25px;
    cursor: pointer;
    background: var(--button_color);
    color: var(--background);
}
.menyu .item:hover{
    background-color: var(--background);
    color:var(--button_color);
    /* border: 1px solid var(--button_color); */

}

.body{
    display: flex;
    width:100%;
    min-height: calc(100vh - 100px);
    border:1px solid red;
}

.body .bolim{
    display: flex;
    flex-direction: column;
    width: 200px;
    padding: 15px;
    font-size: x-large;
    background: var(--item_color);
}

.body .bolim .item{
    width:100%;
    margin-top: 5px;
    background: var(--button_color);
    color: var(--background);
    padding-left: 15px;
    cursor: pointer;
}
.body .bolim .item:hover{
    background: var(--background);
    color: var(--button_color);
    border: 1px solid var(--button_color);
    border-right: none;
}

.body .continer{
    width:calc(100% - 500px);
    height:100%;
    position: relative;
}



.item1{
    width: 100%;
    position: absolute;
    display: none;
    justify-content: space-around;
    flex-wrap: wrap;
}
.body .continer .item1 h1{
    width: 100%;
    text-align: center;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:4px;
    line-height:1.15;
}
.body .continer .item1 h1 .blockRoom{
    display:block;
    font-size:16px;
    font-weight:600;
    opacity:.75;
}
.body .continer .item1 .table{
    display:flex;
    width:400px;
    justify-content: space-between;
   margin: 10px;
   position: relative;
}
.body .continer .item1 .table .max-leng{
   font-size: x-large;
   padding: 5px;
   text-align: start;
   width: 50%;
   display: flex;
   flex-direction: column;
   justify-content: center;
   overflow: hidden;
   white-space: nowrap;
   text-overflow: ellipsis;
   max-width: 250px;
   border-top-left-radius: 20px;
   border-bottom-left-radius: 20px;
   
   background: var(--item_color);
   color: var(--item_text_color);
   border: 1px solid black;
}
.body .continer .item1 .table .max-leng:hover{
    position: absolute;
    width: 400px;
    max-width: 400px;
    border-radius: 20px;
    /* border-end-end-radius: 20px;
    border-top-right-radius: 20px; */
}

.body .continer .item1 .table .ajib input[type=text]{
    font-size: 40px;
    text-align: end;
    width:150px;
    background: var(--dubl_bg_color);
    outline: none;
    border:none;
}
.body .continer .item1 .table .horizontal{
    width:50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.body .continer .item1 .table .horizontal .ajib{
    display: flex;
    width:100%;
    height: 40px;
    
}
.body .continer .item1 .table .horizontal .ajib span{
    border-end-end-radius: 50%;
    border-top-right-radius: 50%;
    background: var(--button_color);
    display: flex;
    padding: 5px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width:30px;
    border:1px solid black;
    cursor: pointer;
    font-size: x-large;
    color: var(--background);
}
.body .continer .item1 .table .horizontal .ajib span:hover{
    background: var(--background);
    color: var(--button_color);
    border-color: var(--button_color)
}
.body .chek{
    width:300px;
    background: var(--item_color);
}
.body .chek span{
    display: flex;
    justify-content: center;
    width: 100%;
    font-size: x-large;
}
.body .chek table{
    width: 270px;
    font-size: x-large;
}
.body .chek table input[type=text] , .body .chek table button{
    font-size: x-large;
    width: 100%;
}

.body .chek table button{
    background: var(--button_color);
    color: var(--background);
    cursor: pointer;
}
.body .chek table button:hover{
    background: var(--background);
    color: var(--button_color);
    border-color: var(--button_color);
}
.body .chek table td:nth-child(2){
    text-align: end;
    bottom: 0;
    padding-left: 5px;
    padding: 5px;
   
}


.body .chek table td:nth-child(3) i{
    display: none;
}
.body .chek table td:nth-child(3){

    width: 35px;
    height: 35px;
    cursor: pointer;
    background-position: center;
    background-repeat: no-repeat;
    background-position:center;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23cc3f47' d='M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z' /%3E%3C/svg%3E" );   
}
.body .chek table td:nth-child(3):hover{
   
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%674188' d='M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z' /%3E%3C/svg%3E" );   

}

.body .bolim .action, .logo .menyu .action1{
    background: var(--background);
    color: var(--button_color);
    border: var(--button_color);
    border-right: none;

}


/* Bemor, to'lov va saqlanganlar oynalari */
.modalBack{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}
.modalBox{
    width: 420px;
    max-width: calc(100% - 30px);
    max-height: 92vh;
    overflow: auto;
    background: var(--background);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 0 25px rgba(0,0,0,.35);
    font-size: 18px;
}
.modalBox.wide{ width: 720px; }
.modalHead{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 22px;
    color: var(--color);
}
.modalClose{
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--button_color);
    color: var(--background);
    font-size: 24px;
    cursor: pointer;
}
.modalBox label{
    display: block;
    margin: 8px 0;
}
.modalBox input{
    width: 100%;
    box-sizing: border-box;
    font-size: 20px;
    padding: 8px;
    margin-top: 3px;
    border: 1px solid var(--item_color);
    border-radius: 8px;
}
.modalBtns{
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}
.modalBtns button, .savedRow button{
    background: var(--button_color);
    color: var(--background);
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    margin-left: 6px;
    cursor: pointer;
    font-size: 18px;
}
.suggest{
    background: white;
    border-radius: 8px;
    overflow: hidden;
}
.suggest div{
    padding: 7px 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}
.suggest div:hover{ background: var(--item_color); }
.payTotal{
    font-size: 26px;
    text-align: center;
    padding: 10px;
    background: var(--item_color);
    border-radius: 10px;
    margin-bottom: 8px;
}
.savedRow{
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid var(--item_color);
    align-items: center;
}
#bemorBtn{
    width: 100%;
    font-size: x-large;
    background: var(--button_color);
    color: var(--background);
    cursor: pointer;
}

/* Kassa bo'limlari qidiruvi */
.bolimTop{
    width: 100%;
    margin-bottom: 10px;
}
#departmentFilter{
    width: 100%;
    box-sizing: border-box;
    font-size: 20px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--button_color);
    outline: none;
}
.body .bolim .addDepartmentItem{
    background: transparent;
    padding-left: 0;
    cursor: default;
}
.body .bolim .addDepartmentItem:hover{
    background: transparent;
    border: none;
}
#qoshmoq{
    width: 100%;
    box-sizing: border-box;
    font-size: 18px;
    padding: 7px;
    border-radius: 8px;
    border: 1px solid var(--button_color);
}

/* Bemor modal oynasi: inputlar 2 ustun, manzil bitta to'liq qator */
.patientModalBox{
    width: 720px;
}
.patientGrid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
}
.patientField{
    position: relative;
}
.patientField.patientFull{
    grid-column: 1 / -1;
}
.patientField label{
    display: block;
    margin: 0 0 4px 0;
    font-size: 17px;
}
.patientField .suggest{
    margin-top: 4px;
    max-height: 145px;
    overflow: auto;
    border: 1px solid #eee;
}
@media (max-width: 720px){
    .patientGrid{ grid-template-columns: 1fr; }
    .patientField.patientFull{ grid-column: auto; }
}

.suggest div.active{
    background: var(--button_color);
    color: #fff;
}
@media print{
    .modalBack, #chekprint, #respoans1, #popUp{
        display: none !important;
    }
}

/* Klaviatura bilan tanlangan xizmat */
.body .continer .item1 .table.serviceActive{
    outline: 3px solid var(--button_color);
    outline-offset: 3px;
    border-radius: 22px;
    background: rgba(103,65,136,.08);
}
.body .continer .item1 .table.serviceActive .qosh{
    background: var(--background);
    color: var(--button_color);
    border-color: var(--button_color);
}

/* Login/tiket */
.logo .menyu a.item{ text-decoration:none; }
.logo .menyu .userItem{ opacity:.9; cursor:default; }
.ticketWide{ width: 980px; }
.ticketHeader{ display:flex; flex-wrap:wrap; gap:12px; justify-content:space-between; background:var(--item_color); padding:10px; border-radius:10px; margin-bottom:10px; }
.ticketCards{ display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:10px 0; }
.ticketCards>div{ background:var(--item_color); padding:10px; border-radius:10px; line-height:1.5; }
.ticketExpense{ background:#fff; padding:10px; border-radius:10px; margin:10px 0; }
.ticketExpenseGrid{ display:grid; grid-template-columns:2fr 1fr 1fr auto; gap:8px; align-items:end; }
.ticketExpenseGrid input,.ticketExpenseGrid select{ font-size:18px; padding:8px; border-radius:8px; border:1px solid var(--item_color); }
.ticketExpenseGrid button,.ticketActions button,#ticketOpenNow{ background:var(--button_color); color:var(--background); border:0; border-radius:8px; padding:9px 14px; cursor:pointer; font-size:18px; }
.ticketTableWrap{ overflow:auto; max-height:260px; background:#fff; border-radius:8px; margin-bottom:12px; }
.ticketTable{ width:100%; border-collapse:collapse; font-size:14px; }
.ticketTable th,.ticketTable td{ border:1px solid #ddd; padding:6px; text-align:left; }
.ticketTable th{ background:var(--item_color); position:sticky; top:0; }
.ticketActions{ display:flex; justify-content:flex-end; gap:8px; margin-top:10px; }
@media(max-width:900px){ .ticketCards{grid-template-columns:1fr 1fr;} .ticketExpenseGrid{grid-template-columns:1fr;} }

/* Qaytarish oynasi eski ro'yxat modalining ustiga chiqadi */
#refundModal{ z-index: 1200; }
#refundModal .modalBox{ box-shadow:0 0 35px rgba(0,0,0,.55); }

/* Saqlangan va yozilgan bemorlar: bitta qatorli jadval */
.listTableWrap{
    width:100%;
    overflow:auto;
    background:#fff;
    border-radius:10px;
    border:1px solid var(--item_color);
}
.listTable{
    width:100%;
    border-collapse:collapse;
    font-size:15px;
    white-space:nowrap;
}
.listTable th,.listTable td{
    border-bottom:1px solid #eee;
    padding:8px 10px;
    vertical-align:middle;
    text-align:left;
}
.listTable th{
    background:var(--item_color);
    position:sticky;
    top:0;
    z-index:1;
}
.listTable tr:hover td{ background:rgba(103,65,136,.06); }
.actionsCell{
    display:flex;
    gap:6px;
    align-items:center;
    justify-content:flex-start;
}
.iconBtn{
    width:34px;
    height:34px;
    border:0;
    border-radius:8px;
    background:var(--button_color);
    color:var(--background);
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:16px;
    margin:0 !important;
}
.iconBtn:hover{ background:var(--background); color:var(--button_color); outline:1px solid var(--button_color); }
.iconBtn:disabled,.loadingBtn{ opacity:.65; cursor:not-allowed; }
.statusPaid{ color:#148c38; font-size:18px; }
.statusRefund{ color:#c83b44; font-size:18px; }
.refundMini{ color:#c83b44; }
.reasonMini{ color:#674188; }
.srOnly{
    position:absolute;
    width:1px;
    height:1px;
    padding:0;
    margin:-1px;
    overflow:hidden;
    clip:rect(0,0,0,0);
    white-space:nowrap;
    border:0;
}
.inputError{border:2px solid #e53935 !important; box-shadow:0 0 0 2px rgba(229,57,53,.12)}

/* Bo'lim ostida vrachlar ko'rinishi */
.depItem{display:flex;flex-direction:column;align-items:flex-start;gap:2px;}
.depItem .depName{font-weight:700;}
.depDoctors{font-size:12px;line-height:1.2;opacity:.78;font-weight:400;}
.blockDoctors{font-size:15px;margin:-8px 0 10px 0;opacity:.85;color:var(--button_color);}
.blockDoctors.muted{opacity:.55;color:inherit;}

/* Statsionar kassir hisobi */
.miniPayGrid{display:grid;grid-template-columns:90px 90px 90px minmax(120px,1fr) 42px;gap:5px;align-items:center;min-width:430px}
.miniPayGrid input,.miniPayGrid select{padding:7px;border:1px solid #ddd;border-radius:7px;font-size:13px;min-width:0}
.miniPayGrid button{height:34px;border:0;border-radius:7px;background:var(--button_color);color:var(--background);cursor:pointer}
.muted{opacity:.7;font-size:12px}
@media(max-width:900px){.miniPayGrid{grid-template-columns:1fr;min-width:0}}

/* Yotib davolanayotgan bemorni kassada ajratib ko'rsatish */
.inpatientBadge,
.inpatientMini{
    color:#0f766e;
    margin-right:5px;
    display:inline-flex;
    align-items:center;
    gap:4px;
}
.suggest .suggestInpatient{
    font-weight:600;
}
.suggest .suggestInpatient small{
    font-weight:400;
    margin-left:6px;
}
#pay_nasiya_wrap input.inputError,
.inputError{
    border-color:#dc2626 !important;
    box-shadow:0 0 0 2px rgba(220,38,38,.15);
}

.refundedRow td{ background:#ffe1e1 !important; }
.refundedRow:hover td{ background:#ffd0d0 !important; }
.refundedRow .iconBtn:disabled{ background:#b8aeb0; color:#fff; opacity:.7; }

.labBlankPreview{background:#fff;color:#111;border-radius:10px;padding:14px;max-height:70vh;overflow:auto}.labBlankPreview .head{text-align:center;border-bottom:2px solid #111;padding-bottom:8px;margin-bottom:12px}.labBlankPreview .meta{display:grid;grid-template-columns:1fr 1fr;gap:6px 18px;margin-bottom:12px}.labBlankPreview .meta div{border-bottom:1px solid #ddd;padding:4px 0}.labBlankPreview table{width:100%;border-collapse:collapse}.labBlankPreview th,.labBlankPreview td{border:1px solid #333;padding:7px;text-align:left}.iconLink{display:inline-flex;align-items:center;gap:6px;background:var(--button_color);color:var(--background);border-radius:8px;padding:8px 10px;text-decoration:none}
@media(max-width:700px){.labBlankPreview{padding:8px;font-size:12px}.labBlankPreview .meta{grid-template-columns:1fr}.labBlankPreview th,.labBlankPreview td{padding:5px}}

/* Yagona laboratoriya blankasi ko'rinishi */
.labBlankPreview .labHead{display:flex;align-items:center;gap:16px;border-bottom:2px solid #222;padding-bottom:10px;margin-bottom:12px}
.labBlankPreview .labLogo{width:64px;height:64px;border:2px solid #222;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:34px;flex:0 0 auto}
.labBlankPreview .labTitle h1{margin:0;font-size:26px;letter-spacing:1px;color:#111}
.labBlankPreview .labTitle p{margin:2px 0;color:#111}.labBlankPreview .slogan{font-style:italic;font-size:13px}.labBlankPreview .docName{text-align:center;font-weight:700;margin:12px 0 8px;font-size:18px}.labBlankPreview .meta .full{grid-column:1/3}.labBlankPreview .note{margin-top:12px;min-height:34px}.labBlankPreview .sign{display:grid;grid-template-columns:1fr 1fr;gap:28px;margin-top:30px}.labBlankPreview .stamp{text-align:center;border:1px dashed #777;border-radius:50%;width:120px;height:80px;padding-top:40px;margin-left:auto;color:#555}
@media(max-width:700px){.labBlankPreview .labHead{gap:8px}.labBlankPreview .labLogo{width:48px;height:48px;font-size:25px}.labBlankPreview .labTitle h1{font-size:20px}.labBlankPreview .meta .full{grid-column:auto}.labBlankPreview .sign{grid-template-columns:1fr}.labBlankPreview .stamp{margin:10px 0 0}}
.patientField select{width:100%;box-sizing:border-box;font-size:18px;padding:7px;border-radius:8px;border:1px solid var(--button_color);background:#fff;}

/* Kassa yuqori menyu: ixcham ikonli tugmalar */
.logo{
    align-items: center;
    gap: 14px;
    padding: 6px 14px;
}
.logo .my_logo{
    line-height: 1;
    white-space: nowrap;
}
.menyu{
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}
.menyu .item,
.menyu .profileBtn{
    margin: 0;
    border: 1px solid rgba(255,255,255,.22);
    box-shadow: 0 6px 14px rgba(0,0,0,.10);
    transition: .18s ease;
}
.logo .menyu .menuBtn{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 7px 10px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .1px;
}
.logo .menyu .menuBtn i{
    font-size: 16px;
}
.logo .menyu .menuBtn b{
    font: inherit;
}
.logo .menyu .action1,
.logo .menyu .menuBtn:hover,
.logo .menyu .profileBtn:hover{
    background: var(--background);
    color: var(--button_color);
    border-color: var(--background);
}
.profileMenu{
    position: relative;
    display: inline-flex;
    align-items: center;
}
.logo .menyu .profileBtn{
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 180px;
    min-height: 38px;
    padding: 7px 10px;
    font-size: 15px;
    font-weight: 700;
    border: 0;
    font-family: inherit;
}
.logo .menyu .profileBtn span{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profileArrow{
    font-size: 11px;
    transition: transform .18s ease;
}
.profileMenu.open .profileArrow{
    transform: rotate(180deg);
}
.profileDrop{
    display: none;
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    min-width: 190px;
    background: #fff;
    color: var(--button_color);
    border-radius: 14px;
    box-shadow: 0 15px 35px rgba(0,0,0,.20);
    padding: 8px;
    z-index: 1600;
}
.profileMenu.open .profileDrop{
    display: block;
}
.profileDrop:before{
    content: "";
    position: absolute;
    top: -7px;
    right: 18px;
    width: 14px;
    height: 14px;
    background: #fff;
    transform: rotate(45deg);
}
.profileName,
.profileLink{
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    box-sizing: border-box;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.2;
    text-decoration: none;
    color: var(--button_color);
    background: transparent;
    border: 0;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
}
.profileName{
    cursor: default;
    font-weight: 800;
    border-bottom: 1px solid #eee;
    border-radius: 10px 10px 4px 4px;
    margin-bottom: 5px;
}
.profileName span,
.profileLink span{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profileLink:hover{
    background: var(--dubl_bg_color);
}

/* Bo'lim kartalari: chap burchak yumaloq, o'ng tomoni containerga tekis tegadi */
.body .bolim .item{
    box-sizing: border-box;
    border-radius: 10px 0 0 10px;
    border: 1px solid transparent;
    border-right: 0;
    padding: 8px 8px 8px 12px;
    margin-right: -15px;
}
.body .bolim .item:hover,
.body .bolim .action{
    border-radius: 10px 0 0 10px;
    border: 1px solid var(--button_color);
    border-right: 0;
}
.body .bolim .action{
    background: var(--background);
    color: var(--button_color);
}
.depItem{
    min-width: 0;
    overflow: hidden;
}
.depItem .depName{
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.depDoctors{
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.body .bolim .addDepartmentItem{
    margin-right: 0;
    border-radius: 10px;
    border-right: 1px solid transparent;
}
.body .bolim .addDepartmentItem:hover{
    border-right: none;
}
@media(max-width:900px){
    .logo{align-items:flex-start; flex-direction:column; padding:8px 10px;}
    .logo .my_logo{font-size:30px; margin-left:0;}
    .menyu{width:100%; justify-content:flex-start; gap:6px;}
    .logo .menyu .menuBtn{font-size:13px; padding:7px 8px; min-height:34px;}
    .logo .menyu .menuBtn b{display:none;}
    .logo .menyu .profileBtn{max-width:145px; min-height:34px; font-size:13px;}
    .profileDrop{right:auto; left:0;}
    .profileDrop:before{right:auto; left:18px;}
}

/* Yotib davolanayotganlar hisobi: katta modal va amallar dizayni */
.modalBox.inpatientWide{
    width: min(1180px, calc(100vw - 22px));
    max-width: calc(100vw - 22px);
    max-height: 94vh;
    padding: 12px;
}
.modalBox.inpatientWide .modalHead{
    position: sticky;
    top: -12px;
    z-index: 5;
    background: var(--background);
    padding: 8px 0 10px;
    border-bottom: 1px solid rgba(103,65,136,.16);
}
#inpatientsList,
#inpatientReportContent{
    min-width: 0;
}
.inpatientsTable{
    min-width: 900px;
}
.inpatientActionBtn{
    width: 38px;
    height: 38px;
    border-radius: 12px;
    box-shadow: 0 5px 12px rgba(0,0,0,.12);
}
.inpatientActionBtn.viewBtn{ background:#0f766e; }
.inpatientActionBtn.payBtn{ background:#674188; }
.inpatientActionBtn.addBtn{ background:#2563eb; }
.inpatientActionBtn:hover{
    transform: translateY(-1px);
}
.actionsCell{
    gap: 8px;
    white-space: nowrap;
}
@media(max-width:700px){
    .modalBox.inpatientWide{
        width: calc(100vw - 8px);
        max-width: calc(100vw - 8px);
        max-height: 96vh;
        border-radius: 10px;
        padding: 8px;
    }
    .modalBox.inpatientWide .modalHead{ top:-8px; }
    .inpatientActionBtn{ width:36px; height:36px; }
}

/* To'lov modalida chegirma bloki yashirin panel bo'lib ochiladi */
.paymentBox{
    overflow: visible;
}
.discountToggleRow{
    display:flex;
    justify-content:flex-end;
    margin: -2px 0 8px;
}
.discountToggle{
    border: 1px solid var(--button_color);
    background: var(--background);
    color: var(--button_color);
    border-radius: 999px;
    padding: 7px 12px;
    cursor: pointer;
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-size:15px;
    font-weight:700;
}
.discountToggle:hover,
.discountToggle.active{
    background: var(--button_color);
    color: var(--background);
}
.discountPanel{
    background: rgba(103,65,136,.08);
    border: 1px solid rgba(103,65,136,.22);
    border-radius: 14px;
    padding: 10px;
    margin: 0 0 10px;
}
.discountPanel[hidden]{
    display:none !important;
}
.modalBox select,
.styledSelect{
    width: 100%;
    box-sizing: border-box;
    font-size: 18px;
    padding: 10px 38px 10px 10px;
    margin-top: 3px;
    border: 1px solid var(--item_color);
    border-radius: 10px;
    background: #fff;
    color: var(--color);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--button_color) 50%), linear-gradient(135deg, var(--button_color) 50%, transparent 50%);
    background-position: calc(100% - 18px) 54%, calc(100% - 12px) 54%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}
.modalBox select:focus,
.styledSelect:focus{
    border-color: var(--button_color);
    box-shadow: 0 0 0 2px rgba(103,65,136,.14);
}

/* Payment modal: qog'ozni teskari qilish va o'ngga tekislangan raqam inputlar */
input[type="number"]{
    text-align: right;
    direction: ltr;
    font-variant-numeric: tabular-nums;
}
.paymentBox{
    width: min(94vw, 430px);
    max-width: 430px;
    padding: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    perspective: 1200px;
}
.paymentFlipCard{
    position: relative;
    width: 100%;
    min-height: 515px;
    transform-style: preserve-3d;
    transition: transform .55s cubic-bezier(.2,.75,.25,1);
}
.paymentBox.isBack .paymentFlipCard{
    transform: rotateY(180deg);
}
.paymentFace{
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    background: var(--background);
    color: var(--color);
    border: 1px solid rgba(103,65,136,.16);
    border-radius: 20px;
    padding: 14px;
    box-shadow: 0 18px 60px rgba(0,0,0,.22);
    overflow: auto;
}
.paymentFace .modalHead{
    margin: -14px -14px 12px;
    border-radius: 20px 20px 0 0;
}
.paymentBack{
    transform: rotateY(180deg);
    background:
        linear-gradient(transparent 31px, rgba(103,65,136,.07) 32px),
        var(--background);
    background-size: 100% 32px, auto;
}
.payCalcLine{
    background: rgba(103,65,136,.08);
    border: 1px solid rgba(103,65,136,.18);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 10px;
    text-align: center;
    font-size: 20px;
    font-weight: 900;
    color: var(--button_color);
    font-variant-numeric: tabular-nums;
}
.payCalcLine .mutedMinus{
    opacity: .72;
    font-weight: 800;
    margin: 0 4px;
}
.payCalcLine .payEquals{
    display: inline-block;
    margin-left: 4px;
    padding-left: 7px;
    border-left: 1px solid rgba(103,65,136,.22);
}
.discountBackBtns{
    display:flex;
    justify-content:flex-end;
    margin-top: 12px;
}
.discountPanelShake,
.paymentBack.shakeNeeded{
    animation: discountShake .38s ease both;
}
@keyframes discountShake{
    0%,100%{ transform: rotateY(180deg) translateX(0); }
    20%{ transform: rotateY(180deg) translateX(-7px); }
    40%{ transform: rotateY(180deg) translateX(7px); }
    60%{ transform: rotateY(180deg) translateX(-5px); }
    80%{ transform: rotateY(180deg) translateX(5px); }
}
#discount_reason.inputError,
#pay_discount.inputError{
    border-color: #d93636 !important;
    box-shadow: 0 0 0 3px rgba(217,54,54,.18) !important;
}
@media (max-width: 520px){
    .paymentBox{ width: calc(100vw - 18px); }
    .paymentFlipCard{ min-height: 535px; }
    .payCalcLine{ font-size: 18px; }
}


/* Kassa narxlari va chek tugmalari */
.body .continer .item1 .table .horizontal .ajib input.update_tolov,
.body .continer .item1 .table .horizontal .ajib input[id^="xizmat_xaq_"]{
    font-variant-numeric: tabular-nums;
    letter-spacing: .2px;
    text-align: right;
    padding-right: 8px;
}
.body .chek{
    padding: 10px;
    box-sizing: border-box;
}
.body .chek table{
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}
.body .chek table td{
    vertical-align: middle;
}
.body .chek table td:nth-child(2){
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-weight: 700;
}
.body .chek .checkActionBtn,
#bemorBtn.checkActionBtn,
#payBtn.checkActionBtn,
#saveBtn.checkActionBtn{
    border: 0;
    border-radius: 12px;
    padding: 10px 12px;
    background: linear-gradient(135deg, var(--button_color), #8a61aa);
    color: var(--background);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 14px rgba(103,65,136,.22);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.body .chek .checkActionBtn:hover,
#bemorBtn.checkActionBtn:hover,
#payBtn.checkActionBtn:hover,
#saveBtn.checkActionBtn:hover{
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(103,65,136,.28);
    background: var(--background);
    color: var(--button_color);
    outline: 1px solid var(--button_color);
}
.checkBtnRow{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
}
#bemorBtn.checkActionBtn{
    width: 100%;
    min-height: 46px;
}
#bemorBtn.checkActionBtn span{
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#mytable tr:not(:first-child):not(:nth-last-child(-n+2)) td:nth-child(2){
    color: var(--color);
}

.cashExpTop{display:flex;justify-content:space-between;gap:10px;align-items:center;background:#fff;border-radius:10px;padding:10px;margin-bottom:10px;}
.cashExpPeriod{display:flex;gap:6px;align-items:center;flex-wrap:wrap;}
.cashExpPeriod input,.cashExpSearch input,.cashExpAmount,.cashExpTable input,.cashExpTable select{font-size:16px;padding:7px;border:1px solid var(--item_color);border-radius:8px;}
.cashExpGeneral{background:#fff;border-radius:10px;padding:10px;margin:10px 0;}
.cashExpSearch{margin:10px 0;}
.cashExpSearch input{width:100%;box-sizing:border-box;}
.cashExpTable{max-height:420px;}
.cashExpTable td{vertical-align:middle;}
.cashExpBtn,.cashExpPeriod button,#cashGenAdd{background:var(--button_color);color:var(--background);border:0;border-radius:8px;padding:8px 12px;cursor:pointer;}
.cashExpBtn:disabled,#cashGenAdd:disabled{opacity:.65;cursor:wait;}
.cashExpNeed{color:#16843a;font-weight:bold;}
.cashExpAdvance{color:#c62828;font-weight:bold;}
.cashExpLoading{background:#fff;border-radius:12px;padding:18px;text-align:center;font-size:20px;}
@media(max-width:900px){.cashExpTop{display:block}.cashExpPeriod{margin-top:10px}.cashExpTable{max-height:60vh}.cashExpTable input{min-width:110px}}

/* Kassa xarajatlari: 3 ta alohida bo'lim */
.cashExpTabs{display:flex;gap:8px;flex-wrap:wrap;background:#fff;border-radius:12px;padding:8px;margin-bottom:10px;position:sticky;top:0;z-index:2;box-shadow:0 2px 10px #00000012;}
.cashExpTabBtn{border:1px solid var(--item_color);background:#fff;color:var(--text_color);border-radius:10px;padding:10px 14px;font-weight:700;cursor:pointer;}
.cashExpTabBtn.active{background:var(--button_color);color:var(--background);border-color:var(--button_color);}
.cashExpTabPane{display:none;}
.cashExpTabPane.active{display:block;}
.cashExpPaid{color:#16843a;font-weight:700;}
.cashExpSearch.mini{min-width:260px;}
.cashExpTable select,.cashExpTable input{max-width:150px;}
.cashExpTable button:disabled,.cashExpTable input:disabled,.cashExpTable select:disabled{opacity:.55;cursor:not-allowed;}
@media(max-width:900px){.cashExpTabs{position:static}.cashExpTabBtn{flex:1 1 auto}.cashExpSearch.mini{min-width:0;width:100%}}

/* Kassadagi ombor kirimi formasi */
.cashWhAddBox{background:#fff;border:1px solid var(--item_color);border-radius:14px;padding:12px;margin:10px 0 14px;box-shadow:0 6px 18px #0000000d;}
.cashWhAddBox h3{margin:0 0 10px;font-size:18px;display:flex;gap:8px;align-items:center;}
.cashWhGrid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:10px;align-items:end;}
.cashWhGrid label{display:flex;flex-direction:column;gap:5px;font-weight:700;font-size:13px;color:var(--text_color);}
.cashWhGrid input,.cashWhGrid select{width:100%;box-sizing:border-box;font-size:15px;padding:9px;border:1px solid var(--item_color);border-radius:9px;background:#fff;}
.cashWhNote{grid-column:span 2;}
.cashWhSave{min-height:40px;align-self:end;}
@media(max-width:1100px){.cashWhGrid{grid-template-columns:repeat(2,minmax(140px,1fr));}.cashWhNote{grid-column:span 2;}}
@media(max-width:650px){.cashWhGrid{grid-template-columns:1fr;}.cashWhNote{grid-column:auto;}.cashWhSave{width:100%;}}

/* Chekdagi bemorni tahrirlash / boshqa bemorga o'tkazish */
.patientEditGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:10px 0 14px}
.patientEditGrid label{font-size:12px;color:#64748b;font-weight:700}
.patientEditGrid input,.patientEditGrid select,.patientEditGrid textarea,.transferBox input{width:100%;box-sizing:border-box;border:1px solid #d8e0ee;border-radius:12px;padding:10px;background:#fff;color:#0f172a;font-size:14px}
.patientEditGrid .full{grid-column:1/-1}.transferBox{display:grid;gap:8px}.transferResults{max-height:260px;overflow:auto;border:1px solid #edf2f7;border-radius:14px;background:#fff}.transferPatientRow{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:10px;border-bottom:1px solid #edf2f7}.transferPatientRow:last-child{border-bottom:0}.transferPatientRow:hover{background:#f8fbff}.transferPatientRow b{display:block}.transferPatientRow small{color:#64748b}.transferPatientRow button{border:0;border-radius:10px;background:#2563eb;color:white;padding:8px 10px;font-weight:800;cursor:pointer}
@media(max-width:760px){.patientEditGrid{grid-template-columns:1fr}.transferPatientRow{align-items:flex-start;flex-direction:column}.transferPatientRow button{width:100%}}

/* Yozilgan bemorlar ro'yxati filterlari */
.visitListTools{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap;margin:0 0 10px;padding:10px;background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px}
.visitListTools input{flex:1;min-width:240px;padding:10px 12px;border:1px solid #d1d5db;border-radius:10px;font-size:14px;background:#fff}
.visitListTools label{display:flex;gap:5px;flex-direction:column;font-size:12px;color:#64748b;font-weight:700}
.visitListTools select{padding:9px 10px;border:1px solid #d1d5db;border-radius:10px;background:#fff;font-size:14px}
#visitsListInfo{margin:4px 2px 8px;color:#64748b}
.visitsTable td small{display:block;color:#64748b;margin-top:3px;white-space:nowrap}
@media(max-width:640px){.visitListTools{display:block}.visitListTools input,.visitListTools label,.visitListTools button{width:100%;margin-bottom:8px}.visitsTable th:nth-child(4),.visitsTable td:nth-child(4),.visitsTable th:nth-child(5),.visitsTable td:nth-child(5){display:none}}


/* Yozilgan bemorlar modalini kengaytirish va ustma-ust modal tartibi */
#visitsModal .modalBox.wide{width:min(1180px,calc(100vw - 24px));}
#visitsModal .listTableWrap{max-height:70vh;overflow:auto;}
#visitsModal .visitsTable{min-width:980px;}
#patientModal{background:rgba(15,23,42,.35);}
#patientModal .patientModalBox{width:min(820px,calc(100vw - 24px));}
.visitsClearBtn{display:inline-flex;align-items:center;gap:7px;border:0;border-radius:12px;padding:10px 14px;background:#e2e8f0;color:#0f172a;font-weight:800;cursor:pointer;box-shadow:inset 0 -1px 0 rgba(15,23,42,.08)}
.visitsClearBtn:hover{background:#cbd5e1}.visitsClearBtn:active{transform:translateY(1px)}
.dmdToast{position:fixed;right:18px;bottom:18px;z-index:5000;max-width:360px;background:#0f172a;color:#fff;padding:12px 14px;border-radius:14px;box-shadow:0 12px 40px rgba(15,23,42,.25);font-weight:800;opacity:0;pointer-events:none;transform:translateY(10px);transition:.18s}
.dmdToast.show{opacity:1;transform:translateY(0)}
.dmdDialogBack{z-index:4800!important}.dmdDialogBox{width:min(440px,calc(100vw - 28px));}.dmdDialogText{font-size:16px;line-height:1.45;color:#334155;margin:10px 0 6px;white-space:pre-wrap}
@media(max-width:700px){#visitsModal .modalBox.wide{width:calc(100vw - 10px);max-width:calc(100vw - 10px);padding:10px}.visitListTools{gap:8px}.patientGrid{grid-template-columns:1fr}.patientModalBox{width:calc(100vw - 14px)!important}}

/* Kassir: qo'lda qabulni yopish */
.manualAcceptWide{max-width:min(1280px,96vw)!important;width:96vw!important}
.manualAcceptTools{gap:10px;align-items:end;flex-wrap:wrap}
.manualAcceptTools label{display:flex;flex-direction:column;font-weight:700;font-size:13px;color:#344054;gap:5px}
.manualAcceptTools select,.manualAcceptTools input{min-height:38px;border:1px solid #d0d5dd;border-radius:10px;padding:8px 10px;background:#fff;min-width:220px}
.primarySmallBtn{border:0;border-radius:11px;background:#1570ef;color:#fff;font-weight:800;padding:10px 14px;cursor:pointer;box-shadow:0 8px 20px rgba(21,112,239,.18)}
.primarySmallBtn:hover{filter:brightness(.97)}
.manualAcceptTable select{min-width:170px;border:1px solid #d0d5dd;border-radius:9px;padding:7px;background:#fff}
.manualAcceptTable th:first-child,.manualAcceptTable td:first-child{text-align:center;width:42px}
.manualAcceptChk,#manualAcceptAll{width:18px;height:18px;accent-color:#1570ef}
@media(max-width:760px){.manualAcceptWide{width:100vw!important;max-width:100vw!important;border-radius:0!important}.manualAcceptTools select,.manualAcceptTools input{min-width:100%;width:100%}.primarySmallBtn{width:100%}}
