/* apps/account.css
   Profilo account e form-card (anche pagine di affiliazione).
*/

/* Account Page Styles */
.account-page {
    padding: 2rem 0;
}

.account-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.account-header h2 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.account-section {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.account-section-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--light-bg);
}

.account-section-header h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin: 0;
}

.account-section-body {
    padding: 1.5rem;
}

.account-form-group {
    margin-bottom: 2rem;
}

.account-form-group label {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    display: block;
    font-size: 1rem;
}

.account-form-group .form-control {
    width: 100%;
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: var(--white);
}

.account-form-group .form-control:hover {
    border-color: #adb5bd;
}

.account-form-group .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
    outline: none;
}

.account-form-group select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

.account-form-group textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.account-section-body .row {
    margin: 0 -1rem;
}

.account-section-body .col-md-6 {
    padding: 0 1rem;
}

.account-section-body p {
    margin-bottom: 0;
}

.account-section-body .form-group {
    margin-bottom: 1.5rem;
}

.account-section-body label {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: block;
}

.account-section-body input[type="text"],
.account-section-body input[type="email"],
.account-section-body input[type="tel"],
.account-section-body input[type="date"],
.account-section-body select,
.account-section-body textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.account-section-body input[type="text"]:hover,
.account-section-body input[type="email"]:hover,
.account-section-body input[type="tel"]:hover,
.account-section-body input[type="date"]:hover,
.account-section-body select:hover,
.account-section-body textarea:hover {
    border-color: #adb5bd;
}

.account-section-body input[type="text"]:focus,
.account-section-body input[type="email"]:focus,
.account-section-body input[type="tel"]:focus,
.account-section-body input[type="date"]:focus,
.account-section-body select:focus,
.account-section-body textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
    outline: none;
}

.account-section-body select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

.account-section-body textarea {
    min-height: 120px;
    resize: vertical;
}

.account-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.account-actions-left {
    display: flex;
    gap: 1rem;
}

.account-actions-right {
    display: flex;
    gap: 1rem;
}

/* Su schermi stretti i bottoni vanno a capo e occupano tutta la riga:
   in nowrap "Aggiorna Dati" finiva fuori schermo, tagliato dal body. */
@media (max-width: 768px) {
    .account-actions {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 0.75rem;
    }

    .account-actions-left,
    .account-actions-right {
        flex-direction: column;
        gap: 0.75rem;
    }

    .account-actions .btn {
        width: 100%;
        min-width: 0;
    }
}

.account-actions .btn,
.form-card .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
    min-width: 160px;
    color: white;
}

.account-actions .btn i,
.form-card .btn i {
    margin-right: 0.75rem;
    font-size: 1rem;
}

.account-actions .btn-secondary,
.form-card .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.account-actions .btn-secondary:hover,
.form-card .btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
    color: white;
}

.account-actions .btn-success,
.form-card .btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.account-actions .btn-success:hover,
.form-card .btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
    color: white;
}

.account-alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.account-alert.alert-info {
    background-color: var(--info-bg);
    color: var(--info-color);
}

.account-alert.alert-danger {
    background-color: var(--danger-bg);
    color: var(--danger-color);
}

.account-alert.alert-success {
    background-color: var(--success-bg);
    color: var(--success-color);
}

.account-errorlist {
    color: var(--danger-color);
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
}

.account-errorlist li {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}
