/* ============================================
   VOY — Global Styles
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
@import './variables.css';

/* ── Reset ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-sans); color: var(--gray-800); background: var(--gray-50); line-height: 1.5; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-sans); border: none; background: none; }
ul, ol { list-style: none; }
input, select, textarea { font-family: var(--font-sans); }

/* ── Utilidades globales ─────────────────── */
.hidden { display: none !important; }

/* ── Utilidades de layout ─────────────────── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-6); }
.flex        { display: flex; }
.flex-col    { display: flex; flex-direction: column; }
.items-center{ align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2  { gap: var(--sp-2); }
.gap-3  { gap: var(--sp-3); }
.gap-4  { gap: var(--sp-4); }
.gap-6  { gap: var(--sp-6); }
.grid   { display: grid; }

/* ── Tipografía ──────────────────────────── */
.text-xs  { font-size: var(--text-xs); }
.text-sm  { font-size: var(--text-sm); }
.text-lg  { font-size: var(--text-lg); }
.text-xl  { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.font-medium   { font-weight: var(--weight-medium); }
.font-semibold { font-weight: var(--weight-semibold); }
.font-bold     { font-weight: var(--weight-bold); }
.text-muted    { color: var(--gray-500); }
.text-primary  { color: var(--color-primary); }
.text-navy     { color: var(--color-navy); }

/* ── Botones ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-2); padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius-lg); font-weight: var(--weight-semibold);
  font-size: var(--text-sm); transition: var(--transition); white-space: nowrap;
}
.btn-primary {
  background: var(--color-primary); color: var(--white);
  box-shadow: var(--shadow-blue);
}
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-blue-lg); }
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent; color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-outline:hover { background: var(--blue-50); }

.btn-white {
  background: var(--white); color: var(--color-primary);
  box-shadow: var(--shadow-md);
}
.btn-white:hover { background: var(--blue-50); transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--gray-600); padding: var(--sp-2) var(--sp-4); }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-900); }

.btn-danger { background: var(--color-danger); color: var(--white); }
.btn-danger:hover { background: #dc2626; }

.btn-success { background: var(--color-success); color: var(--white); }
.btn-success:hover { background: #059669; }

.btn-sm { padding: var(--sp-2) var(--sp-4); font-size: var(--text-xs); border-radius: var(--radius-md); }
.btn-lg { padding: var(--sp-4) var(--sp-8); font-size: var(--text-base); border-radius: var(--radius-xl); }
.btn-block { width: 100%; }
.btn-icon { padding: var(--sp-3); border-radius: var(--radius-lg); aspect-ratio: 1; }

/* ── Cards ───────────────────────────────── */
.card {
  background: var(--white); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200);
  overflow: hidden; transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-body { padding: var(--sp-6); }
.card-header { padding: var(--sp-4) var(--sp-6); border-bottom: 1px solid var(--gray-100); }

/* ── Badges ──────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3); border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: var(--weight-semibold);
}
.badge-blue    { background: var(--blue-100); color: var(--blue-700); }
.badge-green   { background: #d1fae5; color: #065f46; }
.badge-yellow  { background: #fef3c7; color: #92400e; }
.badge-red     { background: #fee2e2; color: #991b1b; }
.badge-gray    { background: var(--gray-100); color: var(--gray-600); }

/* ── Avatar ──────────────────────────────── */
.avatar {
  border-radius: var(--radius-full); object-fit: cover;
  border: 2px solid var(--white); box-shadow: var(--shadow-sm);
}
.avatar-xs { width: 28px; height: 28px; }
.avatar-sm { width: 36px; height: 36px; }
.avatar-md { width: 48px; height: 48px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-xl { width: 80px; height: 80px; }

/* ── Stars ───────────────────────────────── */
.stars { display: inline-flex; gap: 1px; color: var(--color-warning); font-size: var(--text-sm); }

/* ── Inputs ──────────────────────────────── */
.input-group { display: flex; flex-direction: column; gap: var(--sp-1); }
.input-label { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--gray-700); }
.input {
  width: 100%; padding: var(--sp-3) var(--sp-4);
  border: 1.5px solid var(--gray-300); border-radius: var(--radius-lg);
  font-size: var(--text-sm); color: var(--gray-900);
  transition: var(--transition); background: var(--white);
}
.input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--blue-100); }
.input::placeholder { color: var(--gray-400); }

select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* ── Range slider ────────────────────────── */
input[type=range] { -webkit-appearance: none; width: 100%; height: 4px; background: var(--gray-200); border-radius: var(--radius-full); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--color-primary); cursor: pointer; box-shadow: var(--shadow-blue); }

/* ── Modal ───────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(17,24,39,0.6);
  backdrop-filter: blur(4px); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-4); opacity: 0; pointer-events: none; transition: var(--transition);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white); border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl); width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(16px) scale(0.97); transition: var(--transition-slow);
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); }
.modal-header {
  padding: var(--sp-5) var(--sp-6); border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-body   { padding: var(--sp-6); }
.modal-footer { padding: var(--sp-4) var(--sp-6); border-top: 1px solid var(--gray-100); display: flex; gap: var(--sp-3); justify-content: flex-end; }
.modal-close  { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-md); background: var(--gray-100); color: var(--gray-500); cursor: pointer; transition: var(--transition); border: none; }
.modal-close:hover { background: var(--gray-200); color: var(--gray-900); }

/* ── Toast ───────────────────────────────── */
#toast-container {
  position: fixed; top: var(--sp-6); right: var(--sp-6);
  z-index: 2000; display: flex; flex-direction: column; gap: var(--sp-3);
}
.toast {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5); border-radius: var(--radius-xl);
  background: var(--white); box-shadow: var(--shadow-xl);
  border-left: 4px solid var(--color-primary);
  font-size: var(--text-sm); font-weight: var(--weight-medium);
  max-width: 340px; animation: slideIn 0.3s var(--ease);
}
.toast.success { border-color: var(--color-success); }
.toast.error   { border-color: var(--color-danger); }
.toast.warning { border-color: var(--color-warning); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(100%); } }

/* ── Status dot ──────────────────────────── */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.online  { background: var(--color-success); box-shadow: 0 0 0 2px #d1fae5; }
.status-dot.offline { background: var(--gray-400); }
.status-dot.busy    { background: var(--color-warning); box-shadow: 0 0 0 2px #fef3c7; }

/* ── Spinner ─────────────────────────────── */
.spinner {
  width: 20px; height: 20px; border: 2px solid var(--blue-200);
  border-top-color: var(--color-primary); border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Divider ─────────────────────────────── */
.divider { height: 1px; background: var(--gray-200); margin: var(--sp-4) 0; }
.divider-text {
  display: flex; align-items: center; gap: var(--sp-3);
  color: var(--gray-500); font-size: var(--text-sm);
}
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }

/* ── Scrollbar ───────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ── Responsive ──────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 0 var(--sp-4); }
  .hide-mobile { display: none !important; }
}
@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}
