/* ============================================================
   MAYAN EDMS · 煤矿数字档案管理中枢 — Login Theme
   Palette aligned with coal-platform demo:
   navy #050914 · cyan #00e5ff · violet #7c6cf8 · orange #ff8a5c
   ============================================================ */

:root {
    --edms-bg: #050914;
    --edms-bg-1: #080f22;
    --edms-bg-2: #0c1730;
    --edms-cyan: #00e5ff;
    --edms-cyan-deep: #00b8d4;
    --edms-violet: #7c6cf8;
    --edms-violet-deep: #5b4bd6;
    --edms-violet-line: rgba(148, 163, 255, 0.28);
    --edms-orange: #ff8a5c;
    --edms-amber: #ffc53d;
    --edms-red: #ff6b7d;
    --edms-green: #34e0a1;
    /* 浅色玻璃面板上的墨色 */
    --edms-ink: #1e2a4e;
    --edms-ink-2: #4c5b85;
    --edms-ink-3: #8b97bd;
    --edms-glass: rgba(255, 255, 255, 0.72);
    --edms-glass-border: rgba(109, 93, 246, 0.22);
    --edms-font-display: 'Rajdhani', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --edms-font-mono: 'Share Tech Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

html, body {
    height: 100%;
}

body#body-plain {
    margin: 0;
    padding: 0;
    background: var(--edms-bg);
    color: #eef2ff;
    font-family: var(--edms-font-display);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============ 舞台与背景层（demo: radial light @28% 18%） ============ */

.edms-login {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    isolation: isolate;
    overflow: hidden;
}

.edms-login__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.edms-login__grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(124, 108, 248, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 108, 248, 0.05) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 30%, transparent 100%);
}

.edms-login__scanline {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(0, 229, 255, 0.05) 48%,
        rgba(0, 229, 255, 0.09) 50%,
        rgba(0, 229, 255, 0.05) 52%,
        transparent 100%);
    background-size: 100% 260px;
    animation: edms-scan 9s linear infinite;
    mix-blend-mode: screen;
}

@keyframes edms-scan {
    0%   { background-position: 0 -260px; }
    100% { background-position: 0 110vh; }
}

.edms-login__vignette {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(ellipse 120% 90% at 28% 18%, rgba(221, 228, 248, 0.14) 0%, transparent 52%),
        radial-gradient(ellipse 90% 70% at 88% 92%, rgba(124, 108, 248, 0.12), transparent 60%),
        radial-gradient(ellipse closest-side at 50% 50%, transparent 55%, rgba(3, 6, 16, 0.6) 100%);
}

/* ============ 整体布局 ============ */

.edms-login__shell {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
    min-height: 100vh;
    min-height: 100dvh;
}

/* ============ 左侧品牌区（深色，保持终端气质） ============ */

.edms-brand {
    display: flex;
    flex-direction: column;
    padding: clamp(28px, 4vw, 56px);
    border-right: 1px solid rgba(148, 163, 255, 0.12);
    background: linear-gradient(115deg, rgba(5, 9, 20, 0.5) 0%, rgba(5, 9, 20, 0.08) 70%);
    position: relative;
}

.edms-brand::after {
    content: '';
    position: absolute;
    top: 0;
    right: -1px;
    width: 1px;
    height: 34%;
    background: linear-gradient(to bottom, var(--edms-violet), transparent);
    opacity: 0.7;
    animation: edms-edge 6s ease-in-out infinite alternate;
}

@keyframes edms-edge {
    0%   { top: 0; }
    100% { top: 66%; }
}

.edms-brand__top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.edms-brand__logo {
    width: 46px;
    height: 46px;
    color: var(--edms-cyan);
    filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.45));
    flex: none;
}

.edms-brand__logo svg { width: 100%; height: 100%; }

.edms-brand__name {
    font-family: var(--edms-font-mono);
    font-size: 19px;
    letter-spacing: 0.22em;
    color: #eef2ff;
    line-height: 1.1;
}

.edms-brand__sub {
    font-family: var(--edms-font-mono);
    font-size: 10.5px;
    letter-spacing: 0.3em;
    color: var(--edms-ink-3);
    margin-top: 3px;
}

.edms-brand__online {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--edms-font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--edms-green);
    border: 1px solid rgba(52, 224, 161, 0.3);
    background: rgba(52, 224, 161, 0.07);
    padding: 6px 12px;
    border-radius: 6px;
}

.edms-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex: none;
}

.edms-dot--live  { background: var(--edms-green); box-shadow: 0 0 8px var(--edms-green); animation: edms-blink 2.2s ease-in-out infinite; }
.edms-dot--red   { background: var(--edms-red); }
.edms-dot--amber { background: var(--edms-amber); }
.edms-dot--green { background: var(--edms-green); }

