* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f5f7f4;
    color: #1f2d2a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
    max-width: 1240px;
    margin: 0 auto;
    padding: 28px 20px 48px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.brand-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.topbar .top-actions {
    margin-left: auto;
}

.topbar h1 {
    margin: 0;
    font-size: 28px;
}

.topbar p {
    margin: 8px 0 0;
    color: #64736f;
}

.top-actions,
.toolbar,
.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbar {
    margin-bottom: 14px;
}

.auth-tabs {
    max-width: 520px;
    margin: 0 auto;
}

.auth-page {
    max-width: 430px;
    margin: 72px auto 0;
}

.auth-page-heading {
    margin-bottom: 28px;
    text-align: center;
}

.auth-page-heading h2 {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 0;
}

.auth-switch {
    display: block;
    margin: 16px auto 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #397c5a;
    cursor: pointer;
    font: inherit;
}

.auth-page .el-card {
    border: 0;
    box-shadow: none;
    background: transparent;
}

.auth-page .el-form {
    padding: 22px 24px 24px;
    background: #fff;
    border: 1px solid #e5ebe7;
    border-radius: 12px;
}

.auth-page .el-button {
    min-width: 96px;
    min-height: 42px;
    margin-top: 6px;
}

.auth-page .auth-primary-button {
    display: flex;
    width: 100%;
    margin-top: 8px;
    justify-content: center;
    border-radius: 9px;
    font-size: 16px;
    font-weight: 600;
}

.auth-page .el-tabs__nav-wrap::after {
    background-color: #e5ebe7;
}

.auth-page .el-tabs__item {
    height: 42px;
    padding: 0 18px;
    color: #74817d;
}

.auth-page .el-tabs__item.is-active {
    color: #397c5a;
    font-weight: 600;
}

.auth-page .el-form-item {
    margin-bottom: 20px;
}

.auth-page .el-form-item__label {
    color: #51615c;
    font-size: 14px;
}

.auth-page .el-input__wrapper {
    min-height: 44px;
    border-radius: 8px;
    box-shadow: 0 0 0 1px #dce5df inset;
}

.auth-page .el-input__wrapper.is-focus {
    box-shadow: 0 0 0 1px #397c5a inset;
}

.dialog-copy {
    margin: 0;
    color: #51615c;
    line-height: 1.7;
}

.mb {
    margin-bottom: 16px;
}

.summary-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 16px;
    margin-bottom: 16px;
}

.warn {
    color: #b7791f;
}

.pre {
    white-space: pre-wrap;
    margin: 6px 0;
}

.notice-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: #64736f;
}

.notice-heading strong {
    color: #1f2d2a;
}

.notice-content {
    line-height: 1.7;
}

.el-card {
    border-radius: 8px;
}

.user-console {
    max-width: 920px;
    margin: 0 auto;
}

.user-console-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 18px 0 22px;
}

.setting-group-title {
    color: #73817d;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.user-console h2 {
    margin: 5px 0 6px;
    font-size: 30px;
    line-height: 1.15;
}

.muted {
    color: #74817d;
}

.account-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #51615c;
    font-size: 14px;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #9aa6a1;
}

.status-dot.running {
    background: #39a56b;
}

.setting-group {
    margin-bottom: 22px;
}

.setting-group-title {
    margin: 0 0 8px 4px;
}

.setting-navigation-row {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid #e2e9e5;
    border-radius: 8px;
    border-width: 0 0 1px;
    border-radius: 0;
    background: #fff;
    color: #1f2d2a;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.setting-navigation-row:last-child {
    border-bottom: 0;
}

.setting-navigation-title {
    font-size: 16px;
    font-weight: 600;
}

.setting-navigation-trailing {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #74817d;
    font-size: 13px;
}

.setting-navigation-row:active {
    background: #f5f8f6;
}

.setting-chevron {
    color: #9aa6a1;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
}

.homeland-dialog .setting-list {
    max-height: min(60vh, 480px);
    overflow-y: auto;
}

