/* 
 * PagRico - CSS Compartilhado
 * Versão: 1.0.0
 * Data: 27/07/2025
 */

:root {
    /* Cores principais PagRico */
    --primary-blue: #00033D;
    --accent-green: #00ffaa;
    --primary-green: #00ffaa;
    --white: #ffffff;
    
    /* Paleta expandida */
    --primary-blue-dark: #00033D;
    --primary-blue-light: #1a0d5c;
    --accent-green-light: #a8ffd1;
    --accent-green-dark: #00ffaa;
    
    /* Cores neutras semânticas */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Sistema de cores semânticas */
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-muted: var(--gray-500);
    --background: #f8fafc;
    --background-light: #f1f5f9;
    --surface: var(--white);
    --border: #e2e8f0;
    --overlay: rgba(0, 0, 0, 0.5);
    
    /* Estados semânticos */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, #0600AB 100%);
    --gradient-success: linear-gradient(135deg, var(--accent-green) 0%, #00b478 100%);
    
    /* Sombras */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Espaçamentos consistentes */
    --space-0: 0;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    /* Bordas */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;
    
    /* Transições */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Z-indexes */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-tooltip: 1070;
}

/* === RESET E BASE === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--background);
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Melhor renderização de imagens */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Reset de formulários */
input, button, textarea, select {
    font: inherit;
    color: inherit;
}

/* Links sem decoração padrão */
a {
    color: inherit;
    text-decoration: none;
}

/* Listas sem marcadores */
ul, ol {
    list-style: none;
}

/* === UTILITÁRIOS === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* === SISTEMA DE BOTÕES === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn:focus {
    outline: 2px solid var(--accent-green);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-blue);
    border: 2px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--primary-blue);
    transform: translateY(-1px);
}

.btn-accent {
    background: var(--gradient-success);
    color: var(--primary-blue);
    box-shadow: var(--shadow);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* === ANIMAÇÕES === */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === RESPONSIVIDADE === */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-4);
    }
    
    .btn {
        padding: var(--space-3) var(--space-4);
        font-size: 0.875rem;
    }
}

/* === ACESSIBILIDADE === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

:focus {
    outline: 2px solid var(--accent-green);
    outline-offset: 2px;
}

@media (prefers-contrast: high) {
    :root {
        --text-primary: #000000;
        --text-secondary: #333333;
        --border: #000000;
    }
}

/* Estados de foco para navegação por teclado */
.keyboard-navigation *:focus {
    outline: 2px solid var(--accent-green) !important;
    outline-offset: 2px !important;
}

/* === CLASSES UTILITÁRIAS PARA ELEMENTOS ESPECÍFICOS === */

/* Estilos para informações do usuário */
.user-name {
    color: var(--white);
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

.user-company {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    margin: 0.25rem 0 0;
}

.user-email {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8125rem;
    margin: 0.125rem 0 0;
    word-break: break-word;
}
    margin: 0.125rem 0 0;
}

/* Botões de ação do header */
.header-action-btn {
    background: var(--accent-green);
    color: white;
    border: none;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.header-action-btn:hover {
    background: var(--accent-green-dark);
    transform: translateY(-1px);
}

/* Texto descritivo do footer */
.footer-description {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: var(--space-4) 0;
    text-align: center;
}

/* Classes de utilidade para margin/padding */
.m-0 { margin: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mb-2 { margin-bottom: var(--space-2); }
.mr-2 { margin-right: var(--space-2); }

/* Classes de largura */
.w-full { width: 100%; }

/* === ÍCONES DE MOEDAS === */
/* Ícones de imagem das moedas - estilo global */
.currency-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: inline-block;
}

/* Tamanhos alternativos */
.currency-icon.small {
    width: 16px;
    height: 16px;
}

.currency-icon.large {
    width: 32px;
    height: 32px;
}

.currency-icon.xlarge {
    width: 48px;
    height: 48px;
}

/* Classes de texto */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.8125rem; }

/* ===========================
   SISTEMA DE NOTIFICAÇÕES 
   =========================== */

.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.notification {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 
                0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 16px 20px;
    margin-bottom: 12px;
    min-width: 320px;
    max-width: 400px;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    transform: translateX(450px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.hide {
    transform: translateX(450px);
    opacity: 0;
}

.notification::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
}

.notification.success::before {
    background: var(--success);
}

.notification.error::before {
    background: var(--error);
}

.notification.warning::before {
    background: var(--warning);
}

.notification.info::before {
    background: var(--info);
}

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notification-icon {
    font-size: 20px;
    line-height: 1;
    margin-top: 2px;
    flex-shrink: 0;
}

.notification.success .notification-icon {
    color: var(--success);
}

.notification.error .notification-icon {
    color: var(--error);
}

.notification.warning .notification-icon {
    color: var(--warning);
}

.notification.info .notification-icon {
    color: var(--info);
}

.notification-text {
    flex: 1;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
}

.notification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.notification-close:hover {
    color: var(--text-primary);
    background: var(--gray-100);
}

/* Progress bar para duração */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.notification-progress::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    background: currentColor;
    transform: translateX(-100%);
    animation: notification-progress 5s linear forwards;
}

.notification.success .notification-progress::after {
    color: var(--success);
}

.notification.error .notification-progress::after {
    color: var(--error);
}

.notification.warning .notification-progress::after {
    color: var(--warning);
}

.notification.info .notification-progress::after {
    color: var(--info);
}

@keyframes notification-progress {
    to {
        transform: translateX(0);
    }
}

/* Responsivo */
@media (max-width: 480px) {
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .notification {
        min-width: auto;
        max-width: none;
        margin-bottom: 8px;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
    
    .notification.hide {
        transform: translateY(-100px);
    }
}
