:root {
    --login-bg: #f4ead8;
    --login-ink: #251f1a;
    --login-muted: #71685d;
    --login-teal: #0a4c47;
    --login-green: #3f854f;
    --login-line: #d8c3a2;
    --login-shadow: 0 18px 40px rgba(83, 58, 29, 0.18);
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    color: var(--login-ink);
    background:
        linear-gradient(180deg, rgba(255, 249, 236, 0.90), rgba(244, 231, 210, 0.94)),
        url("../img/ticket-template/paper-texture.png"),
        var(--login-bg);
    font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
}

.login-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(360px, 1fr) 520px;
    min-height: 100vh;
    overflow: hidden;
}

.brand-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 42px 52px;
    color: #fff8ea;
    background:
        radial-gradient(circle at 80% 18%, rgba(255, 248, 234, 0.10), transparent 24%),
        radial-gradient(circle at 22% 72%, rgba(47, 133, 118, 0.34), transparent 30%),
        linear-gradient(135deg, #021918 0%, #073d39 48%, #032523 100%);
    box-shadow: inset -22px 0 32px rgba(0, 0, 0, 0.28);
}

.brand-stage::after {
    content: "";
    position: absolute;
    right: -34px;
    top: 0;
    bottom: 0;
    width: 68px;
    background: radial-gradient(circle, rgba(244, 234, 216, 1) 0 7px, transparent 8px) center 16px / 24px 26px repeat-y;
    opacity: 0.96;
}

.brand-bar {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo {
    width: 58px;
    height: 58px;
    padding: 3px;
    border: 1px solid rgba(216, 195, 162, 0.82);
    border-radius: 50%;
    background:
        linear-gradient(180deg, rgba(255, 249, 236, 0.96), rgba(244, 231, 210, 0.96)),
        url("../img/ticket-template/paper-texture.png"),
        var(--login-bg);
}

.brand-name {
    font-size: 25px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 1px;
}

.brand-sub {
    margin-top: 5px;
    color: rgba(255, 248, 234, 0.66);
    font-size: 14px;
}

.hero-copy {
    position: relative;
    z-index: 1;
    max-width: 560px;
    padding-bottom: 16px;
}

.hero-copy h1 {
    margin: 0;
    color: #fffdf4;
    font-size: 48px;
    line-height: 1.08;
    letter-spacing: 0;
}

.hero-copy p {
    max-width: 470px;
    margin: 18px 0 0;
    color: rgba(255, 248, 234, 0.74);
    font-family: "Microsoft YaHei", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.8;
}

.stage-meta {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 590px;
}

.meta-item {
    min-height: 76px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 248, 234, 0.18);
    border-radius: 8px;
    background: rgba(255, 248, 234, 0.06);
}

.meta-item strong {
    display: block;
    color: #fffef4;
    font-size: 19px;
    line-height: 1.2;
}

.meta-item span {
    display: block;
    margin-top: 8px;
    color: rgba(255, 248, 234, 0.64);
    font-family: "Microsoft YaHei", Arial, sans-serif;
    font-size: 12px;
}

.login-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px;
}

.login-area::before {
    content: "";
    position: absolute;
    top: 36px;
    right: 34px;
    width: 230px;
    height: 96px;
    background: url("../img/ticket-style-icons/header-sewing-art.png") center / contain no-repeat;
    opacity: 0.32;
}

.login-card {
    position: relative;
    z-index: 1;
    width: min(100%, 430px);
    border: 1px solid var(--login-line);
    border-radius: 12px;
    background:
        linear-gradient(rgba(255, 248, 234, 0.92), rgba(255, 248, 234, 0.92)),
        url("../img/ticket-template/paper-texture.png");
    box-shadow: var(--login-shadow);
}

.login-card::before,
.login-card::after {
    content: "";
    position: absolute;
    top: 16px;
    bottom: 16px;
    width: 24px;
    pointer-events: none;
    background: radial-gradient(circle, rgba(244, 234, 216, 1) 0 5px, transparent 6px) left top / 14px 18px repeat-y;
}

.login-card::before {
    left: -7px;
}

.login-card::after {
    right: -19px;
}

.card-head {
    padding: 30px 34px 22px;
    border-bottom: 1px dashed rgba(154, 124, 84, 0.36);
}

.card-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 28px;
    padding: 0 11px;
    border: 1px solid rgba(63, 133, 79, 0.42);
    border-radius: 5px;
    color: #2d733a;
    background: rgba(236, 247, 229, 0.76);
    font-family: "Microsoft YaHei", Arial, sans-serif;
    font-size: 12px;
    font-weight: 800;
}

.card-kicker::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--login-green);
}

.card-head h2 {
    margin: 18px 0 8px;
    font-size: 34px;
    line-height: 1.1;
    letter-spacing: 0;
}

