/**
 * =====================================================
 * SISTEMA DE CONTRATOS DIGITAIS
 * Estilos CSS
 * =====================================================
 */

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* Container principal */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    padding: 30px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 5px;
}

header p {
    opacity: 0.9;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.card h2 {
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

/* Formulários */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 0.85rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Botões */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.85rem;
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* Alertas */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Link Box */
.link-box {
    background: #e8f4fd;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.link-box label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.link-box input {
    width: 100%;
    padding: 12px;
    border: 2px solid #667eea;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

/* Tabela */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e5eb;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.table tr:hover {
    background: #f8f9fa;
}

/* Status badges */
.status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pendente {
    background: #fff3cd;
    color: #856404;
}

.status-parcial {
    background: #cce5ff;
    color: #004085;
}

.status-finalizado {
    background: #d4edda;
    color: #155724;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 10px;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.info-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.info-item strong {
    display: block;
    margin-bottom: 5px;
    color: #555;
}

/* PDF Viewer */
.pdf-viewer {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.pdf-viewer iframe {
    display: block;
}

/* Canvas de Assinatura */
.canvas-container {
    border: 2px dashed #667eea;
    border-radius: 8px;
    padding: 10px;
    background: #fafafa;
    margin-bottom: 10px;
}

#canvasAssinatura {
    display: block;
    margin: 0 auto;
    background: white;
    border-radius: 5px;
    cursor: crosshair;
    max-width: 100%;
    touch-action: none;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-label input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
}

/* Assinaturas Lista */
.assinaturas-lista {
    display: grid;
    gap: 20px;
}

.assinatura-item {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.assinatura-info {
    margin-bottom: 5px;
}

.assinatura-data {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.assinatura-img img {
    background: white;
    padding: 10px;
    border-radius: 5px;
}

/* Utilitários */
.text-center {
    text-align: center;
}

.text-muted {
    color: #888;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 0.9rem;
}

/* Responsivo */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 15px;
    }
    
    .btn-large {
        width: 100%;
    }
}
