/* Gmail-style Login CSS */

:root {
    --google-blue: #1a73e8;
    --google-blue-hover: #1557b0;
    --google-blue-light: #e8f0fe;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-link: #1a73e8;
    --border-color: #dadce0;
    --border-focus: #1a73e8;
    --error-color: #d93025;
    --bg-page: #f8f9fa;
    --bg-card: #ffffff;
    --shadow-card: 0 1px 3px 0 rgba(60, 64, 67, .15), 0 4px 8px 3px rgba(60, 64, 67, .05);
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Google Sans', 'Roboto', -apple-system, sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}

/* Container */
.login-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    min-height: 100vh;
}

/* Card */
.login-card {
    width: 100%;
    max-width: 450px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 48px 40px 36px;
    box-shadow: var(--shadow-card);
}

@media (max-width: 450px) {
    .login-card {
        border: none;
        box-shadow: none;
        padding: 24px 24px 36px;
    }

    .login-container {
        background: var(--bg-card);
    }
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 24px;
}

.logo {
    width: 75px;
    height: 24px;
    margin-bottom: 16px;
}

.logo-section h1 {
    font-size: 24px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Form */
.login-form {
    margin-top: 24px;
}

.form-step {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Floating Label Input */
.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    height: 56px;
    padding: 16px 16px 0;
    font-size: 16px;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    outline: none;
    background: transparent;
    transition: border-color 0.2s;
}

.input-wrapper input:focus {
    border-color: var(--border-focus);
    border-width: 2px;
    padding: 15px 15px 0;
}

.input-wrapper label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.2s;
    background: var(--bg-card);
    padding: 0 4px;
}

.input-wrapper input:focus+label,
.input-wrapper input:not(:placeholder-shown)+label {
    top: 0;
    font-size: 12px;
    color: var(--border-focus);
}

.input-wrapper input:not(:focus):not(:placeholder-shown)+label {
    color: var(--text-secondary);
}

.helper-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
    padding-left: 16px;
}

/* User Chip */
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 4px 4px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 24px;
    cursor: pointer;
    transition: background 0.2s;
}

.user-chip:hover {
    background: var(--google-blue-light);
}

.user-chip svg {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
}

.change-user {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
}

.change-user svg {
    width: 20px;
    height: 20px;
}

/* Show Password Checkbox */
.show-password {
    margin: 16px 0 24px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--google-blue);
    cursor: pointer;
}

/* Links */
.forgot-link {
    margin: 8px 0 24px;
}

.forgot-link a,
.form-actions a {
    color: var(--text-link);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.forgot-link a:hover,
.form-actions a:hover {
    text-decoration: underline;
}

/* Guest Mode */
.guest-mode {
    background: var(--bg-page);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 32px;
    font-size: 14px;
    color: var(--text-secondary);
}

.guest-mode p {
    margin-bottom: 8px;
}

.guest-mode a {
    color: var(--text-link);
    text-decoration: none;
}

.guest-mode a:hover {
    text-decoration: underline;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
}

.btn-primary {
    min-width: 90px;
    height: 36px;
    padding: 0 24px;
    background: var(--google-blue);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    background: var(--google-blue-hover);
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-text {
    color: var(--text-link);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-text:hover {
    background: var(--google-blue-light);
    text-decoration: none;
}

/* Error Message */
.error-message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--error-color);
    font-size: 12px;
    margin: 16px 0;
    animation: shake 0.3s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

.error-message svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    animation: spin 0.8s linear infinite;
}

.spinner circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-dasharray: 50;
    stroke-dashoffset: 20;
    stroke-linecap: round;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Language Selector */
.language-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 40px;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.language-selector:hover {
    background: rgba(0, 0, 0, 0.05);
}

.language-selector svg {
    width: 20px;
    height: 20px;
}

/* Footer */
.page-footer {
    display: flex;
    gap: 24px;
    margin-top: 16px;
}

.page-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
}

.page-footer a:hover {
    color: var(--text-primary);
}