* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, Arial, sans-serif; font-size: 14px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 20px; background: #000080; color: #fff; min-height: 46px; }
.topbar-left { display: flex; align-items: center; gap: 8px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.brand-img { height: 28px; width: auto; display: block; object-fit: contain }
.user { display: flex; align-items: center; gap: 8px; position: relative; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: #b8c0ff; color: #00002a; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar.has-img { background: transparent; color: inherit; border: 1px solid #e3e3e3; }
.profile-header { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.avatar-lg { width: 96px; height: 96px; border-radius: 50%; background: #b8c0ff; color: #00002a; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 36px; border: 1px solid #e3e3e3; }
.avatar-lg img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar-lg.has-img { background: transparent; color: inherit; }
.profile-meta .profile-name { font-size: 18px; font-weight: 700; }
.profile-meta .profile-sub { color: #666; font-size: 13px; }
.upload-hint { color: #777; font-size: 12px; margin-left: 8px; }
.profile-grid { display: grid; grid-template-columns: 280px 1fr; gap: 12px; }
.profile-card { text-align: center; }
.avatar-xl { width: 180px; height: 180px; border-radius: 50%; background: #b8c0ff; color: #00002a; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 72px; border: 1px solid #e3e3e3; margin: 0 auto 8px; }
.avatar-xl img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar-xl.has-img { background: transparent; color: inherit; }
.profile-name.big { font-size: 20px; font-weight: 700; }
.profile-sub.muted { color: #666; }
.profile-actions { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
.profile-detail .detail-list { margin-top: 4px; }
.profile-detail .detail-row { display: grid; grid-template-columns: 160px 1fr; padding: 10px 12px; border-top: 1px solid #e3e3e3; }
.profile-detail .detail-row:first-child { border-top: 0; }
.profile-detail .detail-label { color: #666; font-weight: 600; }
.profile-detail .detail-value { color: #222; }
.profile-edit { max-width: 820px; }
.profile-edit .edit-grid { display: grid; grid-template-columns: repeat(2, minmax(240px, 1fr)); gap: 10px; }
.profile-edit .input { display: flex; align-items: center; gap: 10px; background: #f8f9fc; border: 1px solid #e3e3e3; border-radius: 10px; padding: 12px 14px; }
.profile-edit .input .icon { color: #666; width: 22px; text-align: center; }
.profile-edit .input input { border: 0; outline: 0; flex: 1; font-size: 14px; background: transparent; }
.profile-edit .input.active-row, .profile-edit .input.full-row { grid-column: 1 / -1; }
.profile-edit .form-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
@media (max-width: 720px) { .profile-edit .edit-grid { grid-template-columns: 1fr; } }
.user-toggle { background: transparent; border: 0; color: #fff; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.user-toggle .name { font-size: 14px; font-weight: 500; }
.user-menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; color: #222; border: 1px solid rgba(0,0,0,.1); border-radius: 8px; min-width: 160px; box-shadow: 0 8px 24px rgba(0,0,0,.12); display: none; z-index: 10; }
.user-menu a { display: block; padding: 8px 12px; color: #222; text-decoration: none; }
.user-menu a:hover { background: #f5f5f5; }
.brand { font-weight: 600; }
.layout { display: flex; min-height: calc(100vh - 48px); position: relative; }
.page-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.page-title { display:flex; align-items:center; gap:10px; font-size:30px; font-weight:700; }
.page-title.h0 { font-size:28px; }
.page-header .actions { display:flex; gap:8px; }
.sidebar { 
  width: 260px; 
  min-width: 260px;
  max-width: 260px;
  background: #343a40; 
  padding: 12px; 
  border-right: 1px solid #0a0a3a; 
  color: #e6e9ff; 
  font-size: 12px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.3s ease,
              width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              border-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(0);
  opacity: 1;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.sidebar nav a { display: block; padding: 8px 6px; color: #e6e9ff; text-decoration: none; font-size: 12px; }
.sidebar nav a:hover { background: rgba(255,255,255,0.08); }
.menu { list-style: none; padding: 0; margin: 8px 0; }
.menu > li { margin-bottom: 6px; }
.menu-toggle { width: 100%; text-align: left; padding: 8px 6px; background: transparent; border: 0; font-weight: 600; cursor: pointer; color: #e6e9ff; font-size: 14px; }
.sidebar .menu-toggle { font-size: 12px; }
.menu-toggle:hover { background: rgba(255,255,255,0.08); }
.menu-toggle::after { 
  content: '▸'; 
  float: right; 
  color: #b8c0ff; 
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1); 
  display: inline-block;
}
.open > .menu-toggle::after { transform: rotate(90deg); }
.submenu { 
  list-style: none; 
  padding: 0; 
  margin: 6px 0 0 24px; 
  display: none;
  overflow: hidden;
}
.submenu li a { padding: 6px 12px; font-size: 14px; color: #e6e9ff; }
.sidebar .submenu li a { font-size: 12px; }
.sidebar .icon { display:inline-block; width: 18px; margin-right: 8px; text-align: center; }
.sidebar hr { border: 0; border-top: 1px solid #ffffff; opacity: .5; margin: 10px 0; }
.content { 
  flex: 1; 
  padding: 16px; 
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: 0;
  font-size: 13px;
}
.footer { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.97); border-top: 1px solid #e3e3e3; padding: 10px 16px; z-index: 1000; box-shadow: 0 -2px 12px rgba(0,0,0,.08); }
.content { padding-bottom: 56px; }
.content .page-title { font-size: 26px; }
.content .card-header { font-size: 15px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.card { border: 1px solid #e3e3e3; border-radius: 8px; padding: 12px; background: #fff; }
.card-header { font-weight: 600; font-size: 16px; background: #f5f6fa; border-bottom: 1px solid #e3e3e3; margin: -12px -12px 12px -12px; padding: 10px 12px; border-top-left-radius: 8px; border-top-right-radius: 8px; }
.card-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-toolbar .left, .card-toolbar .right { display: flex; align-items: center; gap: 8px; }
.card-toolbar select { padding: 6px; }
.card-toolbar .search-input { padding: 6px; }
.table { width: 100%; border-collapse: collapse; border: 1px solid #e3e3e3; border-radius: 8px; overflow: hidden; }
.table thead th { background: #f5f6fa; color: #333; font-weight: 600; text-align: left; padding: 10px; border-bottom: 1px solid #e3e3e3; }
.table tbody td { padding: 10px; border-top: 1px solid #f0f0f0; }
.table tbody tr:nth-child(odd) { background: #f6f7fb; }
.table tbody tr:nth-child(even) { background: #ffffff; }
.table tbody tr:hover { background: #f9fbff; }
.anggota-master .master-row { cursor: pointer; }
.anggota-master .detail-row { display: none; background: #f9fafc; }
.anggota-master .detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.anggota-master .master-row .caret { display: inline-block; width: 16px; color: #666; }
.anggota-master .master-row.open .caret { transform: rotate(90deg); }
.suplier-master .master-row { cursor: pointer; }
.suplier-master .detail-row { display: none; background: #f9fafc; }
.suplier-master .detail-grid { display: block; }
.suplier-master .master-row .caret { display: inline-block; width: 16px; color: #666; }
.suplier-master .master-row.open .caret { transform: rotate(90deg); }
.kemitraan-master .master-row { cursor: pointer; }
.kemitraan-master .detail-row { display: none; background: #f9fafc; }
.kemitraan-master .detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.kemitraan-master .master-row .caret { display: inline-block; width: 16px; color: #666; cursor: pointer; user-select: none; }
.kemitraan-master .master-row.open .caret { transform: rotate(90deg); }
/* Header tabel kemitraan */
.kemitraan-th { background: #000080 !important; color: #fff !important; font-weight: 600; text-align: center; vertical-align: middle; padding: 10px; }
.kemitraan-th-daftar { background: #0d5c2e !important; color: #fff !important; font-weight: 600; text-align: center; vertical-align: middle; padding: 10px; }
/* Petunjuk singkat */
.kemitraan-hint { margin: 0 0 12px 0; padding: 8px 12px; background: #e8f4fd; border-left: 4px solid #0d6efd; border-radius: 4px; font-size: 13px; color: #333; }
.kemitraan-tabel-hint { margin: 0 0 12px 0; padding: 8px 12px; background: #f0f4f8; border-left: 4px solid #5c6bc0; border-radius: 4px; font-size: 13px; color: #333; }
/* Panel detail (baris yang dibuka) */
.kemitraan-detail-panel { padding: 12px 0; max-width: 100%; }
.kemitraan-detail-heading { font-size: 14px; font-weight: 600; color: #1a237e; margin-bottom: 12px; padding-bottom: 6px; border-bottom: 1px solid #c5cae9; }
.kemitraan-detail-section { margin-bottom: 14px; }
.kemitraan-detail-section:last-of-type { margin-bottom: 0; }
.kemitraan-detail-label { font-weight: 600; font-size: 12px; color: #455a64; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.03em; }
.kemitraan-inner-table { margin-top: 6px; width: 100%; font-size: 13px; }
.kemitraan-inner-table thead th { background: #37474f; color: #fff; padding: 8px 10px; font-weight: 600; text-align: left; }
.kemitraan-inner-table tbody td { padding: 8px 10px; border-top: 1px solid #eceff1; }
.kemitraan-inner-table tbody tr:nth-child(even) { background: #fafafa; }
.kemitraan-no-mitra { margin: 8px 0 0 0; padding: 10px; background: #fff8e1; border-radius: 4px; font-size: 13px; color: #795548; }
.kemitraan-add-section { padding-top: 12px; border-top: 1px dashed #b0bec5; margin-top: 12px; }
.kemitraan-add-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.kemitraan-add-form select { padding: 6px 8px; min-width: 200px; }
/* Tabel Daftar Mitra Suplier (halaman daftar_mitra) */
.kemitraan-tabel-daftar { margin-top: 0; }
.kemitraan-empty { text-align: center; padding: 20px !important; color: #657382; font-style: italic; }
.kemitraan-daftar-suplier-admin .tabel-daftar-mitra-suplier thead th { background: #0d5c2e !important; color: #fff !important; }
.kemitraan-daftar-suplier-admin .tabel-daftar-mitra-suplier tbody tr:nth-child(odd) { background: #f0f7f2; }
.kemitraan-daftar-suplier-admin .tabel-daftar-mitra-suplier tbody tr:nth-child(even) { background: #e3efe6; }
.kemitraan-daftar-suplier-admin .tabel-daftar-mitra-suplier tbody tr:hover { background: #d4e8d9; }
.kemitraan-group-first { border-top: 2px solid #b0bec5; }
.kemitraan-group-first:first-child { border-top: none; }
.table-actions { display: flex; gap: 6px; }
.btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 6px 8px; border-radius: 6px; border: 1px solid #e3e3e3; color: #222; text-decoration: none; background: #fff; }
.btn:hover { background: #f5f6fa; }
.btn-primary { background: #0d6efd; color: #fff; border-color: #0d6efd; }
.btn-primary:hover { background: #0b5ed7; }
.btn-secondary { background: #6c757d; color: #fff; border-color: #6c757d; }
.btn-secondary:hover { background: #5c636a; }
.btn-info { background: #0dcaf0; color: #000; border-color: #0dcaf0; }
.btn-info:hover { background: #31d2f2; }
.btn-warning { background: #ffc107; color: #000; border-color: #ffc107; }
.btn-warning:hover { background: #ffca2c; }
.btn-success { background: #198754; color: #fff; border-color: #198754; }
.btn-success:hover { background: #157347; }
.btn-danger { background: #dc3545; color: #fff; border-color: #dc3545; }
.btn-danger:hover { background: #bb2d3b; }
.btn-outline { background: #fff; color: #0d6efd; border-color: #0d6efd; }
.btn-outline:hover { background: #eef2ff; }
.btn-sm { padding: 3px 5px; font-size: 12.6px; }
.btn-add { font-size: 12.6px; padding: 6px 8px; }
.bar { width: 160px; height: 8px; background: #e3e3e3; border-radius: 6px; overflow: hidden; display: inline-block; vertical-align: middle; }
.bar-fill { height: 100%; background: #0d6efd; }
.footer { padding: 10px 16px; border-top: 1px solid #e3e3e3; background: #fafafa; }
.toggle { 
  background: transparent; 
  border: 0; 
  color: #fff; 
  font-size: 24px; 
  cursor: pointer; 
  transition: transform 0.2s ease;
  padding: 6px 10px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.toggle:hover {
  transform: scale(1.1);
}
.collapsed #sidebar { 
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
  width: 0;
  min-width: 0;
  max-width: 0;
  padding: 12px 0;
  border-right-width: 0;
}
.collapsed .content {
  margin-left: 0;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.login-wrap { 
  position: relative;
  display: flex; 
  align-items: center; 
  justify-content: center; 
  min-height: 100vh; 
  padding: 24px; 
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  overflow: hidden;
}
.login-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}
.login-bg-shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 20s infinite ease-in-out;
}
.login-bg-shape.shape-1 {
  width: 300px;
  height: 300px;
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}
.login-bg-shape.shape-2 {
  width: 200px;
  height: 200px;
  bottom: -50px;
  right: -50px;
  animation-delay: 5s;
}
.login-bg-shape.shape-3 {
  width: 150px;
  height: 150px;
  top: 50%;
  right: 10%;
  animation-delay: 10s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}
.login-card { 
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  animation: slideUp 0.5s ease-out;
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.login-header { 
  background: linear-gradient(135deg, #000080 0%, #1a1a8e 100%);
  padding: 40px 32px 32px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.login-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}
@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.login-logo-wrapper {
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
}
.login-logo { 
  width: 96px; 
  height: 96px; 
  object-fit: contain; 
  display: block; 
  margin: 0 auto;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.login-title { 
  position: relative;
  z-index: 1;
  font-weight: 700; 
  font-size: 28px; 
  margin: 0 0 8px 0;
  letter-spacing: -0.5px;
}
.login-subtitle { 
  position: relative;
  z-index: 1;
  font-size: 14px; 
  opacity: 0.9;
  margin: 0;
  font-weight: 400;
}
.login-body { 
  padding: 40px 32px 32px;
}
.login-error { 
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fee;
  color: #c62828;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 14px;
  border: 1px solid #ffcdd2;
  animation: shake 0.5s ease-in-out;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin: 0;
}
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 0;
  background: #fff;
  transition: all 0.3s ease;
}
.input-wrapper:focus-within {
  border-color: #000080;
  box-shadow: 0 0 0 4px rgba(0, 0, 128, 0.1);
  transform: translateY(-2px);
}
.input-icon {
  position: absolute;
  left: 16px;
  color: #666;
  pointer-events: none;
  transition: color 0.3s ease;
}
.input-wrapper:focus-within .input-icon {
  color: #000080;
}
.input-wrapper input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 16px 16px 16px 48px;
  font-size: 15px;
  background: transparent;
  color: #333;
  transition: all 0.3s ease;
}
.input-wrapper input::placeholder {
  color: #999;
}
.input-wrapper input:focus {
  color: #000;
}
.btn-login {
  width: 100%;
  background: linear-gradient(135deg, #000080 0%, #1a1a8e 100%);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 16px 24px;
  cursor: pointer;
  font-size: 12.6px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 128, 0.3);
  position: relative;
  overflow: hidden;
}
.btn-login::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}
.btn-login:hover::before {
  left: 100%;
}
.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 128, 0.4);
}
.btn-login:active {
  transform: translateY(0);
}
.btn-login svg {
  transition: transform 0.3s ease;
}
.btn-login:hover svg {
  transform: translateX(4px);
}
.login-footer { 
  margin-top: 32px;
  padding-top: 24px;
  text-align: center;
  font-size: 12px;
  color: #999;
  border-top: 1px solid #eee;
}
.login-footer p {
  margin: 0;
}
@media (max-width: 480px) {
  .login-wrap {
    padding: 16px;
  }
  .login-card {
    border-radius: 20px;
  }
  .login-header {
    padding: 32px 24px 24px;
  }
  .login-body {
    padding: 32px 24px 24px;
  }
  .login-title {
    font-size: 24px;
  }
}
.form-actions { margin-top: 12px }
.toggle-pass { background: transparent; border: 0; color: #666; cursor: pointer; }
.kuota-anggota-table thead th { font-size: 12px; padding: 6px 8px; }
.kuota-anggota-table tbody td { font-size: 12px; padding: 6px 8px; }
.kuota-anggota-table tr.total-row td { font-weight: 700; }
.kuota-anggota-table tr.total-row td:first-child { text-align: center; }
.kuota-anggota-table { table-layout: fixed; }
.kuota-anggota-table th:nth-child(1), .kuota-anggota-table td:nth-child(1) { width: 6%; }
.kuota-anggota-table th:nth-child(2), .kuota-anggota-table td:nth-child(2) { width: 17%; }
.kuota-anggota-table th:nth-child(3), .kuota-anggota-table td:nth-child(3) { width: 17%; }
.kuota-anggota-table th:nth-child(4), .kuota-anggota-table td:nth-child(4) { width: 17%; }
.kuota-anggota-table th:nth-child(5), .kuota-anggota-table td:nth-child(5) { width: 7%; text-align: right; }
.kuota-anggota-table th:nth-child(6), .kuota-anggota-table td:nth-child(6) { width: 7%; text-align: right; }
.kuota-anggota-table th:nth-child(7), .kuota-anggota-table td:nth-child(7) { width: 9%; }
.kuota-anggota-table th:nth-child(8), .kuota-anggota-table td:nth-child(8) { width: 10%; }
.kuota-anggota-table th:nth-child(9), .kuota-anggota-table td:nth-child(9) { width: 10%; }
.kuota-anggota-table .bar { width: 80px; }

/* Tabel recap: scroll horizontal & vertikal di wrapper ini; kolom No./Anggota/Jenis Karang freeze */
.kuota-recap-scroll-wrapper {
  margin: 12px 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  position: relative;
  overflow: auto;
  max-height: 70vh;
  max-width: 100%;
  width: 100%;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}
.kuota-recap-table-inner {
  overflow: visible;
  width: max-content;
}
.kuota-recap-table {
  table-layout: auto;
  width: max-content;
  border-collapse: collapse;
}
/* Lebar kolom 1 (No) dan 3 (Jenis Karang) tetap; kolom 2 (Anggota) menyesuaikan teks */
.kuota-recap-table thead th:nth-child(1),
.kuota-recap-table tbody td:nth-child(1) { width: 50px; min-width: 50px; max-width: 50px; }
.kuota-recap-table thead th:nth-child(2),
.kuota-recap-table tbody td:nth-child(2) { width: 180px; min-width: 180px; }
.kuota-recap-table thead th:nth-child(3),
.kuota-recap-table tbody td:nth-child(3) { width: 120px; min-width: 120px; }
.kuota-recap-table thead th.kuota-recap-anggota-th,
.kuota-recap-table tbody td.kuota-recap-anggota-cell { width: auto; min-width: 5.5em; max-width: none; white-space: nowrap; }
.kuota-recap-table thead th {
  font-size: 12px;
  padding: 8px 10px;
  white-space: normal;
  word-wrap: break-word;
  min-width: 80px;
  max-width: 100px;
  width: 100px;
  line-height: 1.35;
  text-align: center;
  vertical-align: middle;
}
.kuota-recap-table thead th:nth-child(1) { width: 50px; min-width: 50px; max-width: 50px; }
.kuota-recap-table thead th:nth-child(2) { width: 180px; min-width: 180px; max-width: 180px; }
.kuota-recap-table thead th.kuota-recap-anggota-th { width: auto; min-width: 5.5em; max-width: none; white-space: nowrap; }
.kuota-recap-table thead th:nth-child(3) { width: 120px; min-width: 120px; max-width: 120px; }
/* Kolom suplier: lebar proporsional sesuai panjang teks (inisial) */
.kuota-recap-table thead th.kuota-recap-suplier-th {
  width: auto;
  min-width: 7em;
  max-width: none;
  white-space: nowrap;
}
.kuota-recap-table tbody td {
  font-size: 12px;
  padding: 8px 10px;
  white-space: nowrap;
  min-width: 70px;
}
.kuota-recap-table tbody td.kuota-recap-suplier-cell {
  width: auto;
  min-width: 7em;
  white-space: nowrap;
}
.kuota-recap-table tbody td.kuota-recap-anggota-cell {
  text-align: center;
  cursor: help;
}
/* Header freeze: setiap th sticky ke atas area scroll */
.kuota-recap-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #000080;
  color: #fff;
  font-weight: bold;
  box-shadow: 0 2px 2px 0 rgba(0,0,0,0.1);
}
/* Freeze kolom 1–3 saat scroll horizontal (tbody) */
.kuota-recap-table.has-sticky-header tbody td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 2px 0 4px -1px rgba(0,0,0,0.08);
}
.kuota-recap-table.has-sticky-header tbody td:nth-child(2) {
  position: sticky;
  left: var(--kuota-recap-col2-left, 50px);
  z-index: 2;
  background: #fff;
  box-shadow: 2px 0 4px -1px rgba(0,0,0,0.08);
}
.kuota-recap-table.has-sticky-header tbody td:nth-child(3) {
  position: sticky;
  left: var(--kuota-recap-col3-left, 230px);
  z-index: 2;
  background: #fff;
  box-shadow: 2px 0 4px -1px rgba(0,0,0,0.08);
}
.kuota-recap-table.has-sticky-header tr.total-row td:nth-child(1),
.kuota-recap-table.has-sticky-header tr.total-row td:nth-child(2),
.kuota-recap-table.has-sticky-header tr.total-row td:nth-child(3) {
  background: #f0f4ff;
}
.kuota-recap-table tr.total-row td { font-weight: 700; }
.kuota-recap-table tr.total-row td:first-child { text-align: center; }

/* Sembunyikan thead asli saat pakai sticky clone (hapus baris kosong di bawah header) */
.kuota-recap-table.has-sticky-header > thead,
.kuota-recap-table.has-sticky-header > thead tr,
.kuota-recap-table.has-sticky-header > thead th {
  height: 0 !important;
  max-height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  line-height: 0 !important;
  overflow: hidden !important;
  font-size: 0 !important;
  visibility: hidden !important;
}

/* Sticky header clone (JS): tampil di atas tabel saat scroll */
.kuota-recap-sticky-header {
  width: 100%;
  min-width: 0;
}
.kuota-recap-sticky-header-table {
  table-layout: fixed;
  border-collapse: collapse;
}
.kuota-recap-sticky-header-table thead th {
  background: #000080;
  color: #fff;
  font-weight: bold;
  text-align: center;
  padding: 8px 10px;
  font-size: 12px;
  white-space: normal;
  word-wrap: break-word;
  min-width: 80px;
  max-width: 100px;
  width: 100px;
  line-height: 1.35;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 2px 2px 0 rgba(0,0,0,0.1);
}
/* Freeze kolom 1–3 di header saat scroll horizontal */
.kuota-recap-sticky-header-table thead th:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 5;
  width: 50px;
  min-width: 50px;
  max-width: 50px;
  background: #000080;
  box-shadow: 2px 0 4px -1px rgba(0,0,0,0.2);
}
.kuota-recap-sticky-header-table thead th:nth-child(2) {
  position: sticky;
  left: var(--kuota-recap-col2-left, 50px);
  z-index: 5;
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  background: #000080;
  box-shadow: 2px 0 4px -1px rgba(0,0,0,0.2);
}
.kuota-recap-sticky-header-table thead th.kuota-recap-anggota-th {
  width: auto;
  min-width: 5.5em;
  max-width: none;
  white-space: nowrap;
}
.kuota-recap-sticky-header-table thead th:nth-child(3) {
  position: sticky;
  left: var(--kuota-recap-col3-left, 230px);
  z-index: 5;
  width: 120px;
  min-width: 120px;
  max-width: 120px;
  background: #000080;
  box-shadow: 2px 0 4px -1px rgba(0,0,0,0.2);
}
/* Kolom suplier di sticky header: lebar disinkron JS dari tabel utama (proporsional teks); hover tampilkan nama perusahaan via title */
.kuota-recap-sticky-header-table thead th.kuota-recap-suplier-th {
  width: auto;
  min-width: 7em;
  max-width: none;
  white-space: nowrap;
  cursor: help;
}
.kuota-recap-table thead th.kuota-recap-suplier-th {
  cursor: help;
}

/* Kolom Aksi: Edit & Hapus rapi sejajar */
td.table-actions { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; white-space: nowrap; }
.kuota-anggota-toolbar .right { flex-wrap: nowrap; }
/* Filter kuota_anggota vertikal */
.kuota-anggota-toolbar { flex-wrap: wrap; align-items: flex-start; gap: 16px; }
.kuota-anggota-filters { display: flex; flex-direction: column; gap: 10px; min-width: 200px; }
.kuota-anggota-filters .filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.kuota-anggota-filters .filter-label { flex-shrink: 0; min-width: 110px; font-weight: 500; color: #333; }
.kuota-anggota-filters .filter-form { display: inline-flex; align-items: center; gap: 6px; flex: 1; max-width: 280px; }
.kuota-anggota-filters .filter-form select { padding: 6px 8px; min-width: 140px; }
/* Filter button mengikuti alur form (flex), penempatan konsisten untuk semua role */
#kuota-anggota-filter-form .filter-row button.btn.btn-primary { margin-left: 0; }
/* Role Badge Styling */
.role-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  margin-right: 6px;
  margin-bottom: 4px;
  text-transform: capitalize;
  white-space: nowrap;
}
.role-badge:last-child {
  margin-right: 0;
}
.role-superadmin {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}
.role-admin-akkii {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  box-shadow: 0 2px 4px rgba(245, 87, 108, 0.3);
}
.role-anggota {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  box-shadow: 0 2px 4px rgba(79, 172, 254, 0.3);
}
.role-suplier {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  box-shadow: 0 2px 4px rgba(67, 233, 123, 0.3);
}
.role-none {
  background: #e0e0e0;
  color: #666;
  box-shadow: none;
}
