[x-cloak] {
  display: none !important;
}

/* ── Utility classes (menggantikan Tailwind) ── */
.hide-mobile {
  display: block;
}

.c-red {
  color: #dc2626;
}

.c-blue-dark {
  color: #1e3a5f;
}

.c-green {
  color: #047337;
}

.toast {
  margin-bottom: 1rem;
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.toast-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.toast-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #dc2626;
}

.form-stack {
  display: grid;
  gap: 1.25rem;
}

.card-grid-4 {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid-2,
.field-grid-4 {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.section-tabs {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.history-panel {
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  padding: 1.25rem;
}

.history-list {
  display: grid;
  gap: 0.75rem;
}

.history-item {
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  padding: 1rem;
}

.number-stepper {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.number-stepper .field {
  margin: 0;
  flex: 1;
}

.number-stepper .step-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  color: #18181b;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  min-width: 42px;
  width: 42px;
  padding: 0;
}

.number-stepper .step-button i {
  height: 18px;
  width: 18px;
}

.number-stepper .step-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.number-stepper button:hover {
  border-color: #a1a1aa;
  color: #18181b;
}

/* ── PWA support ── */
@media all and (display-mode: standalone) {
  body {
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    user-select: none;
    -webkit-touch-callout: none;
  }
  .app-header {
    padding-top: env(safe-area-inset-top, 0px);
  }
  .bottom-nav {
    padding-bottom: calc(0.45rem + env(safe-area-inset-bottom));
  }
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #fafafa;
  color: #09090b;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  width: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-width: 0;
  flex: 1;
}

.header-clock {
  flex: 0 0 auto;
  line-height: 1.4;
  white-space: nowrap;
}

.header-clock p {
  font-size: 0.82rem;
  font-weight: 500;
}

.app-header {
  background: linear-gradient(135deg, #0b2f66 0%, #08306b 48%, #06214d 100%);
  border-bottom: 1px solid #092a61;
  color: #ffffff;
}

.brand-logo {
  flex: 0 0 auto;
  height: 50px;
  width: 50px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.header-brand {
  align-items: center;
  display: flex;
  gap: 1rem;
  min-width: 0;
}

.brand-copy {
  min-width: 0;
}

.brand-copy h1 {
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.05;
}

.brand-copy p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  font-weight: 500;
  margin-top: 0.35rem;
}

.header-refresh {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  color: #ffffff;
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 500;
  justify-content: center;
  min-height: 42px;
  padding: 0.55rem 0.9rem;
}

.header-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 0.5rem;
}

.header-actions svg,
.side-link svg,
.bottom-link svg,
.login-button svg,
.menu-toggle svg,
.drawer-link svg,
.drawer-head svg {
  height: 18px;
  width: 18px;
}

.menu-toggle {
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  color: #ffffff;
  display: none;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.busy-overlay {
  align-items: center;
  background: rgba(15, 23, 42, 0.28);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  padding: 1rem;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 80;
}

.busy-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.04);
  display: grid;
  gap: 0.75rem;
  justify-items: center;
  max-width: 340px;
  padding: 1.25rem;
  text-align: center;
  width: 100%;
}

.busy-card strong {
  color: #09090b;
  font-size: 1rem;
  font-weight: 600;
}

.busy-card span {
  color: #71717a;
  font-size: 0.85rem;
}

.spinner,
.button-spinner {
  animation: spin 0.75s linear infinite;
  border: 2px solid #e4e4e7;
  border-top-color: #18181b;
  border-radius: 999px;
  display: inline-block;
}

.spinner {
  height: 42px;
  width: 42px;
}

.button-spinner {
  border-color: rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-width: 2px;
  flex: 0 0 auto;
  height: 16px;
  width: 16px;
}

.button-spinner.dark {
  border-color: #e4e4e7;
  border-top-color: #18181b;
}

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

.header-refresh,
.login-button,
.header-account-button {
  gap: 0.45rem;
}

.header-account-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  color: #ffffff;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
  padding: 0;
}

.login-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 6px;
  color: #07306b;
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 500;
  justify-content: center;
  min-height: 42px;
  padding: 0.55rem 0.9rem;
}

