* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a0a 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px;
    background: linear-gradient(135deg, #1a0a0a 0%, #2a0a0a 100%);
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(139, 0, 0, 0.4);
    border: 1px solid #8b0000;
}

header h1 {
    color: #8b0000;
    font-size: 2rem;
    text-shadow: 0 0 8px rgba(139, 0, 0, 0.6);
}

header h1 i {
    margin-right: 12px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Botões */
.btn-primary {
    background: linear-gradient(135deg, #8b0000 0%, #a00000 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(139, 0, 0, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 0, 0, 0.6);
    background: linear-gradient(135deg, #a00000 0%, #b00000 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #3a3a3a 0%, #4a4a4a 100%);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #8b0000 0%, #a00000 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #a00000 0%, #b00000 100%);
    transform: translateY(-2px);
}

/* Estatísticas */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: linear-gradient(135deg, #1a0a0a 0%, #2a0a0a 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 6px 25px rgba(139, 0, 0, 0.3);
    border: 1px solid #8b0000;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(139, 0, 0, 0.5);
}

.stat-card h3 {
    color: #8b0000;
    margin-bottom: 8px;
    font-size: 1rem;
}

.stat-card span {
    font-size: 2rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 8px rgba(139, 0, 0, 0.6);
}

/* Busca e Filtro */
.search-filter {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.search-filter input,
.search-filter select {
    flex: 1;
    min-width: 150px;
    padding: 10px 14px;
    border: 2px solid #8b0000;
    border-radius: 6px;
    background: #1a0a0a;
    color: white;
    font-size: 0.9rem;
}

.search-filter input::placeholder {
    color: #888;
}

.search-filter input:focus,
.search-filter select:focus {
    outline: none;
    border-color: #a00000;
    box-shadow: 0 0 8px rgba(139, 0, 0, 0.4);
}

/* Lista de Clientes */
.clients-container {
    background: linear-gradient(135deg, #1a0a0a 0%, #2a0a0a 100%);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 6px 25px rgba(139, 0, 0, 0.3);
    border: 1px solid #8b0000;
}

.client-card {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a0a 100%);
    margin-bottom: 12px;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #8b0000;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.client-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #8b0000, #a00000, #8b0000);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.client-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.5);
}

.client-card.expiring-soon {
    border-color: #a00000;
    background: linear-gradient(135deg, #1a0a0a 0%, #2a0a0a 100%);
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0% { box-shadow: 0 0 0 0 rgba(160, 0, 0, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(160, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(160, 0, 0, 0); }
}

.client-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.client-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #8b0000;
}

.client-actions {
    display: flex;
    gap: 8px;
}

.client-actions button {
    background: none;
    border: none;
    color: #8b0000;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.client-actions button:hover {
    background: rgba(139, 0, 0, 0.2);
    transform: scale(1.1);
}

.client-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 4px;
}

.info-value {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.9rem;
}

.client-observation {
    background: rgba(139, 0, 0, 0.1);
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    border-left: 3px solid #8b0000;
}

.client-observation .info-value {
    font-style: italic;
    color: #ccc;
    word-wrap: break-word;
    line-height: 1.4;
}

.days-remaining {
    text-align: center;
    padding: 8px;
    border-radius: 6px;
    font-weight: bold;
    margin-top: 8px;
    font-size: 0.9rem;
}

.days-remaining.ready {
    background: linear-gradient(135deg, #2d5a2d, #1a4a1a);
    color: white;
}

.days-remaining.warning {
    background: linear-gradient(135deg, #8b5a00, #6b4a00);
    color: white;
}

.days-remaining.danger {
    background: linear-gradient(135deg, #8b0000, #6b0000);
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    overflow-y: auto;
}

.modal-content {
    background: linear-gradient(135deg, #1a0a0a 0%, #2a0a0a 100%);
    margin: 20px auto;
    padding: 0;
    border-radius: 12px;
    width: 95%;
    max-width: 450px;
    box-shadow: 0 15px 50px rgba(139, 0, 0, 0.5);
    border: 1px solid #8b0000;
    animation: modalSlideIn 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #8b0000;
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #1a0a0a 0%, #2a0a0a 100%);
    z-index: 10;
}

.modal-header h2 {
    color: #8b0000;
    margin: 0;
    font-size: 1.3rem;
}

.close {
    color: #8b0000;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
}

.close:hover {
    color: #a00000;
    transform: scale(1.1);
}

/* Formulário */
form {
    padding: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #8b0000;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #8b0000;
    border-radius: 6px;
    background: #0a0a0a;
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.4;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #a00000;
    box-shadow: 0 0 8px rgba(139, 0, 0, 0.4);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 15px;
    flex-wrap: wrap;
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 12px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-card span {
        font-size: 1.8rem;
    }
    
    .search-filter {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-filter input,
    .search-filter select {
        min-width: 100%;
    }
    
    .client-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .client-info {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .modal-content {
        width: 98%;
        margin: 10px auto;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 12px;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    form {
        padding: 12px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .form-actions button {
        width: 100%;
    }
    
    /* Melhorar botões de ação em mobile */
    .client-actions {
        gap: 12px;
    }
    
    .client-actions button {
        padding: 8px;
        font-size: 1.2rem;
        min-width: 40px;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    
    header {
        padding: 10px;
    }
    
    header h1 {
        font-size: 1.3rem;
    }
    
    .btn-primary {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .client-card {
        padding: 12px;
    }
    
    .client-name {
        font-size: 1rem;
    }
    
    .info-value {
        font-size: 0.8rem;
    }
    
    .days-remaining {
        font-size: 0.8rem;
        padding: 6px;
    }
    
    /* Otimizações para telas muito pequenas */
    .modal-content {
        width: 100%;
        margin: 5px;
        border-radius: 8px;
    }
    
    .modal-header {
        padding: 10px;
    }
    
    .modal-header h2 {
        font-size: 1.1rem;
    }
    
    form {
        padding: 10px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 0.85rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 8px;
        font-size: 0.85rem;
    }
    
    .form-group textarea {
        min-height: 60px;
    }
    
    .notification {
        max-width: 90%;
        right: 5px;
        left: 5px;
        font-size: 0.85rem;
        padding: 10px 12px;
    }
}

/* Prevenir zoom em dispositivos móveis */
@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="date"],
    select {
        font-size: 16px !important;
    }
}

/* Melhorar acessibilidade em mobile */
@media (max-width: 768px) {
    .client-actions button {
        background: rgba(139, 0, 0, 0.1);
        border-radius: 6px;
    }
    
    .client-actions button:active {
        background: rgba(139, 0, 0, 0.3);
        transform: scale(0.95);
    }
}

/* Notificações */
.notification {
    position: fixed;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #8b0000 0%, #a00000 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.5);
    z-index: 1001;
    animation: slideInRight 0.3s ease;
    max-width: 280px;
    font-size: 0.9rem;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    background: linear-gradient(135deg, #2d5a2d, #1a4a1a);
}

.notification.warning {
    background: linear-gradient(135deg, #8b5a00, #6b4a00);
}

.notification.error {
    background: linear-gradient(135deg, #8b0000, #6b0000);
}

/* Scrollbar personalizada para o modal */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: #1a0a0a;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #8b0000;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #a00000;
} 