/* ============================================================
   MONALISA - Platform CSS
   Design moderno, elegante, responsivo
   ============================================================ */

/* === Variables CSS === */
:root {
    --primary: #22c55e;
    --primary-dark: #16a34a;
    --primary-light: #4ade80;
    --primary-bg: #f0fdf4;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --dark: #1e293b;
    --light: #f8fafc;
    --body-bg: #f1f5f9;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --sidebar-width: 260px;
    --navbar-height: 60px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --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 -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --transition: all 0.2s ease;
}

/* Dark Theme */
[data-bs-theme="dark"] {
    --body-bg: #0f172a;
    --card-bg: #1e293b;
    --border-color: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --light: #1e293b;
}

/* === Base === */
* { box-sizing: border-box; }

html, body { overflow-x: hidden; max-width: 100%; }

body {
    font-family: var(--font-family);
    background-color: var(--body-bg);
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 1.6;
}

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

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--secondary); }

/* === Navbar === */
.navbar-monalisa {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    height: var(--navbar-height);
    box-shadow: var(--shadow-md);
    z-index: 1030;
    padding: 0 1rem;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
}

.brand-text {
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff !important;
}

.navbar-search .input-group {
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius);
    max-width: 400px;
}

.navbar-search .input-group-text {
    color: rgba(255,255,255,0.7);
}

.navbar-search .form-control {
    background: transparent;
    border: none;
    color: #fff;
    padding-left: 0;
}

.navbar-search .form-control::placeholder {
    color: rgba(255,255,255,0.5);
}

.navbar-search .form-control:focus {
    box-shadow: none;
    background: rgba(255,255,255,0.25);
}

/* === Sidebar === */
.sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--navbar-height));
    background: var(--card-bg);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    z-index: 1020;
    transition: var(--transition);
}

.sidebar-content {
    padding: 0;
}

.sidebar-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-nav {
    padding: 0.5rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    color: var(--text-secondary);
    border-radius: var(--radius);
    margin: 2px 0;
    font-weight: 500;
    transition: var(--transition);
}

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

.sidebar-nav .nav-link.active {
    background: var(--primary);
    color: #fff;
}

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

.sidebar-nav .nav-link .badge {
    font-size: 0.65rem;
}

.nav-section {
    padding: 0.75rem 1rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    list-style: none;
}

/* === Main Content === */
.main-wrapper {
    padding-top: var(--navbar-height);
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 1.5rem;
    min-height: calc(100vh - var(--navbar-height));
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.content-header h1 {
    margin-bottom: 0;
}

/* === Cards === */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 0;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
}

.card-title {
    font-weight: 600;
    font-size: 0.95rem;
}

/* === Stat Cards === */
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.stat-card-primary::before { background: var(--primary); }
.stat-card-success::before { background: var(--success); }
.stat-card-warning::before { background: var(--warning); }
.stat-card-danger::before { background: var(--danger); }
.stat-card-info::before { background: var(--info); }

.stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.stat-card-primary .stat-icon { color: var(--primary); }
.stat-card-success .stat-icon { color: var(--success); }
.stat-card-warning .stat-icon { color: var(--warning); }
.stat-card-danger .stat-icon { color: var(--danger); }
.stat-card-info .stat-icon { color: var(--info); }

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* === Avatar === */
.avatar-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.75rem;
}

.avatar-sm { width: 32px; height: 32px; font-size: 0.7rem; }
.avatar-md { width: 40px; height: 40px; font-size: 0.8rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1rem; }

/* === Tables === */
.table { margin-bottom: 0; }

.table th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom-width: 1px;
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

.table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

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

.cursor-pointer { cursor: pointer; }

/* === Badges === */
.badge {
    font-weight: 500;
    font-size: 0.72rem;
    padding: 0.35em 0.65em;
    border-radius: 0.35rem;
}

/* === Chat/Messages === */
.chat-area {
    max-height: 500px;
    overflow-y: auto;
    padding: 1rem;
}

.chat-message {
    display: flex;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

.chat-message.mine {
    flex-direction: row-reverse;
}

.chat-message.mine .chat-bubble {
    background: var(--primary-bg);
    border-color: var(--primary-light);
}

.chat-message.bot .chat-bubble {
    background: #f0fdf4;
    border-color: var(--success);
}

.chat-bubble {
    max-width: 75%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--card-bg);
}

