:root {
    --background: #f3f8f7;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-solid: #ffffff;
    --text-main: #18312d;
    --text-soft: #69807b;
    --primary: #4d9a89;
    --primary-dark: #347c6d;
    --primary-light: #e4f3ef;
    --border: #dce9e5;
    --danger: #b85353;
    --danger-bg: #fff0f0;
    --shadow: 0 20px 60px rgba(35, 91, 80, 0.10);
    --radius-large: 26px;
    --radius-medium: 18px;
    --radius-small: 12px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text-main);
    font-family:
        Inter,
        "PingFang SC",
        "Microsoft YaHei",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    background:
        radial-gradient(
            circle at 10% 0%,
            rgba(161, 218, 204, 0.30),
            transparent 32%
        ),
        radial-gradient(
            circle at 100% 20%,
            rgba(207, 231, 218, 0.42),
            transparent 30%
        ),
        var(--background);
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.page-shell {
    width: min(1500px, calc(100% - 40px));
    margin: 0 auto;
    padding-bottom: 40px;
}

.topbar {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.brand-logo {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: white;
    font-size: 19px;
    font-weight: 800;
    border-radius: 14px;
    background:
        linear-gradient(
            145deg,
            #66b5a3,
            #347c6d
        );
    box-shadow: 0 10px 24px rgba(52, 124, 109, 0.24);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-copy strong {
    font-size: 17px;
    letter-spacing: -0.02em;
}

.brand-copy small {
    color: var(--text-soft);
    font-size: 12px;
}

.ghost-button {
    padding: 9px 15px;
    color: var(--text-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
}

.ghost-button:hover {
    color: var(--primary-dark);
    border-color: #bcd9d2;
    background: white;
}

.workspace {
    display: grid;
    grid-template-columns: minmax(230px, 0.72fr) minmax(520px, 1.55fr) minmax(270px, 0.83fr);
    gap: 22px;
    align-items: start;
}

.intro-panel,
.creation-panel,
.result-panel {
    border: 1px solid rgba(220, 233, 229, 0.90);
    border-radius: var(--radius-large);
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.intro-panel {
    min-height: 690px;
    padding: 38px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        linear-gradient(
            165deg,
            rgba(255, 255, 255, 0.94),
            rgba(225, 243, 238, 0.88)
        );
}

.soft-label {
    display: inline-flex;
    padding: 7px 10px;
    color: var(--primary-dark);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
}

.intro-panel h1 {
    margin: 28px 0 18px;
    font-size: clamp(34px, 3.2vw, 54px);
    line-height: 1.12;
    letter-spacing: -0.06em;
}

.intro-panel p {
    margin: 0;
    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.9;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--text-soft);
    font-size: 13px;
}

.online-dot,
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5db39e;
    box-shadow: 0 0 0 5px rgba(93, 179, 158, 0.13);
}

.creation-panel {
    padding: 32px;
}

.result-panel {
    padding: 26px;
}

.panel-heading {
    margin-bottom: 25px;
}

.panel-heading > div,
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-heading h2,
.section-title h2 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -0.03em;
}

.panel-heading p {
    margin: 9px 0 0 36px;
    color: var(--text-soft);
    font-size: 13px;
}

.panel-heading.compact {
    margin-bottom: 20px;
}

.step-number {
    width: 26px;
    height: 26px;
    display: inline-grid;
    place-items: center;
    color: var(--primary-dark);
    font-size: 10px;
    font-weight: 800;
    border-radius: 9px;
    background: var(--primary-light);
}

.notice {
    margin-bottom: 20px;
    padding: 13px 15px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-radius: var(--radius-small);
}

.notice-error {
    color: var(--danger);
    border: 1px solid #f3caca;
    background: var(--danger-bg);
}

.notice span {
    font-size: 13px;
}

.creation-type-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.creation-type-card {
    position: relative;
    min-height: 116px;
    cursor: pointer;
}

.creation-type-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.type-card-content {
    height: 100%;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
    background: rgba(255, 255, 255, 0.72);
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.creation-type-card:hover .type-card-content {
    transform: translateY(-2px);
    border-color: #b8d9d1;
}

.creation-type-card input:checked + .type-card-content {
    border-color: var(--primary);
    background: linear-gradient(
        145deg,
        #ffffff,
        #eaf7f3
    );
    box-shadow: 0 12px 28px rgba(77, 154, 137, 0.14);
}

.type-icon {
    width: 31px;
    height: 31px;
    margin-bottom: 12px;
    display: grid;
    place-items: center;
    color: var(--primary-dark);
    font-size: 15px;
    font-weight: 800;
    border-radius: 10px;
    background: var(--primary-light);
}

.type-card-content strong {
    margin-bottom: 5px;
    font-size: 15px;
}

.type-card-content small {
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.5;
}

.form-section {
    margin-top: 30px;
    padding-top: 27px;
    border-top: 1px solid var(--border);
}

.section-title {
    margin-bottom: 22px;
}

.field-group {
    margin-bottom: 19px;
}

.field-group label {
    display: block;
    margin-bottom: 8px;
    color: #3b5751;
    font-size: 13px;
    font-weight: 700;
}

input[type="text"],
input[type="password"],
textarea,
select {
    width: 100%;
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: 13px;
    outline: none;
    background: rgba(255, 255, 255, 0.82);
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

input[type="text"],
input[type="password"],
select {
    min-height: 48px;
    padding: 0 14px;
}

textarea {
    min-height: 210px;
    padding: 14px;
    resize: vertical;
    line-height: 1.75;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #78b9aa;
    background: white;
    box-shadow: 0 0 0 4px rgba(77, 154, 137, 0.11);
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.field-help {
    margin-top: 7px;
    color: var(--text-soft);
    font-size: 12px;
}

.novel-fields {
    display: none;
    margin-bottom: 20px;
    padding: 18px;
    border: 1px solid #d1e7e1;
    border-radius: var(--radius-medium);
    background: rgba(232, 247, 243, 0.66);
}

.novel-fields.is-visible {
    display: block;
}

.novel-fields .field-group {
    margin-bottom: 0;
}

.novel-tip {
    margin-top: 13px;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.65;
}

.primary-button {
    width: 100%;
    min-height: 52px;
    margin-top: 3px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    font-weight: 800;
    border: 0;
    border-radius: 14px;
    background:
        linear-gradient(
            135deg,
            #5aab98,
            #347c6d
        );
    box-shadow: 0 14px 28px rgba(52, 124, 109, 0.22);
}

.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(52, 124, 109, 0.27);
}

.empty-state {
    min-height: 245px;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px dashed #c9ddd8;
    border-radius: var(--radius-medium);
    background: rgba(246, 251, 249, 0.72);
}

.empty-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    color: var(--primary-dark);
    font-size: 19px;
    border-radius: 15px;
    background: var(--primary-light);
}

.empty-state h3 {
    margin: 16px 0 7px;
    font-size: 15px;
}

.empty-state p {
    margin: 0;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.7;
}

.task-card {
    padding: 19px;
    border: 1px solid #cfe4de;
    border-radius: var(--radius-medium);
    background:
        linear-gradient(
            150deg,
            #ffffff,
            #eef8f5
        );
}

.task-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.task-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 800;
}

.task-type {
    color: var(--text-soft);
    font-size: 11px;
}

.task-card h3 {
    margin: 18px 0 11px;
    font-size: 19px;
    line-height: 1.4;
}

.task-tags {
    margin-bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.task-tags span {
    padding: 5px 8px;
    color: var(--primary-dark);
    font-size: 10px;
    font-weight: 700;
    border-radius: 999px;
    background: var(--primary-light);
}

.task-request {
    max-height: 170px;
    overflow: auto;
    padding: 12px;
    color: #526b66;
    font-size: 12px;
    line-height: 1.7;
    white-space: pre-wrap;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.72);
}

.task-progress {
    margin-top: 17px;
}

.progress-line {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #dfece8;
}

.progress-line span {
    width: 24%;
    height: 100%;
    display: block;
    border-radius: inherit;
    background: var(--primary);
}

.task-progress p {
    margin: 10px 0 0;
    color: var(--text-soft);
    font-size: 11px;
    line-height: 1.65;
}

.capability-list {
    margin-top: 24px;
    padding-top: 21px;
    border-top: 1px solid var(--border);
}

.capability-list h3 {
    margin: 0 0 13px;
    font-size: 13px;
}

.capability-list > div {
    padding: 10px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #ebf2f0;
}

.capability-list span {
    font-size: 12px;
    font-weight: 700;
}

.capability-list small {
    color: var(--text-soft);
    font-size: 10px;
}

/* 登录页 */

.login-body {
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(420px, 100%);
    padding: 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-large);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.login-card .brand-mark {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    margin-bottom: 25px;
    color: white;
    font-size: 22px;
    font-weight: 800;
    border-radius: 17px;
    background: linear-gradient(145deg, #66b5a3, #347c6d);
}

.login-card h1 {
    margin: 0;
    font-size: 26px;
}

.login-card .subtitle {
    margin: 8px 0 26px;
    color: var(--text-soft);
}

.login-card form label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
}

.login-card button[type="submit"] {
    width: 100%;
    min-height: 50px;
    margin-top: 15px;
    color: white;
    font-weight: 800;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, #5aab98, #347c6d);
}

.message.error {
    margin-bottom: 18px;
    padding: 12px;
    color: var(--danger);
    font-size: 13px;
    border: 1px solid #f3caca;
    border-radius: 11px;
    background: var(--danger-bg);
}

@media (max-width: 1180px) {
    .workspace {
        grid-template-columns: minmax(220px, 0.75fr) minmax(500px, 1.6fr);
    }

    .result-panel {
        grid-column: 1 / -1;
    }

    .intro-panel {
        min-height: 100%;
    }
}

@media (max-width: 820px) {
    .page-shell {
        width: min(100% - 24px, 720px);
    }

    .workspace {
        grid-template-columns: 1fr;
    }

    .intro-panel {
        min-height: auto;
        padding: 28px;
    }

    .status-row {
        margin-top: 35px;
    }

    .creation-panel,
    .result-panel {
        padding: 22px;
    }
}

@media (max-width: 560px) {
    .topbar {
        min-height: 74px;
    }

    .brand-copy small {
        display: none;
    }

    .creation-type-grid,
    .field-grid {
        grid-template-columns: 1fr;
    }

    .creation-type-card {
        min-height: 102px;
    }

    .login-card {
        padding: 30px 24px;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    white-space: nowrap;
    border: 0;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
}
