@font-face {
    font-family: 'Roboto';
    src: url('roboto-italic-variablefont_wdthwght-webfont.woff2') format('woff2'),
         url('roboto-italic-variablefont_wdthwght-webfont.woff') format('woff');
    font-weight: normal;
    font-style: italic;

}

@font-face {
    font-family: 'Roboto';
    src: url('/assets/static/roboto-variablefont_wdthwght-webfont.woff2') format('woff2'),
         url('/assets/static/roboto-variablefont_wdthwght-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}



/* MIRA Auth Pages - Dark Theme with Bold Colors */
/* Matching the chat interface aesthetic: nearly black with bold colors */

:root {
    /* Colors matching main style.css */
    --accent-green: #00ff2d;
    --accent-magenta: #ff00ff;
    --accent-yellow: #ffff00;
    --transition: 0.2s ease;
    --border-radius: 8px;
    --input-padding: 16px;
    
    /* Dark theme colors */
    --bg: #0b0e11;
    --text: #c2c9cb;
    --surface: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.2);
    --icon-filter: invert(0);
}

/* Computed variants using color-mix */
:root {
    --text-secondary: color-mix(in srgb, var(--text) 80%, transparent);
    --text-muted: color-mix(in srgb, var(--text) 60%, transparent);
    --text-faint: color-mix(in srgb, var(--text) 40%, transparent);
    --text-disabled: color-mix(in srgb, var(--text) 20%, transparent);
    --surface-hover: color-mix(in srgb, var(--surface) 200%, transparent);
    --surface-active: color-mix(in srgb, var(--surface) 400%, transparent);
    --border-strong: color-mix(in srgb, var(--border) 250%, transparent);
    --border-weak: color-mix(in srgb, var(--border) 50%, transparent);
    --highlight: color-mix(in srgb, var(--accent-yellow) 30%, transparent);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Roboto', 'Segoe UI', 'Helvetica', 'Arial', sans-serif;
    font-weight: 100;
    min-height: 100vh;
    transition: background-color var(--transition), color var(--transition);
}

/* Auth Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--input-padding);
    text-align: center;
}

.auth-header {
    margin-bottom: 2rem;
    position: relative;
    width: 100%;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 64px;
    height: 64px;
    filter: var(--icon-filter);
}

.auth-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.back-link {
    position: absolute;
    left: 0;
    top: 0;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition);
}

.back-link:hover {
    color: var(--text);
}

.auth-main {
    width: 100%;
    max-width: 350px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Input styling matching main interface */
.form-group input {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: var(--input-padding);
    color: var(--text);
    font-size: 1rem;
    transition: border-color var(--transition), background-color var(--transition);
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    background: var(--bg);
    border-color: var(--border-strong);
    box-shadow: 0 0 0 2px var(--border-weak);
}

.form-group input::placeholder {
    color: var(--text-faint);
}

.form-help {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Button styling with bold accent colors */
.btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    text-decoration: none;
    display: inline-block;
    color: var(--text);
    font-family: inherit;
}

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

.btn-primary {
    background: var(--accent-green);
    color: var(--bg);
    border-color: var(--accent-green);
    font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
    background: color-mix(in srgb, var(--accent-green) 85%, white);
    box-shadow: 0 0 8px 2px rgba(0, 255, 45, 0.4);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: var(--accent-magenta);
    color: var(--bg);
    border-color: var(--accent-magenta);
    font-weight: 600;
}

.btn-secondary:hover:not(:disabled) {
    background: color-mix(in srgb, var(--accent-magenta) 85%, white);
    box-shadow: 0 0 8px 2px rgba(255, 0, 255, 0.4);
    transform: translateY(-1px);
}

.btn-full {
    width: 100%;
}

.auth-links {
    text-align: center;
    margin-top: 2rem;
}

.auth-links p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-links a {
    color: var(--accent-green);
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
    color: color-mix(in srgb, var(--accent-green) 85%, white);
}

/* Dev section using highlight background */
.dev-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--highlight);
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
}

.dev-section h3 {
    color: var(--accent-yellow);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.dev-note {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.divider {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 1.5rem 0;
}

/* Status messages with bold accent colors */
.status-message {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.status-message.success {
    background: rgba(0, 255, 45, 0.1);
    border: 1px solid rgba(0, 255, 45, 0.3);
    color: var(--accent-green);
}

.status-message.success small {
    opacity: 0.8;
    font-size: 0.85em;
}

.status-message.error {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff4444;
}

.status-message.error a {
    color: #ff4444;
    text-decoration: underline;
    font-weight: 600;
}

.status-message.error a:hover {
    color: #ff6666;
}

.status-message.info {
    background: var(--highlight);
    border: 1px solid var(--border);
    color: var(--accent-yellow);
}

/* Manual Token Entry Section */
.manual-token-section {
    margin-top: 1.5rem;
}

.manual-token-section #toggle-manual-token {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.5rem 0;
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: color var(--transition);
    font-family: inherit;
}

.manual-token-section #toggle-manual-token:hover {
    color: var(--text-secondary);
}

.manual-token-section .toggle-icon {
    font-size: 0.7rem;
    transition: transform var(--transition);
}

.manual-token-section .manual-token-wrapper {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-weak);
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.manual-token-section .manual-token-wrapper .auth-form {
    margin-top: 0;
}

.manual-token-section #manual-token {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

/* WebAuthn section (hidden for now) */
.webauthn-section {
    margin-top: 2rem;
}

.webauthn-section h3 {
    color: var(--accent-green);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    body {
        padding: 1rem;
    }
    
    .auth-container {
        padding: 1rem;
    }
    
    .auth-header {
        margin-bottom: 1.5rem;
    }
    
    .back-link {
        position: static;
        display: inline-block;
        margin-bottom: 1rem;
    }
    
    .logo {
        width: 48px;
        height: 48px;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
}

/* Light theme support (in case it's needed) */
[data-theme="light"] {
    --bg: #f6f7f8;
    --text: #1a1b1c;
    --surface: rgba(0, 0, 0, 0.05);
    --border: rgba(0, 0, 0, 0.2);
    --icon-filter: invert(0);
}

/* Auto-authentication status */
.auto-auth-status {
    text-align: center;
    padding: 2rem;
    margin-bottom: 2rem;
}

.auto-auth-status p {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auto-auth-status p.success {
    color: var(--accent-green);
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--surface);
    border-top: 3px solid var(--accent-magenta);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}