:root {
    --primary: #49abae;
    --primary-active: #409698;

    --main-bg: rgb(251, 251, 251);

    --primary-text: rgba(255, 255, 255, 0.9);

    --accent-light: #e4f7f7;
    --accent: #49abae;
    --accent-dark: #409698;
}

body {
    background-color: var(--main-bg);
    display: flex;
    flex-direction: column;
    gap: 50px;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    font-family: Arial, sans-serif;
    position: relative;

    /* -- Background patterns -- */
    /* graph paper pattern 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.4'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9zm-1 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3Cpath d='M6 5V0H5v5H0v1h5v94h1V6h94V5H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    */

    /* bricks wall pattern
    background-image: url("data:image/svg+xml,%3Csvg width='42' height='44' viewBox='0 0 42 44' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='Page-1' fill='none' fill-rule='evenodd'%3E%3Cg id='brick-wall' fill='%239C92AC' fill-opacity='0.4'%3E%3Cpath d='M0 0h42v44H0V0zm1 1h40v20H1V1zM0 23h20v20H0V23zm22 0h20v20H22V23z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    */
}

.container {
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 0.25rem;
    padding: 2rem;
    margin: 1rem 0;
    width: 100%;
    max-width: 24rem;
}
h1 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
    text-align: center;
    margin-bottom: 1.5rem;
}
form {
    display: grid;
    gap: 1rem;
}
.field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
}
input {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    font-size: 1rem;
    box-sizing: border-box;
}
input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5);
}

a {
    color: var(--accent);
    font-weight: 500;
}
a:hover {
    color: #1f2937
}

.password-input-wrapper {
    display: flex;
    position: relative;
}
.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    display: flex;
    align-items: center;
}
.password-toggle svg {
    height: 1.25rem;
    width: 1.25rem;
}
button[type="submit"] {
    width: 100%;
    background-color: var(--primary);
    color: var(--primary-text);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}
button[type="submit"]:hover {
    background-color: var(--primary-active);
}
button[type="submit"]:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5);
}

.messages-container:has(.message) {
    padding: 0.5rem 0;
}
.message {
    font-size: 0.875rem;
    opacity: 0.7;
}

.error-message {
    color: #a30b0b;
    font-weight: bold;
}

.collapsible-details {
    margin-top: 0.5rem; padding: 1rem; 
    border-radius: 0.5rem; 
}
.collapsible-summary {
    cursor: pointer; font-weight: 600; color: #374151; font-size: 0.875rem;
}
.collapsible-body {
    margin-top: 1rem; font-size: 0.875rem; color: #6b7280; line-height: 1.6;
}

.secondary-action {
    font-weight: bold;
    text-decoration: underline;
    margin-top:1rem   
}

.secondary-action.footer-link {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}
.secondary-action a {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;

    font-weight: bold;
    color: var(--accent);
    gap:0.25rem;
}
.secondary-action.footer-link a {
    justify-content: center;
}
.secondary-action a:hover {
    color: #374151;
    text-decoration: underline;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

@media (max-width: 800px) {
    body {
        padding: 0;
    }
    .container {
        max-width: 90vw;
        padding: 1rem;
        margin: 1.5rem auto;
        box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    }
    form {
        gap: 0.75rem;
    }
    .field {
        gap: 0.3rem;
    }
    input, button[type="submit"] {
        font-size: 1rem;
        padding: 0.7rem 0.8rem;
    }
    .password-toggle svg {
        width: 1.1rem;
        height: 1.1rem;
    }
}