/* Auth pages – GoldSphere professional theme */
:root {
    --auth-bg: #0a0e12;
    --auth-bg2: #111820;
    --auth-card: rgba(22, 28, 36, 0.92);
    --auth-border: rgba(212, 175, 55, 0.18);
    --auth-border-focus: rgba(244, 208, 63, 0.55);
    --auth-gold: #d4af37;
    --auth-gold-light: #f4d03f;
    --auth-text: #eaecef;
    --auth-muted: #848e9c;
    --auth-input-bg: #161b22;
    --auth-radius: 12px;
    --auth-max: 420px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    background: var(--auth-bg);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0 auto;
    max-width: 480px;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--auth-bg);
    color: var(--auth-text);
}

#app, ion-app, ion-content, .ion-pages {
    background: transparent !important;
    --background: transparent;
}

ion-header, ion-toolbar {
    --background: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
}

.auth-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 16px 20px;
    min-height: 56px;
}

.auth-header__back {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--auth-border);
    color: var(--auth-text);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.auth-header__back:hover {
    background: rgba(212, 175, 55, 0.12);
    border-color: var(--auth-border-focus);
}

.auth-header__title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--auth-gold-light);
}

.auth-page {
    padding: 0 20px 40px;
    max-width: var(--auth-max);
    margin: 0 auto;
}

.auth-brand {
    text-align: center;
    margin-bottom: 28px;
}

.auth-brand__logo {
    max-width: 220px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 12px;
}

.auth-brand__subtitle {
    font-size: 14px;
    color: var(--auth-muted);
    margin: 0;
    font-weight: 400;
}

.auth-card {
    background: var(--auth-card);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    padding: 24px 20px;
}

.auth-field {
    margin-bottom: 16px;
}

.auth-field__label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--auth-muted);
    margin-bottom: 8px;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-wrap .auth-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-muted);
    font-size: 15px;
    pointer-events: none;
    z-index: 2;
}

.auth-input-wrap .auth-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-muted);
    font-size: 15px;
    cursor: pointer;
    z-index: 2;
    padding: 4px;
    transition: color 0.2s;
}

.auth-input-wrap .auth-toggle:hover {
    color: var(--auth-gold-light);
}

.auth-input,
.auth-input-wrap input,
.auth-input-wrap .native-input {
    width: 100% !important;
    max-width: 100% !important;
    height: 48px !important;
    padding: 0 44px !important;
    border: 1px solid var(--auth-border) !important;
    border-radius: 10px !important;
    background: var(--auth-input-bg) !important;
    color: var(--auth-text) !important;
    font-size: 15px !important;
    outline: none !important;
    transition: border-color 0.2s !important;
    -webkit-appearance: none;
}

.auth-input-wrap:not(.auth-input-wrap--toggle) .auth-input,
.auth-input-wrap:not(.auth-input-wrap--toggle) input {
    padding-right: 14px !important;
}

.auth-input:focus,
.auth-input-wrap input:focus,
.auth-input-wrap .native-input:focus {
    border-color: var(--auth-border-focus) !important;
    box-shadow: none !important;
}

.auth-input::placeholder,
.auth-input-wrap input::placeholder {
    color: #5c6570 !important;
    opacity: 1 !important;
}

.auth-btn {
    display: block;
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    text-align: center;
    line-height: 50px;
    text-decoration: none;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    filter: none !important;
    text-shadow: none !important;
}

.auth-btn:active {
    opacity: 0.88;
}

.auth-btn--primary {
    background: var(--auth-gold) !important;
    background-image: none !important;
    color: #0a0e12;
    margin-top: 8px;
}

.auth-btn--primary:hover {
    opacity: 0.92;
}

.auth-btn--outline {
    background: transparent !important;
    background-image: none !important;
    color: var(--auth-gold-light);
    border: 1px solid var(--auth-border);
    margin-top: 12px;
    line-height: 48px;
}

.auth-btn--outline:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: var(--auth-border-focus);
}

/* Override Ionic / legacy button glow on auth pages */
.auth-page button,
.auth-page .md.button,
.auth-page ion-button,
.auth-card button,
.login.auth-page a.auth-btn {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    filter: none !important;
    text-shadow: none !important;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--auth-muted);
}

.auth-footer a {
    color: var(--auth-gold-light);
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 8px 0 4px;
    cursor: pointer;
}

.auth-check input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    margin-top: 2px;
    accent-color: var(--auth-gold);
    cursor: pointer;
}

.auth-check span {
    font-size: 13px;
    color: var(--auth-muted);
    line-height: 1.45;
}

.auth-check span a {
    color: var(--auth-gold-light);
    text-decoration: none;
}

.auth-lang {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 100;
    font-size: 12px;
    color: var(--auth-muted);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(22, 28, 36, 0.8);
    border: 1px solid var(--auth-border);
}

.auth-lang:hover {
    color: var(--auth-gold-light);
    border-color: var(--auth-border-focus);
}

/* Hide legacy ion clutter */
.input-clear-icon { display: none !important; }
.login .login-box .top .right1 .qut { display: none !important; }

/* Register: stack layout on mobile */
.auth-form .form-group {
    margin-bottom: 0;
    display: block !important;
}

.auth-form .password-wrapper {
    position: relative;
    width: 100%;
}

.auth-form .password-wrapper ion-input {
    width: 100%;
}

.auth-form .password-wrapper .toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-muted);
    cursor: pointer;
    z-index: 5;
    font-size: 15px;
}

.lang-item:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--auth-gold-light) !important;
}

@media (max-width: 380px) {
    .auth-page { padding: 0 16px 32px; }
    .auth-card { padding: 20px 16px; }
    .auth-brand__logo { max-width: 190px; }
}
