/* ============================================================
   TAILORHUB — COMPONENTS
   Pustaka komponen visual resmi TailorHub (style-guide.html).
   ============================================================ */

/* ----- Eyebrow / Label ----- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--clay);
  background: var(--clay-100);
  border: 1px solid rgba(192, 84, 36, .18);
  padding: 7px 15px;
  border-radius: 999px;
}

.lead {
  font-size: 1.06rem;
  color: var(--ink-70);
  max-width: 58ch;
  font-weight: 500;
}

/* ----- Tombol (Pill Shape) ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: -.01em;
  padding: 13px 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform .3s var(--ease), background .25s, border-color .25s, color .25s, box-shadow .3s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn svg {
  transition: transform .3s var(--ease);
}

.btn--primary {
  background: var(--clay);
  color: #fff;
  box-shadow: 0 8px 20px rgba(192, 84, 36, .26);
}

.btn--primary:hover {
  background: var(--clay-700);
  box-shadow: 0 14px 30px rgba(192, 84, 36, .34);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--sand);
}

.btn--ghost:hover {
  border-color: var(--clay);
  color: var(--clay);
}

.btn--light {
  background: #fff;
  color: var(--clay);
  border-color: var(--sand);
}

.btn--light:hover {
  background: var(--cream-200);
}

.btn--danger {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 20px rgba(192, 57, 43, .22);
}

.btn--danger:hover {
  background: #A5281B;
}

.btn--sm {
  padding: 9px 16px;
  font-size: .85rem;
}

.btn--lg {
  padding: 16px 30px;
  font-size: 1rem;
}

.btn--icon {
  padding: 12px;
  border-radius: 12px;
}

.btn--block {
  width: 100%;
}

.btn:disabled, .btn[aria-disabled="true"] {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ----- Form & Input ----- */
.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.field > label {
  font-size: .86rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
}

.field .req {
  color: var(--clay);
}

.field .help {
  font-size: .78rem;
  color: var(--ink-45);
}

.field .err {
  font-size: .78rem;
  color: var(--red);
  font-weight: 600;
}

.input, .select, .textarea {
  width: 100%;
  font-family: inherit;
  font-size: .94rem;
  color: var(--ink);
  background-color: var(--paper);
  border: 1.6px solid var(--sand);
  border-radius: var(--r-s);
  padding: 12px 14px;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}

.input::placeholder, .textarea::placeholder {
  color: var(--ink-45);
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--clay);
  box-shadow: 0 0 0 4px rgba(192, 84, 36, .12);
  background-color: #fff;
}

.textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.55;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238E7266' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.select:hover:not(:disabled) {
  border-color: var(--clay-300);
}

.select:open {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23C05424' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 15 6-6 6 6'/%3E%3C/svg%3E");
}

.input--err {
  border-color: var(--red);
}

.input--err:focus {
  box-shadow: 0 0 0 4px rgba(192, 57, 43, .12);
}

.input:disabled, .select:disabled, .textarea:disabled {
  background-color: var(--cream-200);
  color: var(--ink-45);
  cursor: not-allowed;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group svg {
  position: absolute;
  left: 14px;
  color: var(--ink-45);
  pointer-events: none;
}

.input-group .input {
  padding-left: 42px;
}

.input-group .toggle-pass {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--ink-45);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: color .2s, background .2s;
  z-index: 2;
}

.input-group .toggle-pass:hover {
  color: var(--clay);
  background: var(--cream-200);
}

.input-group .toggle-pass svg {
  position: static;
  pointer-events: auto;
  color: inherit;
}

.input-group .input--has-toggle {
  padding-right: 44px;
}

/* Upload Box Component */
.upload-box {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  background: var(--cream-200);
  border: 1.5px dashed var(--sand-dark);
  border-radius: var(--r-m);
  transition: border-color .2s, background .2s;
}

.upload-box:hover {
  border-color: var(--clay-300);
  background: #FFF4E8;
}

.upload-preview {
  width: 76px;
  height: 76px;
  border-radius: var(--r-s);
  background: var(--paper);
  border: 1.5px solid var(--sand);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  flex: none;
  box-shadow: var(--shadow-s);
}

