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

@import 'core/reset.css';
@import 'core/variables.css';
@import 'components/buttons.css';
@import 'components/cards.css';
@import 'components/forms.css';
@import 'components/nav.css';
@import 'pages/auth.css';
@import 'pages/dashboard.css';

/* ── Base ── */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-3); }

/* ── Gradient Text ── */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card-2);
  border: 1px solid var(--border-2);
  color: var(--text);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transform: translateY(12px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 360px;
  pointer-events: none;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.toast.success {
  background: var(--bg-card-2);
  border-color: var(--green-border);
  color: var(--green);
}
.toast.error {
  background: var(--bg-card-2);
  border-color: var(--red-border);
  color: var(--red);
}
.toast.info {
  background: var(--bg-card-2);
  border-color: rgba(129,140,248,0.25);
  color: var(--primary);
}
.toast-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}
.toast-msg { color: var(--text); }
.toast.success .toast-msg { color: var(--text); }
.toast.error   .toast-msg { color: var(--text); }
.toast.info    .toast-msg { color: var(--text); }

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

/* ── Skeleton ── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-2) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skel-line { height: 12px; border-radius: var(--radius-full); }
.skel-line.w-full { width: 100%; }
.skel-line.w-3-4 { width: 75%; }
.skel-line.w-1-2 { width: 50%; }
.skel-line.w-1-4 { width: 25%; }
.skel-box { border-radius: var(--radius); }

/* ── Divider ── */
.sec-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ── Section Card (shared across dashboard pages) ── */
.sc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.sc-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sc-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.sc-sub {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}
.sc-body {
  padding: 20px;
}

/* ── Guest Banner ── */
.guest-banner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.guest-banner .gb-icon {
  width: 40px; height: 40px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
}
.guest-banner .gb-text { flex: 1; }
.guest-banner .gb-title { font-size: 14px; font-weight: 700; color: var(--text); }
.guest-banner .gb-sub { font-size: 13px; color: var(--text-3); margin-top: 1px; }

/* ── Custom Confirm Dialog ── */
.confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 9000; padding: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition-slow);
}
.confirm-overlay.open { opacity: 1; pointer-events: all; }
.confirm-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 28px 24px;
  width: 100%;
  max-width: 400px;
  transform: scale(0.95) translateY(8px);
  transition: transform var(--transition-slow);
}
.confirm-overlay.open .confirm-dialog {
  transform: scale(1) translateY(0);
}
.confirm-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.confirm-icon.danger { background: var(--red-light); color: var(--red); }
.confirm-icon.warning { background: var(--yellow-light); color: var(--yellow); }
.confirm-icon.info { background: var(--primary-light); color: var(--primary); }
.confirm-title {
  font-size: 18px; font-weight: 700;
  color: var(--text); margin-bottom: 8px;
}
.confirm-msg {
  font-size: 14px; color: var(--text-2);
  line-height: 1.6; margin-bottom: 24px;
}
.confirm-actions {
  display: flex; gap: 10px;
}

/* ── Prompt Dialog ── */
.prompt-dialog .prompt-input {
  width: 100%;
  background: var(--bg-2);
  border: 1.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px;
  margin-bottom: 20px;
  font-family: var(--font);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.prompt-dialog .prompt-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

/* ── Code block ── */
.code-block {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.8;
  overflow-x: auto;
}
.code-block .tk { color: var(--primary); }
.code-block .tv { color: var(--green); }
.code-block .tc { color: var(--text-3); }
