/* Reset e configurações globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a73e8;
    --secondary-color: #34a853;
    --dark-bg: #f0f7ff;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --success: #34a853;
    --danger: #ea4335;
    --warning: #fbbc04;
    --gradient-primary: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
    --gradient-secondary: linear-gradient(135deg, #34a853 0%, #5bb974 100%);
    --shadow: 0 2px 8px rgba(26, 115, 232, 0.08);
    --bg-light-blue: #e3f2fd;
    --border-color: #bbdefb;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to bottom, #e3f2fd 0%, #f0f7ff 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Container principal */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
.header {
    text-align: center;
    padding: 30px 0;
    margin-bottom: 30px;
}

.logo {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Cards */
.card {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.12);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 700;
}

/* Formulários */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    background: #f8fcff;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Botões */
.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.4);
    background: #1557b0;
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: rgba(0, 212, 255, 0.1);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Links */
.link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Alertas */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInDown 0.3s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-error {
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-info {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    color: #0d47a1;
}

/* Dashboard */
.saldo-card {
    background: var(--primary-color);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.saldo-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.saldo-valor {
    font-size: 2.5rem;
    font-weight: 900;
    margin: 10px 0;
}

.saldo-descricao {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Menu de navegação */
.nav-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.nav-item {
    background: #ffffff;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(26, 115, 232, 0.1);
}

.nav-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.2);
    border-color: var(--primary-color);
    background: var(--bg-light-blue);
}

.nav-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.nav-label {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Info do usuário */
.user-info {
    background: #ffffff;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(26, 115, 232, 0.1);
}

.user-info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e3f2fd;
}

.user-info-item:last-child {
    border-bottom: none;
}

.user-info-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.user-info-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--text-primary);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsividade */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .saldo-valor {
        font-size: 2rem;
    }
}

/* Animações de entrada */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilo para etapas do registro */
.step-indicator {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.step {
    width: 40px;
    height: 4px;
    background: #bbdefb;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.step.active {
    background: var(--primary-color);
    box-shadow: 0 0 8px rgba(26, 115, 232, 0.4);
}

/* Mascara de input */
.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

/* Barra de navegação inferior fixa */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 2px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 0 max(12px, env(safe-area-inset-bottom));
    z-index: 1000;
    box-shadow: 0 -3px 12px rgba(26, 115, 232, 0.12);
    height: auto;
    min-height: 70px;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #757575;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 12px;
    flex: 1;
    min-width: 70px;
    max-width: 100px;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--primary-color);
    background: rgba(26, 115, 232, 0.08);
}

.bottom-nav-icon {
    font-size: 1.6rem;
    margin-bottom: 4px;
    display: block;
    line-height: 1;
}

.bottom-nav-label {
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    text-align: center;
}

/* Estilos do painel admin - otimizado para desktop */
body.admin-panel {
    background: #f5f5f5;
}

body.admin-panel .container {
    max-width: 1400px;
    padding: 40px 20px;
}

body.admin-panel .header {
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    body.admin-panel .card {
        padding: 30px;
    }
    
    body.admin-panel .form-group {
        margin-bottom: 20px;
    }
}
