/* =========================================
   ESTILOS GLOBAIS DO SISTEMA HABITACIONAL
   ========================================= */

/* Reset e configurações base */
.ffaust-painel-container * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.ffaust-painel-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.5;
    font-size: 14px;
    background-color: #f5f7f9;
    width: 100%;
}

/* Toolbar superior */
.ffaust-toolbar {
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

.ffaust-context-selectors {
    display: flex;
    gap: 20px;
    align-items: center;
}

.ffaust-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ffaust-selector label {
    font-weight: 600;
    color: #555;
}

.ffaust-selector select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    min-width: 180px;
    font-size: 14px;
}

.ffaust-user-menu {
    display: flex;
    align-items: center;
}

.ffaust-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.ffaust-user-greeting {
    font-weight: 500;
}

.ffaust-avatar {
    width: 32px;
    height: 32px;
    background-color: #4CAF50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.ffaust-avatar.large {
    width: 48px;
    height: 48px;
    font-size: 18px;
}

.ffaust-dropdown-arrow {
    color: #777;
    font-size: 12px;
}

/* Layout principal com sidebar */
.ffaust-main-container {
    display: flex;
    min-height: calc(100vh - 56px);
}

.ffaust-sidebar {
    width: 250px;
    background-color: white;
    border-right: 1px solid #e0e0e0;
    padding: 20px 0;
    box-shadow: 1px 0 3px rgba(0, 0, 0, 0.05);
}

.ffaust-sidebar-user {
    padding: 0 20px 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ffaust-user-details {
    display: flex;
    flex-direction: column;
}

.ffaust-user-name {
    font-weight: bold;
    font-size: 16px;
}

.ffaust-user-role {
    color: #666;
    font-size: 13px;
}

.ffaust-main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ffaust-nav-item {
    margin-bottom: 2px;
}

.ffaust-nav-item a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #444;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.ffaust-nav-item.active a {
    background-color: #f0f7f0;
    color: #4CAF50;
    border-left-color: #4CAF50;
    font-weight: 500;
}

.ffaust-nav-item:not(.active) a:hover {
    background-color: #f9f9f9;
    color: #2E7D32;
}

.ffaust-icon {
    width: 24px;
    margin-right: 10px;
    text-align: center;
}

/* Conteúdo principal */
.ffaust-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.ffaust-page-header {
    margin-bottom: 24px;
}

.ffaust-page-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.ffaust-breadcrumbs {
    color: #666;
    font-size: 13px;
}

/* =========================================
   CARDS E ELEMENTOS DO DASHBOARD
   ========================================= */

/* Grid de cards */
.ffaust-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Card base */
.ffaust-card {
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    transition: all 0.2s ease;
}

.ffaust-card:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.ffaust-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ffaust-card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #444;
    margin: 0;
}

.ffaust-card-icon {
    color: #4CAF50;
    font-size: 18px;
}

.ffaust-card-icon.alert-icon {
    color: #f44336;
}

.ffaust-card-body {
    padding: 20px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ffaust-card-footer {
    padding: 12px 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.ffaust-card-link {
    color: #2E7D32;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.ffaust-card-link:hover {
    text-decoration: underline;
}

/* Estatísticas nos cards */
.ffaust-stat {
    text-align: center;
}

.ffaust-stat-value {
    font-size: 40px;
    font-weight: 300;
    color: #4CAF50;
    line-height: 1.2;
}

.ffaust-stat-label {
    color: #666;
    font-size: 13px;
    margin-top: 4px;
}

/* Estilos específicos para gráfico de barras */
.graph-card-body {
    padding: 20px 10px 10px;
}

.ffaust-chart-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 120px;
}

.ffaust-chart-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: calc(100% / 3);
}

.ffaust-mini-bar {
    width: 30px;
    background-color: #ddd;
    margin-bottom: 8px;
    border-radius: 2px 2px 0 0;
    transition: height 0.5s;
}

.ffaust-mini-bar.pending {
    background-color: #90CAF9; /* Azul claro */
}

