:root {
    --text-main: #2f231e;
    --text-muted: #7c685f;
    --text-light: #a0897d;
    --accent: #dc6b2e;
    --accent-deep: #c65318;
    --line-soft: rgba(190, 116, 69, 0.16);
    --panel-bg: rgba(255, 255, 255, 0.88);
    --panel-bg-strong: rgba(255, 255, 255, 0.96);
    --shadow-lg: 0 28px 64px rgba(104, 61, 35, 0.16);
    --shadow-sm: 0 14px 30px rgba(104, 61, 35, 0.08);
    --radius-xl: 32px;
    --radius-lg: 20px;
    --radius-md: 16px;
}

html,
body {
    min-height: 100%;
}

body.signin {
    position: relative;
    min-height: 100vh;
    margin: 0;
    overflow: hidden auto;
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at 18% 20%, rgba(237, 173, 132, 0.2), transparent 24%),
        radial-gradient(circle at 82% 18%, rgba(224, 145, 92, 0.16), transparent 22%),
        linear-gradient(135deg, #f7efe8 0%, #fcf8f4 52%, #f3e9e1 100%);
}

body.signin:before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(188, 122, 80, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(188, 122, 80, 0.05) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.28));
}

.signin-shell {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 28px;
}

.ambient {
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(8px);
}

.ambient-left {
    left: -90px;
    top: 15%;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(220, 107, 46, 0.16) 0%, rgba(220, 107, 46, 0) 72%);
}

.ambient-right {
    right: -60px;
    bottom: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(198, 83, 24, 0.16) 0%, rgba(198, 83, 24, 0) 72%);
}

.center-stage {
    width: 100%;
    display: flex;
    justify-content: center;
}

.signin-card {
    width: 100%;
    max-width: 520px;
    padding: 38px 34px 28px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, var(--panel-bg-strong), var(--panel-bg));
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
    text-align: center;
}

.brand-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 34px rgba(198, 83, 24, 0.14);
    overflow: hidden;
    padding: 10px;
}

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

.brand-name {
    margin-top: 18px;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: 1px;
}

.brand-subtitle {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 18px;
    font-weight: 600;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    padding: 10px 16px;
    border: 1px solid rgba(220, 107, 46, 0.18);
    border-radius: 999px;
    background: rgba(255, 247, 242, 0.9);
    color: var(--accent);
    font-size: 14px;
    box-shadow: var(--shadow-sm);
}

.brand-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ec9d67, #dc6b2e);
    box-shadow: 0 0 0 4px rgba(220, 107, 46, 0.1);
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 28px 0 30px;
    padding: 12px 14px;
    border: 1px solid rgba(190, 116, 69, 0.12);
    border-radius: 18px;
    background: rgba(250, 244, 239, 0.82);
}

.status-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6f5b52;
    font-size: 13px;
    font-weight: 600;
}

.status-item i {
    color: var(--accent);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #37b26f;
    box-shadow: 0 0 0 4px rgba(55, 178, 111, 0.12);
}

.status-divider {
    width: 1px;
    height: 14px;
    background: rgba(190, 116, 69, 0.16);
}

.field-group {
    margin-bottom: 18px;
    text-align: left;
}

.field-label {
    display: block;
    margin-bottom: 10px;
    color: #6d5950;
    font-size: 14px;
    font-weight: 700;
}

.field-wrap {
    position: relative;
}

.field-wrap i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #be9989;
    font-size: 16px;
}

.signin .form-control {
    height: 54px !important;
    padding: 14px 16px 14px 46px !important;
    border: 1px solid rgba(190, 116, 69, 0.18);
    border-radius: var(--radius-md) !important;
    background: rgba(255, 255, 255, 0.94);
    color: var(--text-main);
    font-size: 15px;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.signin .form-control::placeholder {
    color: #c1a49a;
}

.signin .form-control:focus {
    border-color: rgba(220, 107, 46, 0.5) !important;
    box-shadow: 0 0 0 4px rgba(220, 107, 46, 0.1);
    transform: translateY(-1px);
}

.captcha-row {
    display: flex;
    gap: 12px;
}

.captcha-row .field-wrap {
    flex: 1;
}

.captcha-box {
    flex: 0 0 132px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(190, 116, 69, 0.18);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.94);
}

.imgcode {
    display: block;
    width: 100%;
    height: 54px;
    object-fit: cover;
}

.signin-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
    text-align: left;
}

.checkbox-custom {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.checkbox-custom input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.checkbox-custom label {
    position: relative;
    margin: 0;
    padding-left: 30px;
    color: #7d675d;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.checkbox-custom label:before {
    content: "";
    position: absolute;
    left: 0;
    top: 1px;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(190, 116, 69, 0.28);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.96);
    transition: all 0.2s ease;
}

.checkbox-custom input[type="checkbox"]:checked + label:before {
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    border-color: transparent;
}

.checkbox-custom input[type="checkbox"]:checked + label:after {
    content: "\f00c";
    position: absolute;
    left: 5px;
    top: 2px;
    color: #fff;
    font-family: FontAwesome;
    font-size: 11px;
}

.meta-note {
    color: var(--text-light);
    font-size: 13px;
}

.signin-submit {
    width: 100%;
    margin-top: 24px;
    height: 54px;
    border: 0;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #e07b40, #c65318);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 18px 30px rgba(198, 83, 24, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.signin-submit:hover,
.signin-submit:focus {
    transform: translateY(-1px);
    box-shadow: 0 22px 36px rgba(198, 83, 24, 0.28);
    color: #fff;
}

.footer-note {
    margin-top: 18px;
    color: var(--text-light);
    font-size: 13px;
}

.signin .form-control,
.signin .form-control:focus,
.signin .has-error .form-control:focus,
.signin .has-success .form-control:focus,
.signin .has-warning .form-control:focus,
.navbar-collapse,
.navbar-form,
.navbar-form-custom .form-control:focus,
.navbar-form-custom .form-control:hover,
.open .btn.dropdown-toggle,
.panel,
.popover,
.progress,
.progress-bar {
    box-shadow: none;
}

label.error {
    display: block;
    margin-top: 8px;
    color: #d9534f;
    font-size: 13px;
    font-weight: 500;
}

body .layer-ext-moon-msg[type="dialog"] {
    min-width: 100px !important;
}

body .layer-ext-moon-msg {
    background-color: rgba(37, 26, 20, 0.82);
    color: #fff;
    border: none;
}

body .layer-ext-moon-msg .layui-layer-content {
    padding: 12px 25px;
    text-align: center;
}

@media screen and (max-width: 640px) {
    .signin-shell {
        padding: 16px;
        align-items: center;
    }

    .signin-card {
        max-width: none;
        padding: 28px 18px 22px;
        border-radius: 24px;
    }

    .brand-mark {
        width: 78px;
        height: 78px;
        border-radius: 18px;
        padding: 8px;
    }

    .brand-name {
        margin-top: 16px;
        font-size: 28px;
    }

    .brand-subtitle {
        font-size: 16px;
    }

    .status-row {
        gap: 10px;
        padding: 10px 12px;
    }

    .status-divider {
        display: none;
    }

    .status-item {
        width: 100%;
        justify-content: center;
    }

    .captcha-row,
    .signin-meta {
        flex-direction: column;
        align-items: stretch;
    }

    .captcha-box {
        flex-basis: auto;
    }

    .meta-note {
        text-align: center;
    }

    .signin .form-control,
    .imgcode,
    .signin-submit {
        height: 50px !important;
    }
}
