/* BravoKey – Stili form login e messaggi varco */

body .bk-login-form-wrapper,
body .bk-gate-message {
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body .bk-login-form-wrapper {
    max-width: 420px !important;
    width: 100% !important;
    margin: 1rem auto !important;
    padding: 1.5rem !important;
    font-size: 16px !important;
    background: #fff !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.bk-title {
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.bk-subtitle {
    color: #555;
    margin-bottom: 1.5rem;
    font-size: clamp(0.875rem, 3vw, 1rem);
    line-height: 1.5;
}

.bk-error {
    background: #fee;
    color: #c00;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    border-left: 4px solid #c00;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.bk-login-form .bk-field {
    margin-bottom: 1.25rem;
}

.bk-login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9375rem;
    color: #333;
}

body .bk-login-form input[type="email"],
body .bk-login-form input[type="password"] {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    border: 2px solid #ddd !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    font-size: 1rem !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.bk-login-form input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.bk-submit {
    margin-top: 1.75rem;
}

body .bk-btn {
    width: 100% !important;
    padding: 0.875rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    background: #0073aa !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: background-color 0.2s, transform 0.1s !important;
    -webkit-tap-highlight-color: transparent !important;
}

.bk-btn:hover {
    background: #005a87;
}

.bk-btn:active {
    transform: scale(0.98);
}

body .bk-gate-message {
    max-width: 520px !important;
    width: 100% !important;
    margin: 1rem auto !important;
    padding: 2rem 1.5rem !important;
    text-align: center !important;
    background: #fff !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.bk-gate-message h1 {
    font-size: clamp(1.25rem, 5vw, 1.75rem);
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.bk-gate-message p {
    font-size: clamp(0.9375rem, 3vw, 1.0625rem);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.bk-gate-message.success {
    color: #0a0;
}

.bk-gate-message.success h1 {
    color: #0a0;
}

.bk-gate-message.error {
    color: #c00;
}

.bk-gate-message.error h1 {
    color: #c00;
}

.bk-gate-message a {
    color: inherit;
    text-decoration: underline;
}

.bk-gate-message a:hover {
    text-decoration: none;
}

@media screen and (max-width: 480px) {
    .bk-login-form-wrapper {
        padding: 1.25rem 1rem;
        margin: 0.5rem auto;
    }

    .bk-gate-message {
        padding: 1.5rem 1rem;
        margin: 0.5rem auto;
    }

    .bk-login-form input[type="email"],
    .bk-login-form input[type="password"] {
        padding: 0.875rem 0.875rem;
        font-size: 16px;
    }

    .bk-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .bk-error {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }
}

@media screen and (min-width: 481px) and (max-width: 768px) {
    .bk-login-form-wrapper {
        max-width: 480px;
        padding: 2rem 1.75rem;
    }

    .bk-gate-message {
        max-width: 600px;
        padding: 2.5rem 2rem;
    }
}

@media screen and (min-width: 769px) {
    .bk-login-form-wrapper {
        padding: 2.5rem;
    }

    .bk-gate-message {
        padding: 3rem 2.5rem;
    }
}

@media (prefers-color-scheme: dark) {
    .bk-login-form-wrapper {
        color: #e0e0e0;
    }

    .bk-subtitle {
        color: #aaa;
    }

    .bk-login-form label {
        color: #e0e0e0;
    }

    .bk-login-form input[type="email"],
    .bk-login-form input[type="password"] {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }

    .bk-login-form input:focus {
        border-color: #0073aa;
        background: #2a2a2a;
    }

    .bk-error {
        background: #3a1f1f;
        border-left-color: #f44;
    }
}