.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--ink-45);
  font-size: .72rem;
  font-weight: 800;
}

/* Checkbox & Radio */
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.check input {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 1.8px solid var(--sand-dark);
  border-radius: 6px;
  background: var(--paper);
  flex: none;
  cursor: pointer;
  position: relative;
  transition: background .2s, border-color .2s;
}

.check input[type=radio] {
  border-radius: 50%;
}

.check input:checked {
  background: var(--clay);
  border-color: var(--clay);
}

.check input:checked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: no-repeat center/13px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.6 4.4 4.4L19 6.8'/%3E%3C/svg%3E");
}

.check input[type=radio]:checked::after {
  background: #fff;
  border-radius: 50%;
  inset: 5px;
}

/* Toggle */
.toggle {
  position: relative;
  width: 46px;
  height: 26px;
  flex: none;
  cursor: pointer;
}

.toggle input {
  appearance: none;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 999px;
  background: var(--sand-dark);
  cursor: pointer;
  transition: background .25s;
}

.toggle input:checked {
  background: var(--clay);
}

.toggle input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform .25s var(--ease);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.toggle input:checked::after {
  transform: translateX(20px);
}

/* ----- Badge / Chip / Status SOLID ----- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .73rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  white-space: nowrap;
  color: #fff;
  line-height: 1.4;
}

.chip .d {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.chip--queue { background: var(--s-queue); }
.chip--cut { background: var(--s-cut); }
.chip--sew { background: var(--s-sew); }
.chip--finish { background: var(--s-finish); }
.chip--qc { background: var(--s-qc); }
.chip--done { background: var(--s-done); }
.chip--taken { background: var(--s-taken); }

.chip--unpaid { background: var(--pay-unpaid); }
.chip--dp { background: var(--pay-dp); }
.chip--paid { background: var(--pay-paid); }

.chip--clay { background: var(--clay); }
.chip--danger { background: var(--red); }
.chip--info {
  background: rgba(73, 94, 205, .15);
  color: var(--indigo);
}
.chip--warn {
  background: rgba(217, 119, 6, .15);
  color: #b45309;
}
.chip--success {
  background: rgba(47, 143, 91, .15);
  color: #1e7e34;
}
.chip--neutral {
  background: var(--sand);
  color: var(--ink-70);
  border: 1px solid var(--sand-dark);
}
.chip--soft {
  background: var(--cream-200);
  color: var(--ink-70);
  border: 1px solid var(--sand);
}

.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: .72rem;
  font-weight: 800;
  color: #fff;
  background: var(--clay);
  border-radius: 999px;
}

/* ----- Kartu (Card) & KPI Tile ----- */
.card {
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: var(--r-l);
  padding: 24px;
  box-shadow: var(--shadow-s);
  transition: transform .4s var(--ease), box-shadow .4s, border-color .4s;
}

.card--hover:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-m);
  border-color: var(--clay-300);
}

.card-pad-sm {
  padding: 18px;
}

.tile {
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: var(--r-m);
  padding: 18px;
  transition: transform .35s var(--ease), border-color .35s;
}

.tile:hover {
  transform: translateY(-4px);
  border-color: var(--clay-300);
}

.tile small {
  display: block;
  font-size: .71rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-45);
}

.tile b {
  font-size: 1.7rem;
  font-weight: 800;
  display: block;
  line-height: 1.15;
  margin: 6px 0 8px;
  letter-spacing: -.035em;
}

.tile-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.delta {
  font-size: .72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  color: #fff;
}

.delta--up { background: var(--green); }
.delta--down { background: var(--red); }
.delta--warn { background: var(--warn); }

/* ----- Tabel ----- */
.table-wrap {
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: var(--r-m);
  overflow: hidden;
  box-shadow: var(--shadow-s);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

.table thead th {
  text-align: left;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-45);
  padding: 14px 18px;
  background: var(--cream-200);
  border-bottom: 1px solid var(--sand);
  white-space: nowrap;
}

.table tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--sand);
  color: var(--ink-70);
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr {
  transition: background .2s;
}

