/* ==============================================
   ESTILOS SIMPLES - PORTAL TSI CHAMADOS
   ============================================== */

/* Variáveis CSS */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

.fancybox__container {
    z-index: 1060 !important;
    /* Ajuste este valor conforme necessário */
}

/* Reset e base */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    padding-top: 76px; /* Espaço para navbar fixa */
}

/* Navbar customizada */
.navbar-brand img {
    max-height: 30px;
}

/* Sidebar responsiva */
@media (min-width: 768px) {
    .offcanvas-md {
        position: sticky !important;
        top: 76px;
        height: calc(100vh - 76px);
        visibility: visible !important;
        transform: none !important;
        border: none;
    }
}

.offcanvas-body {
    padding-top: 1rem;
}

/* Cards simples */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-radius: 0.5rem;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.15s ease-in-out;
}

/* Botões */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
}

/* Tabelas */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table thead th {
    background-color: var(--dark-color);
    color: white;
    border: none;
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

/* Formulários */
.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Badges */
.badge {
    font-weight: 500;
}

/* Alertas */
.alert {
    border-radius: 0.5rem;
    border: none;
}

/* Breadcrumb */
.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
}

/* Avatar do usuário */
.user-avatar {
    width: 32px;
    height: 32px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Status badges */
.badge.bg-primary { background-color: var(--primary-color) !important; }
.badge.bg-success { background-color: var(--success-color) !important; }
.badge.bg-warning { background-color: var(--warning-color) !important; color: var(--dark-color) !important; }
.badge.bg-danger { background-color: var(--danger-color) !important; }
.badge.bg-info { background-color: var(--info-color) !important; color: var(--dark-color) !important; }

/* Estatísticas - Cards coloridos */
.stats-card {
    padding: 1.5rem;
    border-radius: 0.5rem;
    color: white;
    text-decoration: none;
}

.stats-card:hover {
    color: white;
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}

.stats-card.bg-primary { background: linear-gradient(135deg, #0d6efd, #0b5ed7); }
.stats-card.bg-success { background: linear-gradient(135deg, #198754, #157347); }
.stats-card.bg-warning { background: linear-gradient(135deg, #ffc107, #ffca2c); }
.stats-card.bg-info { background: linear-gradient(135deg, #0dcaf0, #31d2f2); }

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stats-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Página de login */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
}

.login-logo {
    max-height: 60px;
    margin-bottom: 1rem;
}

/* Página 404 */
.error-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.error-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    padding: 3rem 2rem;
    text-align: center;
    max-width: 500px;
}

.error-number {
    font-size: 6rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .stats-number {
        font-size: 1.5rem;
    }
    
    .stats-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .error-number {
        font-size: 4rem;
    }
    
    .login-card, .error-card {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Utilidades */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Animações simples */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Status buttons in ticket detail page */
.status-buttons-container {
    display: flex;
    flex-direction: column !important;
    gap: 10px;
}

.btn-status-control {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    position: relative;
    transition: all 0.3s ease;
    border-left: 6px solid transparent;
    width: 100%;
    text-align: left;
    margin-bottom: 8px;
}

.btn-status-control:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.5rem 0.5rem rgba(0, 0, 0, 0.08);
}

.btn-status-control .indicator-dot {
    position: absolute;
    left: -3px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: transparent;
    transition: all 0.3s ease;
}

.btn-status-control .indicator-dot.active {
    background-color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Status card styling */
.status-card-container {
    border-radius: 0 0 8px 8px;
}

/* Timeline styling */
.timeline-container {
    position: relative;
    padding-left: 30px;
}

.timeline-item-container {
    position: relative;
    margin-bottom: 30px;
}

.timeline-item-container:last-child {
    margin-bottom: 0;
}

.timeline-item {
    position: relative;
}

.timeline-badge {
    position: absolute;
    left: -45px;
    top: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.timeline-badge i {
    font-size: 1rem;
}

.timeline-content {
    position: relative;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

.timeline-item-container:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 30px;
    left: -30px;
    bottom: -30px;
    width: 2px;
    background-color: #E4E6EF;
}

/* Anexos styling */
.anexo-item {
    transition: all 0.3s ease;
}

.anexo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
}

/* Responsive styles */
@media (max-width: 767.98px) {
    .btn-status-control {
        flex-direction: row;
        align-items: center;
        padding: 12px;
    }
    
    .btn-status-control .btn-text {
        margin-left: 15px;
    }
    
    .icon-container {
        width: 40px !important;
        height: 40px !important;
    }
}
