html,
body {
    margin: 0 !important;
    padding-top: 0 !important;
}

/* Ultra-specific selectors to override frontend.css body padding */
html.mobile-auth-html,
body.mobile-auth-body {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
}

/* Force override for any media queries from frontend.css */
@media screen and (max-width: 768px) {
    body.mobile-auth-body {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
}
@media screen and (min-width: 769px) {
    body.mobile-auth-body {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
}

/* Prevent top white seam by coloring the root area the same as topbar on auth page */
html.mobile-auth-html {
    background: #7a2645 !important;
}

body {
    margin: 0;
    padding-top: 0 !important;
    min-height: 100vh;
    background: #eff2f6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    text-decoration: none;
}

.mobile-auth-shell {
    min-height: 100vh;
    background: #eff2f6;
}

.mobile-auth-topbar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #7a2645;
    padding: 3.333vw;
    padding-top: calc(3.333vw + env(safe-area-inset-top));
    overflow: hidden;
    box-sizing: border-box;
}

.mobile-auth-topbar h1 {
    margin: 0 auto;
    line-height: 1;
}

.mobile-auth-topbar .logo img {
    display: block;
    height: 10.5vw;
    margin-left: -5vw;
    border: none;
}

.mobile-auth-topbar-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 2.4vw;
}

.mobile-auth-topbar-icon {
    width: 5.5vw;
    height: 5.5vw;
    display: block;
}

.mobile-auth-page {
    min-height: calc(100vh - 18.667vw);
    padding: 5vw;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 12vh;
}

.mobile-auth-header {
    color: #333;
    padding-top: 0;
    text-align: center;
    margin-bottom: 8vw;
}

.mobile-auth-title {
    font-size: 6.5vw;
    font-weight: 700;
    line-height: 1.2;
}

.mobile-auth-card {
    margin-top: 4vw;
    background: #fff;
    border-radius: 6vw;
    padding: 8vw 6vw;
    box-shadow: 0 2vw 6vw rgba(15, 23, 42, .06);
}

.mobile-auth-card--single {
    padding-top: 6vw;
}

.mobile-auth-tabs {
    display: flex;
    gap: 3vw;
    margin-bottom: 6vw;
}

.mobile-auth-tab {
    flex: 1;
    height: 11vw;
    border-radius: 999px;
    border: 1px solid #ebeef5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4vw;
    color: #6a7280;
    background: #fff;
    font-weight: 600;
    transition: all .3s ease;
}

.mobile-auth-tab:hover {
    color: #3285ce;
}

.mobile-auth-tab.is-active {
    background: #3285ce;
    color: #fff;
    border-color: #3285ce;
    box-shadow: 0 2vw 5vw rgba(50, 133, 206, .18);
}

.mobile-auth-tab.is-active:hover {
    color: #fff;
}

.mobile-auth-field {
    margin-bottom: 5.5vw;
}

.mobile-auth-label {
    display: block;
    margin-bottom: 2.5vw;
    font-size: 3.8vw;
    color: #333;
    font-weight: 700;
}

.mobile-auth-input {
    width: 100%;
    height: 12.5vw;
    border-radius: 3.6vw;
    border: none;
    background: #f5f6f8;
    padding: 0 4vw;
    font-size: 3.8vw;
    color: #333;
    box-sizing: border-box;
    transition: all .3s ease;
    box-shadow: none;
}

.mobile-auth-input:focus {
    outline: none;
    border-color: #3285ce;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(50, 133, 206, .08);
}

.mobile-auth-code-group {
    display: flex;
    align-items: stretch;
    gap: 3vw;
}

.mobile-auth-code-input {
    flex: 1;
}

.mobile-auth-code-btn {
    flex: 0 0 32vw;
    border: none;
    border-radius: 3.6vw;
    background: #e2f0f9;
    color: #3285ce;
    font-size: 3.5vw;
    font-weight: 600;
    padding: 0 3vw;
    transition: all .3s ease;
}

.mobile-auth-code-btn.is-disabled,
.mobile-auth-code-btn:disabled {
    background: #f4f6fb;
    color: #c8ccd6;
}

.mobile-auth-code-tip {
    margin-top: 2.5vw;
    font-size: 3.2vw;
    line-height: 1.6;
    color: #3285ce;
    background: rgba(50, 133, 206, .06);
    border-radius: 3vw;
    padding: 2.4vw 3vw;
}

.mobile-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4vw;
    margin: 0 0 5vw;
}

.mobile-auth-agreement {
    margin: 6vw 0 5vw;
}

