/* ============================================
   SISTEMA DE VISTORIA E CHECKLIST - CSS
   ============================================ */

/* Geral */
.vc-form-wrapper, 
.vc-list-cards, 
.vc-list-categorias, 
.vc-vistoria-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Botões */
.vc-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    background: #f0f0f0;
    color: #333;
}

.vc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.vc-btn-primary {
    background: linear-gradient(135deg, #0073aa 0%, #00a0d2 100%);
    color: white;
}

.vc-btn-primary:hover {
    background: linear-gradient(135deg, #005a87 0%, #0073aa 100%);
    color: white;
    text-decoration: none;
}

.vc-btn-cancel {
    background: #dc3545;
    color: white;
}

.vc-btn-cancel:hover {
    background: #c82333;
    color: white;
    text-decoration: none;
}

.vc-btn-location {
    background: #ff6b6b;
    color: white;
}

.vc-btn-location:hover {
    background: #ee5a24;
    color: white;
    text-decoration: none;
}

.vc-btn-edit {
    background: #ffc107;
    color: #000;
}

.vc-btn-edit:hover {
    background: #e0a800;
}

.vc-btn-delete {
    background: #dc3545;
    color: white;
}

.vc-btn-delete:hover {
    background: #c82333;
    color: white;
}

.vc-btn-inspection {
    background: linear-gradient(135deg, #46b450 0%, #2e7d32 100%);
    color: white;
}

.vc-btn-inspection:hover {
    background: linear-gradient(135deg, #388e3c 0%, #1b5e20 100%);
    color: white;
    text-decoration: none;
}

.vc-btn-completed {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}

.vc-btn-concluir {
    background: linear-gradient(135deg, #ffb900 0%, #ff8f00 100%);
    color: #000;
    font-size: 1.1em;
    padding: 12px 30px;
}

.vc-btn-concluir:disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    transform: none;
}

.vc-btn-resolver {
    background: linear-gradient(135deg, #46b450 0%, #2e7d32 100%);
    color: white;
}

/* Cards Grid */
.vc-list-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

/* Card Base */
.vc-card, 
.vc-card-categoria {
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
}

.vc-card:hover,
.vc-card-categoria:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Card Header */
.vc-card-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.vc-card-checklist .vc-card-header {
    background: linear-gradient(135deg, #0073aa 0%, #00a0d2 100%);
}

.vc-card-vistoria .vc-card-header {
    background: linear-gradient(135deg, #46b450 0%, #2e7d32 100%);
}

.vc-card-historico .vc-card-header {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
}

.vc-card-problema .vc-card-header {
    background: linear-gradient(135deg, #fdcb6e 0%, #f39c12 100%);
    color: #000;
}

.vc-card-categoria .vc-card-header {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    border-radius: 12px 12px 0 0;
}

.vc-icon-building,
.vc-icon-folder,
.vc-icon-history,
.vc-icon-problem {
    font-size: 2.5em;
    min-width: 50px;
    text-align: center;
}

.vc-card-title-group {
    flex: 1;
}

.vc-card-title {
    margin: 0 0 5px 0;
    font-size: 1.3em;
    font-weight: 700;
}

.vc-card-id,
.vc-card-date {
    font-size: 0.85em;
    opacity: 0.9;
}

/* Badges */
.vc-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pendente { 
    background: #ffb900; 
    color: #000; 
}

.status-andamento { 
    background: #00a0d2; 
    color: #fff; 
}

.status-concluida { 
    background: #46b450; 
    color: #fff; 
}

/* Card Body */
.vc-card-body {
    padding: 20px;
    flex: 1;
}

.vc-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #555;
    font-size: 0.95em;
    line-height: 1.4;
}

.vc-icon {
    font-size: 1.3em;
    min-width: 24px;
    text-align: center;
}

/* Card Footer */
.vc-card-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Card Problema Resolvido */
.vc-card-problema.resolvido {
    opacity: 0.7;
    background: #f0f0f0;
}

.vc-card-problema.resolvido .vc-card-header {
    background: linear-gradient(135deg, #b2bec3 0%, #636e72 100%);
}

/* Lista de Itens nas Categorias */
.vc-itens-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vc-itens-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.vc-itens-list li:last-child {
    border-bottom: none;
}

.vc-link-edit {
    color: #0073aa;
    text-decoration: none;
    margin-right: 10px;
}

.vc-link-delete {
    color: #dc3545;
    text-decoration: none;
}

.vc-link-edit:hover,
.vc-link-delete:hover {
    text-decoration: underline;
}

/* Formulários */
.vc-form-wrapper {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 3px 20px rgba(0,0,0,0.08);
}

.vc-form-wrapper h3 {
    margin: 0 0 30px 0;
    color: #333;
    font-size: 1.5em;
    padding-bottom: 15px;
    border-bottom: 3px solid #0073aa;
}

.vc-form-wrapper h4 {
    margin: 25px 0 15px 0;
    color: #555;
    font-size: 1.2em;
}

.vc-form-field {
    margin-bottom: 25px;
}

.vc-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.95em;
}

.vc-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.vc-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 4px rgba(0,115,170,0.1);
}

.vc-form-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

/* Checkboxes */
.vc-itens-checkboxes {
    margin: 15px 0;
}

.vc-categoria-group {
    background: #f8f9fa;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 4px solid #0073aa;
}

.vc-categoria-title {
    display: block;
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #333;
}

.vc-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin: 5px 0;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 5px;
}

.vc-checkbox-item:hover {
    background: #e9ecef;
}

.vc-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.vc-item-name {
    font-size: 0.95em;
    color: #555;
}

/* Vistoria */
.vc-vistoria-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 20px rgba(0,0,0,0.08);
    padding: 30px;
}

.vc-vistoria-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #46b450;
}

.vc-vistoria-header h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.5em;
}

.vc-vistoria-info p {
    margin: 8px 0;
    color: #555;
}

.vc-itens-list h4 {
    color: #333;
    margin-bottom: 20px;
}

.vc-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid #e0e0e0;
    transition: all 0.3s;
}

.vc-item-row:hover {
    background: #e9ecef;
    border-left-color: #0073aa;
}

.vc-item-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.vc-item-title {
    font-weight: 600;
    color: #333;
}

.vc-item-category {
    font-size: 0.85em;
    color: #888;
}

.vc-item-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.vc-btn-ok, 
.vc-btn-problema {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    background: white;
    font-size: 0.9em;
}

.vc-btn-ok:hover,
.vc-btn-ok.active {
    background: #46b450;
    color: white;
    border-color: #46b450;
    box-shadow: 0 3px 10px rgba(70, 180, 80, 0.3);
}

.vc-btn-problema:hover,
.vc-btn-problema.active {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.3);
}

