/* Portale Clienti - Public Styles */
:root {
    --primary-color: #2C5F2D;
    --secondary-color: #97BC62;
    --accent-color: #FFB627;
    --text-color: #1a1a1a;
    --bg-color: #f5f5f5;
    --border-color: #e0e0e0;
}

.portale-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    font-family: 'Work Sans', sans-serif;
}

.portale-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.portale-logo h1 {
    margin: 0;
    color: var(--primary-color);
    font-size: 24px;
}

.portale-user-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
}

.logout-btn {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.portale-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.tab-btn:hover {
    border-color: var(--primary-color);
    background: var(--bg-color);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tab-content {
    display: none;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 14px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.document-card {
    padding: 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.document-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.document-card .doc-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 10px;
}

.document-card h3 {
    margin: 10px 0;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: bold;
}

.document-card .doc-filename {
    font-size: 13px;
    color: #333;
    margin: 5px 0;
    word-break: break-word;
}

.document-card .doc-status {
    margin: 10px 0;
    padding: 5px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.document-card .doc-date {
    font-size: 12px;
    color: #666;
    margin: 5px 0;
}

.document-card .doc-admin-notes {
    background: #fff3cd;
    padding: 8px;
    border-radius: 4px;
    font-size: 12px;
    margin: 10px 0;
}

.document-card .doc-actions {
    margin-top: auto;
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.btn-danger:hover {
    background: #c82333;
}

/* Documents to sign specific styles */
.document-card.to-sign {
    border-left: 4px solid #f0ad4e;
}

.doc-instructions {
    background: #fff3cd;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    font-size: 13px;
    border-left: 3px solid #f0ad4e;
}

.doc-workflow {
    display: flex;
    justify-content: space-around;
    margin: 15px 0;
    padding: 10px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.workflow-step {
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    color: #666;
}

.upload-hint {
    background: #e7f3ff;
    padding: 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-top: 10px;
    border-left: 3px solid #0073aa;
}

.upload-hint strong {
    color: #0073aa;
}

.no-documents-message {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

.no-documents-message p {
    margin: 10px 0;
    color: #666;
}

.no-documents-message strong {
    color: #2C5F2D;
}

.tab-description {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #0073aa;
    margin-bottom: 20px;
    font-size: 14px;
}

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    text-decoration: none;
    transition: transform 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 50px auto;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    border-radius: 10px;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

@media (max-width: 768px) {
    .portale-wrapper {
        padding: 10px;
    }
    
    .portale-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .portale-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
    }
}