.mobile-auth-agreement-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2vw;
    margin: 0;
    font-size: 3.4vw;
    color: #999;
    line-height: 1.6;
    font-weight: 400;
}

.mobile-auth-agreement-checkbox {
    width: 4vw;
    height: 4vw;
    margin: 0;
    flex: 0 0 auto;
}

.mobile-auth-agreement-text a {
    color: #3285ce;
}

.mobile-auth-keep {
    display: flex;
    align-items: center;
    gap: 2vw;
    font-size: 3.4vw;
    color: #6a7280;
}

.mobile-auth-keep input {
    width: 4vw;
    height: 4vw;
    margin: 0;
}

.mobile-auth-link {
    font-size: 3.5vw;
    color: #3285ce;
    transition: all .3s ease;
}

.mobile-auth-link:hover {
    color: #3285ce;
    opacity: .8;
}

.mobile-auth-btn {
    width: 65%;
    margin: 0 auto;
    display: block;
    height: 12.5vw;
    border: none;
    border-radius: 999px;
    background: #3285ce;
    color: #fff;
    font-size: 4.2vw;
    font-weight: 600;
    box-shadow: 0 2vw 5vw rgba(50, 133, 206, .18);
    transition: all .3s ease;
}

.mobile-auth-hint {
    margin-top: 8vw;
    text-align: center;
    font-size: 3.5vw;
    color: #666;
    line-height: 1.6;
    padding: 0 1vw;
}

.mobile-auth-secondary {
    display: block;
    margin-top: 5vw;
    text-align: center;
    font-size: 3.6vw;
    color: #6a7280;
    transition: all .3s ease;
}

.mobile-auth-secondary:hover {
    color: #3285ce;
}

.mobile-auth-form .form-control {
    box-shadow: none;
}

.mobile-auth-form .help-block,
.mobile-auth-form .msg-box {
    font-size: 3.2vw;
}

.footer-nav {
    width: 100%;
    background-color: #fff;
    position: fixed;
    bottom: 0;
    z-index: 999;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 18.667vw;
    box-shadow: 0 -2vw 6vw rgba(15, 23, 42, .05);
}

.footer-nav img {
    width: 6.4vw;
    border: none;
}

.footer-nav a {
    width: 13.333vw;
    font-size: 2.933vw;
    color: #171717;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: center;
}

.footer-nav a span {
    margin-top: 1.333vw;
}

.mobile-school-modal-mask {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000001;
    padding: 5.333vw;
    box-sizing: border-box;
}

.mobile-school-modal-mask.is-visible {
    display: flex !important;
}

.mobile-school-modal-card {
    width: 80%;
    background: #ffffff;
    border-radius: 2.133vw;
    padding: 6.667vw 5.333vw;
    box-shadow: 0 2.667vw 8vw rgba(0, 0, 0, 0.3);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.mobile-school-modal-close {
    position: absolute;
    top: 2.667vw;
    right: 4vw;
    border: none;
    background: transparent;
    font-size: 8vw;
    color: #999999;
    cursor: pointer;
    line-height: 1;
}

.mobile-school-modal-header {
    text-align: center;
    margin-bottom: 6.667vw;
}

.mobile-school-modal-title {
    font-size: 5.333vw;
    font-weight: bold;
    color: #333333;
}

.mobile-school-modal-body {
    display: flex;
    flex-direction: column;
    gap: 4vw;
    margin-bottom: 6.667vw;
}

.mobile-school-modal-btn {
    width: 80%;
    margin: 0 auto;
    height: 12vw;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1.333vw;
    font-size: 4.533vw;
    text-decoration: none !important;
    border: 1px solid #3285ce;
    color: #3285ce;
    background: #ffffff;
    transition: all .2s ease;
    font-weight: bold;
}

.mobile-school-modal-btn:active {
    background: #3285ce;
    color: #ffffff;
}

.mobile-school-modal-footer {
    border-top: 1px solid #eeeeee;
    padding-top: 5.333vw;
    padding-left: 1.5vw;
}

.mobile-exam-intro-title {
    font-weight: bold;
    color: #333333;
    margin-bottom: 2.667vw;
    font-size: 4vw;
}

.mobile-exam-intro-list {
    font-size: 3.467vw;
    color: #666666;
    line-height: 1.6;
}

.mobile-exam-intro-item {
    margin-bottom: 2.667vw;
}

.mobile-exam-remark {
    font-size: 3.2vw;
    color: #999;
    margin-top: 2.667vw;
}