.table tbody tr:hover {
  background: var(--cream);
}

.table td b {
  color: var(--ink);
  font-weight: 700;
}

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Checkbox di dalam tabel */
.table input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.8px solid var(--sand-dark);
  border-radius: 6px;
  background: var(--paper);
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  transition: background .2s, border-color .2s, box-shadow .2s;
  display: inline-block;
  margin: 0;
}

.table input[type="checkbox"]:hover {
  border-color: var(--clay);
}

.table input[type="checkbox"]:checked {
  background: var(--clay);
  border-color: var(--clay);
}

.table input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: no-repeat center/12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.6 4.4 4.4L19 6.8'/%3E%3C/svg%3E");
}

/* ----- Alert & Toast ----- */
.alert {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 20px;
  border-radius: var(--r-m);
  font-size: .92rem;
  color: #fff;
  margin-bottom: 26px;
}

.alert svg { flex: none; }
.alert b { font-weight: 800; }
.alert--info { background: var(--indigo); }
.alert--success { background: var(--green); }
.alert--warn { background: var(--warn); }
.alert--error { background: var(--red); }

.toast {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--ink-900);
  color: #fff;
  border-radius: var(--r-s);
  padding: 14px 18px;
  box-shadow: var(--shadow-l);
  max-width: 360px;
}

.toast svg { flex: none; }
.toast small {
  display: block;
  color: rgba(255, 248, 239, .7);
  font-size: .8rem;
}

/* ----- Avatar ----- */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--clay-100);
  color: var(--clay-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .9rem;
  flex: none;
  border: 2px solid var(--paper);
}

.avatar--sm { width: 30px; height: 30px; font-size: .78rem; }
.avatar--lg { width: 56px; height: 56px; font-size: 1.1rem; }
.avatar--indigo { background: var(--indigo-100); color: #30409A; }

/* ----- Tabs, Crumb & Pagination ----- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--sand);
}

.tabs a {
  padding: 11px 16px;
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink-45);
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;
  transition: color .2s, border-color .2s;
}

.tabs a:hover { color: var(--clay); }
.tabs a.is-on { color: var(--clay); border-bottom-color: var(--clay); }

.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-45);
}

.crumb a:hover { color: var(--clay); }
.crumb .sep { color: var(--sand-dark); }
.crumb b { color: var(--ink); font-weight: 700; }

.pager {
  display: flex;
  gap: 6px;
  align-items: center;
}

.pager a {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 700;
  color: var(--ink-70);
  border: 1px solid var(--sand);
  background: var(--paper);
  transition: all .2s;
}

.pager a:hover { border-color: var(--clay); color: var(--clay); }
.pager a.is-on { background: var(--clay); color: #fff; border-color: var(--clay); }
.pager a.is-off { opacity: .45; pointer-events: none; }

/* ----- Progress bar ----- */
.bar-track {
  height: 9px;
  border-radius: 999px;
  background: var(--sand);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--clay);
}

/* ----- Empty state ----- */
.empty {
  text-align: center;
  padding: 48px 24px;
}

.empty-ic {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: var(--clay-100);
  color: var(--clay);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.empty h3 { margin-bottom: 6px; }
.empty p {
  color: var(--ink-45);
  font-size: .92rem;
  max-width: 40ch;
  margin: 0 auto 18px;
}

/* ----- Modal ----- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 24, 16, .45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal {
  background: var(--paper);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-l);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  border: 1px solid var(--sand);
}

.modal-head {
  padding: 22px 24px 0;
}

.modal-body {
  padding: 14px 24px 22px;
  color: var(--ink-70);
  font-size: .93rem;
}

.modal-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--sand);
  background: var(--cream);
}

/* ============================================================
   AUTH LAYOUT (Khusus Halaman di auth/)
   ============================================================ */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: radial-gradient(circle at 50% 0%, var(--cream-200) 0%, var(--cream) 70%);
}

.auth-box {
  width: 100%;
  max-width: 460px;
}

.auth-box--wide {
  max-width: 680px;
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -.038em;
  margin-bottom: 12px;
}

