/* GDA SOCIAL 2.0 - DESIGN SYSTEM FOUNDATION */
/* Light Theme — Branco Puro + Vermelho Malta */

:root {
    --bg-global: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --vasco-red: #e11d48;
    --card-white: #ffffff;
    --border-soft: #e2e8f0;
    --surface-50: #f8fafc;
    --surface-100: #f1f5f9;
    --surface-200: #e2e8f0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-global);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--vasco-red);
    color: #ffffff;
}

/* ═══════════════════════════════════════════════
   CARD SYSTEM
   ═══════════════════════════════════════════════ */

.glass-effect,
.gda-card {
    background: var(--card-white);
    border: 1px solid var(--border-soft);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 6px 16px -4px rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel {
    background: var(--surface-50);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.gda-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.12);
}

/* ═══════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════ */

.glass-nav {
    background: #000000;
    border-bottom: 3px solid var(--vasco-red);
}

.nav-btn {
    transition: all 0.2s ease;
}

.nav-btn.active {
    background: rgba(225, 29, 72, 0.08);
    color: #e11d48;
    border-right: 4px solid #e11d48;
}

/* ═══════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════ */

.btn-premium {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: var(--vasco-red);
    color: #ffffff;
    font-weight: 800;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px -4px rgba(225, 29, 72, 0.3);
    cursor: pointer;
    border: none;
}

.btn-impact {
    background: #000000;
    color: #ffffff;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.15em; /* tracking-widest */
    transition: all 0.2s ease;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
}

.btn-impact:hover {
    background: #1F2937; /* bg-gray-800 */
    transform: translateY(-1px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.btn-impact:disabled,
button:disabled {
    cursor: wait;
    opacity: 0.65;
    transform: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--vasco-red);
    outline-offset: 3px;
}

.btn-impact:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.12);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px -8px rgba(225, 29, 72, 0.4);
    filter: brightness(1.08);
}

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

/* ═══════════════════════════════════════════════
   FORM INPUTS
   ═══════════════════════════════════════════════ */

.input-premium {
    background: var(--surface-50);
    border: 1px solid var(--border-soft);
    color: var(--text-primary);
    border-radius: 16px;
    font-weight: 500;
    transition: all 0.25s ease;
    outline: none;
}

.input-premium:focus {
    border-color: var(--vasco-red);
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.08);
}

.input-glass {
    background: #ffffff;
    border: 1px solid var(--border-soft);
    color: var(--text-primary);
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.25s ease;
    outline: none;
}

.input-glass:focus {
    border-color: var(--vasco-red);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.06);
}

/* ═══════════════════════════════════════════════
   PROGRESS BAR (IMPACT STYLE)
   ═══════════════════════════════════════════════ */

.progress-impact-container {
    background: #D1D5DB; /* bg-gray-300 */
    height: 2.5rem;      /* h-10 — maior impacto visual */
    position: relative;
    border: 2px solid #000000;
    border-radius: 8px;   /* rounded-lg */
    overflow: hidden;
    box-shadow: inset 0 2px 4px 0 rgba(0,0,0,0.05);
}

.progress-impact-fill {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: end;
    padding-right: 0.75rem;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 700;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-container {
    background: var(--surface-100);
    height: 0.75rem;
    border-radius: 9999px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
}

/* ═══════════════════════════════════════════════
   TOGGLE SWITCH
   ═══════════════════════════════════════════════ */

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--vasco-red);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* ═══════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════ */

#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    background: white;
    border: 1px solid var(--border-soft);
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.12);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
    pointer-events: auto;
    max-width: 380px;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    border-left: 4px solid #22c55e;
    background: #f0fdf4;
    color: #166534;
}

.toast.error {
    border-left: 4px solid #ef4444;
    background: #fef2f2;
    color: #991b1b;
}

.toast.info {
    border-left: 4px solid #3b82f6;
    background: #eff6ff;
    color: #1e40af;
}

/* ═══════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════ */

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

@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 15px rgba(225, 29, 72, 0.2); }
    50% { box-shadow: 0 0 25px rgba(225, 29, 72, 0.4); }
}

.animate-fade-up {
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }

/* ═══════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════ */

.hero-title {
    font-family: 'Bebas Neue', cursive;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
    font-style: italic;
}

/* ═══════════════════════════════════════════════
   MISC UTILITIES
   ═══════════════════════════════════════════════ */

