/* Kvota bölgüsü – qara tema, modern dizayn */

.kb-wrap{
  max-width: 1400px;
  margin: 10px auto;
  padding: 10px;
  color:#f8fafc;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:
    radial-gradient(circle at top right, rgba(96,165,250,.12), transparent 26%),
    linear-gradient(135deg, #1e293b, #0f172a 72%);
  border-radius: 18px;
  box-shadow: 0 16px 44px rgba(2,6,23,0.34);
  border: 1px solid rgba(71,85,105,.82);
}

.kb-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:14px;
  margin-bottom:10px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(71,85,105,.75);
}

.kb-title{
  flex:0 1 auto;
  min-width:0;
}

.kb-header-actions{
  display:grid;
  grid-template-columns:auto minmax(0, 1fr);
  align-items:center;
  gap:10px;
  flex:1 1 760px;
  min-width:0;
  max-width:100%;
  justify-content:end;
}

.kb-title-main{
  font-size:23px;
  font-weight:900;
  color:#f8fafc;
  letter-spacing:.15px;
}
.kb-title-sub{
  margin-top:3px;
  font-size:12px;
  color:#94a3b8;
}

.kb-nav{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:4px;
  padding:4px;
  min-width:0;
  width:max-content;
  max-width:100%;
  background:linear-gradient(180deg, rgba(15,23,42,.86), rgba(30,41,59,.86));
  border:1px solid rgba(71,85,105,.85);
  border-radius:15px;
  overflow-x:auto;
  scrollbar-width:none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 12px 26px rgba(2,6,23,.2);
}

.kb-nav::-webkit-scrollbar{
  display:none;
}

.kb-header-refresh{
  flex:0 0 auto;
  white-space:nowrap;
  padding:7px 11px 7px 8px;
  min-height:42px;
  max-width:100%;
  border-radius:13px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0)),
    linear-gradient(135deg, #243244, #182436);
  border:1px solid rgba(96,165,250,.26);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 12px 22px rgba(2,6,23,.18);
}

.kb-header-refresh:hover{
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02)),
    linear-gradient(135deg, #2a3a4f, #1c2a3d);
}

.kb-btn-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  border-radius:999px;
  font-size:14px;
  line-height:1;
  flex:0 0 24px;
}

.kb-btn-icon-refresh{
  color:#eff6ff;
  background:linear-gradient(135deg, #38bdf8, #2563eb);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.2),
    0 6px 14px rgba(37,99,235,.28);
}
.kb-tab{
  width:auto;
  flex:0 0 auto;
  border:1px solid transparent;
  background:transparent;
  color:#cbd5e1;
  padding:8px 10px;
  min-height:40px;
  min-width:118px;
  border-radius:11px;
  font-weight:800;
  font-size:12px;
  letter-spacing:.01em;
  white-space:nowrap;
  cursor:pointer;
  box-shadow:none;
  transition: all 0.22s ease;
}
.kb-tab:hover{
  transform: translateY(-1px);
  color:#f8fafc;
  background:linear-gradient(180deg, rgba(51,65,85,.78), rgba(30,41,59,.82));
}
.kb-tab-active{
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02)),
    linear-gradient(135deg, #3b82f6, #2563eb 72%);
  border-color:rgba(191,219,254,.72);
  color:#fff;
  box-shadow:
    0 10px 22px rgba(37,99,235,.24),
    inset 0 1px 0 rgba(255,255,255,.14);
}

