@tailwind base;
@tailwind components;
@tailwind utilities;

@layer components {
    .pagy-nav.pagination {
        @apply isolate inline-flex -space-x-px rounded-md shadow-sm;
    }

    .page.next a {
        @apply relative inline-flex items-center rounded-r-md bg-blue-600 px-2 py-2 text-sm font-medium text-white hover:bg-blue-700 focus:z-20;
    }

    .page.prev a {
        @apply relative inline-flex items-center rounded-l-md bg-blue-600 px-2 py-2 text-sm font-medium text-white hover:bg-blue-700 focus:z-20;
    }

    .page.next.disabled {
        @apply relative inline-flex items-center rounded-r-md bg-blue-500 px-2 py-2 text-sm font-medium text-white hover:bg-blue-700 focus:z-20;
    }

    .page.prev.disabled {
        @apply relative inline-flex items-center rounded-l-md bg-blue-500 px-2 py-2 text-sm font-medium text-white hover:bg-blue-700 focus:z-20;
    }

    .page a, .page.gap {
        @apply bg-blue-600 text-white hover:bg-blue-700 relative inline-flex items-center border px-4 py-2 text-sm font-medium focus:z-20;
    }

    .page.active {
        @apply z-10 border-blue-700 bg-blue-700 text-white relative inline-flex items-center border px-4 py-2 text-sm font-bold focus:z-20;
    }
}
@layer components {
  .pagy-nav.pagination {
    @apply isolate inline-flex -space-x-px rounded-md shadow-sm;
  }

  .page.next a {
    @apply relative inline-flex items-center rounded-r-md bg-blue-600 px-2 py-2 text-sm font-medium text-white hover:bg-blue-700 focus:z-20;
  }

  .page.prev a {
    @apply relative inline-flex items-center rounded-l-md bg-blue-600 px-2 py-2 text-sm font-medium text-white hover:bg-blue-700 focus:z-20;
  }

  .page.next.disabled {
    @apply relative inline-flex items-center rounded-r-md bg-blue-500 px-2 py-2 text-sm font-medium text-white hover:bg-blue-700 focus:z-20;
  }

  .page.prev.disabled {
    @apply relative inline-flex items-center rounded-l-md bg-blue-500 px-2 py-2 text-sm font-medium text-white hover:bg-blue-700 focus:z-20;
  }

  .page a, .page.gap {
    @apply bg-blue-600 text-white hover:bg-blue-700 relative inline-flex items-center border px-4 py-2 text-sm font-medium focus:z-20;
  }

  .page.active {
    @apply z-10 border-blue-700 bg-blue-700 text-white relative inline-flex items-center border px-4 py-2 text-sm font-bold focus:z-20;
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 *


 */

/* ─── Design tokens ───────────────────────────────────── */
:root {
  --accent:         oklch(54% 0.19 155);
  --accent-light:   oklch(96% 0.05 155);
  --accent-soft:    oklch(96% 0.05 155);
  --accent-sidebar: oklch(22% 0.06 155);
  --bg-content:     oklch(96.5% 0.008 250);
  --text-primary:   #0d1117;
  --text-muted:     #94a3b8;
  --text-secondary: #64748b;
  --border:         #e8edf3;
  --border-light:   #f1f5f9;

  /* Data Dividends identity (indigo + gold + green/red semánticos) */
  --data:           oklch(48% 0.20 280);
  --data-soft:      oklch(96% 0.05 280);
  --data-strong:    oklch(38% 0.22 280);
  --data-glow:      oklch(72% 0.18 290);
  --pay:            oklch(78% 0.14 80);
  --pay-soft:       oklch(96% 0.05 80);
  --pay-strong:     oklch(58% 0.16 60);
  --green:          oklch(56% 0.16 155);
  --green-soft:     oklch(96% 0.05 155);
  --red:            oklch(58% 0.22 25);

  /* Shared ink/line scale (reused across features) */
  --ink:            #0d1117;
  --ink-2:          #475569;
  --ink-3:          #94a3b8;
  --ink-4:          #cbd5e1;
  --line:           #e8edf3;
  --line-2:         #f1f5f9;
  --line-3:         #f8fafc;
  --bg:             oklch(96.5% 0.008 250);
}

/* ─── Base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'DM Sans', 'Inter', sans-serif;
  color: var(--text-primary);
  background: var(--bg-content);
}

h1, h2, h3, h4,
.font-display,
.font-sora {
  font-family: 'Sora', sans-serif;
}

.font-mono,
.tabular-nums {
  font-family: 'DM Mono', 'ui-monospace', monospace;
}

/* ─── Sidebar nav items ───────────────────────────────── */
.nav-item {
  color: var(--text-secondary);
  font-weight: 500;
  text-decoration: none;
}
.nav-item:hover {
  background: #f1f5f9;
  color: #475569;
}
.nav-item--active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
}

/* ─── Content area ────────────────────────────────────── */
.caudal-content {
  padding: 24px 28px;
}
@media (max-width: 639px) {
  .caudal-content {
    padding: 70px 16px 24px;
  }
}

/* ─── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar        { width: 4px; height: 4px; }
::-webkit-scrollbar-track  { background: transparent; }
::-webkit-scrollbar-thumb  { background: #e2e8f0; border-radius: 2px; }

/* ─── Form components ─────────────────────────────────── */
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.form-input {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.875rem;
  color: var(--text-primary);
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px oklch(54% 0.19 155 / 0.12);
}
.form-input::placeholder {
  color: var(--text-muted);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.form-errors li {
  font-size: 0.875rem;
  color: #dc2626;
  list-style: disc;
  margin-left: 16px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  background: var(--accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
  text-decoration: none;
}
.btn-primary:hover { opacity: 0.88; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  background: #f1f5f9;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}
.btn-secondary:hover { background: #e2e8f0; }

.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.page-header__back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f1f5f9;
  color: var(--text-secondary);
  transition: background 0.15s;
  flex-shrink: 0;
  text-decoration: none;
}
.page-header__back:hover { background: #e2e8f0; }
.page-header__title {
  font-family: 'Sora', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}
.page-header__sub {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ─── Data Dividends ──────────────────────────────────── */
.dd-hero {
  background: linear-gradient(135deg, oklch(22% 0.10 280) 0%, oklch(28% 0.14 280) 60%, oklch(34% 0.16 290) 100%);
  border-radius: 20px;
  padding: 28px 32px;
  color: #fff;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
  box-shadow: 0 8px 28px rgba(34,17,77,.22);
  position: relative;
  overflow: hidden;
}
.dd-hero__glow-1 {
  position: absolute; right: -60px; top: -60px;
  width: 280px; height: 280px; border-radius: 50%;
  background: oklch(72% 0.18 290 / 0.22); filter: blur(40px);
  pointer-events: none;
}
.dd-hero__glow-2 {
  position: absolute; right: 80px; bottom: -80px;
  width: 180px; height: 180px; border-radius: 50%;
  background: oklch(80% 0.16 80 / 0.18); filter: blur(30px);
  pointer-events: none;
}
.dd-hero__bar-track {
  height: 8px; background: rgba(255,255,255,.10);
  border-radius: 99px; position: relative;
}
.dd-hero__bar-fill {
  position: absolute; height: 100%; width: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--pay) 0%, #fde047 100%);
  box-shadow: 0 0 10px oklch(80% 0.16 80 / 0.6);
}

.dd-card     { background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.dd-card-pad { padding: 20px 22px; }

.dd-score-grid    { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.dd-action-grid   { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.dd-subgrid       { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin-bottom: 24px; }
.dd-twocol        { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.dd-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 99px; font-size: 11px;
  font-weight: 600; line-height: 1;
}

.dd-pay-badge {
  font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 99px;
  background: var(--pay-soft); color: var(--pay-strong);
  font-family: 'DM Mono', monospace;
}

.dd-btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: 10px;
  background: var(--data); color: #fff; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.dd-btn-primary:hover { opacity: 0.92; }
.dd-btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: 10px;
  background: #fff; color: var(--ink-2); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.dd-btn-pay {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: 10px;
  background: var(--pay-strong); color: #fff; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.dd-btn-danger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: 10px;
  background: #fff; color: var(--red); border: 1px solid #fecaca;
  font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none;
}

.dd-wallet-card {
  position: relative; border-radius: 18px; padding: 24px 28px;
  background: linear-gradient(135deg, oklch(58% 0.16 60) 0%, oklch(72% 0.16 80) 60%, oklch(80% 0.14 90) 100%);
  color: #fff; overflow: hidden;
  box-shadow: 0 12px 32px rgba(180,120,30,.32);
  min-height: 200px;
}
.dd-wallet-card__glow {
  position: absolute; right: -50px; top: -50px;
  width: 240px; height: 240px; border-radius: 50%;
  background: rgba(255,255,255,.18); filter: blur(40px);
}
.dd-wallet-chip {
  width: 38px; height: 30px; border-radius: 5px;
  background: linear-gradient(135deg, #fde68a 0%, #d4af37 100%);
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr 1fr;
  gap: 1.5px; padding: 3px;
}
.dd-wallet-chip > div { background: rgba(0,0,0,.15); border-radius: 1px; }

.dd-toggle-on {
  width: 38px; height: 22px; border-radius: 99px; background: var(--pay-strong); position: relative;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
}
.dd-toggle-on::after {
  content: ""; position: absolute; top: 2px; right: 2px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
}
.dd-toggle-off {
  width: 38px; height: 22px; border-radius: 99px; background: var(--ink-4); position: relative;
}
.dd-toggle-off::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
}

@media (max-width: 768px) {
  .dd-hero, .dd-subgrid, .dd-twocol { grid-template-columns: 1fr; }
  .dd-score-grid, .dd-action-grid   { grid-template-columns: 1fr; }
}
