/* Reset e configurações globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    --border-color: #475569;
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}
/* Indicador de modo de desenvolvimento */
.dev-mode-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: pulse 2s infinite;
}

.dev-mode-indicator i {
    font-size: 1rem;
}

/* Container principal */
.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
} Debug Panel */
.debug-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 400px;
    max-width: calc(100vw - 40px);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    transition: all 0.3s ease;
}

.debug-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.debug-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.debug-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.debug-toggle:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.debug-content {
    max-height: 300px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.debug-content.collapsed {
    max-height: 0;
}

.debug-log {
    max-height: 250px;
    overflow-y: auto;
    padding: 16px 20px;
}

.debug-item {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    animation: slideIn 0.3s ease;
}

.debug-item.info {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--info-color);
}

.debug-item.success {
    background: rgba(16, 185, 129, 0.1);
    border-left: 3px solid var(--success-color);
}

.debug-item.error {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid var(--error-color);
}

.debug-item.warning {
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid var(--warning-color);
}

.timestamp {
    color: var(--text-muted);
    font-weight: 500;
    min-width: 60px;
}

.message {
    color: var(--text-secondary);
    flex: 1;
}

.clear-debug {
    margin: 0 20px 16px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.clear-debug:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
}

.login-header {
    text-align: center;
    padding: 40px 32px 32px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.logo {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
    backdrop-filter: blur(10px);
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-header p {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 400;
}

/* Form Styles */
.login-form {
    padding: 32px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.2s ease;
}

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

.form-group input::placeholder {
    color: var(--text-muted);
}

.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.password-toggle:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.login-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.login-btn:active {
    transform: translateY(0);
}

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

.btn-text, .btn-loader {
    transition: all 0.2s ease;
}

/* Status Area */
.status-area {
    padding: 0 32px 32px;
    animation: slideDown 0.3s ease;
}

.status-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.status-message.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.status-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error-color);
    color: var(--error-color);
}

/* Success Area */
.success-area {
    padding: 32px;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.success-content i {
    font-size: 48px;
    color: var(--success-color);
    margin-bottom: 16px;
}

.success-content h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.success-content p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.token-info {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    text-align: left;
}

.token-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.token-display {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-primary);
    padding: 12px;
    border-radius: 6px;
    word-break: break-all;
    line-height: 1.4;
}

.test-api-btn, .logout-btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.test-api-btn {
    background: var(--info-color);
    color: white;
}

.test-api-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.logout-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.logout-btn:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .debug-panel {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        margin-bottom: 20px;
        order: -1;
    }
    
    .login-card {
        margin: 0;
    }
    
    .login-header {
        padding: 32px 24px 24px;
    }
    
    .login-form, .success-area {
        padding: 24px;
    }
    
    .status-area {
        padding: 0 24px 24px;
    }
}

@media (max-width: 480px) {
    .debug-panel {
        width: calc(100vw - 32px);
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .login-header p {
        font-size: 14px;
    }
    
    .form-group input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Custom Scrollbar */
.debug-log::-webkit-scrollbar {
    width: 6px;
}

.debug-log::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

.debug-log::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.debug-log::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}