.app-layout {
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
  width: 100%;
}

.app-content {
  min-width: 0;
  padding: 1.25rem 1rem 5.75rem;
  width: 100%;
}

.side-nav {
  display: none;
}

.side-user {
  border-bottom: 1px solid #e4e4e7;
  padding: 1rem;
}

.side-user strong,
.side-user span {
  display: block;
}

.side-user strong {
  color: #09090b;
  font-size: 0.95rem;
  font-weight: 600;
}

.side-user span {
  color: #71717a;
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 0.2rem;
}

.side-menu {
  display: grid;
  gap: 0.4rem;
  padding: 0.75rem;
}

.side-link {
  align-items: center;
  border-radius: 6px;
  color: #71717a;
  display: flex;
  gap: 0.65rem;
  font-size: 0.9rem;
  font-weight: 500;
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.side-link:hover {
  background: #f4f4f5;
  color: #18181b;
}

.side-link-active {
  background: #f4f4f5;
  color: #18181b;
  font-weight: 600;
}

.drawer-backdrop {
  background: rgba(15, 23, 42, 0.38);
  bottom: 0;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 70;
}

.mobile-drawer {
  background: #ffffff;
  border-right: 1px solid #e4e4e7;
  bottom: 0;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
  left: 0;
  max-width: 84vw;
  position: fixed;
  top: 0;
  width: 310px;
  z-index: 90;
}

.drawer-enter,
.drawer-leave {
  transition: transform 220ms ease, opacity 220ms ease;
}

.drawer-enter-start,
.drawer-leave-end {
  opacity: 0;
  transform: translateX(-100%);
}

.drawer-enter-end,
.drawer-leave-start {
  opacity: 1;
  transform: translateX(0);
}

.drawer-head {
  align-items: center;
  border-bottom: 1px solid #e4e4e7;
  display: flex;
  justify-content: space-between;
  padding: 1rem;
}

.drawer-head strong,
.drawer-head span {
  display: block;
}

.drawer-head strong {
  color: #09090b;
  font-weight: 600;
}

.drawer-head span {
  color: #71717a;
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 0.15rem;
}

.drawer-head button {
  align-items: center;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  color: #334155;
  display: flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.drawer-menu {
  display: grid;
  gap: 0.4rem;
  padding: 0.75rem;
}

.drawer-link {
  align-items: center;
  border-radius: 6px;
  color: #334155;
  display: flex;
  gap: 0.65rem;
  font-size: 0.92rem;
  font-weight: 500;
  min-height: 46px;
  padding: 0.65rem 0.75rem;
  text-align: left;
}

.drawer-link-active {
  background: #f4f4f5;
  color: #18181b;
}

.bottom-nav {
  background: #ffffff;
  border-top: 1px solid #e4e4e7;
  bottom: 0;
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.04);
  display: grid;
  gap: 0.25rem;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  left: 0;
  padding: 0.45rem 0.5rem calc(0.45rem + env(safe-area-inset-bottom));
  position: fixed;
  right: 0;
  z-index: 40;
}

.bottom-link {
  align-items: center;
  border-radius: 6px;
  color: #a1a1aa;
  display: flex;
  flex-direction: column;
  font-size: 0.7rem;
  font-weight: 500;
  gap: 0.2rem;
  justify-content: center;
  min-height: 52px;
}

.bottom-link-active {
  background: #f4f4f5;
  color: #18181b;
}

.login-page {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 190px);
  width: 100%;
}

.login-card {
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.04);
  display: grid;
  gap: 1rem;
  max-width: 420px;
  padding: 1.25rem;
  width: 100%;
}

.login-icon {
  align-items: center;
  background: #f8fafc;
  border-radius: 999px;
  color: #0b2f66;
  display: flex;
  height: 56px;
  justify-content: center;
  width: 56px;
}

.login-icon svg {
  height: 28px;
  width: 28px;
}

.login-card h2 {
  color: #09090b;
  font-size: 1.35rem;
  font-weight: 600;
}