.card-head p {
    margin: 0;
    color: var(--login-muted);
    font-family: "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px;
}

.login-form {
    padding: 24px 34px 32px;
    font-family: "Microsoft YaHei", Arial, sans-serif;
}

.form-row {
    margin-bottom: 18px;
}

.form-row label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    color: var(--login-ink);
    font-size: 14px;
    font-weight: 900;
}

.form-row label span {
    color: var(--login-muted);
    font-size: 12px;
    font-weight: 700;
}

.input-wrap {
    position: relative;
}

.input-wrap::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    opacity: 0.82;
    background: var(--icon) center / contain no-repeat;
}

.input-wrap.user {
    --icon: url("../img/ticket-style-icons/employees_icon_refined_green_transparent.png");
}

.input-wrap.password {
    --icon: url("../img/ticket-template/quality-checked.png");
}

.input-wrap input {
    width: 100%;
    height: 46px;
    padding: 0 14px 0 42px;
    border: 1px solid #d7c5aa;
    border-radius: 6px;
    color: var(--login-ink);
    background: rgba(255, 253, 247, 0.92);
    font-size: 15px;
    line-height: 46px;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.input-wrap input:focus {
    border-color: rgba(10, 76, 71, 0.72);
    background: #fffdf7;
    box-shadow: 0 0 0 3px rgba(10, 76, 71, 0.12);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 2px 0 22px;
    color: var(--login-muted);
    font-size: 13px;
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 28px;
    cursor: pointer;
}

.remember input {
    width: 16px;
    height: 16px;
    accent-color: var(--login-teal);
}

.forgot {
    color: var(--login-teal);
    font-weight: 800;
    text-decoration: none;
}

.login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 6px;
    color: #fff8ea;
    background: linear-gradient(180deg, #0e655d, #073e3a);
    box-shadow: 0 12px 22px rgba(39, 29, 18, 0.18);
    font: 900 16px "Microsoft YaHei", Arial, sans-serif;
    cursor: pointer;
}

.login-button:hover {
    background: linear-gradient(180deg, #13756c, #073e3a);
}

.copyright {
    position: absolute;
    left: 42px;
    right: 42px;
    bottom: 20px;
    color: rgba(113, 104, 93, 0.72);
    font-family: "Microsoft YaHei", Arial, sans-serif;
    font-size: 12px;
    text-align: center;
}

@media (max-width: 980px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .brand-stage {
        min-height: 330px;
        padding: 30px 26px;
    }

    .brand-stage::after {
        display: none;
    }

    .hero-copy {
        margin-top: 42px;
    }

    .hero-copy h1 {
        font-size: 34px;
    }

    .stage-meta {
        grid-template-columns: 1fr;
        max-width: none;
        margin-top: 24px;
    }

    .login-area {
        min-height: calc(100vh - 330px);
        padding: 34px 20px 74px;
    }

    .login-area::before {
        right: 8px;
        width: 170px;
        opacity: 0.22;
    }
}

@media (max-width: 560px) {
    .brand-stage {
        min-height: 280px;
    }

    .brand-logo {
        width: 48px;
        height: 48px;
    }

    .brand-name {
        font-size: 21px;
    }

    .hero-copy p,
    .stage-meta {
        display: none;
    }

    .login-card {
        width: 100%;
    }

    .card-head,
    .login-form {
        padding-left: 24px;
        padding-right: 24px;
    }

    .card-head h2 {
        font-size: 29px;
    }

    .form-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .copyright {
        left: 20px;
        right: 20px;
    }
}

.register-shell .hero-copy h1 {
    max-width: 820px;
}

.input-wrap.factory::before {
    background:
            linear-gradient(#3f854f, #3f854f) 7px 7px / 18px 3px no-repeat,
            linear-gradient(#3f854f, #3f854f) 7px 15px / 18px 3px no-repeat,
            linear-gradient(#3f854f, #3f854f) 7px 23px / 18px 3px no-repeat;
}

.input-wrap select {
    width: 100%;
    height: 50px;
    border: 0;
    color: var(--login-ink);
    background: transparent;
    font-size: 16px;
    font-weight: 700;
    outline: none;
    padding: 0 16px 0 48px;
    appearance: none;
}

.register-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 14px;
}

.register-submit {
    margin-top: 0;
}

.register-back {
    height: 50px;
    min-width: 112px;
    border: 1px solid var(--login-line);
    border-radius: 8px;
    color: var(--login-ink);
    background: rgba(255, 253, 247, 0.86);
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
}

.register-back:hover {
    border-color: #ad936b;
}

@media (max-width: 560px) {
    .register-actions {
        grid-template-columns: 1fr;
    }

    .register-back {
        width: 100%;
    }
}