.chat-message.mine .chat-sender {
    text-align: right;
}

.chat-sender {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.chat-text {
    font-size: 0.875rem;
    line-height: 1.5;
}

.chat-internal {
    background: #fffbeb !important;
    border-color: var(--warning) !important;
    border-style: dashed !important;
}

/* === Timeline === */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 1rem;
}

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--card-bg);
    z-index: 1;
}

.timeline-content {
    font-size: 0.85rem;
}

/* === Date Badge === */
.date-badge {
    width: 48px;
    height: 48px;
    background: var(--primary-bg);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.date-day {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.date-month {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* === Login Page === */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #059669 0%, #0d6b3e 40%, #065f46 100%);
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

/* Animated floating education icons */
.login-bg-animation {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 0;
}
.floating-icon {
    position: absolute;
    left: var(--x, 50%);
    top: var(--y, 50%);
    font-size: var(--size, 1.5rem);
    color: rgba(255,255,255,0.08);
    animation: floatIcon 12s ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}
@keyframes floatIcon {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.06; }
    25% { transform: translateY(-30px) rotate(10deg); opacity: 0.12; }
    50% { transform: translateY(-15px) rotate(-5deg); opacity: 0.08; }
    75% { transform: translateY(-40px) rotate(8deg); opacity: 0.14; }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 900px;
}

.login-card {
    display: flex;
    background: var(--card-bg);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    min-height: 580px;
}

.login-brand {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, #059669 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
}

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

.brand-logo, .brand-logo-sm {
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,0.2);
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
}

.brand-logo-sm {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    background: var(--primary);
    color: #fff;
}

.login-brand h1 {
    font-weight: 800;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.brand-features {
    margin-top: 2rem;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    gap: 0.75rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.feature-item i {
    font-size: 1.2rem;
}

.login-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form-content {
    width: 100%;
    max-width: 380px;
    padding: 2rem;
}

.login-form-content h2 {
    font-weight: 700;
}

.demo-credentials .btn {
    font-size: 0.75rem;
}

/* === Notification Dropdown === */
.notification-dropdown {
    max-height: 400px;
    overflow-y: auto;
}

.notification-list .list-group-item {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    padding: 0.75rem 1rem;
}

/* === Chatbot Widget === */
.chatbot-widget {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1040;
}

.chatbot-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

.chatbot-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 360px;
    height: 450px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.chatbot-header {
    background: var(--primary);
    color: #fff;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.chatbot-input {
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
}

/* === Forms === */
.form-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.form-control, .form-select {
    border-color: var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-control-lg {
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
}

.input-group-text {
    border-color: var(--border-color);
    background: var(--light);
}

.categoria-btn {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.8rem !important;
    transition: var(--transition);
}

.btn-check:checked + .categoria-btn {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

/* === Buttons === */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn {
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition);
}

/* === Alerts === */
.alert {
    border-radius: var(--radius);
    font-size: 0.875rem;
    border: none;
}

/* === Breadcrumb === */
.breadcrumb {
    font-size: 0.8rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
}

/* === Responsive === */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .login-card {
        flex-direction: column;
        min-height: auto;
    }

    .login-brand {
        flex: 0 0 auto;
        padding: 1.5rem 1.5rem 1.25rem;
    }

    .login-brand h1 {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }

    .login-brand .lead {
        font-size: 0.85rem;
        margin-bottom: 0;
    }

    .login-brand .brand-features {
        display: none;
    }

    .login-brand .brand-logo {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .login-brand img {
        max-height: 56px !important;
        margin-bottom: 0.5rem !important;
    }

    .chatbot-window {
        width: calc(100vw - 2rem);
        right: -0.5rem;
    }
}

@media (max-width: 575.98px) {
    .main-content {
        padding: 1rem 0.75rem;
    }

    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .content-header h1,
    .main-content h1.h3 {
        font-size: 1.25rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .stat-card {
        padding: 0.85rem;
    }

    .stat-icon {
        font-size: 1.15rem;
        margin-bottom: 0.25rem;
    }

    .stat-label {
        font-size: 0.65rem;
    }

    .card-body {
        padding: 1rem;
    }

    .card-header {
        padding: 0.75rem 1rem;
    }

    /* Reduz fontes utilitárias muito grandes em mobile */
    .fs-1 { font-size: 1.75rem !important; }
    .fs-2 { font-size: 1.5rem !important; }
    .display-4 { font-size: 2rem !important; }

    /* Botões grandes ficam normais em mobile */
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    /* Garantir scroll horizontal seguro em tabelas */
    .table-responsive {
        margin-bottom: 0;
    }

    /* Modais com margem segura */
    .modal-dialog {
        margin: 0.5rem;
    }
}

/* === Wave Animation === */
.wave {
    display: inline-block;
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(20deg); }
    50% { transform: rotate(0); }
    75% { transform: rotate(20deg); }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

/* Fade In Up - cards, rows */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-in {
    animation: fadeInUp 0.5s ease both;
}
.animate-in:nth-child(1) { animation-delay: 0.05s; }
.animate-in:nth-child(2) { animation-delay: 0.10s; }
.animate-in:nth-child(3) { animation-delay: 0.15s; }
.animate-in:nth-child(4) { animation-delay: 0.20s; }
.animate-in:nth-child(5) { animation-delay: 0.25s; }
.animate-in:nth-child(6) { animation-delay: 0.30s; }

/* Fade In */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.fade-in { animation: fadeIn 0.6s ease forwards; }

/* Slide In Left */
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}
.slide-in-left { animation: slideInLeft 0.4s ease forwards; }

/* Slide In Right */
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}
.slide-in-right { animation: slideInRight 0.4s ease forwards; }

/* Scale In */
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}
.scale-in { animation: scaleIn 0.3s ease forwards; }

/* Pulse */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.pulse { animation: pulse 2s ease-in-out infinite; }

/* Bounce In */
@keyframes bounceIn {
    0%   { opacity: 0; transform: scale(0.3); }
    50%  { transform: scale(1.05); }
    70%  { transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}
.bounce-in { animation: bounceIn 0.6s ease forwards; }

/* Counter animation for stat values */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.stat-card .stat-value {
    animation: countUp 0.6s ease forwards;
}

/* Stat card enhanced hover */
.stat-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(99, 102, 241, 0.25);
}

/* Card hover lift */
.card-hover {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.card-hover:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Table row slide in */
.table-animate tbody tr {
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
}
.table-animate tbody tr:nth-child(1) { animation-delay: 0.03s; }
.table-animate tbody tr:nth-child(2) { animation-delay: 0.06s; }
.table-animate tbody tr:nth-child(3) { animation-delay: 0.09s; }
.table-animate tbody tr:nth-child(4) { animation-delay: 0.12s; }
.table-animate tbody tr:nth-child(5) { animation-delay: 0.15s; }

/* Badge glow for urgent */
.badge-glow {
    animation: badgeGlow 2s ease-in-out infinite;
}
@keyframes badgeGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(239, 68, 68, 0.3); }
    50%      { box-shadow: 0 0 15px rgba(239, 68, 68, 0.6); }
}

/* Notification bell ring */
@keyframes bellRing {
    0% { transform: rotate(0); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(6deg); }
    40% { transform: rotate(-4deg); }
    50%, 100% { transform: rotate(0); }
}
.bell-ring { animation: bellRing 1s ease; }

/* Typing indicator */
.typing-indicator { display: flex; gap: 4px; padding: 8px 12px; }
.typing-indicator span {
    width: 8px; height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-8px); opacity: 1; }
}

