@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Montserrat', sans-serif;
    background-image: url("../img/Back (1).png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: black;
    min-height: 100vh;
    padding-bottom: 80px;
}

.btn-voltar {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(20, 99, 139, 0.5);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Montserrat', sans-serif;
    text-decoration: none;
    z-index: 1000;
}

.btn-voltar:hover {
    border-color: #14638b;
    background: rgba(20, 99, 139, 0.3);
    transform: translateY(-2px);
}

.header-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(180deg, rgba(20, 99, 139, 0.95) 0%, rgba(17, 80, 111, 0.9) 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-nav .logo {
    width: 50px;
    height: 50px;
}

.header-nav h1 {
    font-size: 1.5rem;
    color: white;
    font-weight: 700;
}

.atendimentos-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.titulo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.titulo-section h1 {
    font-size: 2rem;
    color: white;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.titulo-section p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.filtros {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-filtro {
    padding: 0.625rem 1.25rem;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid transparent;
    border-radius: 2rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
}

.btn-filtro:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-filtro.active {
    background: linear-gradient(135deg, #14638b 0%, #11506f 100%);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Loading Bar */
.loading-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 1rem 0;
    display: none;
}

.loading-bar-progress {
    height: 100%;
    background: linear-gradient(90deg, #14638b, #1483bb, #14638b);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.atendimentos-lista {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.atendimento-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    position: relative;
    border-left: 5px solid #14638b;
    transition: all 0.3s ease;
}

.atendimento-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.atendimento-card.proximo,
.atendimento-card.pendente,
.atendimento-card.confirmado {
    border-left-color: #14638b;
}

.atendimento-card.concluido {
    border-left-color: #28a745;
    opacity: 0.85;
}

.atendimento-card.cancelado {
    border-left-color: #dc3545;
    opacity: 0.7;
}

.status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.375rem 0.875rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.status-badge.proximo,
.status-badge.status-pendente,
.status-badge.status-confirmado {
    background: linear-gradient(135deg, #14638b 0%, #11506f 100%);
}

.status-badge.concluido,
.status-badge.status-concluido {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.status-badge.cancelado,
.status-badge.status-cancelado {
    background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%);
}

.atendimento-info {
    margin-bottom: 1rem;
}

.data-hora {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.data-hora svg {
    flex-shrink: 0;
    stroke: #14638b;
}

.data-hora div {
    display: flex;
    flex-direction: column;
}

.data-hora strong {
    font-size: 1rem;
    color: #333;
    margin-bottom: 0.25rem;
}

.data-hora span {
    font-size: 0.9rem;
    color: #666;
}

.servico-info h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.servico-info p {
    font-size: 0.9rem;
    color: #666;
}

.atendimento-acoes {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.atendimento-acoes button {
    flex: 1;
    min-width: 100px;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancelar {
    background: #f8d7da;
    color: #721c24;
}

.btn-cancelar:hover {
    background: #f5c6cb;
    transform: translateY(-2px);
}

.btn-reagendar {
    background: #d1ecf1;
    color: #0c5460;
}

.btn-reagendar:hover {
    background: #bee5eb;
    transform: translateY(-2px);
}

.btn-avaliar {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: white;
}

.btn-avaliar:hover {
    background: linear-gradient(135deg, #ffca28 0%, #ffa726 100%);
    transform: translateY(-2px);
}

.novo-agendamento {
    margin-top: 2rem;
    text-align: center;
}

.btn-novo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #14638b 0%, #11506f 100%);
    color: white;
    text-decoration: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(20, 99, 139, 0.3);
    transition: all 0.3s ease;
}

.btn-novo:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(20, 99, 139, 0.4);
    background: linear-gradient(135deg, #1483bb 0%, #14638b 100%);
}

.btn-novo svg {
    stroke: currentColor;
}

/* Barra de Navegação Inferior */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(20, 99, 139, 0.95) 0%, rgba(17, 80, 111, 0.98) 100%);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0.25rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.65rem;
    font-weight: 500;
    padding: 0.4rem 0.5rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    min-width: 60px;
    max-width: 80px;
    position: relative;
}

.bottom-nav .nav-item svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
}

.bottom-nav .nav-item:hover {
    color: rgba(255, 255, 255, 0.9);
    background-color: rgba(255, 255, 255, 0.1);
}

.bottom-nav .nav-item.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.15);
}

.bottom-nav .nav-item.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ffffff, transparent);
    border-radius: 0 0 3px 3px;
}

/* Novos estilos para cards dinâmicos */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.data-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.data-info svg {
    stroke: #14638b;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.9rem;
    color: #666;
}

.info-row svg {
    flex-shrink: 0;
    stroke: #666;
}

.card-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.btn-action {
    flex: 1;
    min-width: 120px;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-action svg {
    flex-shrink: 0;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.sem-atendimentos {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #999;
}

.sem-atendimentos svg {
    margin: 0 auto 1rem;
    stroke: #ccc;
}

.sem-atendimentos p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #666;
}

.sem-atendimentos .subtexto {
    font-size: 0.9rem;
    color: #999;
}

/* Responsividade */
@media screen and (max-width: 600px) {
    /* Garantir que o background fique fixo no mobile */
    body {
        background-attachment: fixed;
        background-size: cover;
        background-position: center;
        overflow-x: hidden;
        overflow-y: auto;
        /* Para iOS Safari */
        -webkit-overflow-scrolling: touch;
        position: relative;
    }
    
    /* Alternativa para iOS que não suporta background-attachment: fixed */
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url("./img/Back\ \(1\).png");
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        z-index: -999;
    }
    .atendimento-acoes,
    .card-actions {
        flex-direction: column;
    }

    .atendimento-acoes button,
    .btn-action {
        width: 100%;
    }
}

@media screen and (min-width: 768px) {
    .bottom-nav {
        padding: 0.75rem 1rem;
    }
    
    .bottom-nav .nav-item {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
        min-width: 70px;
        max-width: 100px;
        gap: 0.25rem;
    }
    
    .bottom-nav .nav-item svg {
        width: 24px;
        height: 24px;
    }
}

@media screen and (min-width: 1025px) {
    .bottom-nav {
        padding: 1rem 2rem;
    }
    
    .bottom-nav .nav-item {
        font-size: 0.875rem;
        padding: 0.75rem 1.5rem;
        min-width: 90px;
        max-width: 120px;
    }
    
    .bottom-nav .nav-item svg {
        width: 28px;
        height: 28px;
    }
}

/* Toast de sucesso para cancelamento instantâneo */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.success-toast {
    animation: slideIn 0.3s ease, slideOut 0.3s ease 2.7s;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Modal de Confirmação/Cancelamento */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.modal-content h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 700;
}

.modal-content p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-modal {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.btn-cancelar-modal {
    background: #e0e0e0;
    color: #333;
}

.btn-cancelar-modal:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
}

.btn-confirmar-modal {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.btn-confirmar-modal:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
}
