/* ============================================
   NeoX Cliente PWA - Styles
   ============================================ */

:root {
    /* Colors - Paleta moderna com verde/teal */
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: #14b8a6;
    --accent: #06b6d4;
    --accent-light: #22d3ee;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    
    /* Neutrals */
    --dark: #0c1222;
    --gray-900: #1a2332;
    --gray-800: #2d3748;
    --gray-700: #4a5568;
    --gray-600: #718096;
    --gray-500: #a0aec0;
    --gray-400: #cbd5e0;
    --gray-300: #e2e8f0;
    --gray-200: #edf2f7;
    --gray-100: #f7fafc;
    --white: #ffffff;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Safe Areas */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    
    /* Header & Nav Heights */
    --header-height: 56px;
    --nav-height: 64px;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(180deg, var(--gray-100) 0%, var(--gray-200) 100%);
    color: var(--gray-800);
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    
    /* Desabilitar seleção de texto */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Permitir seleção apenas em inputs */
input, textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

a {
    color: var(--primary);
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: 16px; /* Previne zoom no iOS */
}

img {
    max-width: 100%;
    height: auto;
}

.hidden {
    display: none !important;
}

/* ============================================
   Splash Screen
   ============================================ */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--dark) 0%, #0a1628 50%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    text-align: center;
}

.splash-logo {
    margin-bottom: var(--spacing-xl);
}

.splash-logo .logo-icon {
    font-size: 64px;
    display: block;
    margin-bottom: var(--spacing-md);
    animation: pulse-glow 2s ease-in-out infinite;
}

.splash-logo h1 {
    color: var(--white);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.splash-loader {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

/* ============================================
   App Container
   ============================================ */
.app-container {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding-top: calc(var(--header-height) + var(--safe-top));
    padding-bottom: calc(var(--nav-height) + var(--safe-bottom));
}

/* ============================================
   Header
   ============================================ */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--header-height) + var(--safe-top));
    padding-top: var(--safe-top);
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary-dark) 100%);
    z-index: 100;
    box-shadow: 0 2px 20px rgba(13, 148, 136, 0.15);
}

.header-content {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-md);
}

.header-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--white);
    font-size: 18px;
    font-weight: 600;
}

.header-icon {
    font-size: 24px;
}

.header-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    border-radius: var(--radius-md);
    transition: background 0.2s ease;
}

.header-btn:active {
    background: rgba(255, 255, 255, 0.1);
}

.menu-icon {
    width: 20px;
    height: 2px;
    background: var(--white);
    position: relative;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: var(--white);
    left: 0;
}

.menu-icon::before { top: -6px; }
.menu-icon::after { bottom: -6px; }

/* ============================================
   Main Content
   ============================================ */
.app-main {
    flex: 1;
    position: relative;
}

.screen {
    display: none;
    padding: var(--spacing-md);
    padding-left: calc(var(--spacing-md) + var(--safe-left));
    padding-right: calc(var(--spacing-md) + var(--safe-right));
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: block;
}

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

.screen-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.screen-header h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark);
}

.back-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: var(--radius-md);
    font-size: 20px;
    box-shadow: var(--shadow-sm);
}

/* ============================================
   Login Screen
   ============================================ */
.login-container {
    max-width: 400px;
    margin: 0 auto;
    padding-top: var(--spacing-xl);
}

.login-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto var(--spacing-lg);
    box-shadow: 0 10px 40px rgba(13, 148, 136, 0.3);
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: var(--spacing-sm);
}

.login-header p {
    color: var(--gray-600);
    font-size: 14px;
}

.login-form {
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: var(--spacing-md);
    position: relative;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--spacing-xs);
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: var(--white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input::placeholder {
    color: var(--gray-400);
}

.toggle-password {
    position: absolute;
    right: 12px;
    bottom: 12px;
    font-size: 18px;
    opacity: 0.6;
}

.login-links {
    text-align: center;
    margin-top: var(--spacing-md);
}

.login-links a {
    font-size: 14px;
    color: var(--primary);
}

.login-footer {
    text-align: center;
    margin-top: var(--spacing-lg);
    color: var(--gray-600);
    font-size: 14px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 10px 16px;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-outline {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ============================================
   Home Screen
   ============================================ */
.home-container {
    max-width: 500px;
    margin: 0 auto;
}

.welcome-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
    box-shadow: 0 10px 30px rgba(13, 148, 136, 0.25);
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.welcome-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.welcome-text {
    display: flex;
    flex-direction: column;
}

.welcome-greeting {
    font-size: 14px;
    opacity: 0.9;
}

.welcome-name {
    font-size: 20px;
    font-weight: 700;
}

.welcome-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.status-card {
    background: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--success);
}

.status-card.inativo {
    border-left-color: var(--danger);
}

.status-icon {
    font-size: 28px;
}

.status-info {
    display: flex;
    flex-direction: column;
}

.status-label {
    font-size: 12px;
    color: var(--gray-600);
}

.status-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--success);
}