/* Progress bar animate */
.progress-animate .progress-bar {
    animation: progressGrow 1s ease forwards;
    width: 0;
}
@keyframes progressGrow {
    to { width: var(--progress-width); }
}

/* Smooth page transition */
.main-content {
    animation: fadeIn 0.3s ease;
}

/* ============================================================
   LIVE CHAT SAE WIDGET
   ============================================================ */
.live-chat-widget {
    position: fixed;
    bottom: 1.5rem;
    right: 6rem;
    z-index: 1039;
}

.live-chat-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--success), #059669);
    color: #fff;
    border: none;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}

.live-chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.live-chat-toggle .chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: var(--danger);
    border-radius: 50%;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    animation: pulse 2s infinite;
}

.live-chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 380px;
    height: 520px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
    animation: scaleIn 0.3s ease forwards;
}

.live-chat-header {
    background: linear-gradient(135deg, var(--success), #059669);
    color: #fff;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.live-chat-header .status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    animation: pulse 2s infinite;
}

.live-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #f8fafb;
}

.live-chat-body .chat-message {
    margin-bottom: 0.75rem;
    animation: fadeInUp 0.3s ease forwards;
}

.live-chat-body .chat-bubble {
    max-width: 80%;
    padding: 0.6rem 0.9rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    line-height: 1.4;
}

