/* ============================================================
   Custom Domain Portal — Base
   Variables, Reset, Typography, Layout Utilities
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,400&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  /* Backgrounds — dark navy oceânico */
  --bg-base:     #060E16;
  --bg-surface:  #0A1820;
  --bg-card:     #0E1E2C;
  --bg-card-alt: #132636;
  --bg-input:    #182E40;
  --bg-hover:    rgba(23,181,232,.08);

  /* Borders */
  --border:      rgba(255,255,255,.07);
  --border-focus: rgba(23,181,232,.5);

  /* Accent — paleta MovingPay */
  --accent:      #17B5E8;   /* azul céu da logo */
  --accent-2:    #4DC8E0;   /* azul mais claro para textos em dark */
  --accent-dark: #0A92C0;
  --accent-glow: rgba(23,181,232,.15);

  /* Semantic */
  --success:     #6DBF45;   /* verde da logo */
  --success-bg:  rgba(109,191,69,.12);
  --warning:     #F59E0B;
  --warning-bg:  rgba(245,158,11,.12);
  --danger:      #EF4444;
  --danger-bg:   rgba(239,68,68,.12);
  --info:        #2DBFB0;   /* teal da logo */
  --info-bg:     rgba(45,191,176,.12);

  /* Text — leve toque azulado no dark */
  --text-1: #E8F4FA;
  --text-2: #7AAFC8;
  --text-3: #3A5A72;

  /* Layout */
  --sidebar-w: 240px;
  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow: 0 4px 24px rgba(0,0,0,.4);
  --shadow-card: 0 2px 12px rgba(0,0,0,.3);
}

/* ── Light Theme ────────────────────────────────────────────── */
[data-theme="light"] {
  /* Backgrounds — leve toque aqua no light */
  --bg-base:     #E0F2F8;
  --bg-surface:  #FFFFFF;
  --bg-card:     #FFFFFF;
  --bg-card-alt: #EAF7FB;
  --bg-input:    #F3FBFD;
  --bg-hover:    rgba(14,165,201,.07);

  --border:      rgba(8,28,45,.10);
  --border-focus: rgba(14,165,201,.50);

  /* Accent ajustado para contraste em fundo claro */
  --accent:      #0EA5C9;
  --accent-2:    #0D9E96;
  --accent-dark: #0880A6;
  --accent-glow: rgba(14,165,201,.09);

  /* Semantic — versões mais escuras para fundos claros */
  --success:     #4E9A20;
  --success-bg:  rgba(109,191,69,.11);
  --info:        #0D8A84;
  --info-bg:     rgba(45,191,176,.11);

  /* Texto — navy com toque de azul (complementa a marca) */
  --text-1: #081E2A;
  --text-2: #1C4258;
  --text-3: #4A6878;   /* mesmo tom do texto "MovingPay" na logo */

  --shadow: 0 4px 24px rgba(0,0,0,.10);
  --shadow-card: 0 2px 8px rgba(8,28,45,.08), 0 0 0 1px rgba(8,28,45,.06);
}

/* ── Light: scrollbar ───────────────────────────────────────── */
[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(15,23,42,.16);
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(14,165,201,.4);
}

/* ── Light: links ───────────────────────────────────────────── */
[data-theme="light"] a { color: #0EA5C9; }
[data-theme="light"] a:hover { color: #0880A6; }

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text-1);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--text-1); }

/* ── Page fade-in ───────────────────────────────────────────── */
body {
  animation: pageFade .2s ease;
}
@keyframes pageFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.1);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(23,181,232,.5); }

/* ── Typography ─────────────────────────────────────────────── */
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }
h3 { font-size: 1rem;    font-weight: 600; }
h4 { font-size: .875rem; font-weight: 600; }
p  { color: var(--text-2); line-height: 1.7; }

/* ── Layout Utils ───────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2  { gap: .5rem; }
.gap-3  { gap: .75rem; }
.gap-4  { gap: 1rem; }
.gap-6  { gap: 1.5rem; }
.w-full { width: 100%; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