.ffaust-mini-bar.progress {
    background-color: #FFB74D; /* Laranja claro */
}

.ffaust-mini-bar.completed {
    background-color: #81C784; /* Verde claro */
}

.ffaust-chart-label {
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* Status tags */
.ffaust-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.ffaust-status.pending {
    background-color: #E3F2FD;
    color: #1976D2;
}

.ffaust-status.progress,
.ffaust-status.in-progress {
    background-color: #FFF3E0;
    color: #E65100;
}

.ffaust-status.completed,
.ffaust-status.approved {
    background-color: #E8F5E9;
    color: #2E7D32;
}

.ffaust-status.cancelled {
    background-color: #FFEBEE;
    color: #C62828;
}

/* Utilidades de margem */
.ffaust-mt-20 {
    margin-top: 20px;
}

.ffaust-mb-20 {
    margin-bottom: 20px;
}

/* Cards com largura completa */
.ffaust-table-card {
    grid-column: 1 / -1;
}

/* =========================================
   TABELAS E ELEMENTOS DE DADOS
   ========================================= */

/* Estilos para tabelas */
.ffaust-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ffaust-table th,
.ffaust-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.ffaust-table th {
    font-weight: 600;
    color: #555;
    background-color: #f9f9f9;
}

.ffaust-table tr:hover {
    background-color: #f5f5f5;
}

.ffaust-table tr:last-child td {
    border-bottom: none;
}

.ffaust-action-link {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 500;
}

.ffaust-action-link:hover {
    text-decoration: underline;
}

/* Formulários */
.ffaust-form-group {
    margin-bottom: 20px;
}

.ffaust-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #555;
}

.ffaust-form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.ffaust-form-control:focus {
    border-color: #4CAF50;
    outline: none;
}

.ffaust-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.ffaust-btn:hover {
    background-color: #388E3C;
}

.ffaust-btn-secondary {
    background-color: #757575;
}

.ffaust-btn-secondary:hover {
    background-color: #616161;
}

.ffaust-btn-danger {
    background-color: #f44336;
}

.ffaust-btn-danger:hover {
    background-color: #d32f2f;
}

/* Alertas e mensagens */
.ffaust-alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.ffaust-alert-success {
    background-color: #E8F5E9;
    border-color: #4CAF50;
    color: #2E7D32;
}

.ffaust-alert-warning {
    background-color: #FFF8E1;
    border-color: #FFC107;
    color: #FF8F00;
}

.ffaust-alert-error {
    background-color: #FFEBEE;
    border-color: #F44336;
    color: #C62828;
}

/* Paginação */
.ffaust-pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.ffaust-pagination a {
    padding: 6px 12px;
    margin: 0 4px;
    border-radius: 4px;
    text-decoration: none;
    color: #444;
    background-color: #f5f5f5;
    transition: all 0.2s;
}

.ffaust-pagination a:hover {
    background-color: #e0e0e0;
}

.ffaust-pagination a.active {
    background-color: #4CAF50;
    color: white;
}

/* Loading spinner */
.ffaust-loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #4CAF50;
    animation: ffaust-spin 1s linear infinite;
}

@keyframes ffaust-spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   RESPONSIVIDADE
   ========================================= */

@media (max-width: 1024px) {
    .ffaust-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ffaust-main-container {
        flex-direction: column;
    }
    
    .ffaust-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding: 10px 0;
    }
    
    .ffaust-sidebar-user {
        padding: 10px 20px;
        margin-bottom: 10px;
    }
    
    .ffaust-card-grid {
        grid-template-columns: 1fr;
    }
    
    .ffaust-toolbar {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .ffaust-context-selectors {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .ffaust-selector {
        width: 100%;
    }
    
    .ffaust-selector select {
        flex: 1;
    }
    
    .ffaust-user-menu {
        width: 100%;
        justify-content: flex-end;
    }
    
    .ffaust-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .ffaust-content {
        padding: 15px 10px;
    }
    
    .ffaust-stat-value {
        font-size: 30px;
    }
    
    .ffaust-page-header h1 {
        font-size: 20px;
    }
}