.login-card p {
  color: #71717a;
  font-size: 0.92rem;
  margin-top: -0.5rem;
}

.remember-row {
  align-items: center;
  color: #334155;
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 500;
  gap: 0.55rem;
}

.remember-row input {
  accent-color: #18181b;
  height: 18px;
  width: 18px;
}

.mini-stat-card {
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.04);
  padding: 1.25rem;
}

.mini-stat-card span,
.mini-stat-card small {
  display: block;
}

.mini-stat-card span {
  color: #71717a;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.mini-stat-card strong {
  color: #09090b;
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  margin-top: 0.5rem;
}

.mini-stat-card small {
  color: #71717a;
  font-size: 0.8rem;
  margin-top: 0.65rem;
}

.account-page {
  align-items: flex-start;
  display: flex;
  justify-content: center;
  min-height: 60vh;
}

.account-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.04);
  display: grid;
  gap: 1rem;
  max-width: 420px;
  padding: 1.25rem;
  text-align: center;
  width: 100%;
}

.account-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  width: 100%;
}

.account-avatar {
  align-items: center;
  background: #f8fafc;
  border-radius: 999px;
  color: #0b2f66;
  display: flex;
  height: 64px;
  justify-content: center;
  justify-self: center;
  width: 64px;
}

.account-avatar svg {
  height: 34px;
  width: 34px;
}

.account-meta {
  display: flex;
  justify-content: center;
  width: 100%;
}

.app-version-card {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #64748b;
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 500;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
}

.account-card h2 {
  color: #09090b;
  font-size: 1.35rem;
  font-weight: 600;
}

.account-card p {
  color: #71717a;
  font-weight: 500;
  margin-top: 0.15rem;
}

.tab-button {
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #a1a1aa;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.625rem 0.875rem;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.tab-button:hover {
  color: #52525b;
  border-bottom-color: #d4d4d8;
}

.dashboard-shell {
  display: grid;
  gap: 1rem;
  width: 100%;
}

.dashboard-skeleton {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  width: 100%;
}

.skeleton-card {
  animation: skeletonPulse 1.1s ease-in-out infinite alternate;
  background: linear-gradient(90deg, #f8fafc 0%, #ffffff 50%, #f8fafc 100%);
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  min-height: 132px;
}

.skeleton-card.small {
  min-height: 132px;
}

@keyframes skeletonPulse {
  from {
    opacity: 0.55;
  }
  to {
    opacity: 1;
  }
}

.metric-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  width: 100%;
}

.metric-card,
.part-card,
.progress-panel,
.note-panel,
.summary-panel {
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.metric-card {
  align-items: center;
  display: flex;
  gap: 1rem;
  min-height: 132px;
  padding: 1.25rem;
}

.metric-icon {
  align-items: center;
  border-radius: 999px;
  background: #f4f4f5;
  color: #71717a;
  display: flex;
  flex: 0 0 auto;
  font-size: 1.5rem;
  height: 76px;
  justify-content: center;
  line-height: 1;
  width: 76px;
}

.metric-icon svg {
  height: 42px;
  stroke-width: 3;
  width: 42px;
}

.metric-card span,
.part-card span {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #71717a;
}

.metric-card strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  margin-top: 0.45rem;
  color: #09090b;
}

.metric-card p {
  color: #09090b;
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 0.25rem;
}

.metric-card small {
  color: #71717a;
  display: block;
  font-size: 0.82rem;
  margin-top: 0.35rem;
}

.metric-card.metric-green {
  background: #ffffff;
  border-color: #e4e4e7;
  color: #09090b;
}

.metric-card.metric-green .metric-icon {
  background: #16a34a;
  color: #ffffff;
}

.metric-card.metric-green > div > span,
.metric-card.metric-green > div > strong {
  color: #166534;
  font-weight: 700;
}

.metric-card.metric-blue {
  background: #ffffff;
  border-color: #e4e4e7;
  color: #09090b;
}

.metric-card.metric-blue .metric-icon {
  background: #2563eb;
  color: #ffffff;
}

.metric-card.metric-blue > div > span,
.metric-card.metric-blue > div > strong {
  color: #1d4ed8;
  font-weight: 700;
}