.homeland-dialog .setting-row {
    min-height: 54px;
}

@media (max-width: 780px) {
    .homeland-dialog {
        width: calc(100% - 24px) !important;
        margin-top: 12vh !important;
    }

    .homeland-dialog .setting-row {
        padding-right: 12px;
        padding-left: 14px;
    }
}

.setting-list {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e9e5;
    border-radius: 8px;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 58px;
    padding: 10px 16px 10px 18px;
    border-bottom: 1px solid #edf1ef;
}

.setting-row:last-child {
    border-bottom: 0;
}

.setting-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.setting-copy strong {
    font-size: 15px;
    font-weight: 500;
}

.setting-hint {
    color: #9aa6a1;
    font-size: 12px;
}

.setting-text-input {
    width: 220px;
}

.setting-select {
    min-width: 150px;
    max-width: 320px;
}

.setting-radio-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px 12px;
    max-width: 520px;
}

.setting-readonly {
    color: #397c5a;
    font-size: 14px;
    font-weight: 600;
}

.settings-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 4px 0 28px;
    font-size: 13px;
}

.account-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

@media (max-width: 780px) {
    .topbar,
    .summary-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .shell {
        padding: 18px 12px 32px;
    }

    .topbar {
        margin-bottom: 8px;
    }

    .user-console-heading,
    .account-strip,
    .settings-footer,
    .account-row {
        align-items: stretch;
        flex-direction: column;
    }

    .user-console-heading {
        flex-direction: row;
        align-items: flex-start;
    }

    .console-process-actions {
        align-items: flex-end;
        text-align: right;
    }

    .user-console-heading {
        gap: 12px;
        margin-top: 8px;
    }

    .user-console h2 {
        font-size: 26px;
    }

    .setting-row {
        min-height: 62px;
        padding: 11px 12px 11px 14px;
    }

    .setting-text-input,
    .setting-row .el-input-number,
    .setting-select {
        width: 142px;
        min-width: 0;
        max-width: 52%;
    }

    .setting-radio-group {
        max-width: 58%;
        justify-content: flex-end;
        gap: 2px 8px;
    }

    .settings-footer .el-button {
        width: 100%;
    }

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

    .auth-tabs {
        max-width: none;
    }

    .auth-page {
        margin: 54px auto 0;
    }

    .auth-page-heading h2 {
        font-size: 30px;
    }
}

:root {
    --el-color-primary: #277d5b;
    --el-color-primary-light-3: #5da17f;
    --el-color-primary-light-5: #8bbda3;
    --el-color-primary-light-7: #bad8c6;
    --el-color-primary-light-9: #e9f3ed;
    --el-color-primary-dark-2: #1f664b;
}

.user-topbar {
    min-height: 44px;
    margin-bottom: 10px;
}

.user-account-entry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
}

.user-account-avatar {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: #e6f1ea;
    color: #277d5b;
    font-size: 16px;
    font-weight: 600;
}

.user-console {
    max-width: 760px;
}

.status-panel {
    padding: 16px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(26, 58, 45, .06);
}

.status-panel-main,
.server-selector-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.status-copy {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-copy .status-dot {
    flex: 0 0 auto;
}

.status-value {
    display: block;
    margin-top: 1px;
    font-size: 18px;
}

.status-label {
    display: block;
    color: #74817d;
    font-size: 12px;
}

.server-selector-line {
    margin-top: 15px;
    padding-top: 14px;
    border-top: 1px solid #edf1ef;
    color: #74817d;
    font-size: 13px;
}

.server-selector-line .setting-select {
    width: 190px;
}

.auto-restart-note {
    margin-top: 11px;
    color: #74817d;
    font-size: 12px;
    line-height: 1.55;
}

.feature-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px;
    border: 1px solid #e2e9e5;
    border-radius: 8px;
    background: #fff;
}

.feature-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: #e9f3ed;
    color: #1f664b;
    font-size: 13px;
    font-weight: 500;
}