.status-card.inativo .status-value {
    color: var(--danger);
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.action-card {
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.action-card:active {
    transform: scale(0.97);
}

.action-icon {
    font-size: 32px;
}

.action-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}

.action-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--danger);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Section Title */
.section-title {
    margin-bottom: var(--spacing-md);
}

.section-title h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
}

/* Fatura Card */
.fatura-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.fatura-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.fatura-mes {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}

.fatura-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

.status-pendente {
    background: var(--warning-light);
    color: var(--warning);
}

.status-pago {
    background: var(--success-light);
    color: var(--success);
}

.status-vencido {
    background: var(--danger-light);
    color: var(--danger);
}

.fatura-body {
    margin-bottom: var(--spacing-md);
}

.fatura-valor {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
}

.fatura-vencimento {
    font-size: 14px;
    color: var(--gray-600);
}

.fatura-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.fatura-actions .btn {
    flex: 1;
}

/* ============================================
   Faturas Screen
   ============================================ */
.faturas-filter {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    overflow-x: auto;
    padding-bottom: var(--spacing-sm);
}

.filter-btn {
    padding: 8px 16px;
    background: var(--white);
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.filter-btn.active {
    background: var(--primary);
    color: var(--white);
}

.faturas-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.fatura-item {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.fatura-item-icon {
    width: 48px;
    height: 48px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.fatura-item-info {
    flex: 1;
}

.fatura-item-ref {
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
}

.fatura-item-venc {
    font-size: 12px;
    color: var(--gray-600);
}

.fatura-item-valor {
    text-align: right;
}

.fatura-item-valor strong {
    font-size: 16px;
    color: var(--dark);
}

.fatura-item-status {
    font-size: 11px;
}

/* ============================================
   Suporte Screen
   ============================================ */
.suporte-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.suporte-card {
    background: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--gray-200);
}

.suporte-card:active {
    transform: scale(0.98);
}

.suporte-icon {
    font-size: 28px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.suporte-card-content {
    flex: 1;
    text-align: left;
}

.suporte-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    display: block;
}

.suporte-desc {
    font-size: 12px;
    color: var(--gray-600);
}

.suporte-card.whatsapp {
    border-left: 4px solid #25D366;
}

.suporte-card.whatsapp .suporte-icon {
    background: rgba(37, 211, 102, 0.15);
    color: #25D366;
}

.suporte-card.telefone {
    border-left: 4px solid var(--primary);
}

.suporte-card.telefone .suporte-icon {
    background: rgba(13, 148, 136, 0.15);
}

.suporte-card.chamado {
    border-left: 4px solid #f59e0b;
}

.suporte-card.chamado .suporte-icon {
    background: rgba(245, 158, 11, 0.15);
}

.suporte-card.email {
    border-left: 4px solid #6366f1;
}

.suporte-card.email .suporte-icon {
    background: rgba(99, 102, 241, 0.15);
}

.suporte-card.chat {
    border-left: 4px solid #00d4ff;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(124, 58, 237, 0.05));
}

.suporte-card.chat .suporte-icon {
    background: linear-gradient(135deg, #00d4ff, #7c3aed);
    color: white;
}

.suporte-card.chat:active {
    transform: scale(0.98);
}

.suporte-arrow {
    color: var(--gray-400);
    font-size: 18px;
    font-weight: 300;
    transition: transform 0.2s ease;
}

.suporte-card:hover .suporte-arrow,
.suporte-card:active .suporte-arrow {
    transform: translateX(3px);
    color: var(--primary);
}

.chamados-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.empty-state {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--gray-500);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-md);
    display: block;
}

/* ============================================
   Perfil Screen
   ============================================ */
.perfil-container {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.perfil-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto var(--spacing-lg);
    box-shadow: 0 10px 40px rgba(13, 148, 136, 0.3);
}

.perfil-info {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    text-align: left;
}

.perfil-item {
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--gray-200);
}