.auth-brand span em {
  font-style: normal;
  color: var(--clay);
}

.auth-header h1 {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 6px;
}

.auth-header p {
  color: var(--ink-70);
  font-size: .92rem;
}

.auth-card {
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: var(--r-l);
  padding: 32px;
  box-shadow: var(--shadow-m);
}

.auth-footer {
  text-align: center;
  margin-top: 22px;
  font-size: .88rem;
  color: var(--ink-70);
}

.auth-footer a {
  color: var(--clay);
  font-weight: 700;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Onboarding Step Bar */
.steps-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin-bottom: 28px;
}

.steps-nav::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--sand);
  z-index: 1;
}

.step-item {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: transparent;
  padding: 0;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .84rem;
  font-weight: 800;
  background: var(--cream-200);
  color: var(--ink-45);
  border: 2px solid var(--sand);
}

.step-item.is-active .step-num {
  background: var(--clay);
  color: #fff;
  border-color: var(--clay);
  box-shadow: 0 4px 12px rgba(192, 84, 36, .3);
}

.step-item.is-done .step-num {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.step-label {
  font-size: .74rem;
  font-weight: 700;
  color: var(--ink-45);
}

.step-item.is-active .step-label {
  color: var(--clay);
}

/* ============================================================
   DASHBOARD — KPI tiles, Kanban, Alert-item, Chart, Table-card
   Komponen khusus halaman internal (app/dashboard.html dll).
   ============================================================ */

/* ----- KPI Grid ----- */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.kpi {
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: var(--r-l);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
}

.kpi:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-m);
  border-color: var(--clay-300);
}

.kpi-ic {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 14px;
}

.kpi small {
  display: block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-45);
}

.kpi b {
  font-size: 1.85rem;
  font-weight: 800;
  display: block;
  line-height: 1.1;
  margin: 5px 0 8px;
  letter-spacing: -.04em;
}

.kpi-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: var(--ink-45);
}

/* ----- Panel Grid (Chart + Deadline) ----- */
.cols {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

/* ----- Card head link ----- */
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.card-head h3 { font-size: 1.02rem; }

.card-head .link {
  font-size: .82rem;
  font-weight: 700;
  color: var(--clay);
  white-space: nowrap;
}

.legend {
  display: flex;
  gap: 14px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--ink-45);
}

.legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
  margin-right: 5px;
  vertical-align: -1px;
}

/* ----- Bar chart SVG ----- */
.chart { width: 100%; height: auto; }
.bar { transition: opacity .2s; }
.bar:hover { opacity: .82; }

/* ----- Deadline / Alert-item list ----- */
.alert-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed var(--sand);
}

.alert-item:last-child { border-bottom: 0; }

.ai-ic {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.ai-ic svg {
  color: #fff;
  stroke: #fff;
}

.alert-item b {
  display: block;
  font-size: .88rem;
  font-weight: 700;
}

.alert-item span { font-size: .78rem; color: var(--ink-45); }

.alert-item .when {
  margin-left: auto;
  font-size: .76rem;
  font-weight: 800;
  white-space: nowrap;
}

/* ----- Alert dismiss button ----- */
.alert .alert-x {
  margin-left: auto;
  background: rgba(255, 255, 255, .2);
  border: 0;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.alert .alert-x:hover { background: rgba(255, 255, 255, .32); }

/* ----- Kanban Board ----- */
.kanban-wrap {
  overflow-x: auto;
  padding-bottom: 6px;
  margin: 0 -4px;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(5, minmax(230px, 1fr));
  gap: 14px;
  padding: 0 4px;
}

.kcol {
  background: var(--cream-200);
  border: 1px solid var(--sand);
  border-radius: var(--r-l);
  padding: 12px;
}

.kcol-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 12px;
}

.kcol-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}

.kcol-head h4 { font-size: .86rem; font-weight: 800; }

.kcol-head .kcount {
  margin-left: auto;
  font-size: .72rem;
  font-weight: 800;
  color: var(--ink-70);
  background: var(--paper);
  border: 1px solid var(--sand);
  padding: 2px 9px;
  border-radius: 999px;
}

