/* Dashboard do Professor - CSS */

/* Wrapper específico para dashboard */
.dashboard-wrapper {
    width: 100%;
    height: calc(100vh - var(--header-height));
    padding: 0;
    margin: 0;
}

.dashboard-wrapper .content-area {
    align-items: flex-start;
    padding: 0;
    height: calc(100vh - var(--header-height));
}

.dashboard-wrapper .content-container {
    max-width: none;
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
}

/* Container principal do dashboard */
.dashboard-container {
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 12px;
    padding: 12px;
    background: var(--color-offwhite);
    width: 100%;
    height: calc(100vh - var(--header-height));
    margin: 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* Header do Dashboard */
.dashboard-header {
    text-align: center;
    margin-bottom: 4px;
}

.dashboard-header h1 {
    color: var(--color-dark-blue);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.dashboard-header h1 i {
    margin-right: 12px;
    color: var(--color-orange);
}

.dashboard-subtitle {
    color: var(--color-gray);
    font-size: 1.1rem;
    margin: 0;
}

/* Grid de Métricas */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 4px;
    width: 100%;
}

/* Cards de Métricas */
.metric-card {
    background: white;
    border-radius: 8px;
    padding: 16px;
    border-left: 4px solid var(--color-dark-blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 91, 127, 0.15);
}

.metric-card[data-metric="aulas"] {
    border-left-color: var(--color-orange);
}

.metric-card[data-metric="presencas"] {
    border-left-color: var(--color-green);
}

.metric-card[data-metric="receita"] {
    border-left-color: var(--color-green);
}

/* Header do card de métrica */
.metric-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.metric-icon {
    font-size: 1.8rem;
    margin-right: 12px;
}

.metric-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-gray);
    letter-spacing: 0.5px;
}

/* Número principal da métrica */
.metric-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-dark-blue);
    line-height: 1;
    margin: 8px 0 12px 0;
}

/* Tendência da métrica */
.metric-trend {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.metric-trend i {
    margin-right: 4px;
    font-size: 1rem;
}

.metric-trend.positive {
    color: var(--color-green);
}

.metric-trend.negative {
    color: #dc3545;
}

.metric-trend.info {
    color: var(--color-gray);
}

/* Grid de Conteúdo Principal */
.content-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 12px;
    width: 100%;
    height: 100%;
    min-height: 0;
    align-items: start;
}

/* Seções */
.actions-section,
.agenda-section {
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
    min-height: 0;
}

.agenda-section {
    min-height: 300px;
    height: fit-content;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

.section-title {
    display: flex;
    align-items: center;
    color: var(--color-dark-blue);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-light-gray);
}

.section-title i {
    margin-right: 8px;
    color: var(--color-orange);
}

/* Container de Ações */
.actions-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Botões de Ação */
.action-button {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.action-button i {
    margin-right: 12px;
    font-size: 1.2rem;
}

.action-button:hover {
    transform: scale(1.02);
    text-decoration: none;
}

.action-orange {
    background-color: var(--color-orange);
    color: white;
}

.action-orange:hover {
    background-color: #e56b1f;
    color: white;
    box-shadow: 0 4px 15px rgba(244, 124, 45, 0.3);
}

.action-green {
    background-color: var(--color-green);
    color: white;
}

.action-green:hover {
    background-color: var(--color-green-hover);
    color: white;
    box-shadow: 0 4px 15px rgba(58, 182, 110, 0.3);
}

.action-blue {
    background-color: var(--color-dark-blue);
    color: white;
}

.action-blue:hover {
    background-color: var(--color-dark-blue-hover);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 91, 127, 0.3);
}

/* Container da Agenda */
.agenda-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    min-height: 0;
}

/* Item da Agenda */
.agenda-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    min-width: 0;
}

.agenda-item:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Estados da agenda */
.agenda-item.status-high {
    background: var(--color-light-blue);
    border-left-color: var(--color-green);
}

.agenda-item.status-medium {
    background: #FFF8E1;
    border-left-color: var(--color-yellow);
}

.agenda-item.status-low {
    background: #FFEBEE;
    border-left-color: #dc3545;
}

/* Tempo da agenda */
.agenda-time {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--color-dark-blue);
    font-size: 1.1rem;
}

.agenda-time i {
    margin-right: 8px;
    color: var(--color-orange);
}

/* Informações da agenda */
.agenda-info h4 {
    margin: 0 0 4px 0;
    color: var(--color-dark-blue);
    font-size: 1.1rem;
    font-weight: 600;
}

.agenda-info p {
    margin: 0;
    color: var(--color-gray);
    font-size: 0.9rem;
}

.agenda-info p i {
    margin-right: 4px;
}

/* Botão de Presença */
.presence-button {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.presence-button:hover {
    transform: scale(1.05);
}

.presence-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Estado Vazio da Agenda */
.agenda-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-gray);
}

.agenda-empty i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--color-light-gray);
}

.agenda-empty p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Loading Overlay */
.loading-overlay {
    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: 9999;
}

.loading-spinner {
    background: white;
    padding: 24px;
    border-radius: 8px;
    text-align: center;
}

.loading-spinner p {
    margin-top: 16px;
    color: var(--color-gray);
}

/* Responsive Design */

/* Large Desktop */
@media (min-width: 1400px) {
    .dashboard-container {
        padding: 32px;
        gap: 32px;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .content-grid {
        grid-template-columns: 350px 1fr;
    }
}

/* Desktop */
@media (max-width: 1399px) and (min-width: 1201px) {
    .metrics-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .content-grid {
        grid-template-columns: 320px 1fr;
    }
}

/* Tablet */
@media (max-width: 1200px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 8px;
        gap: 8px;
    }
    
    .dashboard-header h1 {
        font-size: 1.8rem;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .metric-card {
        padding: 12px;
    }
    
    .metric-number {
        font-size: 1.8rem;
    }
    
    .actions-section,
    .agenda-section {
        padding: 12px;
    }
    
    .agenda-item {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: center;
        padding: 8px;
    }
    
    .agenda-time {
        justify-content: center;
    }
    
    .presence-button {
        justify-content: center;
        width: 100%;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .dashboard-container {
        padding: 12px;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .metric-card {
        padding: 16px;
    }
    
    .metric-number {
        font-size: 1.8rem;
    }
    
    .metric-label {
        font-size: 0.75rem;
    }
    
    .action-button {
        padding: 14px 16px;
        font-size: 1rem;
    }
}

/* Animações */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.metric-card,
.actions-section,
.agenda-section {
    animation: slideIn 0.5s ease-out;
}

/* Loading skeleton para cards */
.metric-card.loading {
    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;
    }
}

/* Focus states para acessibilidade */
.action-button:focus,
.presence-button:focus {
    outline: 2px solid var(--color-orange);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .dashboard-container {
        background: white;
        padding: 0;
    }
    
    .action-button,
    .presence-button {
        display: none;
    }
    
    .agenda-item {
        break-inside: avoid;
    }
}
