/* ===================================
   RAKEL MONTEIRO APP - CSS PRINCIPAL
   Tema: Roxo/Rosa com tons modernos
   =================================== */

/* Variáveis de cores e temas */
:root {
    /* Cores principais */
    --primary-purple: #6C5CE7;
    --primary-rose: #FD79A8;
    --secondary-purple: #A29BFE;
    --secondary-rose: #FDCB6E;
    
    /* Cores de fundo */
    --bg-primary: #0F0F1B;
    --bg-secondary: #1A1A2E;
    --bg-tertiary: #252540;
    --bg-card: rgba(37, 37, 64, 0.8);
    --bg-hover: rgba(108, 92, 231, 0.1);
    
    /* Cores de texto */
    --text-primary: #FFFFFF;
    --text-secondary: #B8B9CE;
    --text-muted: #8B8D9E;
    --text-accent: var(--primary-purple);
    
    /* Cores de borda */
    --border-primary: rgba(108, 92, 231, 0.3);
    --border-secondary: rgba(253, 121, 168, 0.3);
    --border-focus: var(--primary-purple);
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, var(--primary-purple), var(--primary-rose));
    --gradient-secondary: linear-gradient(135deg, var(--secondary-purple), var(--secondary-rose));
    --gradient-card: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(253, 121, 168, 0.1));
    
    /* Sombras */
    --shadow-primary: 0 8px 32px rgba(108, 92, 231, 0.3);
    --shadow-secondary: 0 4px 16px rgba(253, 121, 168, 0.2);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 12px 40px rgba(108, 92, 231, 0.4);
    
    /* Animações */
    --transition-fast: all 0.2s ease;
    --transition-medium: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    
    /* Tipografia */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;
    
    /* Tamanhos */
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
}

/* Tema claro (opcional) */
[data-theme="light"] {
    --bg-primary: #F8F9FA;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #E9ECEF;
    --bg-card: rgba(255, 255, 255, 0.9);
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #6C757D;
    --border-primary: rgba(108, 92, 231, 0.2);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Reset e estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-content {
    text-align: center;
    color: var(--text-primary);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-primary);
    border-top: 4px solid var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: var(--transition-medium);
    backdrop-filter: blur(10px);
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo i {
    color: var(--primary-purple);
    font-size: 1.5rem;
}

.sidebar.collapsed .logo span {
    display: none;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.sidebar-toggle:hover {
    color: var(--primary-purple);
    background: var(--bg-hover);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-list {
    list-style: none;
    padding: 0 16px;
}

.nav-item {
    margin-bottom: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--primary-purple);
    transform: scaleY(0);
    transition: var(--transition-fast);
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--gradient-card);
    color: var(--text-primary);
}

.nav-link.active::before {
    transform: scaleY(1);
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

.badge {
    background: var(--primary-rose);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
    font-weight: 600;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar i {
    font-size: 2rem;
    color: var(--primary-purple);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.user-role {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.sidebar.collapsed .user-details {
    display: none;
}

.settings-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.settings-btn:hover {
    color: var(--primary-purple);
    background: var(--bg-hover);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: var(--transition-medium);
}

.sidebar.collapsed + .main-content {
    margin-left: 80px;
}

/* Header */
.header {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 20px 32px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.header-left p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar i {
    position: absolute;
    left: 12px;
    color: var(--text-secondary);
    z-index: 1;
}

.search-bar input {
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    padding: 10px 16px 10px 40px;
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 300px;
    transition: var(--transition-fast);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.notification-btn {
    position: relative;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--border-radius);
    padding: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.notification-btn:hover {
    background: var(--bg-hover);
    color: var(--primary-purple);
}

.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--primary-rose);
    border-radius: 50%;
    display: none;
}

.notification-dot.active {
    display: block;
}

/* Page Content */
.page-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    transition: var(--transition-medium);
    backdrop-filter: blur(10px);
}

.card:hover {
    box-shadow: var(--shadow-card);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--primary-purple);
}

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

.btn-outline:hover {
    background: var(--primary-purple);
    color: white;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 16px 24px;
    font-size: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-primary);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

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

.form-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-primary);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--border-focus);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table th,
.table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-primary);
}

