/* ── Services nav ── */
.svc-nav-btn{width:100%;display:flex;align-items:center;gap:9px;padding:8px 10px;border-radius:8px;border:none;background:none;cursor:pointer;text-align:left;transition:background .12s,color .12s;min-height:44px}
.svc-nav-btn:hover{background:var(--bg-surface-3)}
.svc-nav-btn.active{background:var(--accent-light)}
.svc-nav-btn.active .svc-nav-name{color:var(--accent);font-weight:600}
.svc-nav-btn.active .svc-nav-count{background:var(--accent);color:#fff}
.svc-nav-icon{width:20px;height:20px;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--text-secondary)}
.svc-nav-name{font-size:12px;font-weight:500;color:var(--text-primary);flex:1;line-height:1.3}
.svc-nav-count{font-size:10px;font-weight:700;padding:1px 6px;border-radius:10px;background:var(--bg-surface-3);color:var(--text-muted);flex-shrink:0}
.settings-nav-btn{width:100%;display:flex;align-items:center;gap:9px;padding:9px 11px;border-radius:10px;border:1px solid transparent;background:none;cursor:pointer;font-size:13px;font-weight:600;color:var(--text-secondary);text-align:left;transition:background .12s,color .12s,border-color .12s}
.settings-nav-btn:hover{background:var(--bg-surface-3);color:var(--text-primary);border-color:var(--border-light)}
.settings-nav-btn.active{background:var(--accent-light);color:var(--accent-strong,var(--accent));font-weight:700;border-color:var(--accent-border)}
.settings-nav-icon{width:18px;height:18px;flex-shrink:0;color:var(--text-muted);transition:color .12s}
.settings-nav-btn.active .settings-nav-icon{color:var(--accent)}
.settings-nav-btn:hover .settings-nav-icon{color:var(--text-primary)}
.settings-section{animation:fadeIn .15s ease}
.settings-section-title{font-size:18px;font-weight:700;color:var(--text-primary);margin-bottom:6px}
.settings-section-desc{font-size:13px;color:var(--text-muted);margin-bottom:20px;line-height:1.5}
.settings-block{margin-bottom:24px}
.settings-block-label{font-size:11px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:.07em;margin-bottom:10px}
.generic-modal-card{
 background:var(--bg-surface);color:var(--text-primary);
 border:1px solid var(--border);border-radius:var(--radius-xl);
 box-shadow:0 24px 70px rgba(0,0,0,.28);
 box-sizing:border-box;
 overflow:hidden;
}
body.dark .generic-modal-card{box-shadow:0 24px 80px rgba(0,0,0,.62)}
.ui-modal-card{width:min(560px,96vw)}
.ui-modal-card.ui-modal-wide{width:min(860px,96vw)}
.ui-modal-head{
 display:flex;align-items:flex-start;justify-content:space-between;gap:16px;
 padding:22px 24px 18px;
 background:linear-gradient(135deg,#1f1f1f 0%,#313131 100%);
 color:#fff;
}
.ui-modal-head-copy{min-width:0}
.ui-modal-kicker{
 font-size:9px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;
 color:rgba(255,255,255,.55);margin-bottom:5px
}
.ui-modal-title{font-size:19px;font-weight:700;line-height:1.15}
.ui-modal-subtitle{font-size:12px;line-height:1.5;color:rgba(255,255,255,.68);margin-top:5px}
.ui-modal-close{
 width:32px;height:32px;border:0;border-radius:10px;
 background:rgba(255,255,255,.08);color:#fff;font-size:20px;line-height:1;
 cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;
 transition:background .14s
}
.ui-modal-close:hover{background:rgba(255,255,255,.16)}
.ui-modal-body{padding:22px 24px}
.ui-modal-section{margin-bottom:18px}
.ui-modal-section:last-child{margin-bottom:0}
.ui-modal-section-title{
 display:flex;align-items:center;gap:8px;margin:0 0 12px;
 font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--text-secondary)
}
.ui-modal-section-title span{
 display:inline-flex;align-items:center;justify-content:center;
 width:22px;height:22px;border-radius:7px;background:var(--accent-light);color:var(--accent);font-size:9px
}
.ui-modal-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.ui-modal-grid.ui-modal-grid-3{grid-template-columns:repeat(3,1fr)}
.ui-modal-field{min-width:0}
.ui-modal-field.ui-modal-field-wide{grid-column:1 / -1}
.ui-modal-field label{
 display:block;margin-bottom:5px;
 font-size:11px;font-weight:600;color:var(--text-secondary)
}
.ui-modal-field label em{
 font-style:normal;font-weight:500;font-size:9px;color:var(--text-muted)
}
.ui-modal-note{
 padding:11px 12px;border-radius:10px;background:var(--bg-surface-2);
 border:1px solid var(--border-light);font-size:11px;line-height:1.55;color:var(--text-secondary)
}
.ui-modal-note.is-warn{background:#fff7ed;border-color:#fed7aa;color:#9a3412}
.ui-modal-note.is-danger{background:var(--bg-surface-2);border-color:var(--accent-border);color:var(--text-primary)}
.ui-modal-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.ui-modal-stat{
 padding:11px 12px;border-radius:12px;background:var(--bg-surface-2);
 border:1px solid var(--border-light)
}
.ui-modal-stat span{display:block;font-size:10px;color:var(--text-muted);margin-bottom:4px}
.ui-modal-stat strong{font-size:15px;color:var(--text-primary)}
.ui-modal-actions{
 display:flex;justify-content:flex-end;gap:8px;padding:16px 24px;
 border-top:1px solid var(--border-light);background:var(--bg-surface)
}
.ui-modal-upload{
 display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;
 min-height:168px;padding:24px;text-align:center;cursor:pointer;
 border:1px dashed var(--border);border-radius:14px;background:var(--bg-surface-2)
}
.ui-modal-upload-title{font-size:15px;font-weight:700;color:var(--text-primary)}
.ui-modal-upload-copy{font-size:12px;line-height:1.5;color:var(--text-muted);max-width:420px}
.inline-edit-popup{
 display:none;position:fixed;z-index:600;
 min-width:250px;max-width:320px;padding:14px;
 border:1px solid var(--border);border-radius:14px;background:var(--bg-surface);
 box-shadow:0 18px 48px rgba(23, 23, 23,.22);backdrop-filter:blur(10px)
}
.inline-edit-popup-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.inline-edit-popup-title{font-size:12px;font-weight:700;color:var(--text-primary)}
.inline-edit-popup-close{
 width:24px;height:24px;border-radius:7px;border:1px solid var(--border);
 background:var(--bg-surface-2);color:var(--text-muted);cursor:pointer;
 display:flex;align-items:center;justify-content:center;font-size:14px
}
.inline-edit-popup-note{
 margin-bottom:10px;padding:10px 11px;border-radius:10px;background:var(--bg-surface-2);
 border:1px solid var(--border-light);font-size:11px;line-height:1.45;color:var(--text-secondary)
}
.segmented-mini{
 display:flex;gap:4px;padding:3px;border:1px solid var(--border);
 border-radius:10px;background:var(--bg-surface-2)
}
.segmented-mini button{
 flex:1;padding:6px 8px;border-radius:8px;border:1.5px solid transparent;
 background:transparent;color:var(--text-secondary);font-size:11px;font-weight:700;
 cursor:pointer;font-family:inherit
}
.segmented-mini button.is-active{background:var(--accent);border-color:var(--accent);color:#fff}
.calendar-modal .modal-body .card-title,
#modal-block .form-label{
 font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--text-muted)
}
.calendar-modal .modal-body .card-title{margin-bottom:10px!important}
.calendar-modal .modal-body .form-group,
#modal-block .form-group,
#modal-svc-block .form-group{margin-bottom:14px}
.calendar-modal .modal-body .form-input,
#modal-block .form-input,
#modal-svc-block .form-input{border-radius:10px;min-height:40px}
#modal-export-slots #exp-preview,
#block-slots-preview{border-radius:12px!important;padding:12px 14px!important}
#expense-popup,#payment-popup{
 border-radius:14px!important;box-shadow:0 18px 48px rgba(23, 23, 23,.22)!important;
 border-color:var(--border)!important;background:var(--bg-surface)!important
}
#expense-popup>div:first-child,
#payment-popup>div:first-child{
 display:flex;align-items:center;justify-content:space-between;gap:10px;
 margin-bottom:12px!important
}
#expense-popup>div:first-child>span,
#payment-popup>div:first-child>span{
 font-size:12px!important;font-weight:700!important;color:var(--text-primary)!important
}
#expense-popup>div:first-child>button,
#payment-popup>div:first-child>button{
 width:24px!important;height:24px!important;border-radius:7px!important;border:1px solid var(--border)!important;
 background:var(--bg-surface-2)!important;color:var(--text-muted)!important;
 display:flex!important;align-items:center!important;justify-content:center!important
}
#expense-popup>button:last-child,
#payment-popup>button:last-child{
 width:100%;border-radius:10px!important;font-weight:700!important
}
#payment-popup .segmented-mini{margin-top:2px}
#payment-popup .segmented-mini button{
 font-weight:700!important;border-radius:8px!important
}
#payment-popup-info{
 margin-bottom:10px!important;padding:10px 11px;border-radius:10px;background:var(--bg-surface-2);
 border:1px solid var(--border-light);font-size:11px;color:var(--text-secondary)
}
.order-wizard-modal{
 width:min(540px,96vw);
 min-height:min(700px,calc(100vh - 40px));
 max-height:calc(100vh - 40px);
 display:flex;
 flex-direction:column;
}
.order-wizard-head{
 padding:20px 22px 16px;
 background:linear-gradient(135deg,#1f1f1f 0%,#313131 100%);
 color:#fff;
 flex-shrink:0;
}
.order-wizard-top{
 display:flex;
 align-items:flex-start;
 justify-content:space-between;
 gap:14px;
 margin-bottom:16px;
}
.order-wizard-top-copy{min-width:0}
.order-wizard-kicker{
 font-size:9px;
 font-weight:700;
 letter-spacing:.14em;
 text-transform:uppercase;
 color:rgba(255,255,255,.56);
 margin-bottom:5px;
}
.order-wizard-title-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.order-wizard-progress{
 display:flex;
 align-items:center;
 margin-bottom:14px;
 padding:0 2px;
}
.order-wizard-assignee-row{
 display:grid;
 grid-template-columns:1fr 1fr;
 gap:8px;
}
.order-wizard-body{
 flex:1;
 position:relative;
 overflow:hidden;
 min-height:0;
 background:linear-gradient(180deg,var(--bg-surface) 0%,var(--bg-surface-2) 100%);
}
.order-wizard-step{
 position:absolute;
 inset:0;
 padding:18px 20px;
 overflow-y:auto;
}
.order-wizard-step-title{
 font-size:11px;
 font-weight:700;
 text-transform:uppercase;
 letter-spacing:.08em;
 color:var(--text-muted);
 margin-bottom:12px;
}
.order-wizard-step-card{
 padding:12px 14px;
 border-radius:12px;
 border:1px solid var(--border-light);
 background:var(--bg-surface);
 box-shadow:0 8px 20px rgba(23, 23, 23,.05);
}
.order-wizard-footer{
 display:flex;
 align-items:center;
 justify-content:space-between;
 padding:14px 20px;
 border-top:1px solid var(--border);
 background:var(--bg-surface);
 flex-shrink:0;
}
.order-wizard-footer-meta{display:flex;align-items:center;gap:8px}
.order-wizard-footer-actions{display:flex;gap:8px}
.eo-modal{width:min(620px,96vw);max-height:calc(100vh - 44px);display:flex;flex-direction:column}
.eo-modal-head{
 display:flex;
 align-items:flex-start;
 justify-content:space-between;
 gap:14px;
 padding:20px 22px 16px;
 background:linear-gradient(135deg,#1f1f1f 0%,#313131 100%);
 color:#fff;
 flex-shrink:0;
}
.eo-modal-head-main{display:flex;align-items:center;gap:12px;min-width:0}
.eo-modal-head-copy{min-width:0}
.eo-modal-kicker{
 font-size:9px;
 font-weight:700;
 letter-spacing:.14em;
 text-transform:uppercase;
 color:rgba(255,255,255,.56);
 margin-bottom:4px;
}
.eo-modal-head-meta{display:flex;align-items:center;gap:10px}
.eo-modal-status{
 font-size:11px;
 padding:4px 10px;
 border-radius:999px;
 border:1px solid rgba(255,255,255,.12);
 background:rgba(255,255,255,.08);
 color:#fff;
 font-family:inherit;
 cursor:pointer;
}
.eo-modal-body{
 overflow-y:auto;
 padding:20px 22px;
 display:flex;
 flex-direction:column;
 gap:18px;
 flex:1;
 background:linear-gradient(180deg,var(--bg-surface) 0%,var(--bg-surface-2) 100%);
}
.eo-section{
 padding:14px;
 border:1px solid var(--border-light);
 border-radius:14px;
 background:var(--bg-surface);
 box-shadow:0 10px 24px rgba(23, 23, 23,.04);
}
.eo-section-title{
 font-size:10px;
 font-weight:700;
 text-transform:uppercase;
 letter-spacing:.09em;
 color:var(--text-muted);
 margin-bottom:8px;
}
.eo-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.eo-grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.eo-field{min-width:0}
.eo-field label{
 display:block;
 margin-bottom:6px;
 font-size:10px;
 font-weight:700;
 text-transform:uppercase;
 letter-spacing:.07em;
 color:var(--text-muted);
}
.eo-input,
.eo-select,
.eo-textarea{
 width:100%;
 box-sizing:border-box;
 padding:10px 12px;
 border:1px solid var(--border);
 border-radius:10px;
 background:var(--bg-surface);
 color:var(--text-primary);
 font-family:inherit;
 font-size:13px;
}
.eo-textarea{resize:none;min-height:74px}
.eo-input-wrap{
 display:flex;
 align-items:center;
 gap:6px;
 padding:9px 10px;
 border:1px solid var(--border);
 border-radius:10px;
 background:var(--bg-surface);
}
.eo-input-wrap.is-soft{background:var(--bg-surface-2)}
.eo-input-wrap input{
 flex:1;
 width:0;
 border:none;
 background:transparent;
 color:var(--text-primary);
 font-family:inherit;
 outline:none;
}
.eo-input-wrap strong{
 color:var(--accent);
 font-size:13px;
 font-weight:700;
}
.eo-input-wrap span{
 font-size:11px;
 color:var(--text-muted);
 flex-shrink:0;
}
.eo-service-row{display:flex;gap:8px;align-items:stretch}
.eo-service-price{
 display:flex;
 align-items:center;
 gap:6px;
 padding:0 10px;
 border:1px solid var(--border);
 border-radius:10px;
 background:var(--bg-surface);
 flex-shrink:0;
}
.eo-service-price input{
 width:74px;
 text-align:right;
 border:none;
 background:transparent;
 color:var(--accent);
 font-size:13px;
 font-weight:700;
 font-family:inherit;
 outline:none;
}
.eo-footer{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:10px;
 padding:14px 22px;
 border-top:1px solid var(--border);
 background:var(--bg-surface);
 flex-shrink:0;
}
@media(max-width:760px){
 .order-wizard-assignee-row,.eo-grid-2,.eo-grid-3{grid-template-columns:1fr}
 .order-wizard-footer,.eo-footer{flex-wrap:wrap}
 .order-wizard-footer-actions,.eo-footer>div:last-child{width:100%}
 .order-wizard-footer-actions .btn,.eo-footer>div:last-child button{flex:1}
 .eo-service-row{flex-direction:column}
 .eo-service-price{width:100%;justify-content:space-between;padding:10px 12px}
}
#order-modal-box{
 width:min(540px,96vw)!important;
 min-height:min(700px,calc(100vh - 40px));
}
#order-modal-box>div:first-child{
 background:linear-gradient(135deg,#1f1f1f 0%,#313131 100%)!important;
 padding:20px 22px 16px!important;
}
#order-modal-box>div:first-child>div:first-child{
 margin-bottom:16px!important;
 align-items:flex-start!important;
}
#order-modal-title-display{font-size:17px!important}
#wiz-step-1,#wiz-step-2,#wiz-step-3,#wiz-step-4,#wiz-step-5{
 padding:18px 20px!important;
 background:linear-gradient(180deg,var(--bg-surface) 0%,var(--bg-surface-2) 100%);
}
#wiz-step-1>div:first-child,#wiz-step-5>div:first-child{
 margin-bottom:2px;
 font-size:11px!important;
 font-weight:700!important;
 letter-spacing:.08em!important;
 text-transform:uppercase!important;
 color:var(--text-muted)!important;
}
#wiz-summary-client,#wiz-summary-services,#wiz-summary-payment,#wiz-summary-datetime{
 box-shadow:0 10px 24px rgba(23, 23, 23,.04);
}
#modal-order #wiz-assignee-row{gap:8px!important}
#modal-order #wiz-assignee-row button{
 min-height:42px;
 box-shadow:0 10px 20px rgba(23, 23, 23,.08);
}
#order-modal-box>div:last-child{
 padding:14px 20px!important;
 background:var(--bg-surface)!important;
}
#modal-edit-order>.modal{
 width:min(620px,96vw)!important;
}
#modal-edit-order>.modal>div:first-child{
 padding:20px 22px 16px!important;
 background:linear-gradient(135deg,#1f1f1f 0%,#313131 100%);
 border-bottom:none!important;
}
#modal-edit-order>.modal>div:first-child #eo-client-name{
 color:#fff!important;
 font-size:17px!important;
}
#modal-edit-order>.modal>div:first-child #eo-order-meta{
 color:rgba(255,255,255,.68)!important;
 font-size:12px!important;
}
#modal-edit-order>.modal>div:first-child #eo-status{
 border-color:rgba(255,255,255,.14)!important;
 background:rgba(255,255,255,.08)!important;
 color:#fff!important;
 padding:4px 10px!important;
}
.eo-status-dd{position:relative;z-index:30}
.eo-status-dd-btn{
 height:32px;
 min-width:112px;
 padding:0 10px 0 11px;
 border:1px solid rgba(255,255,255,.14);
 border-radius:11px;
 background:rgba(255,255,255,.08);
 color:#fff;
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:8px;
 font-family:inherit;
 font-size:11px;
 font-weight:700;
 line-height:1;
 cursor:pointer;
}
.eo-status-dd-btn span:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#eo-status-dd-dot{width:7px;height:7px;border-radius:50%;background:rgba(255,255,255,.5);flex:0 0 auto}
.eo-status-dd-menu{
 display:none;
 position:absolute;
 right:0;
 top:calc(100% + 8px);
 width:180px;
 max-height:260px;
 overflow:auto;
 padding:6px;
 border:1px solid var(--border);
 border-radius:12px;
 background:var(--bg-surface);
 box-shadow:0 18px 45px rgba(23, 23, 23,.22);
 z-index:220;
}
.eo-status-dd.open .eo-status-dd-menu{display:block}
.eo-status-dd-option{
 width:100%;
 min-height:34px;
 padding:7px 9px;
 border:0;
 border-radius:8px;
 background:transparent;
 color:var(--text-primary);
 display:flex;
 align-items:center;
 gap:8px;
 text-align:left;
 font-family:inherit;
 font-size:12px;
 font-weight:700;
 line-height:1.15;
 cursor:pointer;
}
.eo-status-dd-option:hover{background:var(--bg-surface-2)}
.eo-status-dd-option.active{background:var(--accent-light);color:var(--accent)}
.eo-status-dd-option i{width:8px;height:8px;border-radius:50%;flex:0 0 auto}
#modal-edit-order>.modal>div:first-child>div:last-child>button{
 background:rgba(255,255,255,.08)!important;
 border:none!important;
 color:#fff!important;
 border-radius:10px!important;
 width:32px!important;
 height:32px!important;
}
#modal-edit-order>.modal>div:nth-child(2){
 padding:20px 22px!important;
 gap:18px!important;
 background:linear-gradient(180deg,var(--bg-surface) 0%,var(--bg-surface-2) 100%);
}
#modal-edit-order>.modal>div:nth-child(2)>div{
 padding:14px;
 border:1px solid var(--border-light);
 border-radius:14px;
 background:var(--bg-surface);
 box-shadow:0 10px 24px rgba(23, 23, 23,.04);
}
#modal-edit-order>.modal>div:nth-child(2)>div>div:first-child{
 font-size:10px!important;
 font-weight:700!important;
 text-transform:uppercase!important;
 letter-spacing:.09em!important;
 color:var(--text-muted)!important;
 margin-bottom:8px!important;
}
#modal-edit-order>#eo-addr-grid{grid-template-columns:2fr 1fr}
#modal-edit-order>.modal>div:last-child{
 padding:14px 22px!important;
 background:var(--bg-surface)!important;
}
@media(max-width:760px){
 #modal-edit-order>.modal>div:nth-child(2)>div:nth-child(2),
 #modal-edit-order>.modal>div:nth-child(2)>div:nth-child(5){
  grid-template-columns:1fr!important;
 }
 #eo-addr-grid{grid-template-columns:1fr!important}
}
@media(max-width:760px){
 .ui-modal-grid,.ui-modal-grid.ui-modal-grid-3,.ui-modal-stats{grid-template-columns:1fr}
 .ui-modal-head,.ui-modal-body,.ui-modal-actions{padding-left:18px;padding-right:18px}
 .ui-modal-actions{flex-wrap:wrap}
 .ui-modal-actions .btn{flex:1}
 .modal-footer{flex-wrap:wrap}
 .modal-footer .btn{flex:1}
}
.debt-import-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:16px}
@media(max-width:720px){.debt-import-grid{grid-template-columns:1fr 1fr}}
@media(max-width:480px){.debt-import-grid{grid-template-columns:1fr}}
.debt-card-modal{width:840px;max-width:96vw;max-height:94vh;overflow:auto}
.debt-card-header{position:relative;display:flex;align-items:center;gap:14px;padding:22px 24px;color:#fff;background:linear-gradient(135deg,#1f1f1f 0%,#313131 100%);border-radius:var(--radius-xl) var(--radius-xl) 0 0}
.debt-card-header-icon{width:42px;height:42px;display:flex;align-items:center;justify-content:center;border-radius:12px;color:#fff;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.12)}
.debt-card-eyebrow{font-size:9px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:rgba(255,255,255,.55);margin-bottom:3px}
.debt-card-title{font-size:18px;font-weight:700;line-height:1.2}.debt-card-subtitle{font-size:11px;color:rgba(255,255,255,.6);margin-top:3px}
.debt-card-close{position:absolute;right:16px;top:14px;width:30px;height:30px;border:0;border-radius:8px;background:rgba(255,255,255,.08);color:#fff;font-size:20px;line-height:1;cursor:pointer}.debt-card-close:hover{background:rgba(255,255,255,.16)}
.debt-card-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(230px,.85fr);gap:0}
.debt-card-form{padding:22px 24px}.debt-card-summary{padding:22px;background:var(--bg-surface-2);border-left:1px solid var(--border-light)}
.debt-card-section-title{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text-secondary);margin:0 0 12px}
.debt-card-section-title:not(:first-child){margin-top:20px}.debt-card-section-title span{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:7px;background:var(--accent-light);color:var(--accent);font-size:9px}
.debt-card-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.debt-card-field{min-width:0}.debt-card-field-wide{margin-bottom:12px}
.debt-card-field label{display:flex;justify-content:space-between;gap:8px;font-size:11px;font-weight:600;color:var(--text-secondary);margin-bottom:5px}.debt-card-field label em{font-size:9px;font-weight:500;font-style:normal;color:var(--text-muted)}
.debt-card-field .input{width:100%;height:38px;box-sizing:border-box;border-color:var(--border);border-radius:8px;background:var(--bg-surface);color:var(--text-primary)}
.debt-card-field .input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-light);outline:none}
.debt-card-input-unit{position:relative}.debt-card-input-unit .input{padding-right:48px}.debt-card-input-unit b{position:absolute;right:11px;top:50%;transform:translateY(-50%);font-size:10px;font-weight:700;color:var(--text-muted);pointer-events:none}
.debt-card-summary-kicker{font-size:9px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--text-muted);margin-bottom:10px}
.debt-card-summary-main{padding:14px;border-radius:12px;background:linear-gradient(135deg,#1f1f1f,#373737);color:#fff}.debt-card-summary-main span,.debt-card-summary-grid span{display:block;font-size:10px;color:rgba(255,255,255,.58);margin-bottom:5px}.debt-card-summary-main strong{font-size:22px}
.debt-card-summary-grid{display:grid;gap:8px;margin-top:9px}.debt-card-summary-grid>div{padding:11px 12px;border:1px solid var(--border-light);border-radius:10px;background:var(--bg-surface)}.debt-card-summary-grid span{color:var(--text-muted)}.debt-card-summary-grid strong{font-size:13px;color:var(--text-primary)}
.debt-card-coverage{margin-top:16px}.debt-card-coverage>div:first-child{display:flex;justify-content:space-between;gap:8px;font-size:9px;color:var(--text-muted);margin-bottom:6px}.debt-card-coverage-track{height:5px;border-radius:4px;background:var(--border-light);overflow:hidden}.debt-card-coverage-track i{display:block;width:0;height:100%;border-radius:4px;background:var(--accent);transition:width .2s}
.debt-card-note{margin-top:14px;padding:10px 11px;border-radius:9px;background:var(--accent-light);color:var(--text-secondary);font-size:10px;line-height:1.5}.debt-card-note.is-danger{background:var(--bg-surface-2);color:var(--text-primary)}
.debt-card-footer{display:flex;justify-content:flex-end;gap:8px;padding:15px 24px;border-top:1px solid var(--border-light);background:var(--bg-surface);border-radius:0 0 var(--radius-xl) var(--radius-xl)}.debt-card-save{min-width:180px}
body.dark .debt-card-note.is-danger{background:var(--bg-surface-2);color:var(--text-primary)}
@media(max-width:760px){.debt-card-layout{grid-template-columns:1fr}.debt-card-summary{border-left:0;border-top:1px solid var(--border-light)}}
@media(max-width:520px){.debt-card-grid{grid-template-columns:1fr}.debt-card-form,.debt-card-summary{padding:18px}.debt-card-header{padding:18px}.debt-card-footer{padding:14px 18px}.debt-card-save{min-width:0}}
@keyframes fadeIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
.settings-card .drag-handle {
 position:absolute;top:14px;right:14px;
 width:20px;height:20px;cursor:grab;
 color:var(--border);opacity:0;
 transition:opacity .15s;
 display:flex;align-items:center;justify-content:center;
 z-index:2
}
.settings-card:hover .drag-handle { opacity:1 }
.settings-card .drag-handle:active { cursor:grabbing }
.settings-drop-gap {
 height:4px;border-radius:2px;
 background:var(--accent);
 display:none;margin:-10px 0;
 position:relative;z-index:10
}
.settings-drop-gap.active { display:block }

.client-filter-btn {
 padding:5px 10px;border:none;border-radius:var(--radius-sm);font-size:11px;font-weight:600;
 cursor:pointer;transition:all .14s;background:transparent;color:var(--text-secondary);
 white-space:nowrap;
}
.client-filter-btn:hover { color:var(--text-primary); }
.client-filter-btn.active { background:linear-gradient(135deg,var(--accent-strong) 0%,var(--accent) 100%);color:var(--accent-contrast,#fff);border-color:var(--accent-strong); }

.rel-badge {
 display:inline-flex;align-items:center;gap:4px;
 height:28px;padding:0 10px;border-radius:var(--radius-sm);font-size:11px;font-weight:600;
 border:1px solid;cursor:pointer;transition:all .14s;
 white-space:nowrap;
}
.rel-new { background:#f1f1f1;border-color:#dbdbdb;color:#5b5b5b }
.rel-active { background:#f0f0f0;border-color:#dcdcdc;color:#4f4f4f }
.rel-regular { background:#f1f1f1;border-color:#dfdfdf;color:#585858 }
.rel-vip { background:#f4f4f4;border-color:#e1e1e1;color:#636363 }
.rel-sleeping { background:#f4f4f4;border-color:#d5d5d5;color:#727272 }

.dark .rel-new { background:#292929;border-color:#494949;color:#b2b2b2 }
.dark .rel-active { background:#2b2b2b;border-color:#545454;color:#d6d6d6 }
.dark .rel-regular { background:#2b2b2b;border-color:#505050;color:#c1c1c1 }
.dark .rel-vip { background:#2c2c2c;border-color:#616161;color:#dddddd }
.dark .rel-sleeping { background:#252525;border-color:#434343;color:#a2a2a2 }

.order-view-btn {
 padding:5px 8px;border:none;border-radius:6px;cursor:pointer;
 background:transparent;color:var(--text-muted);transition:all .14s;
 display:flex;align-items:center;
}
.order-view-btn.active { background:linear-gradient(135deg,var(--accent-strong) 0%,var(--accent) 100%);color:var(--accent-contrast,#fff);border-color:var(--accent-strong); }
.order-view-btn:hover:not(.active) { color:var(--text-primary); }

.sort-th { cursor:pointer;user-select:none;white-space:nowrap }
.sort-th:hover { color:var(--accent) }
.sort-icon { margin-left:4px;font-size:10px;opacity:.5 }
.sort-icon.asc::after { content:'↑' }
.sort-icon.desc::after { content:'↓' }

/* Настройка колонок таблицы заказов */
.col-hidden { display:none }
table.orders-cols-applied .col-assignee { display:none }
table.orders-cols-applied .col-source   { display:none }
table.orders-cols-applied .col-address  { display:none }
table.orders-cols-applied .col-expenses { display:none }

/* Дропдаун выбора колонок */
.col-picker-drop {
 position:absolute;top:calc(100% + 4px);right:0;z-index:300;
 background:var(--bg-surface);border:1px solid var(--border);
 border-radius:var(--radius-lg);box-shadow:0 4px 16px rgba(0,0,0,.1);
 padding:6px;min-width:190px;display:none;
}
.col-picker-drop.open { display:block; }
.col-picker-item {
 display:flex;align-items:center;gap:8px;
 padding:7px 10px;border-radius:6px;
 font-size:12px;cursor:pointer;
 color:var(--text-primary);transition:background .1s;
 border:none;background:none;width:100%;text-align:left;
}
.col-picker-item:hover { background:var(--bg-surface-2); }
.col-picker-check {
 width:15px;height:15px;border-radius:4px;flex-shrink:0;
 border:1.5px solid var(--border);background:var(--bg-surface);
 display:flex;align-items:center;justify-content:center;transition:all .12s;
}
.col-picker-check.on {
 background:var(--accent);border-color:var(--accent);
}
.col-picker-check.on::after {
 content:'';display:block;width:4px;height:7px;
 border:1.5px solid #fff;border-top:none;border-left:none;
 transform:rotate(45deg) translate(-1px,-1px);
}
.of-chip {
 display:inline-flex;align-items:center;gap:5px;
 padding:3px 6px 3px 10px;
 background:var(--accent-light);
 border:1px solid var(--accent-border);
 border-radius:20px;
 font-size:11px;font-weight:600;
 color:var(--accent);
 white-space:nowrap;cursor:default;
}
.of-chip-x {
 display:flex;align-items:center;justify-content:center;
 width:18px;height:18px;border-radius:50%;
 border:none;background:rgba(0,0,0,.06);cursor:pointer;
 font-size:14px;line-height:1;color:var(--accent);
 opacity:.7;padding:0;transition:opacity .12s,background .12s;
 flex-shrink:0;position:relative;z-index:1;
}

/* ===== Monochrome polish pass ===== */

/* Tables */
.table-wrap{
 border-radius:16px;
 box-shadow:0 10px 30px rgba(23, 23, 23,.05);
}
table{
 font-size:12.5px;
 line-height:1.45;
}
th{
 padding:11px 16px;
 font-size:10px;
 font-weight:800;
 letter-spacing:.08em;
 color:var(--text-muted);
 background:linear-gradient(180deg,var(--bg-surface-2),var(--bg-surface));
 border-bottom:1px solid var(--border-light);
}
td{
 padding:12px 16px;
 color:var(--text-primary);
}
tbody tr:nth-child(even) td{
 background:color-mix(in srgb,var(--bg-surface) 90%, var(--bg-surface-2) 10%);
}
tr:hover td{
 background:color-mix(in srgb,var(--accent-light) 26%, var(--bg-surface) 74%);
}
.cl-row td{
 padding-top:11px;
 padding-bottom:11px;
}
.client-name,
.svc-item-label,
.svc-nav-name,
.ua-user-text strong{
 font-weight:600;
 letter-spacing:-.01em;
}
.empty-row td{
 padding:40px 24px;
 font-size:12px;
}

/* Icons */
.nav-icon,
.settings-nav-icon{
 opacity:.72;
}
.nav-item.active .nav-icon,
.settings-nav-btn.active .settings-nav-icon{
 opacity:1;
}
.icon-btn,
.btn-icon,
.cal-nav-btn{
 width:30px;
 height:30px;
 border-radius:9px;
}
.icon-btn svg,
.btn-icon svg,
.settings-nav-icon svg,
.svc-nav-icon svg,
.order-card-icon svg,
.svc-hero-icon svg{
 width:16px;
 height:16px;
}
.order-card-icon,
.svc-hero-icon{
 box-shadow:inset 0 1px 0 rgba(255,255,255,.4);
}
.order-card-icon,
.svc-nav-btn.active .svc-nav-icon,
.svc-hero-icon{
 color:var(--accent-strong,var(--accent));
}
.svc-nav-btn.active .svc-nav-count{
 background:var(--accent-strong,var(--accent));
 color:var(--accent-contrast,#fff);
}

/* Kanban / finance surfaces */
.kanban-col{
 border:1px solid var(--border);
 background:linear-gradient(180deg,var(--bg-surface-2),var(--bg-surface));
 box-shadow:0 8px 24px rgba(23, 23, 23,.04);
}
.kanban-col-header{
 border-bottom:1px solid var(--border-light);
}
.kanban-card{
 border-radius:12px;
 box-shadow:0 4px 14px rgba(23, 23, 23,.04);
}
.debt-card-summary-main,
.debt-card-header,
#order-modal-box>div:first-child,
#modal-edit-order>.modal>div:first-child,
.ui-modal-head,
.modal-header{
 background:linear-gradient(135deg,var(--accent-strong,var(--accent)) 0%, var(--accent) 100%) !important;
 color:var(--accent-contrast,#fff);
}
.debt-card-header-icon,
.ui-modal-close,
.modal-close,
.debt-card-close{
 background:rgba(255,255,255,.12);
 border:1px solid rgba(255,255,255,.14);
}

/* Final dark theme alignment */
body.dark{
 --bg-app:#1b1b1b;
 --bg-surface:#242424;
 --bg-surface-2:#2c2c2c;
 --bg-surface-3:#373737;
 --border:#414141;
 --border-light:#373737;
 --text-primary:#f1f1f1;
 --text-secondary:#c1c1c1;
 --text-muted:#929292;
 --accent:#b7b7b7;
 --accent-hover:#c7c7c7;
 --accent-light:#313131;
 --accent-border:#595959;
 --accent-strong:#dcdcdc;
 --accent-contrast:#1a1a1a;
 --user-primary:var(--accent);
 --user-light:var(--accent-light);
}
body.dark .topbar{
 background:rgba(27, 27, 27,.9);
 backdrop-filter:blur(16px);
}
body.dark #sidebar{
 background:#1f1f1f;
}
body.dark .card,
body.dark .table-wrap,
body.dark .ua-users,
body.dark .ua-editor,
body.dark .svc-hero,
body.dark .svc-metric,
body.dark .kanban-col{
 box-shadow:inset 0 1px 0 rgba(255,255,255,.03),0 10px 28px rgba(0,0,0,.28);
}
body.dark th{
 background:linear-gradient(180deg,var(--bg-surface-2),var(--bg-surface));
 color:var(--text-muted);
 border-bottom-color:var(--border-light);
}
body.dark tbody tr:nth-child(even) td{
 background:color-mix(in srgb,var(--bg-surface) 90%, var(--bg-surface-2) 10%);
}
body.dark tr:hover td{
 background:color-mix(in srgb,var(--accent-light) 40%, var(--bg-surface) 60%);
}
body.dark .btn-primary,
body.dark .btn.active,
body.dark .cal-view-btn.active,
body.dark .dash-period-btn.active,
body.dark .order-view-btn.active,
body.dark .filter-btn.active,
body.dark .client-filter-btn.active,
body.dark #of-quick-month.active-month{
 background:linear-gradient(135deg,var(--accent-strong,var(--accent)) 0%, var(--accent) 100%) !important;
 border-color:var(--accent-border) !important;
 color:var(--accent-contrast,#1a1a1a) !important;
}
body.dark .btn-primary:hover,
body.dark .btn.active:hover,
body.dark .cal-view-btn.active:hover,
body.dark .dash-period-btn.active:hover,
body.dark .order-view-btn.active:hover,
body.dark .filter-btn.active:hover,
body.dark .client-filter-btn.active:hover{
 background:linear-gradient(135deg,var(--accent) 0%, var(--accent-hover) 100%) !important;
}
body.dark .svc-nav-btn.active,
body.dark .settings-nav-btn.active,
body.dark .ua-user-card.active{
 background:color-mix(in srgb,var(--accent-light) 78%, var(--bg-surface) 22%);
 border-color:var(--accent-border);
}
body.dark .svc-nav-btn.active .svc-nav-name,
body.dark .settings-nav-btn.active,
body.dark .settings-nav-btn.active .settings-nav-icon,
body.dark .ua-owner-badge{
 color:var(--accent-strong,var(--accent));
}
.of-chip-x:hover { opacity:1;background:rgba(0,0,0,.12); }
.of-chip-reset {
 display:inline-flex;align-items:center;gap:4px;
 padding:3px 10px;border-radius:20px;
 border:1px solid var(--border);background:none;
 font-size:11px;font-weight:500;color:var(--text-muted);
 cursor:pointer;transition:all .12s;
}
.of-chip-reset:hover { border-color:var(--accent);color:var(--accent); }
/* Лейбл-заголовок секции в модалке заказа */
.om-lbl { font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--text-muted);margin-bottom:8px; }
/* Лейбл в booking-модалке */
.bm-lbl { font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--text-muted);margin-bottom:6px; }

/* ── Двухуровневый селектор услуг (вариант 2) ── */
.svc2-wrap { display:grid;grid-template-columns:148px 1fr;gap:0;border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden;height:270px;max-height:270px }
.svc2-cats { background:var(--bg-surface-2);border-right:1px solid var(--border);overflow-y:auto;padding:5px;scrollbar-width:thin;height:100% }
.svc2-cat-btn { display:flex;align-items:center;justify-content:space-between;width:100%;padding:7px 9px;border:none;border-radius:6px;background:none;cursor:pointer;font-size:11px;font-weight:500;color:var(--text-secondary);text-align:left;transition:all .12s;line-height:1.35;gap:5px }
.svc2-cat-btn:hover { background:var(--bg-surface-3);color:var(--text-primary) }
.svc2-cat-btn.active { background:var(--accent-light);color:var(--accent);border:1px solid var(--accent-border) }
.svc2-cat-cnt { flex-shrink:0;min-width:16px;height:16px;border-radius:8px;background:var(--accent);color:#fff;font-size:9px;font-weight:700;display:flex;align-items:center;justify-content:center;padding:0 4px }
.svc2-items { background:var(--bg-surface);overflow-y:auto;scrollbar-width:thin;height:100%;display:flex;flex-direction:column }
.svc2-item { display:flex;align-items:center;gap:9px;padding:8px 12px;border-bottom:1px solid var(--border-light);cursor:pointer;transition:background .1s;user-select:none }
.svc2-item:last-child { border-bottom:none }
.svc2-item:hover { background:var(--bg-surface-2) }
.svc2-item.selected { background:var(--accent-light) }
.svc2-chk { flex-shrink:0;width:15px;height:15px;border-radius:4px;border:1.5px solid var(--border);background:var(--bg-surface);display:flex;align-items:center;justify-content:center;transition:all .12s }
.svc2-chk.on { background:var(--accent);border-color:var(--accent) }
.svc2-chk.on::after { content:'';display:block;width:4px;height:7px;border:1.5px solid #fff;border-top:none;border-left:none;transform:rotate(45deg) translate(-1px,-1px) }
.svc2-item-name { flex:1;font-size:12px;font-weight:500;color:var(--text-primary) }
.svc2-item-meta { font-size:10px;color:var(--text-muted);text-align:right;line-height:1.4 }
.svc2-footer { display:flex;align-items:center;flex-wrap:wrap;gap:4px;padding:6px 10px;background:var(--bg-surface-2);border-top:1px solid var(--border);min-height:32px;border-radius:0 0 var(--radius-lg) var(--radius-lg) }

/* Колоночные фильтры */
.col-th { white-space:nowrap;position:relative }
.col-th-inner { display:flex;align-items:center;gap:4px;cursor:pointer;user-select:none }
.col-th-inner:hover { color:var(--accent) }
.col-filter-btn {
 display:inline-flex;align-items:center;justify-content:center;
 width:16px;height:16px;border:none;background:none;cursor:pointer;
 border-radius:3px;padding:0;flex-shrink:0;opacity:.4;transition:all .12s;
 color:var(--text-muted);
}
.col-filter-btn:hover,.col-filter-btn.active { opacity:1;color:var(--accent) }
.col-filter-btn.active { background:var(--accent-light) }
.col-filter-drop {
 display:none;position:absolute;top:calc(100% + 2px);left:0;z-index:300;
 background:var(--bg-surface);border:1px solid var(--border);
 border-radius:8px;box-shadow:0 4px 16px rgba(0,0,0,.12);
 min-width:180px;max-width:260px;padding:6px;
 max-height:280px;overflow-y:auto;
}
.col-filter-drop.open { display:block }
.col-filter-drop.right { left:auto;right:0 }
.col-fopt {
 display:flex;align-items:center;gap:7px;padding:5px 8px;border-radius:5px;
 font-size:12px;cursor:pointer;color:var(--text-primary);transition:background .1s;
 border:none;background:none;width:100%;text-align:left;
}
.col-fopt:hover { background:var(--bg-surface-2) }
.col-fopt.active { background:var(--accent-light);color:var(--accent);font-weight:600 }
.col-fopt-dot { width:8px;height:8px;border-radius:50%;flex-shrink:0 }

.debt-cell { color:var(--text-primary);font-weight:700 }
.debt-cell.paid { color:var(--text-primary) }

.kanban-col {
 min-width:240px;max-width:240px;flex-shrink:0;
 background:var(--bg-surface-2);border-radius:var(--radius-lg);
 border:1px solid var(--border);overflow:hidden;
}
.kanban-col-header {
 padding:10px 12px;font-size:12px;font-weight:700;
 display:flex;align-items:center;justify-content:space-between;
 border-bottom:1px solid var(--border);
 background:linear-gradient(180deg,var(--bg-surface) 0%,var(--bg-surface-2) 100%);
}
.kanban-col-body { padding:8px;display:flex;flex-direction:column;gap:6px;min-height:60px }
.kanban-card {
 background:var(--bg-surface);border:1px solid var(--border);border-radius:var(--radius-md);
 padding:10px 12px;cursor:pointer;transition:box-shadow .14s,border-color .14s;
 border-left:3px solid transparent;
}
.kanban-card:hover { box-shadow:var(--shadow-md);border-color:var(--accent-border);transform:translateY(-1px) }
.kanban-card.drag-over-card { border-color:var(--accent);border-style:dashed;background:var(--accent-light) }

.pay-inline-btn {
 font-size:10px;padding:2px 7px;border-radius:10px;border:1px solid var(--border);
 background:var(--bg-surface-2);color:var(--text-primary);cursor:pointer;font-weight:600;
 transition:all .12s;white-space:nowrap;
}
.pay-inline-btn:hover { background:var(--accent-light);border-color:var(--accent-border);color:var(--text-primary) }

/* Кнопка «Принять» в таблице заказов */
.col-drag { cursor: grab; user-select: none; }
.col-drag:active { cursor: grabbing; }
.col-drag.drag-over { background: var(--accent-light) !important; outline: 2px dashed var(--accent); outline-offset: -2px; }
.col-drag.dragging { opacity: .4; }
/* Кнопка «Принять» в таблице заказов — БАГ FIX: отсутствовал открывающий селектор */
.pay-accept-btn {
 display:inline-flex;align-items:center;gap:4px;
 padding:3px 8px;border:none;border-radius:5px;
 background:var(--text-primary);color:var(--bg-surface);
 font-size:11px;font-weight:600;cursor:pointer;
 white-space:nowrap;line-height:1.3;transition:background .12s;
}
.pay-accept-btn:hover { background:var(--accent-strong,var(--accent)); }

.svc-block-card {
 background:var(--bg-surface);border:1px solid transparent;
 border-radius:var(--radius-lg);padding:10px 12px;
 transition:box-shadow .18s;position:relative;
 box-shadow:var(--shadow-sm);
}
.svc-block-card:hover { box-shadow:var(--shadow-md) }
.svc-block-open { border-color:var(--accent);box-shadow:0 4px 20px rgba(96, 96, 96,.1) }
.svc-block-card.svc-drag-target {
 border-color:var(--accent);border-style:dashed;background:var(--accent-light);
}
.svc-drag-handle {
 width:20px;height:20px;border-radius:4px;
 display:flex;align-items:center;justify-content:center;
 color:var(--border);cursor:grab;flex-shrink:0;
 transition:color .14s;
}
.svc-drag-handle:hover { color:var(--text-muted) }
.svc-drag-handle:active { cursor:grabbing }

/* === Таблица услуг (Вариант А) === */
.svc-tbl-head {
 display:grid;grid-template-columns:28px 1fr 100px 86px 86px 28px 28px 28px;
 padding:9px 14px;background:var(--bg-surface-2);
 border-bottom:1px solid var(--border);position:sticky;top:0;z-index:5
}
.svc-tbl-head span { font-size:10px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:.07em }
.svc-section-row {
 display:flex;align-items:center;gap:10px;
 padding:9px 14px;background:var(--bg-surface-2);
 border-bottom:1px solid var(--border);cursor:pointer;user-select:none;
 transition:background .12s
}
.svc-section-row:hover { background:var(--accent-light); background:color-mix(in srgb,var(--accent-light) 80%,var(--bg-surface-2)) }
.svc-data-row {
 display:grid;grid-template-columns:28px 1fr 100px 86px 86px 28px 28px 28px;
 align-items:center;column-gap:8px;padding:6px 14px;
 border-bottom:1px solid var(--border-light);transition:background .1s
}
.svc-data-row:hover { background:var(--bg-surface-2) }
.svc-data-row.svc-inactive { opacity:.45 }
.svc-data-row.svc-inactive .svc-name-text { text-decoration:line-through }
.svc-add-row { padding:8px 14px;border-bottom:1px solid var(--border-light) }
.svc-inline-form { padding:12px 14px;background:var(--bg-surface-2);border-bottom:1px solid var(--border);display:none }
.svc-icon-btn {
 position:relative;width:40px;height:40px;min-width:40px;min-height:40px;padding:0;border-radius:10px;border:1px solid #d7d7d7;
 background:var(--bg-surface);color:var(--text-secondary);cursor:pointer;font:inherit;
 display:flex;align-items:center;justify-content:center;transition:border-color .12s,background .12s,color .12s,box-shadow .12s
}
.svc-icon-btn::before { content:"";position:absolute;inset:-2px }
.svc-icon-btn:hover { border-color:#9e9e9e;color:var(--text-primary);background:var(--bg-surface-2);box-shadow:0 5px 14px rgba(23, 23, 23,.08) }
.svc-icon-btn:focus-visible { outline:none;border-color:#9e9e9e;box-shadow:0 0 0 3px rgba(40, 40, 40,.08) }
.svc-icon-btn.is-inactive { border-color:#fca5a5;background:#fff1f2;color:#dc2626 }
.svc-icon-btn.svc-danger { border-color:#d7d7d7;background:var(--bg-surface);color:var(--text-secondary) }
.svc-icon-btn.svc-danger:hover { border-color:#fca5a5;background:#fff1f2;color:#dc2626 }
body.dark .svc-icon-btn { border-color:var(--border);background:var(--bg-surface);color:var(--text-secondary) }
body.dark .svc-icon-btn:hover { border-color:#838383;background:var(--bg-surface-2);color:var(--text-primary) }
body.dark .svc-icon-btn.is-inactive,
body.dark .svc-icon-btn.svc-danger:hover { border-color:#7f1d1d;background:#3f1d24;color:#fca5a5 }
.svc-price-input {
 width:100%;height:40px;min-height:40px;padding:0 11px;font-size:13px;font-weight:650;line-height:38px;
 border:1px solid #d7d7d7;border-radius:10px;box-sizing:border-box;
 background:var(--bg-surface);text-align:right;color:var(--text-primary);transition:border-color .12s,box-shadow .12s
}
.svc-price-input:focus { outline:none;border-color:var(--accent) }
.svc-format-cell{display:flex;align-items:center;min-width:0;color:var(--text-muted)}
.svc-price-cell{display:flex;align-items:center;justify-content:stretch;min-width:0}
.svc-row-settings{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:4px}
.svc-addon-link{margin:0;padding:0;border:0;background:none;color:var(--accent);font:600 10px/1.3 inherit;cursor:pointer}
.svc-addon-link:hover{text-decoration:underline}
.svc-addon-editor,.svc-property-editor{padding:12px 14px 14px 48px;border-bottom:1px solid var(--border);background:var(--bg-surface-2)}
.svc-property-editor{background:var(--bg-surface)}
.svc-addon-editor-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px}
.svc-addon-editor-head>div{display:flex;flex-direction:column;gap:2px}.svc-addon-editor-head strong{font-size:12px;color:var(--text-primary)}.svc-addon-editor-head span{font-size:10px;color:var(--text-muted)}
.svc-addon-edit-row,.svc-property-edit-row{display:grid;grid-template-columns:minmax(160px,1fr) 120px 28px 28px;gap:7px;align-items:center;margin-top:6px}.svc-addon-edit-row.is-inactive,.svc-property-edit-row.is-inactive{opacity:.5}
.svc-addon-edit-row .form-input{height:32px;padding:5px 9px;font-size:12px}.svc-addon-price{position:relative}.svc-addon-price input{padding-right:24px}.svc-addon-price span{position:absolute;right:9px;top:50%;transform:translateY(-50%);font-size:11px;color:var(--text-muted);pointer-events:none}
.svc-property-edit-row .form-input{height:32px;padding:5px 9px;font-size:12px}
.svc-addon-empty{padding:12px;border:1px dashed var(--border);border-radius:8px;text-align:center;font-size:11px;color:var(--text-muted)}
@media(max-width:820px){.svc-addon-editor,.svc-property-editor{padding-left:14px}.svc-addon-edit-row,.svc-property-edit-row{grid-template-columns:minmax(120px,1fr) 100px 28px 28px}}

/* === Services workspace redesign === */
.svc-workspace{padding:0;overflow:hidden;border:1px solid var(--border);border-radius:16px;background:var(--bg-surface);box-shadow:0 10px 30px rgba(23, 23, 23,.04)}
.svc-layout{display:grid;grid-template-columns:290px minmax(0,1fr);min-height:620px;max-height:calc(100vh - 190px);overflow:hidden}
.svc-sidebar{min-width:0;border-right:1px solid var(--border);background:var(--bg-surface-2);display:flex;flex-direction:column;overflow:hidden}
.svc-sidebar-head{padding:18px 16px 14px;border-bottom:1px solid var(--border-light)}
.svc-sidebar-title{font-size:11px;font-weight:800;color:var(--text-muted);text-transform:uppercase;letter-spacing:.08em;margin-bottom:10px}
.svc-nav-list{flex:1;overflow-y:auto;padding:10px}
.svc-sidebar-foot{padding:12px 16px;border-top:1px solid var(--border-light);background:var(--bg-surface)}
.svc-nav-btn{gap:11px;padding:10px;border:1px solid transparent;border-radius:11px;min-height:58px;margin-bottom:4px}
.svc-nav-btn:hover{border-color:var(--border);background:var(--bg-surface)}
.svc-nav-btn.active{border-color:var(--accent-border);background:var(--bg-surface);box-shadow:0 5px 16px rgba(23, 23, 23,.06)}
.svc-nav-copy{flex:1;min-width:0}
.svc-nav-name{font-size:12px;font-weight:650;line-height:1.35}
.svc-nav-meta{font-size:10px;color:var(--text-muted);margin-top:3px}
.svc-nav-icon{width:20px;height:20px}
.svc-nav-count{font-size:10px;min-width:24px;text-align:center;padding:3px 6px}
.svc-content{min-width:0;overflow-y:auto;padding:22px 24px 28px;background:linear-gradient(180deg,var(--bg-surface-2),var(--bg-surface) 150px)}
.svc-content-body{min-width:0}
.svc-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:0 0 16px;border-bottom:1px solid var(--border-light);background:transparent}
.svc-hero-copy{display:flex;align-items:center;gap:14px;min-width:0}
.svc-hero-icon{width:44px;height:44px;border-radius:12px;background:var(--accent-light);display:flex;align-items:center;justify-content:center;color:var(--accent);flex-shrink:0}
.svc-hero-icon svg{width:20px;height:20px}
.svc-hero-eyebrow{font-size:9px;font-weight:800;color:var(--text-muted);text-transform:uppercase;letter-spacing:.1em;margin-bottom:3px}
.svc-hero-title{font-size:18px;font-weight:750;color:var(--text-primary);line-height:1.25}
.svc-hero-subtitle{font-size:11px;color:var(--text-muted);margin-top:4px}
.svc-hero-actions{display:flex;gap:8px;flex-shrink:0;flex-wrap:wrap}
.svc-editor-fields{display:flex;gap:8px;flex-wrap:wrap;align-items:flex-end}
.svc-editor-fields label{font-size:11px;color:var(--text-muted);margin-bottom:3px;display:block}
.svc-editor-fields .form-input{font-size:12px;padding:6px 10px}
.svc-editor-fields select.form-input{padding:6px 8px}
.svc-editor-name{flex:2;min-width:140px}
.svc-editor-description{flex:2;min-width:120px}
.svc-editor-number{width:90px}
.svc-editor-duration{width:70px}
.svc-editor-actions{display:flex;gap:6px;padding-top:18px}
.svc-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0}
.svc-metric{display:flex;align-items:baseline;gap:7px;padding:4px 0;border:0;background:transparent}
.svc-metric strong{font-size:17px;color:var(--text-primary)}
.svc-metric span{font-size:10px;color:var(--text-muted)}
.svc-grid{background:var(--bg-surface);border:1px solid var(--border);border-radius:12px;overflow:hidden}
.svc-tbl-head{grid-template-columns:22px minmax(110px,1fr) 72px 96px repeat(3,40px);column-gap:8px;padding:11px 12px;background:var(--bg-surface-2)}
.svc-data-row{grid-template-columns:22px minmax(110px,1fr) 72px 96px repeat(3,40px);column-gap:8px;min-height:56px;padding:7px 12px}
.svc-data-row:last-child{border-bottom:0}
.svc-name-text{font-weight:600!important}
.svc-price-input{background:var(--bg-surface)}

@media (max-width:1100px){
 .svc-layout{grid-template-columns:240px minmax(0,1fr)}
 .svc-tbl-head,.svc-data-row{grid-template-columns:22px minmax(105px,1fr) 68px 92px repeat(3,40px);column-gap:6px}
 .svc-content{padding:18px}
}
@media (max-width:820px){
 .svc-layout{display:block;max-height:none}
 .svc-sidebar{border-right:0;border-bottom:1px solid var(--border);max-height:300px}
 .svc-content{overflow:visible}
 .svc-hero{align-items:flex-start;flex-direction:column}
 .svc-tbl-head{display:none}
 .svc-data-row{grid-template-columns:22px minmax(140px,1fr) 68px 92px repeat(3,40px);column-gap:6px}
}

/* === Dedicated services page and order linking === */
.svc-page-content{overflow-y:auto;padding:20px 24px 32px}
.svc-page-tabs{display:flex;gap:4px;margin-bottom:18px;padding:3px;width:max-content;border:1px solid var(--border);border-radius:10px;background:var(--bg-surface)}
.svc-page-tab{border:0;background:transparent;color:var(--text-muted);padding:7px 14px;border-radius:7px;font-family:inherit;font-size:12px;font-weight:600;cursor:pointer}
.svc-page-tab.active{background:linear-gradient(135deg,var(--accent-strong) 0%,var(--accent) 100%);color:var(--accent-contrast,#fff)}
#svc-sync-badge{align-items:center;justify-content:center;min-width:18px;height:18px;margin-left:5px;padding:0 5px;border-radius:10px;background:var(--text-primary);color:var(--bg-surface);font-size:9px}
.svc-sync-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:14px}
.svc-sync-summary>div{display:flex;align-items:baseline;gap:8px;padding:14px 16px;border:1px solid var(--border);border-radius:12px;background:var(--bg-surface)}
.svc-sync-summary strong{font-size:22px;color:var(--text-primary)}
.svc-sync-summary span{font-size:11px;color:var(--text-muted)}
.svc-sync-summary .ok strong{color:var(--text-primary)}.svc-sync-summary .warn strong{color:#646464}.svc-sync-summary .danger strong{color:#717171}
.svc-sync-toolbar{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:10px}
.svc-sync-filters{display:flex;gap:5px;flex-wrap:wrap}
.svc-sync-filter{padding:6px 10px;border:1px solid var(--border);border-radius:8px;background:var(--bg-surface);font-family:inherit;font-size:11px;font-weight:600;color:var(--text-secondary);cursor:pointer}
.svc-sync-filter.active{border-color:var(--accent-strong);background:linear-gradient(135deg,var(--accent-strong) 0%,var(--accent) 100%);color:var(--accent-contrast,#fff)}
#svc-sync-search{max-width:280px}
.svc-sync-note{padding:10px 12px;margin-bottom:10px;border:1px solid var(--border-light);border-radius:9px;background:var(--bg-surface-2);color:var(--text-secondary);font-size:11px}
.svc-sync-list{border:1px solid var(--border);border-radius:12px;overflow:hidden;background:var(--bg-surface)}
.svc-sync-row{display:grid;grid-template-columns:minmax(220px,1.4fr) 110px minmax(180px,1fr) minmax(180px,1fr) 90px;gap:10px;align-items:center;padding:10px 12px;border-bottom:1px solid var(--border-light)}
.svc-sync-row:last-child{border-bottom:0}.svc-sync-row:hover{background:var(--bg-surface-2)}
.svc-sync-order{min-width:0;font-size:12px;color:var(--text-primary)}.svc-sync-order span,.svc-sync-order small{display:block;margin-top:2px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.svc-sync-state{width:max-content;padding:3px 7px;border-radius:12px;background:var(--bg-surface-2);color:var(--text-primary);font-size:9px;font-weight:700;text-transform:uppercase;border:1px solid var(--border-light)}
.svc-sync-row.broken .svc-sync-state{background:#f4f4f4;color:#6d6d6d}.svc-sync-row.empty .svc-sync-state{background:#efefef;color:#818181}
.svc-sync-row select{font-size:11px;min-width:0}.svc-sync-empty{padding:42px;text-align:center;color:var(--text-muted);font-size:13px}
@media(max-width:1100px){.svc-sync-row{grid-template-columns:minmax(180px,1fr) 90px minmax(140px,1fr) minmax(140px,1fr) 80px}.svc-sync-summary{grid-template-columns:repeat(2,1fr)}}

/* ===== AVATAR COLORS ===== */
.av-0{background:#f1f1f1;color:#4f4f4f}
.av-1{background:#f0f0f0;color:#535353}
.av-2{background:#f4f4f4;color:#646464}
.av-3{background:#f1f1f1;color:#5a5a5a}
.av-4{background:#fce7f3;color:#9d174d}
.av-5{background:#efefef;color:#4b4b4b}
.av-6{background:#ffedd5;color:#9a3412}
.av-7{background:var(--accent-light);color:var(--accent-strong,var(--accent))}

/* ===== LOGIN SCREEN ===== */
#login-screen{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;background:#0e0e0e;overflow:hidden}
.login-bg-overlay{position:absolute;inset:0;background:linear-gradient(135deg,rgba(6, 6, 6,.82) 0%,rgba(11, 11, 11,.72) 50%,rgba(6, 6, 6,.88) 100%);pointer-events:none}
.login-bg-overlay::after{content:'';position:absolute;inset:0;background:radial-gradient(ellipse 60% 50% at 50% 50%,rgba(255,255,255,.04) 0%,transparent 70%);pointer-events:none}
.login-box{position:relative;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.15);border-radius:24px;padding:44px 40px 36px;width:400px;box-shadow:0 0 0 1px rgba(255,255,255,.04),0 32px 80px rgba(0,0,0,.6),0 0 60px rgba(255,255,255,.03);backdrop-filter:blur(20px)}
.login-logo-wrap{display:flex;align-items:center;gap:16px;margin-bottom:28px}
.login-logo-icon{width:52px;height:52px;border-radius:14px;flex-shrink:0;filter:drop-shadow(0 4px 16px rgba(255,255,255,.2))}
.login-brand{display:flex;flex-direction:column;gap:0}
.login-title{font-size:22px;font-weight:900;color:#fff;letter-spacing:.04em;line-height:1}
.login-title-sub{font-size:11px;font-weight:600;letter-spacing:.25em;color:#ffffff;margin-top:3px;opacity:.9}
.login-divider{height:1px;background:linear-gradient(90deg,transparent,rgba(255,255,255,.2),transparent);margin-bottom:28px}
.login-welcome{font-size:18px;font-weight:700;color:#fff;margin-bottom:6px;letter-spacing:-.01em}
.login-hint{font-size:13px;color:rgba(255,255,255,.4);margin-bottom:24px}
.login-pw-wrap{display:flex;flex-direction:column;gap:10px;margin-bottom:16px}
.login-pw-inner{position:relative;display:flex;align-items:center}
.login-pw-icon{position:absolute;left:14px;width:18px;height:18px;color:rgba(255,255,255,.3);pointer-events:none;flex-shrink:0}
.login-pw-input{width:100%;padding:13px 44px 13px 42px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);border-radius:12px;font-size:14px;color:#fff;outline:none;transition:.2s;letter-spacing:.02em}
.login-pw-input::placeholder{color:rgba(255,255,255,.25)}
.login-pw-input:focus{border-color:rgba(255,255,255,.5);background:rgba(255,255,255,.08);box-shadow:0 0 0 3px rgba(255,255,255,.1)}
.login-eye-btn{position:absolute;right:12px;background:none;border:none;cursor:pointer;padding:4px;color:rgba(255,255,255,.25);display:flex;align-items:center;transition:.15s}
.login-eye-btn:hover{color:rgba(255,255,255,.8)}
.login-eye-btn svg{width:18px;height:18px}
.login-error{font-size:12px;color:#f87171;margin-top:8px;min-height:18px;padding-left:2px}
.login-btn{width:100%;padding:14px;background:linear-gradient(135deg,#ffffff 0%,#e0e0e0 50%,#ffffff 100%);color:#111111;border:none;border-radius:12px;font-size:14px;font-weight:800;cursor:pointer;transition:all .2s;display:flex;align-items:center;justify-content:center;gap:8px;letter-spacing:.02em;box-shadow:0 4px 24px rgba(255,255,255,.2);margin-bottom:24px}
.login-btn:hover{transform:translateY(-1px);box-shadow:0 8px 32px rgba(255,255,255,.3)}
.login-btn:active{transform:scale(.98)}
.login-btn svg{width:18px;height:18px}
.login-footer{text-align:center;font-size:11px;color:rgba(255,255,255,.18);letter-spacing:.03em}
.role-btn,.login-roles,.login-sub,.login-logo,.login-pw-label{display:none}
.role-badge-admin{background:#f4f4f4;color:#636363;font-size:11px;padding:2px 8px;border-radius:20px;font-weight:500;border:1px solid #e1e1e1}
.role-badge-photo{background:#f1f1f1;color:#5b5b5b;font-size:11px;padding:2px 8px;border-radius:20px;font-weight:500;border:1px solid #dedede}
#current-role-badge{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:20px;font-size:12px;font-weight:500;cursor:pointer;border:1px solid var(--border);background:var(--bg-surface-2)}
#current-role-badge:hover{background:#f4f4f4}

/* ===== CLIENT CARD ===== */
.client-hero{display:flex;align-items:center;gap:20px;padding:24px;background:var(--bg-surface);border:1px solid var(--border);border-radius:16px;margin-bottom:20px}
.avatar-xl{width:72px;height:72px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:700;flex-shrink:0}
.client-hero-info{min-width:0;overflow-wrap:anywhere}
.client-hero-info h2{font-size:22px;font-weight:700;color:var(--text-primary);margin-bottom:4px}
.client-search-option{display:flex;flex-direction:column;gap:4px;width:100%;text-align:left;padding:10px 14px;border:0;border-bottom:1px solid var(--border-light);background:var(--bg-surface);color:var(--text-primary);font:inherit;cursor:pointer}
.client-search-option span{font-size:12px;color:var(--text-muted);overflow-wrap:anywhere}
.client-search-option:hover,.client-search-option:focus-visible{background:var(--accent-light)}
#clients-board [role="button"]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media(max-width:900px){
 .client-hero{flex-wrap:wrap}
 .client-hero-actions{flex-wrap:wrap;width:100%;margin-left:0}
 #page-client-card .order-card{flex-wrap:wrap;overflow-wrap:anywhere}
}
.client-hero-info .meta{font-size:13px;color:var(--text-secondary);display:flex;gap:16px;flex-wrap:wrap;margin-top:6px}
.client-hero-info .meta span{display:flex;align-items:center;gap:4px}
.client-hero-actions{margin-left:auto;display:flex;gap:8px;flex-shrink:0}
.kpi-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:20px}
.kpi-card{background:var(--bg-surface);border:1px solid var(--border);border-radius:12px;padding:16px}
.kpi-label{font-size:11px;color:var(--text-muted);font-weight:600;text-transform:uppercase;letter-spacing:.06em;margin-bottom:6px}
.kpi-value{font-size:26px;font-weight:700;color:var(--text-primary);line-height:1}
.kpi-sub{font-size:12px;color:var(--text-secondary);margin-top:4px}
.kpi-positive{color:var(--text-primary)}
.bar-chart{display:flex;flex-direction:column;gap:10px}
.bar-row{display:flex;align-items:center;gap:10px}
.bar-label{font-size:12px;color:var(--text-primary);width:110px;flex-shrink:0;text-align:right}
.bar-track{flex:1;height:10px;background:#f3f2ef;border-radius:5px;overflow:hidden}
.bar-fill{height:100%;border-radius:5px;transition:width .4s}
.bar-val{font-size:12px;font-weight:600;color:var(--text-primary);min-width:70px;text-align:right}
.back-btn{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--text-secondary);cursor:pointer;padding:6px 0;margin-bottom:16px;background:none;border:none;font-weight:500}
.back-btn:hover{color:var(--text-primary)}
.order-card{background:var(--bg-surface);border:1px solid var(--border);border-radius:12px;padding:16px;margin-bottom:10px;display:flex;align-items:center;gap:16px;transition:.12s}
.order-card:hover{border-color:var(--text-muted)}
.order-card-icon{width:40px;height:40px;border-radius:10px;background:var(--accent-light);display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0}
.order-card-info{flex:1}
.order-card-title{font-size:14px;font-weight:600;color:var(--text-primary)}
.order-card-meta{font-size:12px;color:var(--text-muted);margin-top:2px}
.order-card-right{text-align:right;flex-shrink:0}
.order-card-amount{font-size:15px;font-weight:700;color:var(--text-primary)}
.order-card-paid{font-size:11px;margin-top:2px}
.donut-wrap{display:flex;align-items:center;gap:20px}
.donut-legend{display:flex;flex-direction:column;gap:8px;flex:1}
.legend-item{display:flex;align-items:center;gap:8px;font-size:12px}
.legend-dot{width:10px;height:10px;border-radius:50%;flex-shrink:0}
.legend-label{color:var(--text-primary);flex:1}
.legend-val{font-weight:600;color:var(--text-primary)}

/* ============================================================
   SCHEDULE SIDE PANEL (вариант 4 — встроен в Журнал)
   ============================================================ */
#cal-sch-side-panel {
 transition: width .2s ease;
 flex-shrink: 0;
 overflow: hidden;
 border-left: 1px solid var(--border);
 background: var(--bg-surface);
}
#cal-sch-panel-btn.active,
#cal-sch-panel-btn[style*="var(--accent)"] {
 background: var(--accent);
 color: #fff;
 border-color: var(--accent);
}
body.dark #cal-sch-side-panel {
 background: var(--bg-surface-2);
 border-left-color: var(--border);
}

/* ── Kanban — Трекер задач ───────────────────────────────────── */
.kanban-col {
 background: var(--bg-surface-2);
 border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 9px;
  min-height: 80px;
  transition: background .12s, border-color .12s;
}
.kanban-col-over {
 background: var(--accent-light);
 border-color: var(--accent);
}
.kanban-card {
 background: var(--bg-surface);
 border: 1px solid var(--border);
 border-radius: 7px;
 padding: 8px 10px;
 margin-bottom: 6px;
 cursor: grab;
 transition: border-color .12s, transform .1s;
 user-select: none;
}
.kanban-card:hover {
 border-color: var(--accent-border);
 transform: translateY(-1px);
}
.kanban-card:active { cursor: grabbing; }

/* Убираем спиннеры у числовых инпутов */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance:none; margin:0 }
input[type=number] { -moz-appearance:textfield; appearance:textfield }
.an-service-chart { width:140px;height:140px;margin:0 auto 14px;flex-shrink:0; }
.an-service-chart canvas { display:block; }
.an-sources-toggle { margin-top:8px;min-height:44px;padding:8px;border:0;border-radius:8px;background:transparent;color:var(--accent);font:inherit;font-size:12px;cursor:pointer; }
.an-sources-toggle:hover { background:var(--accent-light); }
.an-sources-toggle:focus-visible { outline:2px solid var(--accent);outline-offset:2px; }
#page-dashboard #orders-analytics-view button { --an-control-radius:6px; }
#page-dashboard #orders-analytics-view .an-toolbar-control,
#page-dashboard #orders-analytics-view [style*="padding:2px"] { --an-control-radius:8px; }
