/* Skill2App / FoxAdmin Account Shell Stylesheet */

:root {
    --s2a-auth-accent: #5b45e0;
    --s2a-auth-accent-hover: #4b37ca;
    --s2a-auth-accent-rgb: 91, 69, 224;
    --s2a-auth-accent-subtle: rgba(91, 69, 224, 0.08);
    --s2a-auth-accent-ring: rgba(91, 69, 224, 0.18);
    --s2a-auth-gradient: linear-gradient(135deg, #6366f1 0%, #5b45e0 50%, #4338ca 100%);
    --s2a-auth-gradient-hover: linear-gradient(135deg, #5558e6 0%, #4e3ac9 50%, #3a2fa8 100%);
    --s2a-auth-glow: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, rgba(99, 102, 241, 0) 70%);
    --s2a-card-border: rgba(226, 232, 240, 0.85);
    --s2a-card-shadow: 0 24px 60px -12px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.05);
    --s2a-text-primary: #0f172a;
    --s2a-text-secondary: #64748b;
    --s2a-text-tertiary: #94a3b8;
    --s2a-radius-sm: 0.5rem;
    --s2a-radius-md: 0.75rem;
    --s2a-radius-lg: 1rem;
    --s2a-radius-xl: 1.5rem;
    --s2a-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.abp-account-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    color: var(--s2a-text-primary);
    background:
        radial-gradient(circle at 10% 10%, rgba(99, 102, 241, 0.08), transparent 35rem),
        radial-gradient(circle at 90% 90%, rgba(59, 130, 246, 0.06), transparent 35rem),
        #f8fafc;
    font-family: var(--s2a-font-sans);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.abp-account-layout *,
.abp-account-layout *::before,
.abp-account-layout *::after {
    box-sizing: border-box;
}

/* ABP Shell Container Overrides */
.abp-account-layout > #main-navbar,
.abp-account-layout .brand-container,
.abp-account-layout .brand-container + .card {
    display: none !important;
}

.abp-account-layout > .container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 100vh;
    min-height: 100dvh;
    max-width: none !important;
    margin: 0 auto !important;
    padding: clamp(0.75rem, 2.5dvh, 2rem) 1.25rem !important;
}

.abp-account-layout > .container > .row {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 1 1 auto !important;
}

.abp-account-layout > .container > .row > .col,
.abp-account-layout > .container > .row > [class*="col"] {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 1 1 auto !important;
}

/* Main Auth Shell (Desktop / PC View) */
.s2a-auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(24rem, 0.95fr);
    width: min(68rem, calc(100dvw - 2rem));
    max-height: calc(100dvh - 1rem);
    margin: auto;
    overflow: auto;
    border: 1px solid var(--s2a-card-border);
    border-radius: var(--s2a-radius-xl);
    background: #ffffff;
    box-shadow: var(--s2a-card-shadow);
    overscroll-behavior: contain;
    transition: box-shadow 0.3s ease;
}

/* Left Hero Showcase Section */
.s2a-auth-intro {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(2.5rem, 4vw, 3.75rem);
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.4), transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(59, 130, 246, 0.3), transparent 45%),
        linear-gradient(145deg, #111827 0%, #0f172a 45%, #1e1b4b 100%);
}

.s2a-intro-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(50px);
}

.s2a-intro-glow-1 {
    top: -4rem;
    left: -4rem;
    width: 20rem;
    height: 20rem;
    background: rgba(99, 102, 241, 0.25);
}

.s2a-intro-glow-2 {
    bottom: -5rem;
    right: -5rem;
    width: 22rem;
    height: 22rem;
    background: rgba(14, 165, 233, 0.2);
}

.s2a-auth-intro-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.s2a-auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
}

