/* ============================================================
   auth.css — 独立认证页（登录 / 修改密码）共用的编辑海报式版式
   左：焦橙整屏色块（品牌 / 标语）；右：奶油底表单区。
   由 index.html 与 resetpwd.html 引入 —— 这两个页面不加载
   unified-theme.css 与 pm.css（独立文档，没有后台布局），
   因此在 .auth 作用域内自带一份别名层；严禁在 :root 上定义。
   所有前景色均已验算对比度：
     奶油 #FDF6E9 压焦橙 #B3451A = 5.15:1 ✓（正文/小字均可）
     焦橙   #B3451A 压奶油 #FDF6E9 = 5.15:1 ✓（印章里的文字）
   断点只用 576 / 992。
   ============================================================ */

.auth {
    --cream: #FDF6E9;
    --cream-2: #FAF8F5;
    --ink: #1C1917;
    --ink-2: #44403C;
    --muted: #78716C;
    --line: #E7E5E4;
    --burnt: #B3451A;
    --burnt-dark: #8F3512;
    --amber: #CC8800;
    --on-burnt: #FFFFFF;

    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr);
    min-height: 100vh;
    background: var(--cream-2);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
                 Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

html, body { overflow-x: hidden; margin: 0; }

/* ---------- 左：海报块 ---------- */
.auth-poster {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: 56px 56px 36px;
    overflow: hidden;
    color: var(--on-burnt);
    background-color: var(--burnt);
    /* 极淡的点阵：编辑海报的印刷底纹 */
    background-image: radial-gradient(circle at 1px 1px, rgba(253, 246, 233, .15) 1px, transparent 0);
    background-size: 24px 24px;
}

/* 顶部琥珀色标尺 */
.auth-poster::after {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 5px;
    background: var(--amber);
}

/* 右下角琥珀色同心圆环 */
.auth-poster::before {
    content: '';
    position: absolute;
    right: -170px; bottom: -210px;
    width: 520px; height: 520px;
    border-radius: 50%;
    border: 1px solid rgba(204, 136, 0, .55);
    box-shadow: inset 0 0 0 52px rgba(253, 246, 233, .04);
    pointer-events: none;
}

/* 标题块：不设像素上限，跟着海报栏宽度走（站点名长度由用户配置，
   写死 max-width 会让长名字在最后一个字上折行，例如「…管理系 / 统」） */
.auth-poster-inner {
    position: relative;
    z-index: 1;
    max-width: 100%;
    /* 配合 .auth-poster 的 space-between：把内容块在页脚之上垂直居中，
       否则内容全挤在顶部、下方留一大片空橙色 */
    margin: auto 0;
}

.auth-poster-foot {
    position: relative;
    z-index: 1;
    font-size: 13px;
    color: var(--cream);
}

/* 品牌标记：奶油色「印章」方块，任何配色的 Logo 都放得下 */
.auth-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    min-height: 64px;
    padding: 10px;
    margin-bottom: 44px;
    border-radius: 16px;
    background: var(--cream);
    box-shadow: 0 14px 34px -16px rgba(28, 25, 23, .55);
}

.auth-mark img {
    display: block;
    max-height: 44px;
    max-width: 220px;
    object-fit: contain;
}

.auth-mark-text,
.auth-mark span {
    /* login.js 早期版本会内联写 color:#fff，这里 !important 兜住 */
    color: var(--burnt) !important;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1.2;
    white-space: nowrap;
}

.auth-kicker {
    margin-bottom: 16px;
    font-family: ui-monospace, "SF Mono", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--cream);
}

.auth-headline {
    margin: 0 0 16px;
    /* 站点名长度不可控，用 clamp 自适应：短名字不放大到失真，长名字自动缩字号 */
    font-size: clamp(28px, 3.4vw, 42px);
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: -0.5px;
    color: var(--on-burnt);
    /* 万一仍然放不下（名字特别长），让浏览器均分两行，而不是把最后一个字甩到第二行 */
    text-wrap: balance;
}

