/* Paleta de Cores IECH Portal Acadêmico - Corporativo SaaS */
:root {
    /* Cores de Marca e Fundo */
    --bg-navy: #1B2A4A;
    --bg-canvas: #F4F6F9;
    --bg-white: #FFFFFF;
    
    /* Tipografia */
    --text-main: #0F172A;
    --text-muted: #475569;
    --text-light: #94A3B8;
    
    /* Cores de Status/Cards */
    --iech-yellow: #F6C84B;
    --iech-yellow-text: #D69E2E;
    --iech-blue: #4A90D9;
    --iech-blue-text: #3182CE;
    --iech-teal: #38B2AC;
    --iech-teal-text: #319795;
    --iech-purple: #7C6BC9;
    --iech-purple-text: #667EEA;
    --iech-gray: #718096;
    --iech-gray-text: #4A5568;

    /* Feedbacks Globais */
    --border-color: #E2E8F0;
    --color-error: #E53E3E;
    --color-success: #38A169;
    
    /* Sombras Corporativas */
    --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-card-hover: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    
    /* Transições */
    --transition-smooth: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset Básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-canvas);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Layout Geral (Sidebar + Conteúdo) */
.portal-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 220px;
    background-color: var(--bg-navy);
    color: var(--bg-white);
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid rgba(255,255,255,0.05);
}

.sidebar-logo {
    text-align: center;
    margin-bottom: 32px;
}

.sidebar-logo img {
    max-width: 120px;
    height: auto;
    background: white;
    border-radius: 10px;
    padding: 8px;
}

/* Perfil (Avatar Dinâmico) */
.user-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.avatar-circle {
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-profile .name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--bg-white);
    text-align: center;
}

.user-profile .role {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* Menu da Sidebar */
.sidebar-menu {
    list-style: none;
    flex: 1;
}

.sidebar-menu li {
    margin-bottom: 8px;
}

.sidebar-menu a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
    font-weight: 500;
}

.sidebar-menu a svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.5;
    flex-shrink: 0;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--bg-white);
}

.sidebar-footer {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    padding: 10px 14px;
    border-radius: 6px;
}

.sidebar-footer a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--bg-white);
}

/* Área de Conteúdo Principal */
.main-content {
    flex: 1;
    padding: 40px;
    background-color: var(--bg-canvas);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.dashboard-header {
    margin-bottom: 32px;
}

.dashboard-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Grid e Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.dashboard-card {
    background-color: var(--bg-white);
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    border-left: 4px solid transparent;
    transition: var(--transition-smooth);
    position: relative;
}

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

.dashboard-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-card h3 svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.dashboard-card .card-content {
    flex: 1;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.dashboard-card .card-action {
    margin-top: 20px;
    text-align: right;
    font-size: 0.875rem;
    font-weight: 600;
}

.dashboard-card .card-action a {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.2s;
}

.dashboard-card .card-action a:hover {
    opacity: 0.8;
}

/* Cores específicas dos cards */
.card-avisos { border-left-color: var(--iech-yellow); }
.card-avisos h3 { color: var(--iech-yellow-text); }
.card-avisos .card-action a { color: var(--iech-yellow-text); }

.card-provas { border-left-color: var(--iech-blue); }
.card-provas h3 { color: var(--iech-blue-text); }
.card-provas .card-action a { color: var(--iech-blue-text); }

.card-aulas { border-left-color: var(--iech-teal); }
.card-aulas h3 { color: var(--iech-teal-text); }
.card-aulas .card-action a { color: var(--iech-teal-text); }

.card-notas { border-left-color: var(--iech-purple); }
.card-notas h3 { color: var(--iech-purple-text); }
.card-notas .card-action a { color: var(--iech-purple-text); }

.card-ementa { border-left-color: var(--iech-gray); }
.card-ementa h3 { color: var(--iech-gray-text); }
.card-ementa .card-action a { color: var(--iech-gray-text); }

/* Utilidades Textuais */
.loading-text {
    color: var(--text-light);
    font-style: italic;
}

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

/* Botões Corporativos */
.btn-primary {
    background-color: var(--iech-blue);
    color: var(--bg-white);
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: #3182CE; /* Darker blue */
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background-color: var(--bg-white);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-secondary:hover {
    background-color: var(--bg-canvas);
    border-color: #CBD5E1;
}

/* Tabelas Corporativas */
.table-container {
    background-color: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #F8FAFC;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    color: var(--text-main);
    font-size: 0.95rem;
}

tr:last-child td {
    border-bottom: none;
}

/* Tela de Login Específica */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-canvas);
}

.login-card {
    background-color: var(--bg-white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow-card-hover);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 30px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
    margin-top: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.form-group input:focus {
    outline: none;
    border-color: var(--iech-blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.2);
}

.error-message {
    color: var(--color-error);
    font-size: 0.9rem;
    margin-top: 10px;
    display: none;
}

.logo { 
    max-width: 160px; 
    width: 100%; 
    height: auto; 
    display: block; 
    margin: 0 auto;
}