.kb-alert{
  border:1px solid #f59e0b;
  background: linear-gradient(135deg, #451a03, #78350f);
  color:#fbbf24;
  padding:9px 11px;
  border-radius:11px;
  font-weight:700;
  margin-bottom:10px;
  box-shadow: 0 4px 10px rgba(245,158,11,0.18);
}

.kb-panel{ margin-top:8px; }

.kb-card{
  background:
    linear-gradient(180deg, rgba(255,255,255,.015), rgba(255,255,255,0)),
    linear-gradient(135deg, #1e293b, #0f172a);
  border:1px solid rgba(51,65,85,.95);
  border-radius:15px;
  padding:12px;
  margin-bottom:10px;
  box-shadow: 0 8px 24px rgba(2,6,23,0.22);
  transition: all 0.2s ease;
}
.kb-card:hover{
  box-shadow: 0 12px 30px rgba(2,6,23,0.26);
  transform: translateY(-1px);
}

.kb-card-title{
  font-weight:900;
  margin-bottom:8px;
  font-size:14px;
  letter-spacing:.01em;
  color:#f8fafc;
}

.kb-grid{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap:10px;
}
@media (max-width: 1100px){
  .kb-grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 650px){
  .kb-grid{ grid-template-columns: 1fr; }
}

.kb-field{ min-width: 168px; }
.kb-label{
  font-size:12px;
  font-weight:900;
  color:#e2e8f0;
  margin-bottom:5px;
}
.kb-hint{
  margin-top:5px;
  font-size:11px;
  color:#94a3b8;
}

.kb-input{
  width:100%;
  border:1px solid #475569;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color:#f8fafc;
  border-radius:11px;
  min-height:40px;
  padding:8px 11px;
  outline:none;
  font-weight:700;
  font-size:13px;
  transition: all 0.2s ease;
}
.kb-input:focus{
  border-color:#60a5fa;
  box-shadow: 0 0 0 3px rgba(96,165,250,0.16);
  background: linear-gradient(135deg, #1e293b, #334155);
}
.kb-input::placeholder{
  color: #64748b;
  font-weight: 500;
}

.kb-row{
  display:flex;
  gap:8px;
}
.kb-row .kb-input{ flex:1; }

.kb-toggles{ display:flex; flex-direction:column; gap:8px; }
.kb-toggle{
  display:flex; align-items:center; gap:10px;
  font-weight:800; color:#e2e8f0; font-size:13px;
}
.kb-toggle input{ transform: scale(1.1); }

.kb-actions{
  margin-top:10px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

.kb-actions-split{
  justify-content:space-between;
}

.kb-inline-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:nowrap;
  margin-left:auto;
}

.kb-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  border:none;
  border-radius:11px;
  min-height:36px;
  padding:7px 12px;
  font-weight:900;
  font-size:12px;
  line-height:1;
  letter-spacing:.01em;
  cursor:pointer;
  box-shadow: 0 6px 16px rgba(15,23,42,0.22);
  transition: all 0.2s ease;
}
.kb-btn:hover{ transform: translateY(-1px); box-shadow: 0 10px 22px rgba(15,23,42,0.28); }
.kb-btn:disabled{
  opacity:.55;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
}
.kb-btn-primary{
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color:#fff;
  border:1px solid #60a5fa;
}
.kb-btn-primary:hover{ background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.kb-btn-secondary{
  background: linear-gradient(135deg, #475569, #334155);
  color:#f8fafc;
  border:1px solid #64748b;
}
.kb-btn-secondary:hover{ background: linear-gradient(135deg, #64748b, #475569); }
.kb-btn-premium{
  background:
    linear-gradient(180deg, rgba(255,255,255,.24), rgba(255,255,255,.02)),
    linear-gradient(135deg, #7c3aed, #2563eb);
  color:#fff;
  border:1px solid rgba(191,219,254,.78);
  box-shadow:
    0 10px 20px rgba(37,99,235,.28),
    inset 0 1px 0 rgba(255,255,255,.25);
  font-weight:900;
  letter-spacing:.01em;
}
.kb-btn-premium:hover{
  transform: translateY(-1px);
  background:
    linear-gradient(180deg, rgba(255,255,255,.32), rgba(255,255,255,.06)),
    linear-gradient(135deg, #8b5cf6, #3b82f6);
}
.kb-btn-success{
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color:#fff;
  border:1px solid #4ade80;
}
.kb-btn-success:hover{ background: linear-gradient(135deg, #16a34a, #15803d); }
.kb-btn-export{
  min-width:150px;
}

.kb-btn-danger{
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border:1px solid #f87171;
  color:#fff;
}
.kb-btn-danger:hover{
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  filter: brightness(1.1);
  transform: translateY(-1px);
}


.kb-mini{
  font-size:13px;
  color:#e2e8f0;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.kb-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 10px;
  border:1px solid #475569;
  border-radius:999px;
  background: linear-gradient(135deg, #334155, #1e293b);
  font-weight:900;
  color:#f8fafc;
}

.kb-table-wrap{
  overflow:auto;
  border-radius:12px;
  border:1px solid #334155;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.kb-table{
  width:100%;
  border-collapse:collapse;
  background: transparent;
  min-width: 900px;
}
.kb-table thead th{
  position:sticky;
  top:0;
  background: linear-gradient(135deg, #334155, #475569);
  color:#f8fafc;
  text-align:left;
  padding:10px 10px;
  font-weight:900;
  border-bottom:2px solid #64748b;
}
.kb-table tbody td{
  padding:10px 10px;
  border-bottom:1px solid #334155;
  font-weight:700;
  color:#e2e8f0;
}
.kb-table tbody tr:hover{
  background: linear-gradient(135deg, #334155, #475569);
  transform: scale(1.01);
  transition: all 0.15s ease;
}

.kb-target-input{
  width:110px;
  padding:8px 10px;
  border:1px solid #475569;
  border-radius:10px;
  font-weight:900;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #f8fafc;
}

.kb-progress{
  position:relative;
  height:18px;
  border-radius:999px;
  border:1px solid #475569;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  overflow:hidden;
  min-width: 140px;
}
.kb-progress > .kb-fill{
  height:100%;
  width:0%;
  background: linear-gradient(90deg, #f59e0b, #fb7185);
}
.kb-progress > .kb-text{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:900;
  color:#f8fafc;
}

.kb-footer-note{
  margin-top:8px;
  font-size:12px;
  color:#94a3b8;
  font-weight:700;
}

.kb-kvota-multi{ margin-top:10px; }
.kb-kvota-multi-head{ display:flex; gap:12px; align-items:center; justify-content:space-between; }
.kb-kvota-multi-list{
  margin-top:8px;
  max-height:180px;
  overflow:auto;
  border:1px solid #475569;
  border-radius:10px;
  padding:8px;
  background: #ffffff;
}
.kb-kvota-item{
  display:flex;
  gap:8px;
  align-items:center;
  padding:6px 8px;
  border-radius:8px;
}
.kb-kvota-item:hover{ background: #f8fafc; }
.kb-hint{ display:block; margin-top:6px; color:#6b7280; }
.kb-export-status{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 4px;
  font-weight:700;
}

.kb-kvota-wrap{ position:relative; }
.kb-kvota-btn{
  width:40px;
  min-width:40px;
  flex:0 0 40px;
  padding:0;
}

.kb-kvota-popup{
  position:fixed;
  top:calc(env(safe-area-inset-top, 0px) + 16px);
  left:50%;
  transform: translateX(-50%);
  z-index:9999999;
  isolation: isolate;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border:1px solid #475569;
  border-radius:14px;
  box-shadow:0 18px 40px rgba(2,6,23,0.34);
  padding:12px;
  width:min(500px, calc(100vw - 24px));
  max-width: 500px;
  max-height: min(80vh, 720px);
  display: flex;
  flex-direction: column;
  overflow:hidden;
}

/* Hesabat popup-u üçün xüsusi stillər */
#krKvotaPopup .kb-kvota-list{
  background: #ffffff;
  border: 1px solid #475569;
  position: relative;
  z-index: 10000000;
  max-height: 250px;
  overflow-y: auto;
  flex: 1;
}

#krKvotaPopup .kb-kvota-item{
  color: #0f172a;
  position: relative;
  z-index: 10000001;
}

#krKvotaPopup .kb-kvota-name{
  color: #0f172a;
}

#krKvotaPopup .kb-kvota-sub{
  color: #64748b;
}

#krKvotaPopup .kb-kvota-item:hover{
  background: #f8fafc;
}

#krKvotaPopup .kb-kvota-table{
  position: relative;
  z-index: 20;
  background: transparent;
}

#krKvotaPopup .kb-kvota-foot{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:10px;
  padding-top: 10px;
  border-top: 1px solid #475569;
  flex-shrink: 0;
  position: relative;
  z-index: 30;
}

.kb-kvota-top{
  display:flex;
  gap:8px;
  align-items:center;
  flex-shrink:0;
  position:sticky;
  top:0;
  z-index:4;
  padding-bottom:8px;
  background:linear-gradient(135deg, #1e293b, #0f172a);
}
.kb-kvota-filter{ height:38px; }
.kb-kvota-topbtns{ display:flex; gap:6px; }

.kb-kvota-list{
  margin-top:8px;
  max-height:250px;
  overflow-y:auto;
  border:1px solid #475569;
  border-radius:10px;
  padding:6px;
  background: #ffffff;
  flex: 1 1 auto;
  min-height:0;
}

.kb-kvota-item{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:8px;
  border-radius:10px;
  cursor:pointer;
}
.kb-kvota-item:hover{ background: #f8fafc; }
.kb-kvota-name{ font-weight:800; color:#0f172a; }
.kb-kvota-sub{ font-size:12px; opacity:.75; margin-top:2px; color:#64748b; }
.kb-aptek-status-saved{ color:#15803d !important; }
.kb-aptek-status-draft{ color:#b45309 !important; }
.kb-aptek-status-missing{ color:#b91c1c !important; }
.kb-aptek-status-muted{ color:#64748b !important; }

.kb-kvota-foot{
  display:flex;
  justify-content:space-between;
  gap:8px;
  flex-wrap:wrap;
  margin-top:8px;
  padding-top: 8px;
  padding-bottom: 2px;
  border-top: 1px solid #475569;
  flex-shrink: 0;
  position:sticky;
  bottom:0;
  z-index:5;
  background:linear-gradient(135deg, #1e293b, #0f172a);
}
.kb-kvota-note{ margin-top:7px; font-size:12px; opacity:.7; }

/* KVOTA popup: 2 sütunlu səliqəli list */
.kb-kvota-table{
  width:100%;
  border-collapse:collapse;
  background: transparent;
  border-radius:10px;
  overflow:hidden;
}
.kb-kvota-table th, .kb-kvota-table td{
  padding:10px 10px;
  border-bottom:1px solid #475569;
  vertical-align:top;
}
.kb-kvota-table th{
  font-size:12px;
  color:#64748b;
  text-transform:uppercase;
  letter-spacing:.04em;
  background: #f8fafc;
}
.kb-kvota-row:hover{ background: #f8fafc; cursor:pointer; }
.kb-kvota-col-check{ width:56px; text-align:center; }
.kb-kvota-check{ transform:scale(1.05); }

.kb-prod-name{ font-weight:800; color:#0f172a; }
.kb-prod-sub{ font-size:12px; opacity:.75; margin-top:2px; color:#64748b; }

/* KVOTA popup list - 2 sütun görünüş */
.kb-kvota-item{
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: center;
}

.kb-kvota-chk{
  width: 18px;
  height: 18px;
}

.kb-kvota-name{
  font-weight: 800;
}

.kb-kvota-sub{
  margin-top: 2px;
  font-size: 12px;
  opacity: .75;
}

.kb-kvota-table{
  width:100%;
  border-collapse:collapse;
  background:#fff;
  border-radius:10px;
  overflow:hidden;
}
.kb-kvota-table th, .kb-kvota-table td{
  padding:10px;
  border-bottom:1px solid #e5e7eb;
  vertical-align:top;
}
.kb-kvota-table th{
  font-size:12px;
  color:#64748b;
  text-transform:uppercase;
  letter-spacing:.04em;
  background:#f8fafc;
}
.kb-kvota-row:hover{ background:#f3f4f6; cursor:pointer; }
.kb-kvota-col-check{ width:60px; text-align:center; }
.kb-kvota-check{ width:18px; height:18px; }

.kb-modal{
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(8px);
}

.kb-modal-card{
  width: min(460px, calc(100vw - 24px));
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border:1px solid #475569;
  border-radius: 15px;
  padding: 14px;
  box-shadow: 0 22px 56px rgba(2,6,23,0.4);
}

.kb-modal-title{
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 12px;
  color: #f8fafc;
}

/* Əməkdaş bölgüsü cədvəlində sütun başlıqları yuxarıda qalsın */
#kbTableSplit thead th{
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(135deg, #334155, #475569);
  color: #f8fafc;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

/* İstəsən hesabat cədvəlində də eyni olsun */
#kbTableReport thead th{
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(135deg, #334155, #475569);
  color: #f8fafc;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

/* Scroll konteyneri düzgün işləsin */
.kb-table-wrap{
  overflow: auto;
  max-height: 70vh;
}

.kb-grid-4{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-top:12px;
}

.kb-stat-card{
  min-height:92px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.kb-stat-label{
  font-size:13px;
  color:#94a3b8;
  font-weight:700;
  margin-bottom:6px;
}

.kb-stat-value{
  font-size:24px;
  font-weight:900;
  color:#f8fafc;
}

.kb-status-card{
  margin-top:12px;
}

.kb-status-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.kb-status-toggle{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#cbd5e1;
  font-size:13px;
  font-weight:800;
  white-space:nowrap;
}

.kb-status-stats{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:10px;
  margin-bottom:12px;
}

.kb-status-stat{
  background:linear-gradient(135deg, rgba(15,23,42,.9), rgba(30,41,59,.85));
  border:1px solid #334155;
  border-radius:12px;
  padding:10px 12px;
}

.kb-status-stat-label{
  display:block;
  font-size:12px;
  font-weight:800;
  color:#94a3b8;
  margin-bottom:4px;
}

.kb-status-stat strong{
  font-size:22px;
  color:#f8fafc;
}

.kb-status-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.kb-status-empty{
  border:1px dashed #475569;
  border-radius:12px;
  padding:14px;
  color:#94a3b8;
  font-size:13px;
  font-weight:700;
  background:rgba(15,23,42,.35);
}

.kb-status-row{
  display:grid;
  grid-template-columns:minmax(0, 1.2fr) auto minmax(0, 1fr);
  gap:12px;
  align-items:center;
  padding:12px;
  border-radius:12px;
  border:1px solid #334155;
  background:linear-gradient(135deg, rgba(15,23,42,.85), rgba(30,41,59,.85));
}

.kb-status-row.is-missing{
  border-color:#7f1d1d;
  background:linear-gradient(135deg, rgba(69,10,10,.88), rgba(127,29,29,.68));
}

.kb-status-row.is-draft{
  border-color:#92400e;
  background:linear-gradient(135deg, rgba(69,26,3,.92), rgba(120,53,15,.75));
}

.kb-status-row.is-saved{
  border-color:#166534;
  background:linear-gradient(135deg, rgba(20,83,45,.9), rgba(21,128,61,.65));
}

.kb-status-main{
  min-width:0;
}

.kb-status-name{
  font-size:14px;
  font-weight:900;
  color:#f8fafc;
}

.kb-status-sub{
  margin-top:4px;
  font-size:12px;
  color:#cbd5e1;
}

.kb-status-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:108px;
  padding:7px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  font-size:12px;
  font-weight:900;
  color:#fff;
}

.kb-status-row.is-missing .kb-status-badge{
  background:#ef4444;
}

.kb-status-row.is-draft .kb-status-badge{
  background:#f59e0b;
  color:#1f2937;
}

.kb-status-row.is-saved .kb-status-badge{
  background:#22c55e;
}

.kb-status-meta{
  text-align:right;
  font-size:12px;
  color:#e2e8f0;
  font-weight:800;
}

.kb-status-time{
  display:block;
  margin-top:4px;
  color:#cbd5e1;
  font-weight:700;
}

@media (max-width: 900px){
  .kb-header-actions{
    grid-template-columns:1fr;
    justify-content:stretch;
  }

  .kb-header-refresh{
    width:100%;
    justify-content:flex-start;
  }

  .kb-nav{
    width:100%;
    justify-content:stretch;
  }

  .kb-tab{
    flex:1 1 0;
    min-width:0;
  }

  .kb-grid-4{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .kb-status-stats{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .kb-status-row{
    grid-template-columns:1fr;
    text-align:left;
  }

  .kb-status-meta{
    text-align:left;
  }
}

@media (max-width: 560px){
  .kb-kvota-popup{
    width:calc(100vw - 16px);
    max-height:85vh;
    padding:10px;
  }

  .kb-kvota-top{
    flex-wrap:wrap;
  }

  .kb-kvota-topbtns{
    width:100%;
    flex-wrap:wrap;
  }

  .kb-kvota-foot{
    justify-content:flex-start;
  }

  .kb-grid-4{
    grid-template-columns:1fr;
  }

  .kb-nav{
    gap:4px;
    padding:4px;
  }

  .kb-header{
    align-items:flex-start;
  }

  .kb-header-actions{
    width:100%;
    grid-template-columns:1fr;
    align-items:stretch;
  }

  .kb-header-refresh{
    width:100%;
    justify-content:flex-start;
  }

  .kb-tab{
    min-height:38px;
    padding:7px 6px;
    font-size:11px;
  }

  .kb-actions-split{
    justify-content:flex-start;
  }

  .kb-inline-actions{
    width:100%;
    margin-left:0;
    flex-wrap:wrap;
  }

  .kb-status-head{
    flex-direction:column;
    align-items:flex-start;
  }

  .kb-status-stats{
    grid-template-columns:1fr;
  }
}

/* Əməkdaş popup siyahıları üçün xüsusi stillər */
#keEmpPopup .kb-kvota-list{
  background: #ffffff;
  border: 1px solid #475569;
  position: relative;
  z-index: 1000000;
}

#keEmpPopup .kb-kvota-item{
  color: #0f172a;
  position: relative;
  z-index: 1000001;
}

#keEmpPopup .kb-kvota-name{
  color: #0f172a;
}

#keEmpPopup .kb-kvota-sub{
  color: #64748b;
}

#keEmpPopup .kb-kvota-item:hover{
  background: #f8fafc;
}

/* Aptek popup siyahıları üçün də eyni */
#kbAptekPopup .kb-kvota-list,
#krAptekPopup .kb-kvota-list,
#keAptekPopup .kb-kvota-list,
#kbKvotaPopup .kb-kvota-list,
#krKvotaPopup .kb-kvota-list{
  background: #ffffff;
  border: 1px solid #475569;
  position: relative;
  z-index: 1000000;
  min-height: 0;
}

#kbAptekPopup .kb-kvota-item,
#krAptekPopup .kb-kvota-item,
#keAptekPopup .kb-kvota-item,
#kbKvotaPopup .kb-kvota-item,
#krKvotaPopup .kb-kvota-item{
  color: #0f172a;
  position: relative;
  z-index: 1000001;
}

#kbAptekPopup .kb-kvota-name,
#krAptekPopup .kb-kvota-name,
#keAptekPopup .kb-kvota-name,
#kbKvotaPopup .kb-kvota-name,
#krKvotaPopup .kb-kvota-name{
  color: #0f172a;
}

#kbAptekPopup .kb-kvota-sub,
#krAptekPopup .kb-kvota-sub,
#keAptekPopup .kb-kvota-sub,
#kbKvotaPopup .kb-kvota-sub,
#krKvotaPopup .kb-kvota-sub{
  color: #64748b;
}

#kbAptekPopup .kb-kvota-item:hover,
#krAptekPopup .kb-kvota-item:hover,
#keAptekPopup .kb-kvota-item:hover,
#kbKvotaPopup .kb-kvota-item:hover,
#krKvotaPopup .kb-kvota-item:hover{
  background: #f8fafc;
}

/* Əməkdaş bölgüsü cədvəli üçün xüsusi stillər */
#kbTableSplit tbody td{
  background: #ffffff;
  color: #0f172a;
}

#kbTableSplit tbody tr:hover{
  background: #f8fafc;
}

#kbTableSplit tbody tr:hover td{
  background: transparent;
}

.kb-group-head td,
.kb-group-head-cell{
  background: linear-gradient(135deg, #f8fafc, #e2e8f0) !important;
  color:#0f172a !important;
  font-weight:900;
}

.kb-group-head-main{
  font-weight:900;
  color:#0f172a;
}

.kb-group-head-stats{
  margin-top:8px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.kb-group-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  border:1px solid transparent;
}

.kb-badge-neutral{
  background:#dbeafe;
  color:#1e3a8a;
  border-color:#93c5fd;
}

.kb-badge-ok{
  background:#dcfce7;
  color:#166534;
  border-color:#86efac;
}

.kb-badge-under{
  background:#fef3c7;
  color:#92400e;
  border-color:#fcd34d;
}

.kb-badge-over{
  background:#fee2e2;
  color:#991b1b;
  border-color:#fca5a5;
}

.kb-balance-cell{
  font-weight:900;
}

.kb-balance-under{
  color:#f59e0b !important;
}

.kb-balance-over{
  color:#ef4444 !important;
}

.kb-balance-ok{
  color:#22c55e !important;
}

.kb-pcell{
  min-width: 96px;
  padding: 6px 8px !important;
}

.kb-pbar{
  position: relative;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #e5e7eb;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
}

.kb-pbar span{
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ef4444 0%, #f59e0b 45%, #22c55e 100%);
  box-shadow: 0 0 8px rgba(34,197,94,0.20);
  transition: width .25s ease;
}

.kb-pct{
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  color: #0f172a;
}

/* Reqem sutunlarini merkezle */
#kbTableSplit tbody td:nth-child(3),
#kbTableSplit tbody td:nth-child(4),
#kbTableSplit tbody td:nth-child(5),
#kbTableSplit tbody td:nth-child(6),
#kbTableSplit tbody td:nth-child(7),
#kbTableSplit tbody td:nth-child(8),
#kbTableSplit thead th:nth-child(3),
#kbTableSplit thead th:nth-child(4),
#kbTableSplit thead th:nth-child(5),
#kbTableSplit thead th:nth-child(6),
#kbTableSplit thead th:nth-child(7),
#kbTableSplit thead th:nth-child(8){
  text-align: center !important;
  vertical-align: middle;
}

#kbTableSplit tbody td:nth-child(5) input.kb-target-input{
  margin: 0 auto;
  text-align: center;
}

#kbTableSplit tbody td:nth-child(8) .kb-pcell,
#kbTableSplit tbody td:nth-child(8){
  text-align: center !important;
}

/* Əməkdaşlar üzrə hesabat – Hədəf / Satış / Qalan / Faiz ortada olsun */
#kbTableEmp thead th:nth-child(4),
#kbTableEmp thead th:nth-child(5),
#kbTableEmp thead th:nth-child(6),
#kbTableEmp thead th:nth-child(7),
#kbTableEmp tbody td:nth-child(4),
#kbTableEmp tbody td:nth-child(5),
#kbTableEmp tbody td:nth-child(6),
#kbTableEmp tbody td:nth-child(7){
  text-align: center !important;
  vertical-align: middle;
}

#kbTableEmp tbody tr.kb-emp-total-row td{
  background: #f8fafc;
  font-weight: 700;
  border-top: 2px solid #dbeafe;
}

/* Hesabatı al statusu */
#kbApplyStatus{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:30px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(71,85,105,.68);
  background:rgba(15,23,42,.52);
  font-size:11px;
  font-weight:800;
  color:#cbd5e1;
  line-height:1.1;
}

#kbApplyStatus.is-loading{
  color:#93c5fd;
}

#kbApplyStatus.is-success{
  color:#86efac;
}

#kbApplyStatus.is-error{
  color:#fca5a5;
}

#kbApplyStatus::before{
  content:"";
  width:8px;
  height:8px;
  border-radius:999px;
  background:currentColor;
  opacity:.95;
}

#kbApplyStatus.is-loading::before{
  box-shadow:0 0 0 0 currentColor;
  animation:kbPulse 1s ease-in-out infinite;
}

@keyframes kbPulse{
  0%   { transform:scale(0.9); opacity:.7; box-shadow:0 0 0 0 rgba(147,197,253,.45); }
  70%  { transform:scale(1.08); opacity:1; box-shadow:0 0 0 10px rgba(147,197,253,0); }
  100% { transform:scale(0.9); opacity:.7; box-shadow:0 0 0 0 rgba(147,197,253,0); }
}

#kbKvotaApplyTargets.is-busy{
  position:relative;
  pointer-events:none;
  opacity:.9;
}

#kbKvotaApplyTargets.is-busy::after{
  content:"";
  width:14px;
  height:14px;
  border-radius:999px;
  border:2px solid rgba(255,255,255,.35);
  border-top-color:#fff;
  display:inline-block;
  margin-left:8px;
  vertical-align:-2px;
  animation:kbSpin .8s linear infinite;
}

@keyframes kbSpin{
  to{ transform:rotate(360deg); }
}