.s2a-auth-brand-mark {
    display: grid;
    width: 2.6rem;
    height: 2.6rem;
    place-items: center;
    padding: 0.4rem;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.s2a-auth-brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.s2a-auth-brand-name {
    font-size: 1.15rem;
    font-weight: 750;
    letter-spacing: -0.01em;
    color: #ffffff;
}

.s2a-auth-badge {
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    background: rgba(99, 102, 241, 0.28);
    border: 1px solid rgba(165, 180, 252, 0.35);
    color: #c7d2fe;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.s2a-auth-hero-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.s2a-auth-eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(6px);
    color: #cbd5e1;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.s2a-auth-hero-title {
    margin: 0;
    font-size: clamp(2rem, 3.2vw, 2.75rem);
    font-weight: 800;
    line-height: 1.16;
    letter-spacing: -0.035em;
    background: linear-gradient(135deg, #ffffff 40%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.s2a-auth-description {
    max-width: 30rem;
    margin: 0;
    color: rgba(226, 232, 240, 0.82);
    font-size: 0.96rem;
    line-height: 1.7;
}

/* Feature Showcase Cards (PC) */
.s2a-showcase-grid {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.s2a-showcase-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    border-radius: var(--s2a-radius-lg);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(12px);
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.s2a-showcase-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateX(4px);
}

.s2a-showcase-icon {
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    flex-shrink: 0;
    border-radius: 0.7rem;
    background: rgba(99, 102, 241, 0.22);
    border: 1px solid rgba(165, 180, 252, 0.25);
    color: #a5b4fc;
    font-size: 1.05rem;
}

.s2a-showcase-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.s2a-showcase-body strong {
    color: #f8fafc;
    font-size: 0.92rem;
    font-weight: 650;
}

.s2a-showcase-body span {
    color: #94a3b8;
    font-size: 0.8rem;
    line-height: 1.4;
}

.s2a-auth-intro-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.s2a-intro-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 500;
}

.s2a-intro-pill i {
    color: #38bdf8;
    font-size: 0.75rem;
}

/* Right Side: Auth Panel */
.s2a-auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    justify-content: safe center;
    padding: clamp(2.25rem, 4vw, 3.5rem) clamp(2rem, 3.5vw, 3.25rem);
    background: #ffffff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.s2a-auth-panel-header {
    margin-bottom: 1.75rem;
}

.s2a-header-tag {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.65rem;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    background: var(--s2a-auth-accent-subtle);
    color: var(--s2a-auth-accent);
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.02em;
}