@keyframes edms-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.35; }
}

.edms-brand__core {
    margin: auto 0;
    padding: 40px 0;
    max-width: 640px;
}

.edms-brand__eyebrow {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

.edms-tag {
    font-family: var(--edms-font-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    color: var(--edms-cyan);
    border: 1px solid rgba(0, 229, 255, 0.3);
    background: rgba(0, 229, 255, 0.06);
    padding: 5px 12px;
    border-radius: 6px;
}

.edms-tag--amber {
    color: var(--edms-orange);
    border-color: rgba(255, 138, 92, 0.34);
    background: rgba(255, 138, 92, 0.08);
}

.edms-brand__heading {
    font-size: clamp(40px, 4.6vw, 64px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: 0.02em;
    margin: 0 0 22px;
    background: linear-gradient(100deg, #ffffff 20%, #9ecbff 55%, #b9aaff 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 30px rgba(124, 108, 248, 0.25));
}

.edms-brand__heading-accent {
    background: linear-gradient(120deg, var(--edms-cyan), var(--edms-violet));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 22px rgba(0, 229, 255, 0.3));
}

.edms-brand__lede {
    font-size: 15.5px;
    line-height: 1.9;
    color: var(--edms-ink-2);
    max-width: 520px;
    margin: 0 0 36px;
}

.edms-brand__caps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-width: 520px;
}

.edms-cap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(148, 163, 255, 0.14);
    background: rgba(8, 15, 34, 0.55);
    border-radius: 8px;
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.edms-cap:hover {
    border-color: rgba(124, 108, 248, 0.5);
    background: rgba(124, 108, 248, 0.08);
    transform: translateY(-2px);
}

.edms-cap__k {
    font-family: var(--edms-font-mono);
    font-size: 11px;
    color: var(--edms-violet);
    letter-spacing: 0.1em;
}

.edms-cap__v {
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #eef2ff;
}

/* 终端启动日志 */

.edms-brand__terminal {
    border: 1px solid rgba(148, 163, 255, 0.16);
    background: rgba(5, 9, 20, 0.82);
    border-radius: 10px;
    overflow: hidden;
    max-width: 560px;
    box-shadow: 0 18px 50px rgba(3, 8, 24, 0.5);
}

.edms-brand__terminal-head {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border-bottom: 1px solid rgba(148, 163, 255, 0.12);
    background: rgba(148, 163, 255, 0.04);
}

.edms-brand__terminal-head .edms-dot { width: 9px; height: 9px; }

.edms-brand__terminal-title {
    margin-left: 8px;
    font-family: var(--edms-font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--edms-ink-3);
}

.edms-brand__terminal-body {
    padding: 14px 16px 16px;
    font-family: var(--edms-font-mono);
    font-size: 12.5px;
    line-height: 1.85;
    color: rgba(170, 184, 224, 0.9);
    min-height: 118px;
    white-space: pre-wrap;
}

.edms-brand__terminal-body .ok { color: var(--edms-green); }

.edms-brand__foot {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
    font-family: var(--edms-font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--edms-ink-3);
}

.edms-brand__foot-sep { color: var(--edms-violet); }

/* ============ 右侧认证面板（demo: 白色磨砂玻璃 + 紫罗兰光晕） ============ */

.edms-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 4vw, 56px);
}