.metric-card.metric-orange {
  background: #ffffff;
  border-color: #e4e4e7;
  color: #09090b;
}

.metric-card.metric-orange .metric-icon {
  background: #ea580c;
  color: #ffffff;
}

.metric-card.metric-orange > div > span,
.metric-card.metric-orange > div > strong {
  color: #c2410c;
  font-weight: 700;
}

.part-card {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 132px;
  padding: 1.25rem;
  text-align: center;
}

.part-card::before {
  content: none !important;
  display: none !important;
}

.part-card {
  border-left: 4px solid transparent;
}

.part-purple {
  border-left-color: #7c3aed;
}

.part-brown {
  border-left-color: #92400e;
}

.part-teal {
  border-left-color: #0f766e;
}

.part-card strong {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
  margin-top: 0.55rem;
  color: #09090b;
}

.part-tersedia {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #71717a;
  margin-top: 0.1rem;
  margin-bottom: 0.5rem;
}

.part-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  margin-top: 0.15rem;
  border-top: 1px solid #e4e4e7;
  padding-top: 0.5rem;
  width: 100%;
}

.part-detail span {
  font-size: 0.72rem;
  color: #52525b;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.part-detail b {
  font-weight: 600;
  color: #09090b;
}

.part-icon {
  height: 54px;
  margin-bottom: 0.65rem;
  object-fit: contain;
  width: 54px;
}

.progress-panel {
  padding: 1.25rem;
  width: 100%;
}

.progress-head {
  align-items: flex-start;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 1fr;
  margin-bottom: 1rem;
}

.progress-title {
  align-items: center;
  display: flex;
  gap: 0.85rem;
}

.animal-symbol-img {
  flex: 0 0 auto;
  height: 54px;
  width: 54px;
  object-fit: contain;
}

.animal-symbol {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  font-size: 2rem;
  font-weight: 600;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.symbol-blue {
  color: #2563eb;
}

.symbol-green {
  color: #16a34a;
}

.progress-title h2 {
  color: #09090b;
  font-size: 1.1rem;
  font-weight: 600;
}

.progress-title small {
  color: #71717a;
  font-size: 0.88rem;
  font-weight: 500;
  margin-left: 0.35rem;
}

.legend-row,
.note-row,
.progress-summary {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.6rem;
}

.legend-row span,
.note-row span {
  align-items: center;
  color: #09090b;
  display: inline-flex;
  font-size: 0.88rem;
  gap: 0.5rem;
}

.legend-box {
  border: 1px solid #e4e4e7;
  border-radius: 5px;
  display: inline-block;
  height: 24px;
  width: 24px;
}

.legend-box.done {
  background: #dc2626;
  border-color: #dc2626;
}

.legend-box.pending {
  background: #ffffff;
}

.progress-summary {
  color: #09090b;
  font-size: 0.95rem;
}

.progress-summary b + b {
  border-left: 1px solid #e4e4e7;
  padding-left: 1.1rem;
}

.number-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
}

.animal-number {
  align-items: center;
  border-radius: 6px;
  display: flex;
  font-size: 1.05rem;
  font-weight: 600;
  height: 48px;
  justify-content: center;
  min-width: 0;
}

.animal-number.is-done {
  background: #dc2626;
  border: 1px solid #dc2626;
  color: #ffffff;
}

.animal-number.is-pending {
  background: #ffffff;
  border: 1px solid #e4e4e7;
  color: #09090b;
}

.animal-number.is-yellow {
  background: #facc15;
  border: 1px solid #eab308;
  color: #713f12;
}

.empty-dashboard {
  background: #ffffff;
  border: 1px dashed #e4e4e7;
  border-radius: 6px;
  color: #71717a;
  font-weight: 500;
  padding: 1rem;
}

.dashboard-bottom {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  width: 100%;
}

.note-panel,
.summary-panel {
  padding: 1.25rem;
}

.note-panel h2,
.summary-panel h2 {
  color: #09090b;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.summary-panel h2 {
  color: #047337;
}

