:root {
    --bg: #f4f7f9;
    --panel: #ffffff;
    --panel-soft: #f8fafb;
    --line: #dce5ec;
    --line-soft: #edf2f5;
    --text: #18232e;
    --muted: #667483;
    --faint: #8d99a6;
    --green: #13664c;
    --green-2: #1f8a67;
    --green-soft: #e8f5f0;
    --blue-soft: #eef5fb;
    --orange: #f59e0b;
    --danger: #d94848;
    --shadow: 0 18px 48px rgba(31, 49, 65, 0.08);
    --radius: 10px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
    letter-spacing: 0;
}

a {
    color: inherit;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
}

.rail {
    background: #10291f;
    color: #dcefe7;
    padding: 18px 10px;
}

.rail-logo {
    width: 42px;
    height: 42px;
    margin: 0 auto 24px;
    border-radius: 10px;
    background: linear-gradient(135deg, #35c989, #1d8f65);
}

.rail-item {
    width: 42px;
    height: 42px;
    margin: 12px auto;
    border-radius: 9px;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.68);
    background: rgba(255, 255, 255, 0.08);
}

.rail-item svg {
    width: 20px;
    height: 20px;
    display: block;
}

.rail-item.active {
    background: #ffffff;
    color: var(--green);
}

.workspace {
    min-width: 0;
}

.topbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 28px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.brand-title {
    font-size: 19px;
    line-height: 1.25;
    font-weight: 800;
}

.brand-subtitle {
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.status-pill,
.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 6px 11px;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
}

.content {
    width: min(1240px, 100%);
    margin: 0 auto;
    padding: 28px;
}

.hero-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 18px;
    align-items: stretch;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.panel-pad {
    padding: 20px;
}

.section-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 800;
}

.section-subtitle {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: var(--green);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover {
    background: #0f553f;
}

.btn-secondary {
    background: var(--panel);
    color: var(--text);
    border-color: var(--line);
}

.btn-secondary:hover {
    background: var(--panel-soft);
}

.btn:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.field-label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.input,
.select {
    width: 100%;
    height: 44px;
    border: 1px solid #cfdce6;
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
    padding: 0 12px;
}

.input:focus,
.select:focus {
    outline: none;
    border-color: var(--green-2);
    box-shadow: 0 0 0 3px rgba(31, 138, 103, 0.15);
}

.footer {
    padding: 24px 28px 32px;
    text-align: center;
    color: var(--faint);
    font-size: 12px;
}

.footer a {
    color: var(--faint);
    text-decoration: none;
}

.footer a:hover {
    color: var(--green);
}

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

    .rail {
        display: none;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .top-actions {
        justify-content: flex-start;
    }

    .content {
        padding: 18px;
    }

    .hero-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .topbar {
        padding: 16px;
    }

    .content {
        padding: 14px;
    }

    .btn {
        width: 100%;
    }
}
