/* Style para o Portal Pedagogia do Exemplo */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-main: #FAF8F2; /* Warm Cream */
    --bg-card: #fdfaf5; /* Warm White */
    --bg-card-hover: #F8F3E9; /* Warm Sand Hover */
    --bg-sidebar: #cc1d24; /* Deep Burgundy Crimson from primary */
    --border-color: #E6DCD2; /* Warm soft border */
    
    --primary: #cc1d24; /* Deep Burgundy */
    --primary-glow: rgba(204, 29, 36, 0.06);
    --secondary: #EEDCD0; /* Sand Peach */
    --accent: #E55B5B; /* Accent Peach Red */
    --warning: #DFB25E; /* Warm Gold */
    --danger: #B52F2F; /* Dark Crimson */
    --success: #2E7D32; /* Dark Green */
    
    --text-primary: #2C221F; /* Deep Charcoal/Brown */
    --text-secondary: #6B5D57; /* Warm Medium Brown */
    --text-muted: #9E8E87; /* Light Brown Muted */
    
    --font-heading: 'Fraunces', 'Times New Roman', serif;
    --font-body: 'Inter', system-ui, sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 8px -1px rgba(44, 34, 31, 0.06);
    --shadow-md: 0 10px 20px -4px rgba(44, 34, 31, 0.1);
    --shadow-glow: 0 0 20px 0 rgba(204, 29, 36, 0.15);
}

/* Base resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* Glassmorphism utility */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

/* Layout Grid */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar styling */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    
    /* Variable override to look premium white-on-crimson */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.75);
    --text-muted: rgba(255, 255, 255, 0.55);
    --border-color: rgba(255, 255, 255, 0.15);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2.5rem;
    padding-left: 0.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--secondary), #ffffff);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 800;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #ffffff, var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-profile-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.user-avatar-sm {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--secondary);
}

.user-info-meta .name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.user-info-meta .role-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-left: 4px solid var(--secondary);
}

.nav-link svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.logout-container {
    margin-top: auto;
}

/* Main Content styling */
.main-content {
    margin-left: 280px;
    flex-grow: 1;
    padding: 2.5rem;
    min-height: 100vh;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.page-title {
    font-size: 2rem;
    margin-bottom: 4px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Dashboard Cards and Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-heading);
}

.stat-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Colorful wrappers */
.wrapper-indigo { background: rgba(99, 102, 241, 0.1); color: var(--primary); }
.wrapper-pink { background: rgba(236, 72, 153, 0.1); color: var(--secondary); }
.wrapper-teal { background: rgba(20, 184, 166, 0.1); color: var(--accent); }
.wrapper-amber { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.wrapper-rose { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.wrapper-emerald { background: rgba(16, 185, 129, 0.1); color: var(--success); }

/* Main Dashboard Layout sectioning */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    .sidebar {
        width: 80px;
        padding: 2rem 0.5rem;
    }
    .sidebar .logo-text, .sidebar .user-profile-summary, .sidebar .nav-link span {
        display: none;
    }
    .main-content {
        margin-left: 80px;
    }
}

.card {
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

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

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Charts / Progress Bars styling */
.virtue-bar-item {
    margin-bottom: 1.25rem;
}

.virtue-bar-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.virtue-bar-bg {
    height: 10px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 5px;
    overflow: hidden;
}

.virtue-bar-fill {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    box-shadow: 0 0 12px var(--primary-glow);
}

/* Lists and Lists items */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
}

.activity-badge {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary));
    color: #ffffff;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.07);
}

/* AI Anna Chat Box UI */
.chat-container {
    height: 380px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.chat-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

.bubble-user {
    background-color: var(--primary);
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.bubble-anna {
    background-color: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.chat-input-wrapper {
    display: flex;
    gap: 8px;
}

/* Audio Player */
.audio-player-card {
    background: linear-gradient(135deg, var(--bg-card), var(--primary-glow));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 16px;
}

.audio-play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    transition: var(--transition);
}

.audio-play-btn:hover {
    transform: scale(1.05);
}

/* Passaporte e Selos */
.passport-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    padding: 16px 8px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.badge-item:hover {
    transform: translateY(-2px);
    background: rgba(0, 0, 0, 0.04);
    border-color: var(--primary);
}

.badge-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px var(--primary-glow);
}

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

.badge-virtue {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Tables styling */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

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

.custom-table th {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.custom-table tr:hover td {
    background-color: rgba(0, 0, 0, 0.015);
}