.s2a-auth-panel-header h2 {
    margin: 0 0 0.45rem;
    color: var(--s2a-text-primary);
    font-size: clamp(1.75rem, 2.5vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.s2a-auth-panel-header p {
    margin: 0;
    color: var(--s2a-text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
}

/* Segmented Control Tabs */
.s2a-auth-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
    margin-bottom: 1.5rem;
    padding: 0.3rem;
    border-radius: var(--s2a-radius-md);
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.s2a-auth-methods button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.65rem;
    border: 0;
    border-radius: calc(var(--s2a-radius-md) - 0.15rem);
    color: var(--s2a-text-secondary);
    background: transparent;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.s2a-auth-methods button:hover {
    color: var(--s2a-text-primary);
}

.s2a-auth-methods button[aria-selected="true"] {
    color: var(--s2a-auth-accent);
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* Form Styles & Input Wrappers */
.s2a-auth-form {
    display: flex;
    flex-direction: column;
}

[data-auth-panel][hidden],
[data-phone-password-reset][hidden],
[data-password-recovery][hidden] {
    display: none !important;
}

.s2a-field-group {
    position: relative;
    margin-bottom: 1.15rem;
}

.s2a-field-group .form-label {
    display: block;
    margin-bottom: 0.45rem;
    color: #334155;
    font-size: 0.86rem;
    font-weight: 650;
    letter-spacing: 0.01em;
}

.s2a-field-group .form-text {
    display: block;
    margin-top: 0.35rem;
    color: var(--s2a-text-tertiary);
    font-size: 0.78rem;
    line-height: 1.4;
}

.s2a-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.s2a-field-icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
    z-index: 3;
}

.s2a-auth-form .form-control {
    display: block;
    width: 100%;
    min-height: 3.1rem;
    padding: 0.72rem 1rem;
    color: var(--s2a-text-primary);
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--s2a-radius-md);
    font-size: 0.95rem;
    line-height: 1.5;
    outline: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.s2a-auth-form .form-control::placeholder {
    color: #94a3b8;
    font-size: 0.9rem;
}

.s2a-auth-form .form-control.s2a-input-with-icon {
    padding-left: 2.65rem;
}

.s2a-auth-form .form-control:hover {
    border-color: #94a3b8;
}

.s2a-auth-form .form-control:focus {
    border-color: var(--s2a-auth-accent);
    box-shadow: 0 0 0 3.5px var(--s2a-auth-accent-ring);
    background: #ffffff;
}

/* Password Input Wrapper & Integrated Toggle Button */
.s2a-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.s2a-password-input {
    padding-right: 3rem !important;
}

.s2a-password-input::-ms-reveal {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.s2a-password-input::-ms-clear {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

input::-ms-reveal {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

input::-ms-clear {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.s2a-password-toggle-btn {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 0;
    border-radius: 0.45rem;
    background: transparent;
    color: #94a3b8;
    font-size: 1.05rem;
    cursor: pointer;
    z-index: 4;
    transition: all 0.15s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.s2a-password-toggle-btn:hover {
    color: var(--s2a-auth-accent);
    background: var(--s2a-auth-accent-subtle);
}

.s2a-password-toggle-btn:focus-visible {
    box-shadow: 0 0 0 2px var(--s2a-auth-accent-ring);
    color: var(--s2a-auth-accent);
}

.s2a-password-toggle-btn:active {
    transform: translateY(-50%) scale(0.92);
}

/* Password Input Group (Fallback) */
.s2a-password-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    position: relative;
    width: 100%;
}

.s2a-password-group .s2a-field-icon {
    position: static;
    transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.95rem;
    border: 1px solid #cbd5e1;
    border-right: 0;
    border-radius: var(--s2a-radius-md) 0 0 var(--s2a-radius-md);
    background: #f8fafc;
    color: #94a3b8;
    flex-shrink: 0;
}

.s2a-password-group .form-control {
    border-radius: 0 !important;
    border-left: 0;
    border-right: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.s2a-password-group .form-control:focus {
    z-index: 2;
    border-left: 1px solid var(--s2a-auth-accent);
    border-right: 1px solid var(--s2a-auth-accent);
}

.s2a-password-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 3.25rem;
    border: 1px solid #cbd5e1;
    border-left: 0;
    border-radius: 0 var(--s2a-radius-md) var(--s2a-radius-md) 0;
    background: #f8fafc;
    color: #64748b;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.s2a-password-btn:hover {
    color: var(--s2a-auth-accent);
    background: #f1f5f9;
}

/* Phone Code Input Group */
.s2a-code-group {
    display: flex;
    gap: 0.65rem;
}

.s2a-code-btn {
    flex-shrink: 0;
    min-height: 3.1rem;
    padding: 0 1.25rem;
    border: 1px solid rgba(var(--s2a-auth-accent-rgb), 0.35);
    border-radius: var(--s2a-radius-md);
    color: var(--s2a-auth-accent);
    background: #ffffff;
    font-size: 0.9rem;
    font-weight: 650;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.s2a-code-btn:hover:not(:disabled) {
    background: var(--s2a-auth-accent-subtle);
    border-color: var(--s2a-auth-accent);
    color: var(--s2a-auth-accent-hover);
}

.s2a-code-btn:disabled {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
}

.s2a-code-status {
    display: block;
    min-height: 1.25rem;
    margin-top: 0.4rem;
    color: var(--s2a-text-secondary);
    font-size: 0.8rem;
}

/* Options Bar (Remember Me & Forgot Password) */
.s2a-auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.75rem 0 1.4rem;
    font-size: 0.88rem;
}

.s2a-auth-options .mb-3 {
    margin-bottom: 0 !important;
}

.s2a-auth-options .form-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 !important;
    padding-left: 0;
}

.s2a-auth-options .form-check-input {
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    border: 1.5px solid #cbd5e1;
    border-radius: 0.35rem;
    accent-color: var(--s2a-auth-accent);
    cursor: pointer;
}

.s2a-phone-remember {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    color: #475569;
    font-size: 0.88rem;
    cursor: pointer;
}

.s2a-phone-remember .form-check-input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--s2a-auth-accent);
}

.s2a-link-forgot {
    color: var(--s2a-auth-accent);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.s2a-link-forgot:hover {
    color: var(--s2a-auth-accent-hover);
    text-decoration: underline;
}

/* Primary Submit Button */
.s2a-auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3.15rem;
    padding: 0.75rem 1.5rem;
    border: 0;
    border-radius: var(--s2a-radius-md);
    color: #ffffff;
    background: var(--s2a-auth-gradient);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 10px 20px -4px rgba(var(--s2a-auth-accent-rgb), 0.35);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
}

.s2a-auth-submit:hover:not(:disabled) {
    background: var(--s2a-auth-gradient-hover);
    box-shadow: 0 12px 24px -4px rgba(var(--s2a-auth-accent-rgb), 0.45);
    transform: translateY(-1px);
}

.s2a-auth-submit:active:not(:disabled) {
    transform: scale(0.985);
    box-shadow: 0 4px 12px rgba(var(--s2a-auth-accent-rgb), 0.3);
}

.s2a-auth-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    box-shadow: none;
}

/* WeChat Scan Panel */
.s2a-wechat-panel {
    text-align: center;
}

.s2a-wechat-card {
    padding: 1.5rem 1rem;
    border-radius: var(--s2a-radius-lg);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.s2a-wechat-card h3 {
    margin: 0 0 0.45rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--s2a-text-primary);
}

.s2a-wechat-card p {
    max-width: 20rem;
    margin: 0 auto 1.35rem;
    color: var(--s2a-text-secondary);
    font-size: 0.86rem;
    line-height: 1.6;
}

.s2a-wechat-qr {
    display: grid;
    place-items: center;
    margin: 0 auto 1.25rem;
}

.s2a-qr-box {
    position: relative;
    display: grid;
    place-items: center;
    width: 7.5rem;
    height: 7.5rem;
    border-radius: var(--s2a-radius-lg);
    background: #ffffff;
    border: 2px solid rgba(7, 193, 96, 0.25);
    color: #07c160;
    font-size: 3.8rem;
    box-shadow: 0 10px 25px -5px rgba(7, 193, 96, 0.15);
    overflow: hidden;
}

.s2a-qr-scanner-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #07c160, transparent);
    box-shadow: 0 0 8px #07c160;
    animation: s2a-scan-beam 2.2s ease-in-out infinite alternate;
}

@keyframes s2a-scan-beam {
    0% { top: 10%; opacity: 0.3; }
    50% { opacity: 1; }
    100% { top: 90%; opacity: 0.3; }
}

.s2a-btn-wechat {
    background: linear-gradient(135deg, #07c160 0%, #06ad56 100%) !important;
    box-shadow: 0 10px 20px -4px rgba(7, 193, 96, 0.35) !important;
}

.s2a-btn-wechat:hover {
    background: linear-gradient(135deg, #06ad56 0%, #059b4c 100%) !important;
}

/* External Providers & Footers */
.s2a-auth-external {
    margin-top: 1.5rem;
    text-align: center;
}

.s2a-divider {
    position: relative;
    margin: 1.25rem 0;
    text-align: center;
}

.s2a-divider::before {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
    content: "";
}

.s2a-divider span {
    position: relative;
    padding: 0 0.85rem;
    background: #ffffff;
    color: var(--s2a-text-tertiary);
    font-size: 0.8rem;
}

.s2a-external-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}

.s2a-provider-btn {
    min-height: 2.6rem;
    padding: 0.4rem 1.2rem;
    border-radius: var(--s2a-radius-md);
    border: 1px solid #cbd5e1;
    color: #475569;
    background: #ffffff;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.s2a-provider-btn:hover {
    border-color: var(--s2a-auth-accent);
    color: var(--s2a-auth-accent);
    background: var(--s2a-auth-accent-subtle);
}

.s2a-auth-switch {
    margin: 1.5rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
    color: var(--s2a-text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

.s2a-auth-switch a {
    margin-left: 0.35rem;
    color: var(--s2a-auth-accent);
    font-weight: 650;
    text-decoration: none;
}

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

.s2a-auth-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin: 1.25rem 0 0;
    color: var(--s2a-text-tertiary);
    font-size: 0.78rem;
}

.s2a-auth-security i {
    color: #10b981;
}

/* Validation Styles */
.s2a-auth-shell .validation-summary-valid {
    display: none;
}

.s2a-auth-shell [data-valmsg-for] {
    display: block;
    min-height: 1.2rem;
    margin-top: 0.35rem;
    color: #e11d48;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Tablet & Intermediate Screens (<= 1024px) */
@media (max-width: 1024px) {
    .abp-account-layout > .container {
        padding: 1.5rem 1rem !important;
    }

    .s2a-auth-shell {
        grid-template-columns: 1fr;
        width: min(35rem, calc(100dvw - 1.25rem));
        min-height: auto;
        max-height: none;
        margin: 1.5rem auto;
        border-radius: var(--s2a-radius-xl);
        overflow: visible;
        overscroll-behavior: auto;
    }

    .s2a-auth-intro {
        min-height: auto;
        padding: 2.25rem 2rem;
    }

    .s2a-auth-hero-title {
        font-size: 2.15rem;
    }

    .s2a-showcase-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.65rem;
    }

    .s2a-showcase-card {
        padding: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .s2a-showcase-body span {
        display: none;
    }

    .s2a-auth-intro-footer {
        display: none;
    }

    .s2a-auth-panel {
        padding: 2.25rem 2rem;
        -webkit-overflow-scrolling: touch;
    }
}

/* Compact Vertical Viewports (<= 800px height: Laptops, Tablets, Desktop Host popups) */
@media (max-height: 800px) {
    .abp-account-layout > .container {
        padding: 0.5rem 1rem !important;
    }

    .s2a-auth-shell {
        min-height: auto !important;
        max-height: calc(100dvh - 1rem) !important;
        margin: auto !important;
        overflow-y: auto !important;
    }

    .s2a-auth-intro {
        padding: 1.25rem 1.5rem !important;
        min-height: auto !important;
    }

    .s2a-auth-hero-group {
        gap: 0.35rem !important;
    }

    .s2a-auth-hero-title {
        font-size: 1.5rem !important;
    }

    .s2a-auth-description {
        font-size: 0.82rem !important;
        line-height: 1.35 !important;
    }

    .s2a-showcase-grid {
        gap: 0.4rem !important;
    }

    .s2a-showcase-card {
        padding: 0.45rem 0.65rem !important;
    }

    .s2a-showcase-icon {
        width: 1.85rem !important;
        height: 1.85rem !important;
        font-size: 0.85rem !important;
    }

    .s2a-showcase-body strong {
        font-size: 0.8rem !important;
    }

    .s2a-showcase-body span {
        font-size: 0.72rem !important;
    }

    .s2a-auth-intro-footer {
        margin-top: 0.75rem !important;
        padding-top: 0.75rem !important;
    }

    .s2a-auth-panel {
        padding: 1.15rem 1.5rem !important;
        justify-content: flex-start !important;
        overflow-y: auto !important;
    }

    .s2a-auth-panel-header {
        margin-bottom: 0.65rem !important;
    }

    .s2a-header-tag {
        margin-bottom: 0.25rem !important;
        padding: 0.15rem 0.45rem !important;
        font-size: 0.68rem !important;
    }

    .s2a-auth-panel-header h2 {
        font-size: 1.4rem !important;
        margin-bottom: 0.15rem !important;
    }

    .s2a-auth-panel-header p {
        font-size: 0.8rem !important;
        margin-bottom: 0 !important;
    }

    .s2a-auth-methods {
        margin-bottom: 0.65rem !important;
    }

    .s2a-auth-methods button {
        min-height: 2.2rem !important;
        font-size: 0.8rem !important;
    }

    .s2a-field-group {
        margin-bottom: 0.55rem !important;
    }

    .s2a-field-group .form-label {
        font-size: 0.78rem !important;
        margin-bottom: 0.15rem !important;
    }

    .s2a-field-group small {
        font-size: 0.7rem !important;
    }

    .s2a-auth-form .form-control {
        min-height: 2.35rem !important;
        padding: 0.35rem 0.75rem !important;
        font-size: 0.88rem !important;
    }

    /* 紧凑模式下仍须给左侧图标留位，否则图标会压住文字/占位符。 */
    .s2a-auth-form .form-control.s2a-input-with-icon {
        padding-left: 2.65rem !important;
    }

    /* 密码框右侧给「显示密码」按钮留位，同样会被上面的 padding 简写清掉。 */
    .s2a-auth-form .form-control.s2a-password-input {
        padding-right: 3rem !important;
    }

    .s2a-auth-submit {
        min-height: 2.5rem !important;
        font-size: 0.92rem !important;
    }

    .s2a-auth-options {
        margin: 0.2rem 0 0.55rem !important;
        font-size: 0.8rem !important;
    }
}

/* Mobile Devices (< 768px: Smartphones & Small Displays) */
@media (max-width: 767px) {
    .abp-account-layout {
        justify-content: flex-start;
        align-items: stretch;
        min-height: 100dvh;
        background: #ffffff;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .abp-account-layout > .container {
        min-height: 100dvh;
        align-items: stretch !important;
        justify-content: flex-start !important;
        padding: 0 !important;
        max-width: 100% !important;
    }

    .abp-account-layout > .container > .row {
        align-items: stretch !important;
        justify-content: flex-start !important;
        flex: 1 1 auto !important;
    }

    .abp-account-layout > .container > .row > .col,
    .abp-account-layout > .container > .row > [class*="col"] {
        align-items: stretch !important;
        justify-content: flex-start !important;
        flex: 1 1 auto !important;
    }

    /* Full-height App Canvas on Mobile */
    .s2a-auth-shell {
        display: flex;
        flex-direction: column;
        width: 100% !important;
        min-height: 100dvh;
        max-height: none;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        overflow: visible;
        background: #ffffff;
    }

    /* Compact Mobile Top Brand Bar: eliminates massive hero banner above the fold */
    .s2a-auth-intro {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        min-height: auto;
        padding: 0.95rem 1.25rem;
        background:
            radial-gradient(circle at 10% 50%, rgba(99, 102, 241, 0.4), transparent 45%),
            linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
    }

    .s2a-auth-intro-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 0;
    }

    .s2a-auth-brand {
        gap: 0.65rem;
    }

    .s2a-auth-brand-mark {
        width: 2.15rem;
        height: 2.15rem;
        padding: 0.3rem;
        border-radius: 0.65rem;
    }

    .s2a-auth-brand-name {
        font-size: 1.05rem;
        font-weight: 750;
    }

    .s2a-auth-badge {
        padding: 0.15rem 0.45rem;
        font-size: 0.68rem;
    }

    /* Hide heavy desktop marketing copy to immediately bring form into mobile view */
    .s2a-auth-hero-group,
    .s2a-showcase-grid,
    .s2a-auth-intro-footer,
    .s2a-intro-glow {
        display: none !important;
    }

    /* Mobile Form Panel */
    .s2a-auth-panel {
        flex: 1 1 auto;
        justify-content: flex-start;
        padding: 1.35rem 1.25rem max(1.5rem, env(safe-area-inset-bottom)) !important;
        background: #ffffff;
    }

    .s2a-auth-panel-header {
        margin-bottom: 1.25rem;
    }

    .s2a-header-tag {
        font-size: 0.72rem;
        padding: 0.2rem 0.55rem;
        margin-bottom: 0.45rem;
    }

    .s2a-auth-panel-header h2 {
        font-size: 1.65rem;
        margin-bottom: 0.3rem;
    }

    .s2a-auth-panel-header p {
        font-size: 0.86rem;
        line-height: 1.5;
    }

    /* Mobile Segmented Tabs: 44px min-height touch target */
    .s2a-auth-methods {
        margin-bottom: 1.35rem;
        padding: 0.25rem;
        gap: 0.25rem;
    }

    .s2a-auth-methods button {
        min-height: 2.75rem;
        font-size: 0.84rem;
        gap: 0.3rem;
    }

    .s2a-auth-methods button i {
        font-size: 0.95rem;
    }

    /* Input targets: 48px height, 16px font to prevent iOS Safari auto-zoom */
    .s2a-field-group {
        margin-bottom: 1.1rem;
    }

    .s2a-field-group .form-label {
        font-size: 0.85rem;
        margin-bottom: 0.35rem;
    }

    .s2a-auth-form .form-control {
        min-height: 3rem;
        font-size: 16px !important;
        padding: 0.7rem 0.95rem;
        border-radius: var(--s2a-radius-md);
    }

    .s2a-auth-form .form-control.s2a-input-with-icon {
        padding-left: 2.65rem;
    }

    .s2a-password-btn {
        min-width: 3rem;
    }

    .s2a-code-group {
        gap: 0.5rem;
    }

    .s2a-code-btn {
        min-height: 3rem;
        padding: 0 0.9rem;
        font-size: 0.84rem;
    }

    /* Mobile Buttons & Options */
    .s2a-auth-options {
        margin: 0.5rem 0 1.25rem;
    }

    .s2a-auth-submit {
        min-height: 3.15rem;
        font-size: 1.02rem;
        border-radius: var(--s2a-radius-md);
    }

    .s2a-wechat-card {
        padding: 1.25rem 0.85rem;
    }

    .s2a-qr-box {
        width: 6.5rem;
        height: 6.5rem;
        font-size: 3.2rem;
    }

    .s2a-auth-switch {
        margin-top: 1.25rem;
        padding-top: 1rem;
        font-size: 0.86rem;
    }

    .s2a-auth-security {
        margin-top: 1rem;
        font-size: 0.75rem;
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .s2a-auth-shell *,
    .s2a-auth-shell *::before,
    .s2a-auth-shell *::after {
        animation: none !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