.live-chat-body .chat-message.mine .chat-bubble {
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
    border: none;
}

.live-chat-body .chat-message.other .chat-bubble {
    background: #fff;
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

.live-chat-body .chat-time {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.live-chat-input {
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
    background: #fff;
}

.live-chat-input .input-group {
    border-radius: 2rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.live-chat-input .form-control {
    border: none;
    padding: 0.6rem 1rem;
}

.live-chat-input .form-control:focus {
    box-shadow: none;
}

.live-chat-input .btn {
    border: none;
    border-radius: 0;
    padding: 0.6rem 1rem;
}

/* Chat Quick Actions */
.chat-quick-actions {
    padding: 0.5rem 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--border-color);
    background: #fff;
}

.chat-quick-actions .btn {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    border-radius: 1rem;
}

/* Chatbot enhanced */
.chatbot-toggle {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.chatbot-toggle:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}
.chatbot-window {
    animation: scaleIn 0.3s ease forwards;
}

/* === Utilities === */
.bg-orange { background-color: #f97316 !important; }
.text-orange { color: #f97316 !important; }

/* Shimmer loading placeholder */
.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive */
@media (max-width: 575.98px) {
    .live-chat-window {
        width: calc(100vw - 2rem);
        right: -3.5rem;
        height: 70vh;
    }
}

/* === Print === */
@media print {
    .sidebar, .navbar-monalisa, .chatbot-widget, .live-chat-widget { display: none !important; }
    .main-content { margin-left: 0 !important; }
}

/* ============================================================
   ENHANCED UX - Aluno Area Animations
   ============================================================ */

/* Card hover lift effect */
.card-hover, .main-content .card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card-hover:hover, .main-content .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

/* Button animations */
.btn {
    transition: all 0.2s ease;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.btn:active {
    transform: translateY(0) scale(0.98);
}
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Stat cards pulse on hover */
.stat-card:hover .stat-value,
.card .fs-1:hover,
.card .fs-2:hover {
    animation: statPop 0.4s ease;
}
@keyframes statPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* Badge animations */
.badge {
    transition: transform 0.15s ease;
}
.badge:hover {
    transform: scale(1.08);
}

/* Progress bar animation */
.progress-bar {
    transition: width 1s ease-in-out;
    animation: progressGlow 2s ease-in-out infinite alternate;
}
@keyframes progressGlow {
    from { opacity: 0.9; }
    to { opacity: 1; }
}

/* Avatar hover */
.avatar-circle {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.avatar-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(34,197,94,0.3);
}

/* Sidebar active item glow */
.sidebar .nav-link.active {
    background: var(--primary) !important;
    box-shadow: 0 4px 15px rgba(34,197,94,0.3);
}

/* Navbar green gradient */
.navbar-monalisa {
    background: linear-gradient(135deg, var(--primary) 0%, #059669 100%) !important;
}

/* Smooth page transitions */
.main-content > * {
    animation: contentFadeIn 0.4s ease;
}
@keyframes contentFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Toast/Alert slide in */
.alert {
    animation: alertSlideIn 0.3s ease;
}
@keyframes alertSlideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Table row hover highlight */
.table-hover tbody tr {
    transition: background-color 0.15s ease;
}

/* Form inputs focus glow green */
.form-control:focus, .form-select:focus {
    border-color: var(--primary-light) !important;
    box-shadow: 0 0 0 0.2rem rgba(34,197,94,0.15) !important;
}

/* Floating action effect for main CTA buttons */
.btn-lg {
    position: relative;
    overflow: hidden;
}
.btn-lg::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}
.btn-lg:active::after {
    width: 300px;
    height: 300px;
}
