/* ============================================================
   MENTOR PEDAGÓGICO IA - Stylesheet
   Sistema de Inteligência Artificial para Coordenadores
   ============================================================ */

:root {
    /* Cores Primárias */
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;
    
    /* Cores Secundárias */
    --secondary: #0ea5e9;
    --secondary-light: #38bdf8;
    --secondary-dark: #0284c7;
    
    /* Cores de Acento */
    --accent: #8b5cf6;
    --accent-light: #a78bfa;
    --accent-dark: #7c3aed;
    
    /* Cores de Status */
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    
    /* Neutros */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Layout */
    --sidebar-width: 280px;
    --sidebar-collapsed: 0px;
    --navbar-height: 70px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px 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);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-cool: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 100%);
}

/* ============================================================
   Reset & Base
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary);
}

a:hover {
    color: var(--primary-dark);
}

/* ============================================================
   App Layout
   ============================================================ */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.content-wrapper {
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 991px) {
    .main-content {
        margin-left: 0;
    }
}

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--gray-900);
    color: white;
    display: flex;
    flex-direction: column;
    z-index: 1050;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 11px;
    color: var(--primary-light);
    font-weight: 500;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 20px;
}

.nav-section-title {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
    padding: 0 12px;
    margin-bottom: 8px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--border-radius-sm);
    color: var(--gray-300);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 2px;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

.sidebar-nav .nav-link.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.sidebar-nav .nav-link i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.nav-badge {
    margin-left: auto;
    background: var(--gradient-primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--border-radius-sm);
    background: rgba(255,255,255,0.05);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    display: block;
    font-size: 11px;
    color: var(--gray-400);
}

.btn-logout {
    color: var(--gray-400);
    font-size: 18px;
    padding: 4px;
    transition: color 0.2s;
}

.btn-logout:hover {
    color: var(--danger);
}

@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
}

/* ============================================================
   Top Navbar
   ============================================================ */