.perfil-item:last-child {
    border-bottom: none;
}

.perfil-label {
    font-size: 12px;
    color: var(--gray-600);
    margin-bottom: 2px;
}

.perfil-value {
    font-size: 16px;
    color: var(--dark);
    font-weight: 500;
}

.perfil-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* ============================================
   Bottom Navigation
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--white);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--spacing-sm);
    color: var(--gray-500);
    position: relative;
    transition: color 0.2s ease;
}

.nav-item.active {
    color: var(--primary);
}

.nav-icon {
    font-size: 24px;
}

.nav-label {
    font-size: 11px;
    font-weight: 500;
}

.nav-badge {
    position: absolute;
    top: 4px;
    right: 50%;
    transform: translateX(14px);
    background: var(--danger);
    color: var(--white);
    font-size: 10px;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   Toast
   ============================================ */
.toast-container {
    position: fixed;
    top: calc(var(--header-height) + var(--safe-top) + var(--spacing-md));
    left: var(--spacing-md);
    right: var(--spacing-md);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    pointer-events: none;
}

.toast {
    background: var(--dark);
    color: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: 14px;
    box-shadow: var(--shadow-xl);
    animation: slideDown 0.3s ease;
    pointer-events: auto;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

.toast.warning {
    background: var(--warning);
}

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

/* ============================================
   Modal
   ============================================ */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.2s ease;
    padding: var(--spacing-md);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    max-height: 90vh;
    width: 100%;
    max-width: 400px;
    overflow-y: auto;
    animation: modalPop 0.3s ease;
    text-align: center;
}

.modal-content .modal-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-md);
}

.modal-content h3 {
    font-size: 20px;
    color: var(--dark);
    margin-bottom: var(--spacing-md);
}

.modal-content p {
    color: var(--gray-600);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.modal-content .modal-example {
    background: var(--gray-100);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: var(--spacing-lg);
}

@keyframes modalPop {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--gray-600);
}

/* ============================================
   Loading & Spinner
   ============================================ */
.loading-placeholder {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--gray-500);
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto var(--spacing-md);
    border: 3px solid var(--gray-300);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ============================================
   Fatura Detalhe - Visualização Melhorada
   ============================================ */
.fatura-detalhe-card {
    background: linear-gradient(145deg, var(--white) 0%, var(--gray-100) 100%);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.fatura-detalhe-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--gray-200);
}

.fatura-detalhe-numero {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

.fatura-detalhe-valor {
    text-align: center;
    padding: var(--spacing-lg) 0;
}

.fatura-detalhe-valor .valor-label {
    display: block;
    font-size: 12px;
    color: var(--gray-600);
    margin-bottom: var(--spacing-xs);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.fatura-detalhe-valor .valor-numero {
    font-size: 36px;
    font-weight: 800;
    color: var(--dark);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fatura-detalhe-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.fatura-detalhe-info .info-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--white);
    border-radius: var(--radius-sm);
}

.fatura-detalhe-info .info-icon {
    font-size: 18px;
}

.fatura-detalhe-info .info-text {
    font-size: 14px;
    color: var(--gray-700);
}

/* QR Code Card */
.qrcode-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 2px dashed var(--gray-300);
}

.qrcode-img {
    width: 200px;
    height: 200px;
    margin: 0 auto var(--spacing-md);
    display: block;
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.qrcode-hint {
    font-size: 13px;
    color: var(--gray-600);
}

/* Copy Section */
.copy-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-top: var(--spacing-md);
    box-shadow: var(--shadow-sm);
}

.copy-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--spacing-md);
}

.copy-icon {
    font-size: 20px;
}

.copy-box {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    overflow: hidden;
}

.copy-box code {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 12px;
    color: var(--gray-700);
    word-break: break-all;
    line-height: 1.6;
}

.btn-copy {
    width: 100%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
    transition: all 0.2s ease;
}

.btn-copy:active {
    transform: scale(0.98);
}

.copy-btn-icon {
    font-size: 18px;
}

/* Payment Actions */
.payment-actions {
    margin-top: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* Pago Card */
.pago-card {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 2px solid var(--success);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    margin-top: var(--spacing-md);
}

.pago-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-sm);
}

