/**
 * ============================================================
 * YNA SHOP - Modern Clean Custom CSS & Design System Tokens
 * ============================================================
 * Menggunakan CSS Custom Properties untuk sistem tema Dark/Light
 * yang stabil tanpa layout shift dan bebas kedipan (no-FOUC).
 */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  /* Tema Terang (Light Mode) */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-input: #ffffff;
  --border-primary: #e2e8f0;
  --border-focus: #0284c7;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  
  --brand-primary: #0284c7;
  --brand-primary-hover: #0369a1;
  --brand-accent: #0ea5e9;
  
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-dropdown: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

.dark {
  /* Tema Gelap (Dark Mode) - Solid, Elegan, Anti-Slop */
  --bg-body: #090d16;
  --bg-surface: #0f172a;
  --bg-card: #131c31;
  --bg-card-subtle: #19243d;
  --bg-input: #0b1120;
  --border-primary: #1e293b;
  --border-focus: #38bdf8;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  --brand-primary: #0284c7;
  --brand-primary-hover: #38bdf8;
  --brand-accent: #38bdf8;
  
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-dropdown: 0 10px 25px rgba(0, 0, 0, 0.5);
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-sans);
  transition: background-color 0.2s ease, color 0.2s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

/* Transisi halus saat toggle tema */
.theme-transition {
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

/* Input & Form Controls */
.yna-input {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-primary);
  color: var(--text-main);
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.yna-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Tombol Utama */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--brand-primary);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  padding: 0.625rem 1.25rem;
  transition: all 0.15s ease;
  cursor: pointer;
  border: none;
}

.btn-primary:hover {
  background-color: var(--brand-primary-hover);
}

.btn-primary:active {
  transform: scale(0.98);
}

/* Tombol Sekunder / Outline */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: transparent;
  border: 1px solid var(--border-primary);
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  padding: 0.625rem 1.25rem;
  transition: all 0.15s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: var(--bg-card-subtle);
  border-color: var(--border-focus);
}

/* Kartu Elegan */
.yna-card, .card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-card);
}

/* Input alias */
.input-control {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-primary);
  color: var(--text-main);
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}