.auth-lead {
    margin: 0 0 40px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--cream);
}

.auth-points {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-points li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14.5px;
    color: var(--cream);
}

.auth-dot {
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--amber);
}

/* ---------- 右：表单块 ---------- */
.auth-pane {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: var(--cream-2);
}

.auth-card {
    width: 100%;
    max-width: 404px;
    padding: 40px 40px 34px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--amber);
    border-radius: 4px 18px 18px 4px;
    background: #FFFFFF;
    box-shadow: 0 26px 60px -30px rgba(28, 25, 23, .28);
}

.auth-card-kicker {
    margin-bottom: 10px;
    font-family: ui-monospace, "SF Mono", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--muted);
}

.auth-card-title {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--ink);
}

.auth-card-sub {
    margin: 0 0 28px;
    font-size: 14px;
    color: var(--muted);
}

/* 卡片顶部的返回链接（改密页） */
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 22px;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    transition: color .18s ease;
}

.auth-back:hover { color: var(--burnt); text-decoration: none; }

/* ---------- 输入 ---------- */
.login-input-group { position: relative; margin-bottom: 16px; }

.login-input-group .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    color: var(--muted);
    font-size: 18px;
}

.login-input-group input {
    width: 100%;
    height: 50px;
    padding-left: 48px;
    padding-right: 16px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: var(--cream);
    color: var(--ink);
    font-size: 15px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-input-group input::placeholder { color: var(--muted); }

.login-input-group input:focus {
    outline: none;
    border-color: var(--burnt);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(179, 69, 26, .3);
}

.captcha-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.captcha-wrapper input {
    flex: 1 1 auto;
    min-width: 0;
    height: 50px;
    padding: 0 16px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: var(--cream);
    color: var(--ink);
    font-size: 15px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.captcha-wrapper input::placeholder { color: var(--muted); }

.captcha-wrapper input:focus {
    outline: none;
    border-color: var(--burnt);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(179, 69, 26, .3);
}

.captcha-img {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 46%;
    width: 118px;
    height: 50px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: #FFFFFF;
    object-fit: contain;
    cursor: pointer;
}

/* ---------- 选项行 ---------- */
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    font-size: 14px;
}

.login-options .custom-control-label { color: var(--muted); cursor: pointer; }
.login-options a { color: var(--burnt); font-weight: 600; text-decoration: none; }
.login-options a:hover { text-decoration: underline; }

/* ---------- 提交 ---------- */
.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    background: var(--burnt);
    color: var(--on-burnt);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .12em;
    cursor: pointer;
    box-shadow: 0 12px 26px -12px rgba(179, 69, 26, .6);
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.btn-login:hover { background: var(--burnt-dark); transform: translateY(-1px); }
.btn-login:active { transform: translateY(0); }
.btn-login:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* ---------- 窄屏：海报压成顶部条 ---------- */
@media (max-width: 992px) {
    .auth { grid-template-columns: minmax(0, 1fr); }
    .auth-poster { padding: 40px 28px 34px; gap: 24px; }
    .auth-mark { margin-bottom: 24px; }
    .auth-headline { font-size: 33px; }
    .auth-lead { margin-bottom: 0; }
    .auth-points { display: none; }
    .auth-pane { padding: 36px 20px 56px; }
}

@media (max-width: 576px) {
    .auth-poster { padding: 30px 20px 28px; }
    .auth-headline { font-size: 27px; }
    .auth-kicker { font-size: 12px; letter-spacing: .16em; }
    .auth-pane { padding: 0 16px 48px; }
    /* 验证码换行占满，避免超出边界 */
    .captcha-wrapper { flex-wrap: wrap; }
    .captcha-wrapper input { flex: 1 1 100%; }
    .captcha-img { width: 100%; max-width: 100%; height: 44px; }
    .auth-card {
        max-width: none;
        padding: 28px 22px 26px;
        border-left-width: 1px;
        border-top: 4px solid var(--amber);
        border-radius: 4px 4px 16px 16px;
        margin-top: -18px;
    }
}