.edms-auth__panel {
    position: relative;
    width: min(440px, 100%);
    background: var(--edms-glass);
    border: 1px solid var(--edms-glass-border);
    backdrop-filter: blur(22px) saturate(1.2);
    -webkit-backdrop-filter: blur(22px) saturate(1.2);
    box-shadow: 0 36px 100px rgba(60, 70, 130, 0.22), 0 0 80px rgba(124, 108, 248, 0.08);
    border-radius: 16px;
    animation: edms-panel-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes edms-panel-in {
    from { opacity: 0; transform: translateY(26px) scale(0.985); }
    to   { opacity: 1; transform: none; }
}

/* HUD 角标（紫罗兰） */

.edms-corner {
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: var(--edms-violet);
    border-style: solid;
    opacity: 0.85;
    filter: drop-shadow(0 0 5px rgba(124, 108, 248, 0.55));
    pointer-events: none;
    z-index: 5;
}

.edms-corner--tl { top: 7px; left: 7px; border-width: 2px 0 0 2px; border-top-left-radius: 6px; }
.edms-corner--tr { top: 7px; right: 7px; border-width: 2px 2px 0 0; border-top-right-radius: 6px; }
.edms-corner--bl { bottom: 7px; left: 7px; border-width: 0 0 2px 2px; border-bottom-left-radius: 6px; }
.edms-corner--br { bottom: 7px; right: 7px; border-width: 0 2px 2px 0; border-bottom-right-radius: 6px; }

/* 面板头部 */

.edms-auth__head {
    border-bottom: 1px solid rgba(84, 96, 160, 0.14);
    padding: 18px 26px 14px;
}

.edms-auth__headline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.edms-auth__sysmono {
    font-family: var(--edms-font-mono);
    font-size: 11.5px;
    letter-spacing: 0.2em;
    color: var(--edms-violet-deep);
}

.edms-auth__clock {
    font-family: var(--edms-font-mono);
    font-size: 11.5px;
    letter-spacing: 0.12em;
    color: var(--edms-ink-3);
}

/* 音频波形装饰（青→紫渐变） */

.edms-auth__wave {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 18px;
}

.edms-auth__wave i {
    flex: 1;
    background: linear-gradient(to top, rgba(0, 229, 255, 0.35), rgba(124, 108, 248, 0.85));
    height: 30%;
    border-radius: 2px;
    animation: edms-wave 1.4s ease-in-out infinite;
}

.edms-auth__wave i:nth-child(2n)  { animation-delay: 0.18s; }
.edms-auth__wave i:nth-child(3n)  { animation-delay: 0.36s; }
.edms-auth__wave i:nth-child(4n)  { animation-delay: 0.10s; }
.edms-auth__wave i:nth-child(5n)  { animation-delay: 0.44s; }
.edms-auth__wave i:nth-child(7n)  { animation-delay: 0.28s; }

@keyframes edms-wave {
    0%, 100% { height: 22%; opacity: 0.55; }
    50%      { height: 100%; opacity: 1; }
}

/* 表单主体 */

.edms-auth__body { padding: 30px 34px 26px; }

.edms-auth__welcome {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 0 0 6px;
    color: var(--edms-ink);
}

.edms-auth__hint {
    font-size: 13.5px;
    letter-spacing: 0.08em;
    color: var(--edms-ink-3);
    margin: 0 0 28px;
}

.edms-auth .mb-3 { position: relative; }

.edms-auth label.fw-semibold {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    row-gap: 2px;
    column-gap: 8px;
    font-family: var(--edms-font-mono);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--edms-violet-deep);
    margin-bottom: 9px;
}

.edms-auth label.fw-semibold::before {
    content: '>';
    color: var(--edms-cyan-deep);
    font-weight: 700;
}

.edms-req {
    font-size: 10px;
    letter-spacing: 0.1em;
    color: #b57f04;
    border: 1px solid rgba(217, 154, 6, 0.4);
    background: rgba(255, 197, 61, 0.12);
    border-radius: 4px;
    padding: 1px 6px;
    transform: translateY(-1px);
}

.edms-auth .form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(84, 96, 160, 0.16);
    border-radius: 8px;
    color: var(--edms-ink);
    font-family: var(--edms-font-display);
    font-size: 15.5px;
    letter-spacing: 0.04em;
    padding: 13px 16px 13px 44px;
    height: auto;
    caret-color: var(--edms-cyan-deep);
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
    background-image: none;
}

.edms-auth .form-control::placeholder { color: var(--edms-ink-3); }

.edms-auth .form-control:focus {
    background: #ffffff;
    border-color: var(--edms-cyan-deep);
    color: var(--edms-ink);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.18), 0 0 22px rgba(0, 229, 255, 0.12);
    outline: none;
}

.edms-auth .form-control.is-invalid {
    border-color: rgba(229, 72, 77, 0.65);
    box-shadow: 0 0 18px rgba(255, 107, 125, 0.14);
}

.edms-auth .form-control.is-invalid:focus {
    border-color: #e5484d;
    box-shadow: 0 0 0 3px rgba(255, 107, 125, 0.18), 0 0 22px rgba(255, 107, 125, 0.16);
}

/* 字段图标（JS 注入） */

.edms-field-icon {
    position: absolute;
    left: 15px;
    bottom: 14px;
    width: 17px;
    height: 17px;
    color: var(--edms-ink-3);
    pointer-events: none;
    transition: color 0.22s ease, filter 0.22s ease;
    z-index: 6;
}

.edms-auth .mb-3:focus-within .edms-field-icon {
    color: var(--edms-cyan-deep);
    filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.45));
}

/* 密码可见性切换 */

.edms-pw-toggle {
    position: absolute;
    right: 10px;
    bottom: 8px;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--edms-ink-3);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.edms-pw-toggle:hover,
