@font-face {
    font-family: AbrilFatface;
    src: url('../fonts/AbrilFatface-Regular-2.ttf');
}

/* TPL Brand Colors */
:root {
    --tpl-blue: #112a87;
    --tpl-blue-light: #193684;
    --tpl-blue-dark: #0a1a5c;
    --tpl-red: #c00922;
    --tpl-red-hover: #a0071c;
    --tpl-secondary: #104392;
    --tpl-gray: #f8f8f8;
    --tpl-text: #333;
    --tpl-text-light: #666;
    --tpl-border: #e8e8e8;
}

/* 公共样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
    background-color: #f5f5f5;
    color: var(--tpl-text);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--tpl-red);
    color: white;
}

.btn-primary:hover {
    background-color: var(--tpl-red);
}

.btn-secondary {
    background-color: #e7ecfb;
    color: var(--tpl-blue);
}

.btn-secondary:hover {
    background-color: var(--tpl-blue);
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 输入框样式 */
.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--tpl-text);
    font-size: 14px;
}

.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
    background: #fff;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--tpl-secondary);
    box-shadow: 0 0 0 3px rgba(16, 67, 146, 0.15);
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 32px;
}

/* TPL 头部 - 认证页专用紧凑样式 */
.auth-top-header {
    background-color: rgba(17, 42, 135, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.auth-topheader {
    width: 100%;
}

.auth-topheadercol {
    max-width: 1200px;
    height: 110px;
    margin: 0 auto;
    padding: 0 20px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-top-header .logo {
    z-index: 99999;
    margin-bottom: -20px;
    flex-shrink: 0;
}

.auth-top-header .logo img {
    display: block;
    height: auto;
    max-height: 130px;
    width: auto;
}

.auth-menu-nav {
    flex: 1;
    margin-left: 40px;
    display: flex;
    align-items: center;
}

.auth-menu-nav .metitle {
    font-family: Georgia, 'Times New Roman', serif;
    color: #fff;
    text-align: left;
    width: 100%;
}

.auth-menu-nav .metitle strong {
    font-size: 28px;
    line-height: 1.3;
    font-weight: 100;
    display: block;
    font-family: AbrilFatface, Georgia, 'Times New Roman', serif;
    text-transform: uppercase;
}

.auth-menu-nav .metitle p {
    font-size: 14px;
    margin-top: 4px;
    opacity: 0.9;
}

.auth-topheaderight {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.auth-topheaderight a {
    float: left;
    background: #e7ecfb;
    height: 44px;
    width: 160px;
    display: flex;
    align-items: center;
    color: #000;
    text-align: left;
    font-size: 12px;
    border-radius: 10px;
    padding-left: 10px;
    line-height: normal;
    text-decoration: none;
}

.auth-topheaderight a img {
    vertical-align: middle;
    margin-right: 6px;
    height: 20px;
    width: auto;
}

.auth-topheaderight a:hover {
    background-image: linear-gradient(to bottom, #fff, #e7ecfb);
}

/* 认证页面样式 */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #eff2f7 0%, #ffffff 100%);
}

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-header h1 {
    font-size: 28px;
    color: var(--tpl-blue);
    margin-bottom: 8px;
    font-weight: 600;
}

.auth-header p {
    color: var(--tpl-text-light);
    font-size: 14px;
}

.captcha-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.captcha-group input {
    flex: 1;
}

.captcha-group img {
    height: 46px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #d9d9d9;
}

.captcha-group .btn {
    padding: 10px 16px;
    font-size: 14px;
    white-space: nowrap;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--tpl-text-light);
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.auth-footer a {
    color: var(--tpl-secondary);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    color: var(--tpl-red);
    text-decoration: underline;
}

/* 消息提示 */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.message-error {
    background-color: #fff2f0;
    border: 1px solid #ffccc7;
    color: #ff4d4f;
}

.message-success {
    background-color: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
}

/* 语言切换 */
.lang-switch {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 10;
}

.lang-switch select {
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    color: var(--tpl-text);
}

/* 顶部内联语言切换（用于 index.html 及统一后的认证页） */
.lang-switch-inline select {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.lang-switch-inline select:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lang-switch-inline select option {
    background: var(--tpl-blue);
    color: #fff;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* TPL 底部 */
.tpl-footer {
    background: #fff;
    border-top: 1px solid var(--tpl-border);
    padding: 5px;
    text-align: center;
    color: var(--tpl-text-light);
    font-size: 13px;
}

/* 响应式 */
@media (max-width: 768px) {
    .auth-topheadercol {
        height: 65px;
        padding: 0 12px;
        flex-wrap: wrap;
        gap: 10px;
        align-content: center;
    }

    .auth-top-header .logo {
        margin-bottom: 0;
    }

    .auth-top-header .logo img {
        height: 75px;
    }

    .auth-menu-nav {
        margin-left: 0;
        min-width: 0;
    }

    .auth-menu-nav .metitle strong {
        font-size: 15px;
        line-height: 1.2;
    }

    .auth-menu-nav .metitle p {
        display: none;
    }

    .auth-topheaderight {
        display: none;
    }

    .lang-switch-inline select {
        padding: 5px 8px;
        font-size: 12px;
        border-radius: 6px;
    }

    .auth-main {
        padding: 20px 16px;
    }

    .card {
        padding: 24px;
    }

    .auth-card {
        max-width: 100%;
    }

    .captcha-group {
        gap: 8px;
    }

    .captcha-group .btn {
        padding: 10px 14px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {

    .auth-main {
        padding: 16px 12px;
    }

    .card {
        padding: 20px;
    }

    .auth-header h1 {
        font-size: 24px;
    }

    .input-group input,
    .input-group textarea,
    .input-group select {
        padding: 10px 12px;
        font-size: 15px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 15px;
    }

    .auth-footer {
        font-size: 13px;
        gap: 4px;
    }

    .tpl-footer {
        font-size: 12px;
        padding: 12px 8px;
    }
}
