/* Shared auth page styles (login + signup) */

@font-face {
    font-family: 'TeX Gyre Heros';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/tex-gyre-heros-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'TeX Gyre Heros';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/tex-gyre-heros-bold.woff2') format('woff2');
}
@font-face {
    font-family: 'Chakra Petch';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/chakra-petch-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Chakra Petch';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/chakra-petch-medium.woff2') format('woff2');
}
@font-face {
    font-family: 'Chakra Petch';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/chakra-petch-semibold.woff2') format('woff2');
}
@font-face {
    font-family: 'Chakra Petch';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/chakra-petch-bold.woff2') format('woff2');
}

:focus-visible {
    outline: 2px solid var(--accent, #E8451A);
    outline-offset: 2px;
    border-radius: 2px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    background: var(--accent, #E8451A);
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    z-index: 9999;
    transition: top 0.2s;
    text-decoration: none;
    font-family: 'TeX Gyre Heros', Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
}

.skip-link:focus {
    top: 16px;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

a { font-family: 'Chakra Petch', sans-serif; transition: font-style 0.15s ease; }
a:hover { font-style: italic; }
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-tertiary: #1e1e1e;
    --text-primary: #f0f0f0;
    --text-secondary: #888;
    --accent: #E8451A;
    --accent-hover: #F05A30;
    --border: #252525;
    --error: #ef4444;
    --success: #22c55e;
}

body {
    font-family: 'TeX Gyre Heros', Helvetica, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

h1, .logo-text {
    font-family: 'TeX Gyre Heros', Helvetica, Arial, sans-serif;
}

.back-nav {
    display: flex;
    gap: 20px;
    margin-bottom: 48px;
    font-size: 14px;
}

.back-nav a {
    color: var(--text-secondary);
    text-decoration: none;
}

.back-nav a:hover {
    color: var(--text-primary);
}

.auth-container {
    width: 100%;
    max-width: 440px;
    padding: 0 24px;
}

.auth-card {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 48px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.logo-icon svg {
    fill: none;
    stroke: currentColor;
}

.logo-text {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: left;
    line-height: 1.2;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 40px;
    text-align: left;
    line-height: 1.6;
}

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

.form-group label {
    display: none;
}

.form-group input {
    width: 100%;
    padding: 12px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    color: var(--text-primary);
    font-family: 'Chakra Petch', sans-serif;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-bottom-color: var(--text-primary);
}

.form-group input::placeholder {
    color: #444;
}

.btn {
    width: 100%;
    padding: 14px 0;
    margin-top: 4px;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--text-secondary);
    border-radius: 0;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn:hover {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--text-primary);
}

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

.error-message {
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: none;
    border-bottom: 1px solid var(--error);
    border-radius: 0;
    color: var(--error);
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

.error-message.visible {
    display: block;
}

.links {
    margin-top: 32px;
    text-align: left;
    font-size: 14px;
    color: var(--text-secondary);
}

.links a {
    color: var(--text-primary);
    text-decoration: none;
}

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

/* SSO buttons */
.sso-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.sso-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 0;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-family: 'Chakra Petch', sans-serif;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.sso-btn:hover {
    border-color: var(--text-primary);
    background: var(--bg-secondary);
}

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

.sso-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sso-btn-google .sso-icon { fill: none; }
.sso-btn-github .sso-icon { fill: currentColor; }
.sso-btn-microsoft .sso-icon { fill: none; }

/* "or" divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
}

/* Email toggle link */
.email-toggle {
    display: block;
    text-align: center;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 24px;
}

.email-toggle:hover {
    color: var(--text-primary);
}

/* Collapsed email form */
.email-form-collapsed {
    display: none;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .auth-container { padding: 32px 20px; }
    .auth-card { padding: 32px 24px; }
    .form-input,
    .form-group input { font-size: 16px; }
    .sso-btn { padding: 14px 16px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
