/* ==========================================================================
   PEDIDOS MIX - SISTEMA DE DISEÑO ESTILO APPLE (TEMA CLARO / iOS & macOS)
   Limpio, minimalista, ultra-fluido, frosted glass y tipografía San Francisco
   ========================================================================== */

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

:root {
  /* Paleta Apple Light */
  --bg-main: #f5f5f7;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #fbfbfd;
  --bg-surface-subtle: #f0f0f2;
  --bg-glass: rgba(255, 255, 255, 0.82);
  --bg-glass-card: rgba(255, 255, 255, 0.88);

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-medium: rgba(0, 0, 0, 0.12);
  --border-focus: #0071e3;

  /* Acentos Apple */
  --accent-primary: #0071e3;
  --accent-primary-hover: #0077ed;
  --accent-gradient: linear-gradient(135deg, #0071e3 0%, #3898ec 100%);
  --accent-music: #fc3c44;

  --success: #34c759;
  --success-hover: #2db34e;
  --warning: #ff9500;
  --danger: #ff3b30;

  /* Tipografía Apple */
  --text-main: #1d1d1f;
  --text-muted: #6e6e73;
  --text-dim: #86868b;
  --text-inverse: #ffffff;

  /* Radios Apple */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Sombras suaves y naturales de Apple */
  --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-elevated: 0 16px 40px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-float: 0 20px 48px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);

  --transition-fast: 0.15s cubic-bezier(0.2, 0, 0, 1);
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.2);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100vh;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Icons', 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.47059;
  font-weight: 400;
  letter-spacing: -0.016em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Sutil difuminado ambiental en la parte superior */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 280px;
  background: radial-gradient(ellipse at 50% 0%, rgba(0, 113, 227, 0.05) 0%, rgba(245, 245, 247, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
}

input, textarea, select {
  font-family: inherit;
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.035);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.95rem;
  width: 100%;
  outline: none;
  transition: all var(--transition-fast);
}

input:focus, textarea:focus {
  background: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

/* Botones Estilo Apple */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  user-select: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--text-main);
  color: #ffffff;
  box-shadow: var(--shadow-subtle);
}

.btn-primary:hover {
  background: #000000;
  box-shadow: var(--shadow-card);
}

.btn-blue {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.25);
}

.btn-blue:hover {
  background: var(--accent-primary-hover);
  box-shadow: 0 6px 18px rgba(0, 113, 227, 0.35);
}

.btn-success {
  background: var(--success);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(52, 199, 89, 0.25);
}

.btn-success:hover {
  background: var(--success-hover);
  box-shadow: 0 6px 18px rgba(52, 199, 89, 0.35);
}

.btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: var(--border-medium);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-full);
}

.btn-danger-ghost {
  color: var(--danger);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.btn-danger-ghost:hover {
  background: rgba(255, 59, 48, 0.08);
}

/* Badges / Píldoras Estilo Apple */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.badge-amber {
  background: rgba(255, 149, 0, 0.12);
  color: #b36600;
  border: 1px solid rgba(255, 149, 0, 0.2);
}

.badge-green {
  background: rgba(52, 199, 89, 0.12);
  color: #248a3d;
  border: 1px solid rgba(52, 199, 89, 0.2);
}

.badge-blue {
  background: rgba(0, 113, 227, 0.1);
  color: #0071e3;
  border: 1px solid rgba(0, 113, 227, 0.18);
}

/* Notificaciones Toast iOS Style */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: 90%;
  max-width: 360px;
}

.toast {
  background: rgba(29, 29, 31, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: toastAppleIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
  text-align: center;
}

.toast.toast-success {
  border-left: none;
}

.toast.toast-error {
  background: rgba(255, 59, 48, 0.95);
}

@keyframes toastAppleIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.text-center { text-align: center; }
.hidden { display: none !important; }
.relative { position: relative; }