.vc-problema-desc {
    font-size: 0.8em;
    color: #dc3545;
    cursor: help;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Modal */
.vc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.vc-modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}

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

.vc-close {
    float: right;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    line-height: 1;
}

.vc-close:hover {
    color: #333;
}

.vc-modal-content h4 {
    margin: 0 0 15px 0;
    color: #333;
}

.vc-modal-content textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95em;
    resize: vertical;
    box-sizing: border-box;
}

.vc-modal-content textarea:focus {
    outline: none;
    border-color: #0073aa;
}

.vc-modal-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

/* Mensagens */
.vc-success {
    background: #d4edda;
    color: #155724;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    margin-bottom: 20px;
}

.vc-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
    margin-bottom: 20px;
}

.vc-warning {
    background: #fff3cd;
    color: #856404;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    margin-bottom: 20px;
}

.vc-message {
    margin-top: 20px;
}

.vc-no-results,
.vc-no-itens {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 1.1em;
}

/* Responsivo */
@media (max-width: 768px) {
    .vc-list-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .vc-form-wrapper {
        padding: 20px;
    }
    
    .vc-card-footer {
        flex-direction: column;
    }
    
    .vc-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    
    .vc-item-row {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .vc-item-actions {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .vc-form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .vc-vistoria-wrapper {
        padding: 15px;
    }
    
    .vc-modal-content {
        padding: 20px;
    }
}