/* Path/File: hostgate-access/assets/css/hostgate-front.css */

:root {
    --hg-primary: #1e3a8a;
    --hg-primary-hover: #1d4ed8;
    --hg-danger: #dc2626;
    --hg-danger-hover: #b91c1c;
    --hg-bg-card: #ffffff;
    --hg-text: #1f2937;
    --hg-text-muted: #6b7280;
    --hg-border: #e5e7eb;
    --hg-radius: 12px;
    --hg-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

.hg-auth-container {
    width: 100%;
    max-width: 580px;
    margin: 2rem auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.hg-auth-card {
    background: var(--hg-bg-card);
    border: 1px solid var(--hg-border);
    border-radius: var(--hg-radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--hg-shadow);
    margin-bottom: 1.5rem;
}

.hg-auth-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--hg-text);
    text-align: center;
}

.hg-auth-subtitle {
    font-size: 0.9rem;
    color: var(--hg-text-muted);
    text-align: center;
    margin-bottom: 1.5rem;
}

.hg-auth-notice {
    text-align: center;
    font-size: 1rem;
    color: var(--hg-text);
    margin: 0;
}

.hg-form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
}

.hg-form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--hg-text);
}

.hg-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--hg-border);
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hg-input:focus {
    outline: none;
    border-color: var(--hg-primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
}

/* Gestione Campo Password con Pulsante Mostra/Nascondi allineato */
.hg-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.hg-password-wrapper .hg-input {
    padding-right: 45px;
    width: 100%;
    box-sizing: border-box;
}

.hg-toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: var(--hg-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.hg-toggle-password svg {
    pointer-events: none;
    width: 20px;
    height: 20px;
}

.hg-toggle-password:hover {
    color: var(--hg-primary);
}

.hg-form-row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}

.hg-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.hg-auth-link {
    color: var(--hg-primary);
    text-decoration: none;
    font-weight: 500;
}

.hg-auth-link:hover {
    text-decoration: underline;
}

.hg-form-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) {
    .hg-grid-2 { grid-template-columns: repeat(2, 1fr); }
    .hg-grid-3 { grid-template-columns: 2fr 1fr 2fr; }
}

.hg-auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 2rem 0 1.5rem 0;
}

.hg-auth-divider::before, .hg-auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--hg-border);
}

.hg-auth-divider span {
    padding: 0 0.75rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hg-text-muted);
    font-weight: 600;
}

.hg-optional-box {
    margin: 1.25rem 0;
    padding: 0.85rem 1rem;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
}

.hg-optional-box summary {
    font-weight: 600;
    color: #0369a1;
    cursor: pointer;
    font-size: 0.9rem;
}

.hg-optional-fields {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #bae6fd;
}

.hg-btn {
    width: 100%;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-sizing: border-box;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.hg-btn-primary {
    background-color: var(--hg-primary);
    color: #ffffff;
}

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

.hg-btn-secondary {
    background-color: #f3f4f6;
    color: var(--hg-text);
    border: 1px solid var(--hg-border);
}

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

.hg-btn-danger {
    background-color: var(--hg-danger);
    color: #ffffff;
}

.hg-btn-danger:hover {
    background-color: var(--hg-danger-hover);
}

.hg-logout-wrapper {
    margin-top: 1.5rem;
}

.hg-auth-alert {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.hg-alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.hg-alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.hg-alert-info {
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}