@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');


/* ============================================================
   KEDAI — Design Tokens, Form, Button, Table, Badge v2.0
   ============================================================ */

/* ---------- Font Import ---------- */

/* ---------- Design Tokens ---------- */
:root {
  /* Color */
  --k-primary: #059669;
  --k-primary-dark: #047857;
  --k-primary-light: #10b981;
  --k-primary-bg: #ecfdf5;
  --k-accent: #f5e6d3;
  --k-surface: #ffffff;
  --k-bg: #f8fafc;
  --k-text: #1e293b;
  --k-text-muted: #64748b;
  --k-border: #e2e8f0;
  --k-danger: #ef4444;
  --k-warning: #f59e0b;
  --k-info: #3b82f6;

  /* Radius */
  --k-radius-xs: 0.375rem;
  --k-radius-sm: 0.5rem;
  --k-radius: 0.75rem;
  --k-radius-lg: 1rem;
  --k-radius-xl: 1.5rem;
  --k-radius-full: 9999px;

  /* Shadow — 5 level */
  --k-shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --k-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --k-shadow: 0 4px 12px rgba(0,0,0,0.08);
  --k-shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
  --k-shadow-xl: 0 20px 48px rgba(0,0,0,0.16);

  /* Typography */
  --k-font-xs: 0.75rem;
  --k-font-sm: 0.875rem;
  --k-font-base: 1rem;
  --k-font-lg: 1.125rem;
  --k-font-xl: 1.25rem;
  --k-font-2xl: 1.5rem;
  --k-font-3xl: 1.875rem;
  --k-font-4xl: 2.25rem;
  --k-font-5xl: 3rem;

  /* Transition */
  --k-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --k-transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --k-transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Legacy aliases */
  --kedai-primary: var(--k-primary);
  --kedai-primary-light: var(--k-primary-light);
  --kedai-accent: var(--k-accent);
  --kedai-dark: var(--k-primary-dark);
  --kedai-success: var(--k-primary-light);
  --kedai-danger: var(--k-danger);
}

/* ---------- Base Typography ---------- */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Glassmorphism ---------- */
.glass {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.3);
}

/* ---------- Scroll Reveal ---------- */
.scroll-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Focus Ring ---------- */
*:focus-visible {
  outline: 2px solid var(--k-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Skip to Content ---------- */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background: var(--k-primary);
  color: white;
  font-weight: 600;
  border-radius: var(--k-radius);
  transition: top 0.2s ease;
}
.skip-to-content:focus {
  top: 1rem;
}

/* ---------- Animations ---------- */
@keyframes slide-in { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fade-up { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes pulse-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(5,150,105,0.4); } 50% { box-shadow: 0 0 0 12px rgba(5,150,105,0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

.animate-slide-in { animation: slide-in 0.3s ease forwards; }
.animate-fade-up { animation: fade-up 0.5s ease forwards; }
.animate-fade-in { animation: fade-in 0.4s ease forwards; }
.animate-spin-slow { animation: spin-slow 2s linear infinite; }
.animate-pulse-glow { animation: pulse-glow 2s infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* ---------- Ripple Effect ---------- */
.ripple {
  position: relative;
  overflow: hidden;
}
.ripple::after {
  content: '';
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10);
  opacity: 0;
  transition: transform 0.5s, opacity 1s;
}
.ripple:active::after {
  transform: scale(0);
  opacity: 0.3;
  transition: 0s;
}

/* ---------- Scroll to Top ---------- */
.scroll-top-btn {
  position: fixed;
  bottom: 4.5rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: var(--k-radius-full);
  background: var(--k-primary);
  color: white;
  border: none;
  box-shadow: var(--k-shadow-lg);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(1rem);
  transition: all var(--k-transition);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-top-btn:hover {
  background: var(--k-primary-dark);
  transform: translateY(-3px);
  box-shadow: var(--k-shadow-xl);
}

/* ---------- Staggered Animation Delay ---------- */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }
.stagger-7 { animation-delay: 0.35s; }
.stagger-8 { animation-delay: 0.4s; }.tabs.tabs-bordered .tab-btn-admin:hover {
  color: var(--k-primary);
  border-bottom-color: color-mix(in srgb, var(--k-primary) 30%, transparent);
}
.tabs.tabs-bordered .tab-btn-admin.tab-active {
  font-weight: 600;
  color: var(--k-primary);
  border-bottom: 2px solid var(--k-primary);
  background: transparent;
}
.tabs.tabs-bordered .tab-btn-admin.tab-active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--k-primary);
  border-radius: 2px 2px 0 0;
  opacity: 1;
}
.tabs.tabs-bordered .tab-btn-admin.tab-active i {
  color: var(--k-primary);
}

/* ---------- Fix DaisyUI tabs border position on mobile ---------- */
@media (max-width: 768px) {
  .tabs {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
    align-items: stretch;
  }
  .tabs::-webkit-scrollbar {
    display: none;
  }
  .tabs.tabs-bordered .tab-btn-admin {
    border-top: none !important;
    border-bottom: none !important;
    flex: 0 0 auto;
    min-width: auto;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    text-align: center;
    justify-content: center;
    border-radius: 0.75rem !important;
    margin-bottom: 0.25rem;
    flex-direction: row;
    gap: 0.5rem;
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
    font-size: 0.875rem;
    font-weight: 600;
    position: relative;
    transition: all 0.2s ease;
    white-space: nowrap;
    color: var(--k-text-muted);
  }
  .tabs.tabs-bordered .tab-btn-admin:hover {
    background: #f0fdf6;
    color: var(--k-primary);
  }
  .tabs.tabs-bordered .tab-btn-admin.tab-active {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5) !important;
    color: var(--k-primary);
    border-radius: 0.75rem !important;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.1);
  }
  .tabs.tabs-bordered .tab-btn-admin.tab-active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0.75rem;
    right: 0.75rem;
    height: 3px;
    background: var(--k-primary);
    border-radius: 3px 3px 0 0;
    display: none;
  }
  .tabs.tabs-bordered .tab-btn-admin.tab-active i {
    color: var(--k-primary);
  }
}

/* ---------- Mobile: Header Produk & Tombol ---------- */
@media (max-width: 768px) {
  .flex.items-center.justify-between.mb-4 {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .flex.items-center.justify-between.mb-4 .flex.gap-2 {
    justify-content: space-between;
  }
  .flex.items-center.justify-between.mb-4 .kedai-btn-outline,
  .flex.items-center.justify-between.mb-4 .kedai-btn-primary {
    flex: 1;
    justify-content: center;
  }
}

/* ---------- Mobile: Tabel Produk Scroll Horizontal ---------- */
@media (max-width: 768px) {
  #produkTable > div {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .kedai-table {
    min-width: 600px;
  }
}