:root {
  --brand: #223079;
  --brand2: #3A4D9F;
  --brand-tint: #EEF2FD;
  --gold: #D6A32B;
  --bg: #F4F6FB;
  --text: #17203B;
  --muted: #7A8296;
  --border: #E7EBF3;
  --border2: #E3E8F1;
  --line: #EEF1F6;
  --line2: #F4F6FA;
  --sidebar-w: 256px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: #1A2660; }
button, input, select, textarea { font-family: inherit; }
::selection { background: rgba(214,163,43,.28); }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #D3DAE6; border-radius: 8px; border: 2px solid #F4F6FB; }

@keyframes kb-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes kb-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes kb-pop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@keyframes kb-drawer-in { from { opacity: .96; transform: translateX(18px); } to { opacity: 1; transform: none; } }

.kb-ico { display: block; flex: 0 0 auto; }
.kb-app { display: flex; min-height: 100vh; width: 100%; position: relative; background: var(--bg); }

/* ===== SIDEBAR ===== */
.kb-sidebar {
  position: sticky; top: 0; height: 100vh; width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  z-index: 20; background: #fff; border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.kb-logo {
  padding: 20px 18px 15px; border-bottom: 1px solid #EEF1F6;
  display: flex; align-items: center; gap: 12px;
}
.kb-logo-img { height: 30px; display: block; width: auto; max-width: 100%; }
.kb-logo-mark {
  display: none; width: 40px; height: 40px; border-radius: 11px;
  background: var(--brand); color: #fff;
  align-items: center; justify-content: center;
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 19px; flex: 0 0 auto;
}
.kb-logo-text { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 15px; color: #1B2340; line-height: 1.15; }
.kb-logo-sub { font-size: 11.5px; color: #97A0B5; margin-top: 1px; }
.kb-nav { flex: 1; overflow-y: auto; padding: 16px 12px; }
.kb-nav-label {
  font-size: 11px; font-weight: 700; letter-spacing: .09em; color: #A0A9BC;
  padding: 0 8px 10px;
}
.kb-nav-item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 11px; margin-bottom: 3px;
  font-weight: 500; font-size: 14px; color: #5A6379;
  transition: all .13s;
}
.kb-nav-item:hover { background: #F5F7FB; color: var(--brand); }
.kb-nav-item.active {
  background: var(--brand-tint); color: var(--brand); font-weight: 700;
}
.kb-nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 22px; border-radius: 0 4px 4px 0; background: var(--brand);
}
.kb-nav-item svg { stroke: currentColor; }
.kb-profile { padding: 12px; border-top: 1px solid #EEF1F6; }
.kb-profile-card {
  display: flex; align-items: center; gap: 11px;
  padding: 8px; border-radius: 12px; background: #F5F7FB; width: 100%; box-sizing: border-box;
}
.kb-avatar {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 14px; flex: 0 0 auto;
}
.kb-logout {
  cursor: pointer; width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: #FBEEED; border: none; color: #C0392B; flex: 0 0 auto; padding: 0;
}

/* ===== MAIN / TOPBAR ===== */
.kb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.kb-topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid #E7EBF3;
  padding: 12px clamp(16px, 2.4vw, 28px);
  display: flex; align-items: center; gap: 14px;
}
.kb-page-title {
  font-family: "Space Grotesk", sans-serif; font-size: 17px; font-weight: 600;
  color: #1B2340; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kb-page-sub { font-size: 12px; color: #8A93A8; white-space: nowrap; }
.kb-search-fake {
  cursor: text; display: flex; align-items: center; gap: 9px;
  border: 1px solid #E3E8F1; border-radius: 11px; padding: 9px 14px;
  min-width: 0; max-width: 280px; flex: 1; background: #F7F9FC; color: #97A0B5; font-size: 13.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kb-icon-btn {
  position: relative; cursor: pointer; width: 40px; height: 40px; border-radius: 11px;
  border: 1px solid #E3E8F1; display: flex; align-items: center; justify-content: center;
  background: #fff; flex: 0 0 auto; color: #5A6379; padding: 0;
}
.kb-icon-btn .dot {
  position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%;
  background: #D6A32B; border: 2px solid #fff;
}
.kb-content { flex: 1; padding: clamp(16px, 2.4vw, 30px); animation: kb-fade-in .25s ease; }

/* ===== CARDS / KPI ===== */
.kb-page { max-width: 1360px; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(15px, 2vw, 20px); }
.kb-card {
  background: #fff; border: 1px solid #E7EBF3; border-radius: 16px; padding: 18px;
  box-shadow: 0 1px 2px rgba(23,32,59,.04);
}
.kb-card-pad { padding: 20px; }
.kb-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(202px, 1fr)); gap: 14px; }
.kb-kpi {
  background: #fff; border: 1px solid #E7EBF3; border-radius: 16px; padding: 18px;
  box-shadow: 0 1px 2px rgba(23,32,59,.04);
  display: flex; flex-direction: column; gap: 11px; min-width: 0;
}
.kb-kpi.clickable { cursor: pointer; }
.kb-kpi.clickable:hover { border-color: #D5DCEC; }
.kb-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kb-kpi-label { font-size: 13px; font-weight: 600; color: #667088; }
.kb-kpi-icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.kb-kpi-value {
  font-family: "Space Grotesk", sans-serif; font-size: clamp(21px, 2.2vw, 27px);
  font-weight: 600; letter-spacing: -.02em; color: #171F38;
}
.kb-kpi-foot { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #8A93A8; }
.kb-delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: #1E8A5E; }
.kb-delta.down { color: #C0392B; }

.kb-mid { display: grid; grid-template-columns: minmax(0,1.9fr) minmax(0,1fr); gap: 16px; align-items: start; }
.kb-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.kb-h { font-family: "Space Grotesk", sans-serif; font-size: 15px; font-weight: 600; color: #1B2340; }
.kb-sub { font-size: 12px; color: #8A93A8; }
.kb-muted { color: #97A0B5; font-size: 12.5px; }
.kb-link { font-size: 12.5px; font-weight: 600; color: var(--brand); cursor: pointer; }
.kb-link:hover { color: #1A2660; }

.kb-bar { display: flex; height: 14px; border-radius: 8px; overflow: hidden; background: #F1F4F9; }
.kb-bar > span { display: block; height: 100%; }
.kb-bar-brand { background: linear-gradient(90deg, var(--brand), var(--brand2)); }
.kb-bar-gold { background: linear-gradient(90deg, #B9840F, #D6A32B); }
.kb-bar-gold2 { background: linear-gradient(90deg, #D6A32B, #E7B948); }
.kb-bar-blue { background: linear-gradient(90deg, #1E6FA5, #3A8DE0); }

.kb-mini {
  flex: 1; min-width: 150px; border: 1px solid #EEF1F6; border-radius: 12px; padding: 12px 14px;
}
.kb-mini.gold { border-color: #F2E9CF; background: #FDFAF1; }
.kb-mini.blue { border-color: #E1EDF5; background: #F5FAFD; }
.kb-dot { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 auto; }
.kb-row-flex { display: flex; gap: 14px; flex-wrap: wrap; }
.kb-head-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; }
.kb-title-xl {
  font-family: "Space Grotesk", sans-serif; font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 600; letter-spacing: -.02em; color: #1B2340;
}
.kb-title-sub { color: #7A8296; font-size: 14px; margin-top: 3px; }

/* segment / period */
.kb-seg {
  display: flex; gap: 3px; background: #fff; border: 1px solid #E7EBF3;
  border-radius: 12px; padding: 4px; flex-wrap: wrap;
}
.kb-seg a, .kb-seg button {
  padding: 7px 15px; border-radius: 9px; border: none; cursor: pointer;
  font-size: 13px; font-weight: 600; color: #5A6379; background: transparent; transition: all .13s;
  text-decoration: none;
}
.kb-seg a.active, .kb-seg button.active { color: #fff; background: var(--brand); }
.kb-seg a:hover:not(.active) { color: var(--brand); }

.kb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 15px; border-radius: 12px; border: none;
  font-weight: 600; font-size: 13.5px; cursor: pointer; transition: .15s ease;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
}
.kb-btn:disabled,
.kb-btn[disabled] {
  background: #CBD3E1 !important;
  color: #fff !important;
  border-color: #CBD3E1 !important;
  box-shadow: none !important;
  cursor: not-allowed;
  opacity: 1;
}
.kb-btn-primary {
  background: var(--brand); color: #fff;
  box-shadow: 0 10px 22px -12px rgba(34,48,121,.7);
}
.kb-btn-primary:hover:not(:disabled):not([disabled]) { background: #1A2660; color: #fff; }
.kb-btn-gold {
  border: 1.5px solid #EAD9AE; background: #FCF7EA; color: #8A6410;
}
.kb-btn-gold:hover:not(:disabled):not([disabled]) { background: #F8EFDA; color: #8A6410; }
.kb-btn-ghost {
  background: #fff; color: var(--brand); border: 1px solid #E3E8F1;
}
.kb-btn-ok { background: #1E8A5E; color: #fff; border: none; }
.kb-btn-danger {
  padding: 9px 14px; border: 1px solid #E7C6C2; border-radius: 9px;
  background: #fff; color: #C0392B; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.kb-btn-sm { padding: 9px; font-size: 12.5px; border-radius: 9px; }
.kb-btn-tint {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
  color: var(--brand); background: var(--brand-tint); border: none; border-radius: 9px;
  padding: 8px 12px; cursor: pointer;
}

/* pending card */
.kb-pending {
  border: 1px solid #EEF1F6; border-radius: 12px; padding: 12px;
  display: flex; flex-direction: column; gap: 0;
}
.kb-pending + .kb-pending { margin-top: 10px; }
.kb-tip {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px;
}
.kb-tip.faturali { color: #1E6FA5; background: #E7F1F8; }
.kb-tip.faturasiz { color: #B9840F; background: #FBF1D6; }

.kb-badge {
  display: inline-flex; align-items: center; padding: 3px 9px;
  border-radius: 6px; font-size: 11.5px; font-weight: 700;
}
.kb-badge.warn { background: #FBF1D6; color: #B9840F; }
.kb-badge.info { background: #E7F1F8; color: #1E6FA5; }
.kb-badge.ok { background: #E5F3EC; color: #1E8A5E; }
.kb-badge.danger { background: #FBE9E7; color: #C0392B; }
.kb-badge.purple { background: #F1EBFB; color: #7A4FC9; }
.kb-badge.teal { background: #E1F3F1; color: #0F8A8A; }

/* table like template */
.kb-table-wrap { background: #fff; border: 1px solid #E7EBF3; border-radius: 16px; overflow: hidden; }
.kb-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kb-table th {
  text-align: left; font-size: 11px; font-weight: 700; color: #97A0B5; letter-spacing: .03em;
  padding: 13px 18px; border-bottom: 1px solid #EEF1F6; background: #fff;
}
.kb-table td { padding: 14px 18px; border-bottom: 1px solid #F4F6FA; vertical-align: middle; color: #2A3350; }
.kb-table tr:last-child td { border-bottom: none; }
.kb-table tbody tr { cursor: pointer; }
.kb-table tbody tr:hover td { background: #FAFBFE; }
.kb-table tbody tr.kb-row-selected td { background: #F7F9FC; }

.kb-products-toolbar {
  padding: 12px 16px;
  border-bottom: 1px solid #EEF1F6;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.kb-products-search {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.kb-products-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: #2A3350;
}
.kb-products-limit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #5A6379;
  flex: 0 0 auto;
}
.kb-products-limit select {
  border: 1px solid #E7EBF3;
  border-radius: 8px;
  padding: 6px 10px;
  background: #fff;
  color: #2A3350;
  font-size: 13px;
  outline: none;
}
.kb-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid #EEF1F6;
  background: #FAFBFE;
}
.kb-pager-info { font-size: 12.5px; color: #97A0B5; }
.kb-pager-nav { display: flex; align-items: center; gap: 8px; }
.kb-pager-page {
  min-width: 28px;
  text-align: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: #171F38;
}
.kb-pager-disabled {
  opacity: .45;
  pointer-events: none;
  cursor: default;
}

/* progress bars */
.kb-progress { flex: 1; height: 8px; border-radius: 6px; background: #F1F4F9; overflow: hidden; }
.kb-progress > span {
  display: block; height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
}
.kb-progress.gold > span { background: linear-gradient(90deg, #D6A32B, #E7B948); }
.kb-progress.lg { height: 9px; }

/* calendar */
.kb-cal-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr); gap: 18px; }
.kb-cal-weekdays, .kb-cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.kb-cal-wd {
  text-align: center; font-size: 11px; font-weight: 700; color: #A0A9BC; padding: 4px 0;
}
.kb-cal-day {
  position: relative; min-height: 62px; padding: 7px 8px; border-radius: 11px;
  border: 1px solid transparent; display: flex; flex-direction: column; gap: 4px;
  transition: all .12s; cursor: pointer;
}
button.kb-cal-day {
  appearance: none; -webkit-appearance: none; background: transparent; color: inherit;
  font: inherit; text-align: left; width: 100%; margin: 0;
}
.kb-cal-day.other { opacity: .32; cursor: default; }
.kb-cal-day.has-due { background: #FAFBFE; }
.kb-cal-day.selected { border-color: var(--brand); background: #F1F5FE; }
.kb-cal-num {
  font-family: "Space Grotesk", sans-serif; font-size: 13px; font-weight: 600; color: #2A3350;
  display: flex; align-items: center; justify-content: center; width: auto; height: auto; border-radius: 7px;
}
.kb-cal-num.today {
  font-weight: 800; color: #fff; width: 22px; height: 22px; background: var(--brand);
}
.kb-cal-due {
  margin-top: auto; font-family: "Space Grotesk", sans-serif; font-size: 10.5px; font-weight: 600;
  color: #8A6410; background: #FBF1D6; border-radius: 6px; padding: 2px 5px; text-align: center;
}

.kb-kk-row {
  display: flex; align-items: center; gap: 11px; padding: 9px 2px;
  border-bottom: 1px solid #F4F6FA;
}
.kb-kk-row:last-child { border-bottom: none; }
.kb-kk-av {
  width: 34px; height: 34px; border-radius: 9px; background: #F1F4F9; color: #5A6379;
  font-family: "Space Grotesk", sans-serif; font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}

.kb-searchbox {
  display: flex; align-items: center; gap: 10px; border: 1px solid #E3E8F1; border-radius: 11px;
  padding: 0 14px; background: #F7F9FC; flex: 1; min-width: 160px;
}
.kb-searchbox input {
  flex: 1; border: none; outline: none; background: transparent; padding: 11px 0;
  font-size: 13.5px; color: #2A3350; min-width: 0;
}

.kb-input, .kb-select {
  width: 100%; padding: 12px 14px; border: 1.5px solid #E3E8F1;
  border-radius: 12px; background: #F9FAFD; font-size: 14px; outline: none; color: #2A3350;
}
.kb-input:focus, .kb-select:focus { border-color: var(--brand); background: #fff; }
.kb-label { display: block; font-size: 12.5px; font-weight: 600; color: #5A6379; margin-bottom: 6px; }

.kb-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 120;
  display: flex; align-items: center; gap: 10px;
  background: #1B2340; color: #fff; padding: 13px 18px; border-radius: 12px;
  font-size: 13.5px; box-shadow: 0 18px 40px -14px rgba(15,20,40,.7);
  animation: kb-pop .2s ease; max-width: min(440px, 90vw);
  pointer-events: none;
}
.kb-toast .kb-toast-icon {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: #1E8A5E; font-size: 12px; font-weight: 700; line-height: 1;
}
.kb-toast.warn .kb-toast-icon { background: #B9840F; }
.kb-toast.danger .kb-toast-icon { background: #C0392B; }
.kb-toast.hide { opacity: 0; transition: opacity .25s ease; }

@keyframes kb-pop {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== LOGIN ===== */
.kb-login { min-height: 100vh; display: flex; flex-wrap: wrap; background: #F4F6FB; }
.kb-login-hero {
  flex: 1 1 430px; min-height: 320px;
  background: linear-gradient(158deg, var(--brand) 0%, #1B2660 58%, #141D50 100%);
  color: #fff; padding: clamp(30px, 4vw, 66px);
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.kb-login-hero::before {
  content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%;
  border: 28px solid #D6A32B; right: -130px; top: -100px; opacity: .16;
}
.kb-login-hero::after {
  content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%;
  background: #D6A32B; right: 70px; bottom: -90px; opacity: .10;
}
.kb-login-form-wrap {
  flex: 1 1 440px; display: flex; align-items: center; justify-content: center;
  padding: clamp(26px, 4vw, 56px);
}
.kb-role-card {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  padding: 14px 16px; border-radius: 14px; transition: all .15s;
  border: 1.5px solid #E3E8F1; background: #fff;
}
.kb-role-card.active {
  border-color: var(--brand); background: #F3F6FE;
  box-shadow: 0 8px 20px -12px rgba(34,48,121,.55);
}
.kb-role-icon {
  width: 42px; height: 42px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  background: #F1F4F9; color: #8A93A8;
}
.kb-role-card.active .kb-role-icon { background: #E4EAFB; color: var(--brand); }
.kb-role-check {
  width: 22px; height: 22px; border-radius: 50%; background: var(--brand);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto; color: #fff;
}

.kb-stack { display: flex; flex-direction: column; gap: 14px; }
.kb-stack-sm { display: flex; flex-direction: column; gap: 10px; }
.kb-icon-title { display: flex; align-items: center; gap: 10px; }
.kb-icon-box {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}

/* ===== SIDE DRAWER (template orderDrawer) ===== */
.kb-drawer-backdrop {
  position: fixed; inset: 0; z-index: 65;
  background: rgba(15,20,40,.5);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  display: flex; justify-content: flex-end;
}
.kb-drawer-backdrop[hidden] { display: none !important; }
.kb-drawer {
  width: 100%; max-width: 460px; height: 100%;
  background: #fff;
  box-shadow: -20px 0 60px -20px rgba(15,20,40,.5);
  overflow-y: auto;
  animation: kb-drawer-in .2s ease;
  display: flex; flex-direction: column;
}
.kb-drawer-head {
  padding: 20px; border-bottom: 1px solid #EEF1F6;
  display: flex; align-items: center; gap: 12px;
  position: sticky; top: 0; background: #fff; z-index: 1;
}
.kb-drawer-body { padding: 20px; flex: 1; }
.kb-drawer-close {
  cursor: pointer; width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid #E3E8F1; display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto; background: #fff; color: #5A6379; padding: 0;
}
.kb-step { display: flex; gap: 12px; }
.kb-step-rail { display: flex; flex-direction: column; align-items: center; }
.kb-step-dot {
  width: 14px; height: 14px; border-radius: 50%; flex: 0 0 auto; background: #E3E8F1;
}
.kb-step-dot.done { background: var(--brand); }
.kb-step-line { width: 2px; flex: 1; min-height: 16px; background: #E3E8F1; }
.kb-step-line.done { background: var(--brand); }
.kb-step-label { font-size: 13.5px; font-weight: 500; color: #97A0B5; padding-bottom: 16px; }
.kb-step-label.done { color: #1B2340; }
.kb-step-label.current { font-weight: 700; color: #1B2340; }
.kb-drawer-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid #F4F6FA;
}
.kb-note {
  display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; margin-bottom: 18px;
  font-size: 12.5px; line-height: 1.5; align-items: flex-start;
}
.kb-note.warn { background: #FDFAF1; border: 1px solid #F2E9CF; color: #8A6410; }
.kb-note.ok { background: #EAF6EF; border: 1px solid #CDEBDA; color: #1E8A5E; align-items: center; }
.kb-note.danger { background: #FBE9E7; border: 1px solid #F1CFC9; color: #C0392B; align-items: center; font-weight: 600; }
.kb-note.brand { background: var(--brand-tint); border: 1px solid #D6DEF5; color: #2A3B7A; }

/* full-bleed gradient promo banner (Bayi dashboard) */
.kb-banner-gradient {
  background: linear-gradient(120deg, var(--brand), var(--brand2));
  border-radius: 18px; padding: clamp(18px, 3vw, 26px) clamp(20px, 3vw, 28px); color: #fff;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.kb-banner-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; opacity: .78; }
.kb-banner-title { font-family: "Space Grotesk", sans-serif; font-size: clamp(19px, 2.4vw, 23px); font-weight: 700; margin-top: 5px; }
.kb-banner-sub { font-size: 13.5px; opacity: .92; margin-top: 6px; max-width: 560px; line-height: 1.5; }
.kb-banner-cta {
  padding: 13px 22px; border: none; border-radius: 12px; background: #fff; color: var(--brand);
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
}

/* quick chip toggle (depo / kategori / ödeme tipi) */
.kb-chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.kb-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 10px;
  border: 1.5px solid #E3E8F1; background: #fff; color: #5A6379; font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: all .13s;
}
.kb-chip:hover { color: var(--brand); }
.kb-chip.active { border-color: var(--brand); background: var(--brand-tint); color: var(--brand); }
.kb-chip.active.ok { border-color: #1E8A5E; background: #E5F3EC; color: #1E8A5E; }

.kb-agenda-dayrail {
  width: 52px; flex: 0 0 52px; border-radius: 12px; background: var(--brand);
  color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: 10px 6px; min-height: 56px;
}
.kb-select {
  border: 1px solid #E3E8F1; border-radius: 11px; padding: 11px 12px;
  background: #F7F9FC; font-size: 14px; color: #2A3350; outline: none; cursor: pointer; width: 100%;
}
.kb-check {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: #5A6379;
  width: auto; height: auto; white-space: nowrap; flex: 0 0 auto;
  background: transparent; border-radius: 0;
}
.kb-check input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--brand); margin: 0; }

.kb-cal-detail { min-width: 0; border-left: 1px solid #EEF1F6; padding-left: 18px; }
/* Bayi dashboard: takvim + gün detayı alt alta (kb-mid sol kolonunda) */
.kb-due-calendar-stack .kb-cal-grid { grid-template-columns: 1fr; }
.kb-due-calendar-stack .kb-cal-detail { border-left: none; padding-left: 0; border-top: 1px solid #EEF1F6; padding-top: 16px; }
.kb-hamburger {
  display: flex; cursor: pointer; width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid #E3E8F1; background: #fff; align-items: center; justify-content: center; flex: 0 0 auto; padding: 0;
}
.kb-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(23,32,59,.36); z-index: 40;
}
.kb-app.kb-sidebar-open .kb-backdrop { display: block; }
.kb-theme-wrap { position: relative; flex: 0 0 auto; }
.kb-theme-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
  background: #fff; border: 1px solid #E7EBF3; border-radius: 14px; padding: 6px;
  box-shadow: 0 12px 28px rgba(23,32,59,.12); min-width: 196px;
}
.kb-theme-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 11px; border-radius: 10px; border: none; background: transparent;
  cursor: pointer; font-size: 13px; font-weight: 600; color: #2A3350; text-align: left;
}
.kb-theme-row:hover { background: var(--brand-tint); }
.kb-swatch { width: 16px; height: 16px; border-radius: 5px; flex: 0 0 auto; }

/* Bayi navbar cart badge */
.kb-cart-nav { position: relative; }
.kb-cart-nav-badge {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px;
  padding: 0 4px; border-radius: 9px; background: var(--brand, #223079); color: #fff;
  font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff; line-height: 1;
}
.kb-cart-nav-badge[hidden] { display: none !important; }

/* Centered product detail modal */
.kb-modal-backdrop {
  position: fixed; inset: 0; z-index: 62;
  background: rgba(15, 20, 40, .55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.kb-modal-backdrop[hidden] { display: none !important; }
.kb-modal {
  width: 100%; max-width: 640px; background: #fff; border-radius: 20px;
  box-shadow: 0 30px 80px -20px rgba(15, 20, 40, .6);
  animation: kb-modal-pop .2s ease; overflow: hidden;
}
@keyframes kb-modal-pop {
  from { opacity: 0; transform: scale(.97); }
  to { opacity: 1; transform: none; }
}

/* Catalog lastik CSS-grid rows (template) */
.kb-cat-grid-head,
.kb-cat-grid-row {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr .9fr .9fr 1fr 1.5fr;
  gap: 10px; align-items: center; padding: 12px 18px;
}
.kb-cat-grid-head {
  padding: 13px 18px; border-bottom: 1px solid #EEF1F6;
  font-size: 11px; font-weight: 700; color: #97A0B5; letter-spacing: .03em;
}
.kb-cat-grid-row { border-bottom: 1px solid #F4F6FA; }
.kb-cat-grid-row:last-child { border-bottom: none; }

html.kb-collapsed { --sidebar-w: 76px; }
html.kb-collapsed .kb-logo-img { display: none; }
html.kb-collapsed .kb-logo-mark { display: flex; }
html.kb-collapsed .kb-nav-label,
html.kb-collapsed .kb-nav-item span,
html.kb-collapsed .kb-profile-meta,
html.kb-collapsed .kb-logout { display: none; }
html.kb-collapsed .kb-logo { justify-content: center; padding-left: 0; padding-right: 0; }
html.kb-collapsed .kb-nav-item { justify-content: center; padding-left: 10px; padding-right: 10px; }
html.kb-collapsed .kb-nav-item.active::before { display: none; }
html.kb-collapsed .kb-profile-card { justify-content: center; }

@media (max-width: 1100px) {
  .kb-mid, .kb-cal-grid { grid-template-columns: 1fr; }
  .kb-cal-detail { border-left: none; padding-left: 0; border-top: 1px solid #EEF1F6; padding-top: 16px; }
}
@media (max-width: 900px) {
  .kb-sidebar {
    display: flex; position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-105%); transition: transform .2s ease; z-index: 50;
  }
  .kb-app.kb-sidebar-open .kb-sidebar { transform: none; }
  .kb-search-fake { display: none; }
  html.kb-collapsed { --sidebar-w: 256px; }
  html.kb-collapsed .kb-logo-img { display: block; }
  html.kb-collapsed .kb-logo-mark { display: none; }
  html.kb-collapsed .kb-nav-label,
  html.kb-collapsed .kb-nav-item span,
  html.kb-collapsed .kb-profile-meta,
  html.kb-collapsed .kb-logout { display: block; }
  html.kb-collapsed .kb-nav-item span { display: inline; }
  html.kb-collapsed .kb-profile-meta { display: block; }
}

/* Sevk fişi print — layout yer kaplamasın (1. sayfa boş kalmasın) */
@media print {
  html, body {
    height: auto !important;
    overflow: visible !important;
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  body > * { display: none !important; }
  body > .kb-modal-backdrop:not([hidden]) {
    display: block !important;
    position: static !important;
    inset: auto !important;
    background: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: auto !important;
  }
  .kb-print-sheet {
    display: block !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    animation: none !important;
    overflow: visible !important;
  }
  .kb-no-print { display: none !important; }
}