.pago-text {
    font-size: 18px;
    font-weight: 700;
    color: #065f46;
}

/* ============================================
   Contrato Screen
   ============================================ */
.contrato-container {
    max-width: 500px;
    margin: 0 auto;
}

.contrato-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-md);
}

.contrato-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--gray-200);
}

.contrato-header-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.contrato-header-info h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 2px;
}

.contrato-header-info p {
    font-size: 13px;
    color: var(--gray-600);
}

.contrato-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.contrato-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--gray-200);
}

.contrato-info-item:last-child {
    border-bottom: none;
}

.contrato-info-label {
    font-size: 13px;
    color: var(--gray-600);
}

.contrato-info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
}

.contrato-content {
    background: var(--gray-100);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    max-height: 300px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.7;
    color: var(--gray-700);
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--gray-300);
}

.contrato-content p {
    margin-bottom: var(--spacing-md);
}

.contrato-status {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.contrato-status.aceito {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 2px solid var(--success);
}

.contrato-status.pendente {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid var(--warning);
}

.contrato-status-icon {
    font-size: 32px;
}

.contrato-status-text h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
}

.contrato-status-text p {
    font-size: 12px;
    color: var(--gray-700);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

/* ============================================
   Aceite de Contrato Screen
   ============================================ */
.aceite-container {
    max-width: 500px;
    margin: 0 auto;
}

.aceite-steps {
    margin-bottom: var(--spacing-lg);
}

.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.step-indicator .step {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--gray-300);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
}

.step-indicator .step.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
}

.step-indicator .step.completed {
    background: var(--success);
    color: var(--white);
}

.step-indicator .step-line {
    width: 40px;
    height: 3px;
    background: var(--gray-300);
    border-radius: var(--radius-full);
    transition: background 0.3s ease;
}

.step-indicator .step-line.completed {
    background: var(--success);
}

.aceite-step-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.aceite-step-content.active {
    display: block;
}

.step-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.step-title .step-icon {
    font-size: 48px;
    display: block;
    margin-bottom: var(--spacing-sm);
}

.step-title h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: var(--spacing-xs);
}

.step-title p {
    font-size: 14px;
    color: var(--gray-600);
}

.photo-capture-area {
    margin-bottom: var(--spacing-lg);
}

.photo-preview {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(145deg, var(--gray-100) 0%, var(--gray-200) 100%);
    border: 3px dashed var(--gray-400);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.photo-preview:hover,
.photo-preview:active {
    border-color: var(--primary);
    background: linear-gradient(145deg, #e6fffa 0%, #ccfbf1 100%);
}

.photo-preview.has-photo {
    border-style: solid;
    border-color: var(--success);
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-placeholder {
    font-size: 48px;
    opacity: 0.5;
}

.preview-text {
    font-size: 14px;
    color: var(--gray-500);
    font-weight: 500;
}

.photo-preview .retake-btn {
    position: absolute;
    bottom: var(--spacing-sm);
    right: var(--spacing-sm);
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.step-tips {
    background: var(--gray-100);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.step-tips p {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--spacing-sm);
}

.step-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.step-tips li {
    font-size: 12px;
    color: var(--gray-600);
    padding: var(--spacing-xs) 0;
    padding-left: 20px;
    position: relative;
}

.step-tips li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

.step-buttons {
    display: flex;
    gap: var(--spacing-md);
}

.step-buttons .btn {
    flex: 1;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Contract Badge Animation */
.action-badge.contract-badge {
    background: var(--warning);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
    }
}

/* No Contract State */
.no-contrato {
    text-align: center;
    padding: var(--spacing-2xl);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.no-contrato-icon {
    font-size: 64px;
    display: block;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.no-contrato h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: var(--spacing-sm);
}

.no-contrato p {
    font-size: 14px;
    color: var(--gray-600);
}

/* ============================================
   Upload de Fotos - Indicadores
   ============================================ */
.upload-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: var(--gray-600);
}

.upload-loading .btn-loader {
    width: 30px;
    height: 30px;
    border-width: 3px;
}

.photo-preview .upload-ok {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: var(--success);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.photo-preview.has-photo {
    position: relative;
}

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.mt-md { margin-top: var(--spacing-md); }
.mb-md { margin-bottom: var(--spacing-md); }