.cause-card {
    background: var(--card-white);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cause-card:hover {
    transform: translateY(-4px);
    border-color: #94a3b8;
}

/* Loading spinner for buttons */
.btn-loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .gda-hover:hover,
    .cause-card:hover,
    .impact-stat:hover {
        transform: none;
    }
}

/* ═══════════════════════════════════════════════
   TRANSPARENCY PAGE
   ═══════════════════════════════════════════════ */

/* Navbar clara para página de transparência */
.impact-navbar {
    background: #ffffff;
    border-bottom: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
}

/* Tab de navegação por campanha */
.impact-tab {
    padding: 0.75rem 1.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border-bottom: 3px solid transparent;
    color: #9CA3AF;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.impact-tab:hover {
    color: #000000;
}

.impact-tab.active {
    color: #000000;
    border-bottom-color: #000000;
    font-weight: 900;
}

.impact-tab .tab-badge {
    font-size: 0.5rem;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.impact-tab .tab-badge.active-badge {
    background: #000000;
    color: #ffffff;
}

.impact-tab .tab-badge.closed-badge {
    background: #F3F4F6;
    color: #6B7280;
    border: 1px solid #E5E7EB;
}

/* Card de stat do resumo global */
.impact-stat {
    text-align: center;
    padding: 2rem 1.5rem;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    border-bottom: 3px solid #000000;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.impact-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.08);
}

/* Container de campanha selecionada */
.impact-campaign {
    animation: fadeSlideUp 0.4s ease forwards;
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Footer da transparência */
.impact-footer {
    background: #F9FAFB;
    border-top: 1px solid #E5E7EB;
    padding: 2rem 0;
    text-align: center;
}

/* ═══════════════════════════════════════════════
   EXPERIENCE POLISH — PUBLIC AND ADMIN SURFACES
   ═══════════════════════════════════════════════ */

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

html {
    color-scheme: light;
}

.donate-page,
.transparency-page,
.admin-shell,
.maintenance-page {
    line-height: 1.5;
}

.donate-page .glass-nav > div,
.transparency-page .impact-navbar > div {
    min-height: 4.5rem;
}

.donate-page #main-card,
.donate-page #pay-card,
.donate-page #success-card,
.donate-page #ranking-area {
    box-shadow: 0 12px 36px -24px rgba(15, 23, 42, 0.42);
}

.donate-page #pay-title,
.donate-page #success-title {
    color: var(--text-primary);
}

.donate-page #success-card > p {
    color: #475569;
}

.donate-page #pay-card #copy {
    background: var(--surface-50);
    border-color: var(--border-soft);
    color: var(--text-primary);
}

.donate-page #pay-card > button:last-child {
    color: #475569;
    min-height: 44px;
}

.donate-page #pay-card > button:last-child:hover {
    color: #0f172a;
}

.donate-page #anonymous-container label,
.donate-page .text-slate-400,
.donate-page .text-zinc-500,
.transparency-page .text-gray-400,
.admin-shell .text-slate-400 {
    color: #64748b;
}

.checkout-assurance {
    color: #475569;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-top: -0.5rem;
    text-align: center;
}

.donate-page #page-alert:not(.hidden) + #checkout-area {
    margin-top: 0;
    padding-top: 2rem;
}

.donate-page button,
.donate-page a,
.transparency-page button,
.transparency-page a,
.admin-shell button,
.admin-shell a {
    -webkit-tap-highlight-color: transparent;
}

.transparency-page .impact-stat {
    min-width: 0;
}

.transparency-page #campaign-tabs {
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 transparent;
}

.transparency-page #empty-state,
.transparency-page #error-state {
    box-shadow: 0 12px 28px -24px rgba(15, 23, 42, 0.5);
}

.admin-shell .admin-main {
    min-width: 0;
}

.admin-shell .admin-nav .nav-btn {
    min-height: 44px;
}

.admin-shell .gda-card,
.admin-shell .glass-panel {
    box-shadow: 0 8px 28px -24px rgba(15, 23, 42, 0.55);
}

.admin-shell input,
.admin-shell select,
.admin-shell textarea {
    min-height: 44px;
}

.admin-shell label {
    color: #475569;
}

.admin-shell .tab-content > header h2 {
    font-size: clamp(2.75rem, 6vw, 4.5rem);
    overflow-wrap: anywhere;
}