.top-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--gray-700);
    cursor: pointer;
    padding: 4px;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.page-date {
    font-size: 13px;
    color: var(--gray-500);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn-ia-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.btn-ia-primary:hover {
    opacity: 0.9;
    color: white;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-ia-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary-200);
    padding: 8px 20px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-ia-secondary:hover {
    background: var(--primary-50);
    color: var(--primary);
    border-color: var(--primary);
}

/* ============================================================
   Cards
   ============================================================ */
.card-custom {
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    overflow: hidden;
}

.card-custom:hover {
    box-shadow: var(--shadow-md);
}

.card-custom .card-header {
    background: white;
    border-bottom: 1px solid var(--gray-100);
    padding: 16px 20px;
    font-weight: 600;
}

.card-custom .card-body {
    padding: 20px;
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.2s;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-icon.purple { background: var(--primary-100); color: var(--primary); }
.stat-icon.blue { background: #dbeafe; color: #2563eb; }
.stat-icon.green { background: #dcfce7; color: #16a34a; }
.stat-icon.orange { background: #fff7ed; color: #ea580c; }
.stat-icon.pink { background: #fce7f3; color: #db2777; }
.stat-icon.cyan { background: #cffafe; color: #0891b2; }

.stat-info h3 {
    font-size: 28px;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 13px;
    color: var(--gray-500);
    margin: 0;
}

/* ============================================================
   Dashboard Welcome
   ============================================================ */
.welcome-card {
    background: var(--gradient-primary);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.welcome-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: 10%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.welcome-card h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.welcome-card p {
    font-size: 15px;
    opacity: 0.9;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.welcome-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.welcome-actions .btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.welcome-actions .btn:hover {
    background: rgba(255,255,255,0.3);
    color: white;
}

/* ============================================================
   Chat Interface
   ============================================================ */
.chat-container {
    display: flex;
    height: calc(100vh - var(--navbar-height) - 60px);
    gap: 20px;
}

.chat-sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.chat-sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
}

.chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.chat-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.chat-list-item:hover {
    background: var(--gray-50);
}

.chat-list-item.active {
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
}

.chat-list-item i {
    color: var(--primary);
    font-size: 18px;
}

.chat-list-item-info {
    flex: 1;
    min-width: 0;
}

.chat-list-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-list-item-date {
    font-size: 11px;
    color: var(--gray-400);
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-message {
    display: flex;
    gap: 12px;
    max-width: 85%;
    animation: fadeInUp 0.3s ease;
}

.chat-message.user {
    margin-left: auto;
    flex-direction: row-reverse;
}

.chat-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.chat-message.assistant .chat-message-avatar {
    background: var(--gradient-primary);
    color: white;
}

.chat-message.user .chat-message-avatar {
    background: var(--gray-200);
    color: var(--gray-600);
}

.chat-message-content {
    padding: 12px 16px;
    border-radius: var(--border-radius);
    font-size: 14px;
    line-height: 1.7;
}

.chat-message.assistant .chat-message-content {
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-top-left-radius: 4px;
}

.chat-message.user .chat-message-content {
    background: var(--primary);
    color: white;
    border-top-right-radius: 4px;
}

.chat-message-content h2,
.chat-message-content h3,
.chat-message-content h4,
.chat-message-content h5 {
    margin-top: 12px;
    margin-bottom: 8px;
    color: var(--gray-900);
}

.chat-message.user .chat-message-content h2,
.chat-message.user .chat-message-content h3,
.chat-message.user .chat-message-content h4,
.chat-message.user .chat-message-content h5 {
    color: white;
}

.chat-message-content ul,
.chat-message-content ol {
    padding-left: 20px;
    margin: 8px 0;
}

.chat-message-content li {
    margin-bottom: 4px;
}

.chat-message-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 13px;
}

.chat-message-content table th,
.chat-message-content table td {
    border: 1px solid var(--gray-200);
    padding: 8px 12px;
    text-align: left;
}

.chat-message-content table th {
    background: var(--gray-100);
    font-weight: 600;
}

.chat-message-content code {
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

.chat-message-content pre {
    background: var(--gray-800);
    color: var(--gray-100);
    padding: 16px;
    border-radius: var(--border-radius-sm);
    overflow-x: auto;
    margin: 12px 0;
}

.chat-message-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.chat-message-content blockquote {
    border-left: 3px solid var(--primary);
    padding-left: 12px;
    margin: 8px 0;
    color: var(--gray-600);
    font-style: italic;
}

.chat-input-area {
    padding: 16px;
    border-top: 1px solid var(--gray-100);
    background: white;
}

.chat-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.chat-input-wrapper textarea {
    flex: 1;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    max-height: 120px;
    transition: border-color 0.2s;
    line-height: 1.5;
}

.chat-input-wrapper textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
}

/* Chat Suggestions */
.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 16px;
}

.chat-suggestion-btn {
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.chat-suggestion-btn:hover {
    background: var(--primary-100);
    border-color: var(--primary);
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--gray-400);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .chat-container {
        flex-direction: column;
        height: calc(100vh - 140px);
    }
    .chat-sidebar {
        width: 100%;
        max-height: 200px;
    }
    .chat-message {
        max-width: 95%;
    }
}

/* ============================================================
   Forms
   ============================================================ */
.form-floating > .form-control,
.form-floating > .form-select {
    border-radius: var(--border-radius-sm);
    border: 2px solid var(--gray-200);
    padding: 16px;
    height: auto;
}

.form-floating > .form-control:focus,
.form-floating > .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-control, .form-select {
    border-radius: var(--border-radius-sm);
    border: 2px solid var(--gray-200);
    padding: 10px 14px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

textarea.form-control {
    min-height: 100px;
}

/* ============================================================
   Login / Register Pages
   ============================================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 480px;
}

.auth-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-xl);
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo .logo-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    margin-bottom: 16px;
}

.auth-logo h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.auth-logo p {
    font-size: 14px;
    color: var(--gray-500);
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form .btn-submit {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--gray-500);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

/* ============================================================
   Onboarding
   ============================================================ */
.onboarding-page {
    min-height: 100vh;
    background: var(--gray-50);
}

.onboarding-header {
    background: var(--gradient-primary);
    color: white;
    padding: 32px;
    text-align: center;
}

.onboarding-header h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}

.onboarding-header p {
    font-size: 16px;
    opacity: 0.9;
}

.onboarding-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transition: all 0.3s;
}

.progress-dot.active {
    background: white;
    transform: scale(1.2);
}

.progress-dot.completed {
    background: var(--success);
}

.onboarding-content {
    max-width: 700px;
    margin: -40px auto 40px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.onboarding-step {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 20px;
}

.onboarding-step h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.onboarding-step .step-subtitle {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 24px;
}

.question-group {
    margin-bottom: 24px;
}

.question-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
    line-height: 1.5;
}

.question-label .question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    margin-right: 8px;
}

.onboarding-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}

/* ============================================================
   Profile Page
   ============================================================ */
.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.profile-details h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-details p {
    color: var(--gray-500);
    font-size: 14px;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-50);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.profile-section {
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    padding: 24px;
    margin-bottom: 20px;
}

.profile-section h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-section h3 i {
    color: var(--primary);
}

.profile-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.profile-item:last-child {
    border-bottom: none;
}

.profile-item-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
    min-width: 180px;
}

.profile-item-value {
    font-size: 14px;
    color: var(--gray-800);
    flex: 1;
}

/* ============================================================
   Tables
   ============================================================ */
.table-custom {
    border-collapse: separate;
    border-spacing: 0;
}

.table-custom thead th {
    background: var(--gray-50);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-600);
    border-bottom: 2px solid var(--gray-200);
    padding: 12px 16px;
}

.table-custom tbody td {
    padding: 14px 16px;
    font-size: 14px;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-100);
}

.table-custom tbody tr:hover {
    background: var(--gray-50);
}

/* ============================================================
   Empty State
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: var(--gray-100);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--gray-400);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--gray-500);
    font-size: 14px;
    max-width: 400px;
    margin: 0 auto 20px;
}

/* ============================================================
   Modal Custom
   ============================================================ */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--gray-100);
    padding: 20px 24px;
}