/* ----- Kartu Kanban ----- */
.kcard {
  --acc: var(--s-queue);
  position: relative;
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: 16px;
  padding: 14px 15px 13px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-s);
  cursor: grab;
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}

.kcard::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--acc);
}

.kcard:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-m);
  border-color: var(--acc);
}

.kcard:active { cursor: grabbing; }

.kc-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}

.kc-code {
  font-weight: 800;
  font-size: .92rem;
  letter-spacing: -.02em;
  color: var(--ink);
}

.kc-type {
  font-size: .72rem;
  font-weight: 700;
  color: var(--acc);
  background: color-mix(in srgb, var(--acc) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--acc) 26%, #fff);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: auto;
}

.kc-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
  letter-spacing: -.01em;
}

.kc-cust {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .78rem;
  color: var(--ink-45);
  margin-bottom: 12px;
}

.kc-cust .mini {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--sand);
  color: var(--ink-70);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .64rem;
  font-weight: 800;
  flex: none;
}

/* Progres 7 segmen */
.kc-steps { display: flex; gap: 3px; margin-bottom: 7px; }
.kc-steps i { flex: 1; height: 5px; border-radius: 999px; background: var(--sand); }
.kc-steps i.on { background: var(--acc); }

.kc-stepslabel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .72rem;
  font-weight: 700;
  color: var(--ink-70);
  margin-bottom: 12px;
}

.kc-stepslabel .pct { color: var(--acc); }

.kc-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 11px;
  border-top: 1px solid var(--sand);
}

.kc-dead {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .73rem;
  font-weight: 800;
  color: var(--ink-70);
}

.kc-dead svg { color: var(--ink-45); }
.kc-dead.is-late { color: var(--red); }
.kc-dead.is-late svg { color: var(--red); }

.kc-assignee {
  margin-left: auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--clay);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .68rem;
  font-weight: 800;
  border: 2px solid var(--paper);
  box-shadow: var(--shadow-s);
}

.kc-assignee.indigo { background: var(--indigo); }

/* ----- Table card wrapper ----- */
.table-card {
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: var(--r-l);
  overflow: hidden;
  box-shadow: var(--shadow-s);
}

.table-card .card-head {
  padding: 20px 22px 0;
  margin-bottom: 14px;
}

.tw { overflow-x: auto; }

/* Customer cell di tabel */
.cust-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.cust-cell .mini {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--clay-100);
  color: var(--clay-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 800;
  flex: none;
}

/* ----- Toast (posisi fixed) ----- */
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--s-done);
  color: #fff;
  border-radius: var(--r-m);
  padding: 14px 16px;
  box-shadow: var(--shadow-l);
  max-width: 360px;
  animation: toastIn .5s var(--ease);
}

.toast svg { flex: none; }
.toast b { font-weight: 800; font-size: .9rem; }
.toast small { display: block; color: rgba(255,255,255,.82); font-size: .78rem; }

.toast .toast-x {
  margin-left: 6px;
  background: rgba(255, 255, 255, .2);
  border: 0;
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* ----- Responsive Dashboard ----- */
@media (max-width: 1100px) {
  .cols  { grid-template-columns: 1fr; }
  .kpis  { grid-template-columns: repeat(2, 1fr); }
  .prod-toolbar,
  .prod-toolbar--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .kpis  { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: repeat(5, minmax(200px, 1fr)); }
  .prod-toolbar,
  .prod-toolbar--4 {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   TOOLBAR FILTER (Shared baris filter melebar)
   ============================================================ */
.prod-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(155px, .85fr)) auto;
  gap: 12px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: var(--r-m);
  padding: 14px 16px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-s);
}

.prod-toolbar--4 {
  grid-template-columns: minmax(200px, 1.4fr) repeat(3, minmax(145px, .8fr)) auto;
}

.prod-toolbar .field {
  margin-bottom: 0;
}

.prod-toolbar .input,
.prod-toolbar .select {
  padding-top: 9px;
  padding-bottom: 9px;
  font-size: .88rem;
}

