/* Stanley Login - Modern Glassmorphism Design - Grey Theme */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
    --stanley-white: #f1f5f9;
    --stanley-accent: #64748b;
    --stanley-grey-light: #94a3b8;
    --stanley-grey-medium: #64748b;
    --stanley-grey-dark: #334155;
    --stanley-font-family: 'Barlow Condensed', system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, "Noto Sans";
    
    /* Font sizes - Desktop */
    --stanley-font-size-h1: 28px;
    --stanley-font-size-input: 16px;
    --stanley-font-size-label: 16px;
    --stanley-font-size-button: 17px;
    --stanley-font-size-message: 12px;
}

.stanley-login-form {
    width: min(92vw, 360px);
    padding: 28px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px) saturate(110%);
    -webkit-backdrop-filter: blur(4px) saturate(110%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    margin: 40px auto;
    font-family: var(--stanley-font-family);
    color: var(--stanley-white);
}

.stanley-login-form h1 {
    margin: 0 0 20px;
    font-weight: 700;
    font-size: var(--stanley-font-size-h1);
    text-align: center;
    letter-spacing: 0.2px;
    color: var(--stanley-white);
}

/* Input Container */
.stanley-input-container {
    position: relative;
    margin-bottom: 1rem;
}

.stanley-form-control {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 12px 2px 10px;
    color: var(--stanley-white);
    font-size: var(--stanley-font-size-input);
    font-family: var(--stanley-font-family);
    border-bottom: 1.5px solid rgba(148, 163, 184, 0.4);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Floating Label */
.stanley-floating-label {
    position: absolute;
    left: 2px;
    top: 12px;
    color: rgba(148, 163, 184, 0.6);
    font-size: var(--stanley-font-size-input);
    font-family: var(--stanley-font-family);
    transition: all 0.2s ease;
    pointer-events: none;
    transform-origin: left center;
}

.stanley-form-control::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

/* Label Animation - Focus and Filled States */
.stanley-form-control:focus + .stanley-floating-label,
.stanley-form-control:not(:placeholder-shown) + .stanley-floating-label {
    transform: translateY(-20px) scale(0.8);
    color: rgba(148, 163, 184, 0.8);
}

.stanley-form-control:focus {
    border-color: rgba(148, 163, 184, 0.8);
    box-shadow: 0 4px 20px rgba(100, 116, 139, 0.15);
}

.stanley-form-control:focus + .stanley-floating-label {
    color: rgba(148, 163, 184, 0.9);
}

.stanley-btn {
    width: 100%;
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px) saturate(110%);
    -webkit-backdrop-filter: blur(4px) saturate(110%);
    color: var(--stanley-white);
    font-weight: 500;
    font-size: var(--stanley-font-size-button);
    font-family: var(--stanley-font-family);
    cursor: pointer;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        0 1px 2px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    position: relative;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.stanley-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.stanley-btn:active {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(0, 0, 0, 0.3);
    transform: translateY(0px);
}

.stanley-message {
    text-align: center;
    font-size: var(--stanley-font-size-message);
    opacity: 0.75;
    margin-top: 10px;
    min-height: 1.2em;
    color: var(--stanley-grey-light);
}

/* Messages */
.stanley-success {
    position: relative;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    color: #1e293b;
    background-color: rgba(226, 232, 240, 0.9);
    border-color: rgba(148, 163, 184, 0.3);
}

.stanley-error {
    position: relative;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    color: #1e293b;
    background-color: rgba(203, 213, 225, 0.9);
    border-color: rgba(100, 116, 139, 0.3);
}

.stanley-loading {
    position: relative;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    color: #1e293b;
    background-color: rgba(241, 245, 249, 0.9);
    border-color: rgba(148, 163, 184, 0.2);
}

.stanley-logged-in {
    position: relative;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    color: #1e293b;
    background-color: rgba(226, 232, 240, 0.9);
    border-color: rgba(148, 163, 184, 0.3);
    text-align: center;
    max-width: 400px;
    margin: 40px auto;
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        /* Font sizes - Tablet */
        --stanley-font-size-h1: 24px;
        --stanley-font-size-input: 16px;
        --stanley-font-size-label: 16px;
        --stanley-font-size-button: 16px;
        --stanley-font-size-message: 12px;
    }
    
    .stanley-login-form {
        padding: 24px;
    }
}

@media (max-width: 576px) {
    :root {
        /* Font sizes - Mobile */
        --stanley-font-size-h1: 22px;
        --stanley-font-size-input: 16px;
        --stanley-font-size-label: 16px;
        --stanley-font-size-button: 16px;
        --stanley-font-size-message: 11px;
    }
    
    .stanley-login-form {
        margin: 20px auto;
        max-width: none;
        width: calc(100% - 2rem);
        padding: 20px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .stanley-form-control {
        color: #f1f5f9;
        border-bottom-color: rgba(148, 163, 184, 0.5);
    }
    
    .stanley-form-control:focus {
        border-color: rgba(148, 163, 184, 0.8);
        box-shadow: 0 4px 20px rgba(100, 116, 139, 0.2);
    }
    
    .stanley-form-control::placeholder {
        color: rgba(148, 163, 184, 0.6);
    }
    
    .stanley-floating-label {
        color: rgba(148, 163, 184, 0.6);
    }
    
    .stanley-form-control:focus + .stanley-floating-label,
    .stanley-form-control:not(:placeholder-shown) + .stanley-floating-label {
        color: rgba(148, 163, 184, 0.9);
    }
}