/* Stili condivisi per le pagine di login e callback Qlik Cloud */

/* Stili generali */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Container principali */
.login-container,
.callback-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    width: 100%;
    overflow: hidden;
}

.login-container {
    max-width: 360px;
    padding: 0;
    text-align: center;
}

.callback-container {
    max-width: 600px;
}

/* Header */
.header {
    background-color: #1a365d;
    color: white;
    padding: 12px 24px;
    position: relative;
    text-align: center;
}

.header h2 {
    margin: 0;
    font-weight: 500;
    font-size: 1.45rem;
}

.login-header {
    background-color: #1a365d;
    color: white;
    text-align: center;
    padding: 16px 0;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.login-header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 500;
}

/* Contenuto principale */
.content {
    padding: 24px;
}

.login-content {
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Box messaggi */
.message-box {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #f9f9f9;
    font-size: 15px;
    line-height: 1.6;
}

/* Spinner e stato di caricamento */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.spinner,
.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #1a73e8;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Status message */
.status-message {
    font-size: 15px;
    color: #333;
    margin-top: 20px;
}

/* Pulsanti */
.buttons-container {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.btn,
.login-button {
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    border: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-secondary {
    background-color: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background-color: #d0d0d0;
}

.btn-primary,
.login-button {
    background-color: #1a73e8;
    color: white;
}

.btn-primary:hover,
.login-button:hover {
    background-color: #1557b0;
}

.login-button {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
}

/* Messaggi di errore */
.error-container,
#error-message {
    padding: 20px;
    color: #d32f2f;
    background-color: #ffebee;
    border-radius: 8px;
    margin: 10px 0 20px 0;
}

.error-container {
    display: none;
}

#error-message {
    text-align: center;
}

/* Messaggi di successo */
.success-message {
    color: #009845;
}

/* Messaggi di errore */
.error-message {
    color: red;
}