.save-bar {
    position: static;
    flex-direction: row;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid #e2e9e5;
    border-radius: 16px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 28px rgba(21, 51, 39, .12);
    backdrop-filter: blur(14px);
}

.save-copy strong {
    display: block;
    font-size: 14px;
}

.save-copy span {
    display: block;
    margin-top: 2px;
    color: #74817d;
    font-size: 12px;
}

.save-bar .el-button {
    width: auto;
    flex: 0 0 auto;
}

.account-console {
    max-width: 720px;
}

.settings-page-header {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    min-height: 48px;
    margin-bottom: 12px;
    text-align: center;
}

.settings-page-header strong {
    font-size: 17px;
}

.settings-back-button {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1f2d2a;
    font-size: 30px;
    line-height: 1;
}

.settings-header-spacer {
    display: block;
    width: 44px;
}

.account-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 16px;
    border-radius: 18px;
    background: #fff;
}

.account-hero-avatar {
    display: grid;
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: #e6f1ea;
    color: #277d5b;
    font-size: 22px;
    font-weight: 600;
}

.account-hero-copy strong {
    display: block;
    font-size: 18px;
}

.account-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-top: 6px;
    padding: 0 9px;
    border-radius: 999px;
    background: #e9f3ed;
    color: #277d5b;
    font-size: 12px;
    font-weight: 600;
}

.setting-muted-value {
    color: #74817d;
    font-size: 14px;
}

.sheet-header {
    display: grid;
    grid-template-columns: 68px 1fr 68px;
    align-items: center;
    min-height: 52px;
    text-align: center;
}

.sheet-header strong {
    font-size: 16px;
}

.sheet-header-action {
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1f2d2a;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
}

.sheet-header-done {
    color: #277d5b;
}

.homeland-dialog {
    overflow: hidden;
    border-radius: 20px;
    background: #f5f7f4;
}

.homeland-dialog .el-dialog__header {
    margin: 0;
    padding: 0;
    background: #f5f7f4;
}

.homeland-dialog .el-dialog__body {
    max-height: min(70vh, 720px);
    overflow-y: auto;
    padding: 8px 14px 24px;
}

.sheet-content {
    display: grid;
    gap: 14px;
}

.sheet-section {
    display: grid;
    gap: 7px;
}

.sheet-section-title {
    color: #74817d;
    font-size: 12px;
    font-weight: 600;
}

.segmented-control {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    padding: 3px;
    border-radius: 12px;
    background: #edf1ef;
}

.segmented-control button {
    min-height: 36px;
    padding: 0 8px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #74817d;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
}

.segmented-control button.active {
    background: #fff;
    color: #1f2d2a;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .08);
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.choice-chip {
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid #e2e9e5;
    border-radius: 999px;
    background: #fff;
    color: #1f2d2a;
    font: inherit;
    font-size: 13px;
}

.choice-chip.selected {
    border-color: #bad8c6;
    background: #e9f3ed;
    color: #1f664b;
    font-weight: 600;
}

.choice-chip:disabled {
    opacity: .48;
}

@media (max-width: 780px) {
    .user-topbar {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .user-topbar .brand-title {
        min-width: 0;
    }

    .status-panel-main {
        align-items: flex-start;
    }

    .server-selector-line {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .server-selector-line .setting-select {
        width: 100%;
    }

    .save-bar {
        flex-direction: row;
    }

    .el-overlay-dialog:has(.homeland-dialog) {
        align-items: flex-end;
        padding: 0;
    }

    .homeland-dialog {
        width: 100% !important;
        max-width: 100%;
        margin: 0 !important;
        border-radius: 24px 24px 0 0;
    }

    .homeland-dialog .el-dialog__body {
        max-height: calc(100vh - 96px);
        padding-right: 14px;
        padding-left: 14px;
    }

    .sheet-header {
        grid-template-columns: 64px 1fr 64px;
    }
}