.maintenance-page {
    align-items: center;
    background:
        radial-gradient(circle at 50% 0%, rgba(225, 29, 72, 0.12), transparent 36rem),
        var(--surface-50);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 1.5rem;
}

.maintenance-card {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-top: 4px solid var(--vasco-red);
    border-radius: 1.5rem;
    box-shadow: 0 24px 60px -36px rgba(15, 23, 42, 0.55);
    max-width: 34rem;
    padding: clamp(2rem, 7vw, 4rem);
    text-align: center;
    width: 100%;
}

.maintenance-logo {
    height: 3.5rem;
    margin-bottom: 1.5rem;
    object-fit: contain;
    width: auto;
}

.maintenance-eyebrow {
    color: var(--vasco-red);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    margin: 0 0 0.75rem;
    text-transform: uppercase;
}

.maintenance-card h1 {
    font-size: clamp(2rem, 8vw, 3.5rem);
    letter-spacing: -0.035em;
    line-height: 1;
    margin: 0;
}

.maintenance-card > p:not(.maintenance-eyebrow) {
    color: #475569;
    margin: 1.25rem auto 0;
    max-width: 28rem;
}

.maintenance-action {
    margin-top: 2rem;
    min-height: 48px;
    padding: 0.875rem 1.5rem;
    width: 100%;
}

@media (max-width: 900px) {
    .admin-shell {
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
    }

    .admin-shell .admin-sidebar {
        border-bottom: 1px solid var(--border-soft);
        border-right: 0;
        display: block;
        flex: none;
        width: 100%;
    }

    .admin-shell .admin-sidebar-brand {
        height: 3.5rem;
        padding: 0.5rem 1rem;
        position: static;
    }

    .admin-shell .admin-sidebar-brand img {
        height: 2.25rem;
    }

    .admin-shell .admin-nav {
        display: flex;
        gap: 0.375rem;
        overflow-x: auto;
        padding: 0.5rem;
        scrollbar-width: thin;
    }

    .admin-shell .admin-nav > :not([hidden]) ~ :not([hidden]) {
        margin-top: 0;
    }

    .admin-shell .admin-nav .nav-btn {
        flex: 0 0 3rem;
        justify-content: center;
        padding: 0.7rem;
        width: 3rem;
    }

    .admin-shell .admin-nav .nav-btn.active {
        border-bottom: 3px solid var(--vasco-red);
        border-right: 0;
    }

    .admin-shell .admin-sidebar-footer {
        display: none;
    }

    .admin-shell .admin-main {
        flex: 1 1 auto;
    }

    .admin-shell .admin-main > div.max-w-7xl {
        padding: 1rem;
    }

    .admin-shell .tab-content > header {
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .admin-shell .gda-card,
    .admin-shell .glass-panel {
        border-radius: 1rem;
    }
}

@media (min-width: 640px) and (max-width: 900px) {
    .admin-shell .admin-nav .nav-btn {
        flex-basis: auto;
        width: auto;
    }

    .admin-shell .admin-nav .nav-btn span {
        display: block;
    }
}

@media (max-width: 639px) {
    .donate-page .glass-nav > div,
    .transparency-page .impact-navbar > div {
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }

    .donate-page .glass-nav img {
        height: 2rem;
    }

    .donate-page .glass-nav a,
    .transparency-page .impact-navbar a {
        min-height: 44px;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .donate-page #mediaArea {
        height: 14rem;
    }

    .donate-page #checkout-area {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .donate-page #main-card,
    .donate-page #pay-card,
    .donate-page #success-card {
        border-radius: 1rem;
        padding: 1.25rem;
    }

    .donate-page #preset-container {
        gap: 0.5rem;
    }

    .donate-page .progress-impact-container {
        height: 2rem;
    }

    .transparency-page .impact-stat {
        padding: 1.25rem 1rem;
    }

    .transparency-page .impact-navbar .text-\[8px\] {
        display: none;
    }

    .admin-shell .gda-card,
    .admin-shell .glass-panel {
        padding: 1.25rem;
    }

    .admin-shell [class*="rounded-[40px]"],
    .admin-shell [class*="rounded-[32px]"] {
        border-radius: 1rem;
        padding: 1.5rem;
    }

    #toast-container {
        left: 0.75rem;
        right: 0.75rem;
        top: 0.75rem;
    }

    .toast {
        max-width: none;
        width: 100%;
    }
}
