/* Inlogpagina's: inloggen, tweestapsverificatie, herstelcodes en uitloggen.
   Een eigen bestand i.p.v. een <style>-blok per pagina, zodat de
   Content-Security-Policy strak kan blijven en de pagina's gelijk ogen. */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1B4D3E 0%, #2d6a4f 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
}

.login-container.breed { max-width: 460px; }

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    width: 80px;
    height: auto;
    margin-bottom: 15px;
}

.login-header h1 {
    color: #1B4D3E;
    font-size: 24px;
    font-weight: 600;
}

.login-header p {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
    line-height: 1.5;
}

.flash-messages {
    margin-bottom: 20px;
}

.flash-message {
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 10px;
}

.flash-message.error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.flash-message.info {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #1B4D3E;
    box-shadow: 0 0 0 3px rgba(27, 77, 62, 0.1);
}

.form-group input.code-input {
    font-size: 22px;
    letter-spacing: 4px;
    text-align: center;
}

.login-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: #1B4D3E;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.login-btn:hover {
    background: #2d6a4f;
}

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

.login-link {
    display: block;
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: #1B4D3E;
}

.login-footer {
    margin-top: 25px;
    text-align: center;
    color: #999;
    font-size: 12px;
}

/* --- Tweestapsverificatie -------------------------------------------------- */
.login-steps {
    margin: 0 0 18px 18px;
    font-size: 14px;
    line-height: 1.6;
    color: #444;
}
.login-steps li { margin-bottom: 4px; }

.qr {
    display: flex;
    justify-content: center;
    margin: 4px 0 12px;
}
.qr svg {
    width: 196px;
    height: 196px;
}

.secret {
    margin-bottom: 20px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f4f7f2;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-align: center;
    /* Alleen tussen de groepjes van vier afbreken: een losse letter op de
       volgende regel leest bij het overtypen als een extra groep. */
    word-break: normal;
    overflow-wrap: break-word;
}
.secret small {
    display: block;
    margin-bottom: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 11.5px;
    letter-spacing: 0;
    color: #666;
}

.hint {
    margin: -8px 0 18px;
    font-size: 12.5px;
    line-height: 1.5;
    color: #666;
}

.codes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 0 20px;
}
.codes code {
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f4f7f2;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 15px;
    text-align: center;
}

@media (max-width: 420px) {
    .login-container { padding: 28px 22px; }
}