.edms-pw-toggle:focus-visible {
    color: var(--edms-violet);
    border-color: rgba(124, 108, 248, 0.35);
    outline: none;
}

.edms-pw-toggle svg { width: 17px; height: 17px; }

/* 错误提示 */

.edms-auth .alert-danger {
    background: rgba(255, 107, 125, 0.08);
    border: 1px solid rgba(255, 107, 125, 0.4);
    border-left: 3px solid #e5484d;
    border-radius: 8px;
    color: #c62f45;
    font-size: 13px;
    letter-spacing: 0.04em;
    padding: 11px 15px;
    margin-bottom: 20px;
}

/* 提交按钮（demo grad-primary: 青→紫） */

.edms-auth__actions { margin-top: 28px; }

.btn-edms {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    font-family: var(--edms-font-display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #ffffff;
    background: linear-gradient(120deg, #00e5ff, #7c6cf8);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(124, 108, 248, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    transition: transform 0.18s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.btn-edms:hover, .btn-edms:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 229, 255, 0.35), 0 8px 30px rgba(124, 108, 248, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    filter: brightness(1.06);
    outline: none;
    color: #ffffff;
}

.btn-edms:active { transform: translateY(0); }

.btn-edms::after {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 45%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: skewX(-20deg);
    animation: edms-shine 3.4s ease-in-out infinite;
}

@keyframes edms-shine {
    0%, 55%  { left: -80%; }
    85%, 100% { left: 140%; }
}

.edms-btn-icon { width: 17px; height: 17px; }

.btn-edms-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 18px;
    font-size: 13.5px;
    letter-spacing: 0.12em;
    color: var(--edms-ink-2);
    background: transparent;
    border: 1px solid rgba(84, 96, 160, 0.24);
    border-radius: 8px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.btn-edms-ghost:hover {
    color: var(--edms-violet-deep);
    border-color: rgba(124, 108, 248, 0.45);
}

/* 底部链接 */

.edms-auth__links {
    margin-top: 22px;
    text-align: center;
}

.edms-auth__links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    letter-spacing: 0.1em;
    color: var(--edms-ink-2);
    text-decoration: none;
    border-bottom: 1px dashed rgba(84, 96, 160, 0.4);
    padding-bottom: 2px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.edms-auth__links a:hover {
    color: var(--edms-violet-deep);
    border-bottom-color: var(--edms-violet);
}

.edms-auth__links svg { width: 14px; height: 14px; }

/* 面板底部状态条 */

.edms-auth__foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 13px 20px;
    border-top: 1px solid rgba(84, 96, 160, 0.14);
    font-family: var(--edms-font-mono);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    color: var(--edms-ink-3);
}

/* ============ 进入动画 ============ */

.edms-brand > * {
    animation: edms-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.edms-brand > *:nth-child(1) { animation-delay: 0.05s; }
.edms-brand > *:nth-child(2) { animation-delay: 0.16s; }
.edms-brand > *:nth-child(3) { animation-delay: 0.28s; }
.edms-brand > *:nth-child(4) { animation-delay: 0.40s; }

@keyframes edms-rise {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .edms-login__scanline,
    .btn-edms::after,
    .edms-auth__wave i,
    .edms-brand::after,
    .edms-dot--live { animation: none; }
}

/* ============ 响应式 ============ */

@media (max-width: 1100px) {
    .edms-login__shell { grid-template-columns: minmax(0, 1fr) minmax(400px, 0.9fr); }
    .edms-brand__terminal { display: none; }
}

@media (max-width: 900px) {
    .edms-login__shell { grid-template-columns: 1fr; }
    .edms-brand {
        border-right: none;
        border-bottom: 1px solid rgba(148, 163, 255, 0.12);
        padding-bottom: 20px;
    }
    .edms-brand__core { margin: 0; padding: 30px 0 10px; }
    .edms-brand__terminal, .edms-brand__foot { display: none; }
    .edms-brand__lede { margin-bottom: 24px; }
    .edms-auth { padding-top: 34px; }
}

@media (max-width: 560px) {
    .edms-brand { padding: 22px 20px 14px; }
    .edms-brand__online { display: none; }
    .edms-brand__caps { grid-template-columns: 1fr 1fr; gap: 8px; }
    .edms-cap { padding: 10px 12px; }
    .edms-cap__v { font-size: 13px; }
    .edms-auth { padding: 24px 16px 40px; }
    .edms-auth__body { padding: 24px 20px 20px; }
    .edms-auth__head { padding: 14px 20px 12px; }
    .edms-brand__heading { font-size: 34px; }
}