.summary-stats {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.summary-stat {
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  padding: 1rem;
}

.summary-stat.total {
  background: #0b2f66;
  border-color: #0b2f66;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.summary-stat.total .stat-label {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.summary-stat.total .stat-value {
  color: #ffffff;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
}

.stat-label {
  color: #71717a;
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
}

.stat-value {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
}

.stat-done {
  color: #dc2626;
}

.stat-pending {
  color: #1e3a5f;
}

.stat-pct {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.06);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  line-height: 1.4;
}

.stat-done .stat-pct {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.stat-pending .stat-pct {
  background: rgba(30, 58, 95, 0.1);
  color: #1e3a5f;
}

.stat-bar {
  margin-top: 0.65rem;
  height: 6px;
  background: #f4f4f5;
  border-radius: 999px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
  min-width: 0;
}

.bar-done {
  background: #dc2626;
}

.bar-pending {
  background: #2563eb;
}

.tab-active {
  border-bottom-color: #18181b;
  color: #18181b;
  font-weight: 600;
}

.panel {
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  background: #ffffff;
  padding: 1.25rem;
}

.section-title {
  color: #09090b;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

/* ── Sembelihan toolbar ── */
.sembelihan-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.sembelihan-tabs {
  display: flex;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.filter-tab {
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  background: #ffffff;
  color: #71717a;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-tab:hover {
  background: #f4f4f5;
  color: #18181b;
}

.filter-tab-active {
  background: #18181b;
  border-color: #18181b;
  color: #ffffff;
}

.sembelihan-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 160px;
}

.sembelihan-search svg {
  flex: 0 0 auto;
  height: 18px;
  width: 18px;
  color: #94a3b8;
}

.sembelihan-search .field {
  min-height: 38px;
  padding: 0.4rem 0.65rem;
  font-size: 0.85rem;
}

.stat-card {
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  background: #ffffff;
  padding: 1rem;
}

.stat-card span,
.stock-item span {
  color: #71717a;
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
}

.stat-card strong {
  display: block;
  font-size: 2rem;
  line-height: 1.1;
  margin-top: 0.35rem;
  color: #09090b;
}

.stock-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stock-item {
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  padding: 0.875rem;
}

.stock-item strong {
  display: block;
  font-size: 1.5rem;
  margin-top: 0.25rem;
  color: #09090b;
}

.animal-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
}

.animal-card {
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  min-height: 112px;
  padding: 0.875rem;
  background: #ffffff;
}

.animal-card strong,
.animal-card span,
.animal-card small {
  display: block;
}

.animal-card strong {
  font-size: 0.95rem;
  font-weight: 600;
}

.animal-card span {
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

.animal-card small {
  color: #71717a;
  margin-top: 0.25rem;
}

.animal-pending {
  background: #ffffff;
}

.animal-done {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.animal-done strong,
.animal-done span,
.animal-done small {
  color: #ffffff;
}

.animal-done .btn-secondary {
  background: #18181b;
  border-color: #18181b;
  color: #ffffff;
}

.animal-done .btn-secondary:hover:not(:disabled) {
  background: #27272a;
}

.field-label {
  color: #09090b;
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.field {
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  color: #09090b;
  font-size: 0.875rem;
  min-height: 40px;
  padding: 0.5rem 0.75rem;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field:focus {
  border-color: #a1a1aa;
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
  outline: none;
}

.btn-primary,
.btn-secondary {
  align-items: center;
  border-radius: 6px;
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 500;
  gap: 0.45rem;
  justify-content: center;
  min-height: 40px;
  padding: 0 1rem;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: #18181b;
  color: #ffffff;
  width: 100%;
}

.btn-primary:hover:not(:disabled) {
  background: #27272a;
}

.btn-secondary {
  border: 1px solid #e4e4e7;
  background: #ffffff;
  color: #18181b;
}

.btn-secondary:hover:not(:disabled) {
  background: #f4f4f5;
}

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  border-collapse: collapse;
  min-width: 0;
  width: 100%;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid #f4f4f5;
  font-size: 0.82rem;
  padding: 0.55rem 0.65rem;
  text-align: left;
}

.data-table th {
  word-break: break-word;
}

@media (max-width: 640px) {
  .data-table th,
  .data-table td {
    font-size: 0.78rem;
    padding: 0.45rem 0.5rem;
  }

  .data-table th,
  .data-table td {
    white-space: normal;
  }

  .data-table th {
    font-size: 0.72rem;
  }
}

.data-table th {
  background: #fafafa;
  color: #71717a;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Penerimaan Cards ── */
.penerimaan-cards {
  display: grid;
  gap: 0.65rem;
}

.penerimaan-card {
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.penerimaan-card.is-expanded {
  border-color: #a1a1aa;
}

.penerimaan-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  cursor: pointer;
  user-select: none;
}

.penerimaan-card-header:hover {
  background: #fafafa;
}

.penerimaan-card-detail {
  border-top: 1px solid #f4f4f5;
  padding: 1rem;
}

.penerimaan-detail-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, 1fr);
}

.penerimaan-detail-grid .field-label {
  margin-bottom: 0.15rem;
}

.penerimaan-detail-grid strong {
  color: #09090b;
  font-size: 0.9rem;
}

.empty-text {
  color: #71717a;
  font-size: 0.875rem;
  padding: 0.75rem 0;
}

@media (min-width: 640px) {
  .panel {
    padding: 1.25rem;
  }
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-skeleton {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .number-grid {
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  }
  .summary-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .card-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .field-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .field-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .app-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .app-layout.has-sidebar {
    grid-template-columns: 248px minmax(0, 1fr);
  }
  .app-layout.public-layout .app-content {
    grid-column: 1 / -1;
  }
  .app-content {
    padding: 1.25rem;
  }
  .side-nav {
    background: #ffffff;
    border-right: 1px solid #e4e4e7;
    display: block;
    min-height: calc(100vh - 97px);
    position: sticky;
    top: 0;
  }
  .drawer-backdrop,
  .mobile-drawer {
    display: none !important;
  }
  .bottom-nav {
    display: none !important;
  }
  .metric-grid {
    grid-template-columns: repeat(3, 1fr) repeat(3, 0.538fr);
  }
  .dashboard-skeleton {
    grid-template-columns: repeat(3, 1fr) repeat(3, 0.538fr);
  }
  .progress-head {
    align-items: center;
    grid-template-columns: minmax(210px, 1fr) auto auto;
  }
  .number-grid {
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  }
  .dashboard-bottom {
    grid-template-columns: 0.78fr 1fr;
  }
}

@media (max-width: 520px) {
  .header-inner {
    padding: 0.85rem 0.75rem;
  }
  .hide-mobile {
    display: none !important;
  }
  .header-brand {
    align-items: center;
    display: grid;
    gap: 0.85rem;
    grid-template-columns: 52px minmax(0, 1fr);
  }
  .header-brand.with-menu {
    grid-template-columns: auto 52px minmax(0, 1fr);
  }
  .menu-toggle {
    display: flex;
  }
  .brand-logo,
  .brand-copy {
    display: none;
  }
  .header-brand.with-menu {
    grid-template-columns: auto;
  }
  .brand-copy h1 {
    font-size: 1.5rem;
    line-height: 1.16;
    max-width: 230px;
  }
  .brand-copy p {
    display: -webkit-box;
    font-size: 0.82rem;
    line-height: 1.45;
    margin-top: 0.45rem;
    max-width: 245px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .header-actions {
    align-items: center;
    flex-direction: row;
    gap: 0.5rem;
    justify-self: end;
  }
  .header-refresh {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
    height: 46px;
    min-height: 46px;
    padding: 0;
    width: 50px;
  }
  .header-refresh span {
    display: none;
  }
  .login-button {
    background: #ffffff;
    color: #07306b;
    font-size: 0.82rem;
    height: 42px;
    min-height: 42px;
    padding: 0 0.8rem;
  }
  .bottom-nav {
    border-radius: 0;
    gap: 0.35rem;
    padding: 0.45rem 0.5rem calc(0.45rem + env(safe-area-inset-bottom));
  }
}