.table th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.table tr:hover {
    background: var(--bg-hover);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(16, 172, 132, 0.2);
    color: #10AC84;
}

.badge-warning {
    background: rgba(253, 203, 110, 0.2);
    color: #FDCB6E;
}

.badge-danger {
    background: rgba(255, 71, 87, 0.2);
    color: #FF4757;
}

.badge-info {
    background: rgba(0, 210, 211, 0.2);
    color: #00D2D3;
}

/* Progress Bar */
.progress {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-primary);
}

.avatar-lg {
    width: 60px;
    height: 60px;
}

.avatar-xl {
    width: 80px;
    height: 80px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--border-radius);
    padding: 16px 20px;
    min-width: 300px;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideInRight 0.3s ease;
}

.toast.success {
    border-left: 4px solid #10AC84;
}

.toast.error {
    border-left: 4px solid #FF4757;
}

.toast.warning {
    border-left: 4px solid #FDCB6E;
}

.toast.info {
    border-left: 4px solid #00D2D3;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: #10AC84;
}

.toast.error .toast-icon {
    color: #FF4757;
}

.toast.warning .toast-icon {
    color: #FDCB6E;
}

.toast.info .toast-icon {
    color: #00D2D3;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.toast-message {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.toast-close:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-none { display: none; }

.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }

.flex-column { flex-direction: column; }

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }

.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-purple);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-purple);
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translateY(0); }
    40%, 43% { transform: translateY(-8px); }
    70% { transform: translateY(-4px); }
    90% { transform: translateY(-2px); }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.pulse {
    animation: pulse 2s infinite;
}

.bounce {
    animation: bounce 1s infinite;
}

/* Responsividade básica (detalhada em responsive.css) */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header {
        padding: 16px 20px;
    }
    
    .page-content {
        padding: 20px;
    }
}
/* ═══════════════════════════════════
   LOGIN SCREEN STYLES
   ═══════════════════════════════════ */

#login-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0c0a10 0%, #1a1028 50%, #0c0a10 100%);
    z-index: 10000;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 24px;
}

.login-brand {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, #e8628c, #c9a0dc);
    font-size: 32px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 16px;
    box-shadow: 0 8px 32px rgba(232, 98, 140, 0.3);
}

.login-brand h1 {
    font-size: 28px;
    font-weight: 800;
    color: #f0e8ee;
    margin: 0 0 4px;
}

.login-brand p {
    font-size: 13px;
    color: #e8628c;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 600;
}

.login-form-wrapper {
    background: #14111c;
    border: 1px solid #241e2e;
    border-radius: 20px;
    padding: 32px;
}

.login-form-wrapper h2 {
    font-size: 20px;
    font-weight: 700;
    color: #f0e8ee;
    margin: 0 0 24px;
    text-align: center;
}

.login-error {
    background: rgba(239, 71, 111, 0.12);
    border: 1px solid rgba(239, 71, 111, 0.3);
    color: #ef476f;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
}

.login-field {
    margin-bottom: 16px;
}

.login-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #7a6b78;
    margin-bottom: 6px;
}

.login-field input {
    width: 100%;
    padding: 12px 16px;
    background: #0c0a10;
    border: 1px solid #241e2e;
    border-radius: 12px;
    color: #f0e8ee;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.login-field input:focus {
    border-color: #e8628c;
    box-shadow: 0 0 0 3px rgba(232, 98, 140, 0.15);
}

.login-field input::placeholder {
    color: #4a3d48;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #e8628c, #c9a0dc);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    margin-top: 8px;
}

.login-btn:hover {
    opacity: 0.9;
}

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

/* Logo icon in sidebar */
.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #e8628c, #c9a0dc);
    font-size: 14px;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
}

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

.logo-name {
    font-size: 14px;
    font-weight: 700;
    color: #f0e8ee;
}

.logo-sub {
    font-size: 9px;
    color: #e8628c;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.user-avatar-text {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}
