/* 
 * MentorPRO - Sistema de Mentoria
 * Estilos CSS - Design Moderno e Responsivo
 * Fonte: Inter | Cores: Azul #4139C8 e Branco
 * + LOGO ANIMADO ORBITAL
 */

/* Import das fontes */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* Reset e configurações base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4139C8;
    --primary-dark: #2d2987;
    --primary-light: #5a50d6;
    --secondary-color: #ffffff;
    --text-dark: #1a1a1a;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --bg-gray: #f9fafb;
    --bg-light: #f3f4f6;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s ease-in-out;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-gray);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout Principal */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ==================== LOGO ANIMADO ORBITAL ==================== */
.animated-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    justify-content: center;
}

.animated-logo:hover {
    transform: scale(1.05);
}

.orbit-container {
    position: relative;
    width: 45px;
    height: 45px;
    flex-shrink: 0;
}

.orbit {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: rotate 12s linear infinite;
}

.orbit-1 {
    width: 30px;
    height: 30px;
    top: 7.5px;
    left: 7.5px;
    border-color: rgba(255, 224, 102, 0.6);
}

.orbit-2 {
    width: 40px;
    height: 40px;
    top: 2.5px;
    left: 2.5px;
    animation-duration: 18s;
    animation-direction: reverse;
    border-color: rgba(255, 255, 255, 0.4);
}

.central-star {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, #FFE066 0%, #4139C8 100%);
    border-radius: 50%;
    box-shadow: 
        0 0 15px rgba(255, 224, 102, 0.8),
        0 0 30px rgba(255, 224, 102, 0.4);
    animation: pulse 3s ease-in-out infinite;
}

.satellite {
    position: absolute;
    background: #FFE066;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 224, 102, 0.6);
    width: 4px;
    height: 4px;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
}

.satellite-1 {
    animation: satellitePulse 2s ease-in-out infinite;
}

.satellite-2 {
    animation: satellitePulse 2s ease-in-out infinite 1s;
}

.logo-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    animation: textGlow 4s ease-in-out infinite;
    letter-spacing: -0.5px;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 
            0 0 15px rgba(255, 224, 102, 0.8),
            0 0 30px rgba(255, 224, 102, 0.4);
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.3);
        box-shadow: 
            0 0 25px rgba(255, 224, 102, 1),
            0 0 50px rgba(255, 224, 102, 0.6);
    }
}

@keyframes satellitePulse {
    0%, 100% { 
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
    50% { 
        transform: translateX(-50%) scale(1.5);
        opacity: 0.7;
    }
}

@keyframes textGlow {
    0%, 100% { 
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    }
    50% { 
        text-shadow: 
            0 0 20px rgba(255, 255, 255, 0.6),
            0 0 30px rgba(255, 224, 102, 0.4);
    }
}

/* Sidebar colapsada - Logo adaptativo */
.sidebar.collapsed .animated-logo {
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar.collapsed .orbit-container {
    width: 30px;
    height: 30px;
}

.sidebar.collapsed .orbit-1 {
    width: 18px;
    height: 18px;
    top: 6px;
    left: 6px;
}

.sidebar.collapsed .orbit-2 {
    width: 25px;
    height: 25px;
    top: 2.5px;
    left: 2.5px;
}

.sidebar.collapsed .central-star {
    width: 6px;
    height: 6px;
}

.sidebar.collapsed .satellite {
    width: 2px;
    height: 2px;
}

.sidebar.collapsed .logo-text {
    display: none;
}

/* ==================== SIDEBAR VERTICAL ==================== */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 1000;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.sidebar.collapsed .sidebar-header h1 {
    font-size: 1rem;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    margin: 0.25rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: white;
}

.nav-link i {
    width: 20px;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.sidebar.collapsed .nav-link {
    padding: 0.75rem;
    justify-content: center;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

/* Conteúdo Principal */
.main-content {
    flex: 1;
    margin-left: 260px;
    transition: var(--transition);
}

.sidebar.collapsed + .main-content {
    margin-left: 70px;
}

/* Header */
.header {
    background: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.header-left {
    display: flex;
    align-items: center;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-gray);
    cursor: pointer;
    margin-right: 1rem;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background-color: var(--bg-light);
}

.header-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: white;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-light);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-gray);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

/* Formulários */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: var(--transition);
    background-color: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(65, 57, 200, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Tabelas */
.table-container {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background-color: var(--bg-gray);
    font-weight: 600;
    color: var(--text-dark);
}

.table tr:hover {
    background-color: var(--bg-gray);
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fecaca;
    color: #991b1b;
}

/* Chat */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 70vh;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.message {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.message.own {
    flex-direction: row-reverse;
}

.message-content {
    background: var(--bg-light);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    max-width: 70%;
}

.message.own .message-content {
    background: var(--primary-color);
    color: white;
}

.chat-input {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}

.chat-input input {
    flex: 1;
}

/* Alertas */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background-color: #fecaca;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
}

/* Utilitários */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-primary { color: var(--primary-color); }
.text-gray { color: var(--text-gray); }
.text-light { color: var(--text-light); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.w-full { width: 100%; }
.h-full { height: 100%; }

/* ==================== RESPONSIVIDADE MOBILE ==================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header {
        padding: 1rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .chat-container {
        height: 60vh;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    /* Logo responsivo no mobile */
    .animated-logo {
        gap: 0.75rem;
    }
    
    .orbit-container {
        width: 35px;
        height: 35px;
    }
    
    .orbit-1 {
        width: 22px;
        height: 22px;
        top: 6.5px;
        left: 6.5px;
    }
    
    .orbit-2 {
        width: 30px;
        height: 30px;
        top: 2.5px;
        left: 2.5px;
    }
    
    .central-star {
        width: 8px;
        height: 8px;
    }
    
    .satellite {
        width: 3px;
        height: 3px;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .header-title {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    /* Logo ainda menor em telas muito pequenas */
    .orbit-container {
        width: 30px;
        height: 30px;
    }
    
    .orbit-1 {
        width: 18px;
        height: 18px;
        top: 6px;
        left: 6px;
    }
    
    .orbit-2 {
        width: 25px;
        height: 25px;
        top: 2.5px;
        left: 2.5px;
    }
    
    .central-star {
        width: 6px;
        height: 6px;
    }
    
    .satellite {
        width: 2px;
        height: 2px;
    }
    
    .logo-text {
        font-size: 1rem;
    }
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-gray);
}

/* FIX MOBILE SIMPLES */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0 !important;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    body {
        overflow-x: hidden;
    }
}
