﻿:root {
    /* Map legacy fallbacks to the dark glass theme tokens when available */
    --primary: var(--c1, #55B0B0);
    --primary-dark: var(--c2, #1C5858);
    --text-main: var(--text, #E8F1F1);
    --text-secondary: rgba(232,241,241,0.72);
    --bg-card: rgba(255,255,255,0.04);
    --border: rgba(255,255,255,0.08);
    --radius: 18px;
    --shadow-sm: 0 8px 28px rgba(0,0,0,0.6);
}

/* Page background (theme provides base colors) */
body {
    background: radial-gradient(circle at top left, #0b141a 0, var(--bg-900, #05080C) 55%, #020406 100%);
    color: var(--text-main);
    font-family: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
}

/* Language selector basic */
.app-header .app-header-actions select#langSelect,
.lang-selector-select,
select#langSelect {
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    color: var(--text-main);
    font-size: 0.95rem;
    min-width: 110px;
}

/* Card wrapper */
.qr-page-container {
    max-width: 980px;
    margin: 16px auto;
    padding: 0 16px;
}

.qr-card {
    width: 100%;
    max-width: 520px;
    margin: 40px auto;
    padding: 22px;
    border-radius: var(--radius);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    color: var(--text-main);
    transition: transform 260ms ease, box-shadow 260ms ease;
}

    .qr-card:hover {
        transform: translateY(-6px);
    }

    /* Inline branding row inserted at top of card (first child of .qr-card) */
    .qr-card > div:first-child {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 12px;
    }

        /* Branding group on the left */
        .qr-card > div:first-child > div {
            display: flex;
            align-items: center;
            gap: 12px;
        }

/* Logo */
.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: contain;
    border: none;
    box-shadow: 0 6px 18px rgba(85,176,176,0.06);
    background: linear-gradient(135deg, rgba(85,176,176,0.12), rgba(28,88,88,0.06));
}

/* Slightly larger app name next to logo */
.app-logo-text {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text-main);
    letter-spacing: 0.01em;
}

/* Language selector inside card (right side) */
.qr-card > div:first-child select#langSelect,
.qr-card > div:first-child .lang-selector-select {
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
    min-width: 120px;
    font-size: 0.95rem;
    color: var(--text-main);
}

/* Titles */
.qr-title {
    font-size: 1.35rem;
    color: var(--text-main);
    margin: 0 0 8px 0;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.qr-subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Form structure */
.qr-form {
    margin-top: 8px;
}

.qr-form-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
    margin-bottom: 12px;
}

.qr-input-wrapper {
    flex: 1 1 100%;
    min-width: 0;
}

/* Labels & inputs */
.qr-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text-main);
    background: rgba(255,255,255,0.02);
    box-sizing: border-box;
    transition: border-color .12s, box-shadow .12s, transform .06s;
    backdrop-filter: blur(6px);
}

    .form-control::placeholder {
        color: rgba(232,241,241,0.36);
        opacity: 1;
    }

    .form-control:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 6px 18px rgba(85,176,176,0.12);
        transform: translateY(-1px);
    }

/* Primary action - legacy class kept for compatibility */
.btn-modern-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.04));
    color: var(--primary);
    border: 1px solid rgba(255,255,255,0.12);
    font-weight: 700;
    cursor: pointer;
    transition: transform .08s var(--ease), background .12s var(--ease), box-shadow .12s var(--ease);
    box-shadow: 0 6px 18px rgba(85,176,176,0.12);
}

    .btn-modern-primary:hover,
    .btn-modern-primary:focus {
        transform: translateY(-2px);
        box-shadow: 0 10px 24px rgba(85,176,176,0.18);
    }

/* New glass button variants to match the app theme */
.glass-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    font-weight: 600;
    font-size: 14px;
    border-radius: 16px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.16);
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.03) 40%, rgba(255,255,255,0.02) 100%);
    color: var(--primary);
    backdrop-filter: blur(12px);
    box-shadow: inset 0 0 8px rgba(255,255,255,0.02), 0 0 16px rgba(85,176,176,0.16);
    transition: transform 260ms var(--ease), box-shadow 260ms var(--ease);
}

    .glass-action-btn:hover {
        transform: translateY(-2px);
        box-shadow: inset 0 0 14px rgba(255,255,255,0.04), 0 0 28px rgba(85,176,176,0.28);
    }

/* Small secondary glass button */
.glass-btn {
    padding: 8px 14px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--primary);
    cursor: pointer;
    transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
}

    .glass-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 20px rgba(85,176,176,0.12);
    }

/* Secondary link */
.forgot-password-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.95rem;
}

    .forgot-password-link:hover {
        text-decoration: underline;
    }

/* Error */
.login-error {
    color: #f87171;
    margin-top: 8px;
    display: none;
    font-size: 0.95rem;
}

/* Accessibility */
.btn-modern-primary:focus,
select#langSelect:focus,
.form-control:focus,
.glass-action-btn:focus {
    outline-offset: 2px;
    outline: 3px solid rgba(85,176,176,0.08);
}

/* Responsive adjustments */
@media (max-width: 720px) {
    .qr-card {
        margin: 24px 16px;
        padding: 18px;
    }

    .qr-title {
        font-size: 1.25rem;
    }

    .user-avatar {
        width: 64px;
        height: 64px;
    }

    .qr-card > div:first-child select#langSelect {
        min-width: 100px;
    }
}

@media (max-width: 420px) {
    .qr-form-row {
        flex-direction: column;
    }

    .qr-card > div:first-child {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .user-avatar {
        width: 56px;
        height: 56px;
    }

    .app-logo-text {
        font-size: 1rem;
    }
}

/* Reduced-motion safety for this page */
@media (prefers-reduced-motion: reduce) {
    .qr-card, .glass-action-btn, .btn-modern-primary {
        transition: none !important;
    }
}