.modal-title {
    font-weight: 700;
    font-size: 18px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid var(--gray-100);
    padding: 16px 24px;
}

/* ============================================================
   Alerts
   ============================================================ */
.alert-custom {
    border-radius: var(--border-radius-sm);
    border: none;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-custom.success {
    background: #dcfce7;
    color: #166534;
}

.alert-custom.warning {
    background: #fff7ed;
    color: #9a3412;
}

.alert-custom.danger {
    background: #fef2f2;
    color: #991b1b;
}

.alert-custom.info {
    background: var(--primary-50);
    color: var(--primary-dark);
}

/* ============================================================
   Utilities
   ============================================================ */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.rounded-custom {
    border-radius: var(--border-radius);
}

.gap-20 {
    gap: 20px;
}

/* Scrollbar Custom */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ============================================================
   Loading Spinner
   ============================================================ */
.spinner-ia {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(79, 70, 229, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
    .content-wrapper {
        padding: 16px;
    }
    
    .welcome-card {
        padding: 24px;
    }
    
    .welcome-card h2 {
        font-size: 20px;
    }
    
    .welcome-actions {
        flex-direction: column;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-info h3 {
        font-size: 24px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .onboarding-step {
        padding: 24px;
    }
    
    .auth-card {
        padding: 24px;
    }
}

/* ============================================================
   Print Styles
   ============================================================ */
@media print {
    .sidebar,
    .top-navbar,
    .welcome-actions,
    .btn,
    .chat-input-area {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .content-wrapper {
        padding: 0;
    }
}
