:root {
    color-scheme: light;
    --primary: #93c4fd;
    --primary-hover: #60a5fa;
    --primary-light: #dbeafe;
    --secondary: #a5b4fc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border: rgba(147, 197, 253, 0.4);
    --border-focus: #93c5fd;
    --background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 50%, #f8fafc 100%);
    --surface: rgba(255, 255, 255, 0.8);
    --header-bg: rgba(147, 197, 253, 0.2);
    --success: #10b981;
    --success-bg: rgba(236, 253, 245, 0.8);
    --error: #ef4444;
    --error-bg: rgba(254, 242, 242, 0.8);
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    color: #1f2933;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 1rem;
}

.logo-link {
    position: absolute;
    top: 2rem;
    left: 2rem;
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.logo {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
}

.login-shell {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 460px;
}

.login-container {
    width: 100%;
    background: var(--surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 2px 4px -2px rgba(0, 0, 0, 0.025),
        0 20px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(to bottom, rgba(147, 197, 253, 0.2) 0%, rgba(147, 197, 253, 0.1) 60%, rgba(255, 255, 255, 0.9) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-primary);
    padding: 2.5rem 2.5rem 2rem;
    text-align: center;
}

.login-header h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.login-header p {
    margin: 0.5rem 0 0;
    opacity: 0.8;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.login-form {
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

input[type="email"],
input[type="password"] {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    font-family: inherit;
    color: var(--text-primary);
}

input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--border-focus);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.1);
}

input[type="email"]:hover,
input[type="password"]:hover {
    border-color: var(--primary-hover);
    background: rgba(255, 255, 255, 0.7);
}

input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.submit-button {
    width: 100%;
    border: 1px solid var(--border);
    background: rgba(147, 197, 253, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-primary);
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    margin-top: 2rem;
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.submit-button:hover {
    transform: translateY(-2px);
    background: rgba(147, 197, 253, 0.9);
    box-shadow:
        0 10px 25px -5px rgba(147, 197, 253, 0.3),
        0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.submit-button:hover::before {
    left: 100%;
}

.submit-button:active {
    transform: translateY(0);
    box-shadow: none;
}

.submit-button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    font-weight: 500;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.alert::before {
    content: '';
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.alert.error {
    background: var(--error-bg);
    color: #991b1b;
}

.alert.error::before {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ef4444'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 18L18 6M6 6l12 12'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

@media (max-width: 768px) {
    .logo-link {
        width: 64px;
        height: 64px;
    }

    .login-header,
    .login-form {
        padding: 2rem 1.5rem;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1.5rem 1rem;
    }

    .login-header,
    .login-form {
        padding: 1.5rem 1.25rem;
    }

    .login-container {
        border-radius: 16px;
    }
}
