* {
    box-sizing: border-box;
}

:root {
    --bg-dark: #073042;
    --bg-deep: #0a4f3c;
    --bg-green: #01875f;
    --line-soft: rgba(255, 255, 255, 0.14);
    --card-bg: rgba(255, 255, 255, 0.96);
    --text-main: #14364a;
    --text-soft: #648396;
    --accent: #22c67a;
    --accent-strong: #109965;
    --danger: #c94242;
    --danger-bg: #ffe7e7;
    --shadow-lg: 0 24px 60px rgba(7, 48, 66, 0.18);
    --shadow-md: 0 18px 40px rgba(7, 48, 66, 0.15);
}

body.admin-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at 15% 15%, rgba(61, 220, 132, 0.18), transparent 32%),
        radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.08), transparent 24%),
        linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-deep) 42%, var(--bg-green) 100%);
}

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 1.2fr) minmax(340px, 0.9fr);
}

.hero-panel,
.auth-panel,
.dashboard-hero,
.panel-card,
.form-card {
    position: relative;
}

.hero-panel {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 48px;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 24% 18%, rgba(61, 220, 132, 0.22), transparent 32%),
        radial-gradient(circle at 78% 72%, rgba(255, 255, 255, 0.10), transparent 24%),
        radial-gradient(circle at 60% 95%, rgba(0, 0, 0, 0.16), transparent 30%);
}

.hero-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(4px);
    opacity: 0.5;
}

.hero-orb-a {
    width: 220px;
    height: 220px;
    right: -40px;
    top: 12%;
    background: rgba(61, 220, 132, 0.14);
}

.hero-orb-b {
    width: 160px;
    height: 160px;
    left: 8%;
    bottom: 10%;
    background: rgba(255, 255, 255, 0.08);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 560px;
    color: #fff;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid var(--line-soft);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-content h1,
.dashboard-copy h1 {
    margin: 18px 0 14px;
    font-size: clamp(32px, 4vw, 46px);
    line-height: 1.18;
    letter-spacing: 0.04em;
}

.hero-subtitle,
.subtitle {
    margin: 0;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.84);
}

.dark-text {
    color: var(--text-soft);
}

.hero-feature-grid {
    display: grid;
    gap: 16px;
    margin: 34px 0 28px;
}

.hero-feature {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line-soft);
    backdrop-filter: blur(10px);
}

.hero-feature strong,
.option-copy strong,
.stat-card strong,
.panel-card h3,
.card-head h2 {
    display: block;
}

.hero-feature strong {
    font-size: 16px;
    margin-bottom: 4px;
}

.hero-feature small {
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.6;
}

.hero-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(61, 220, 132, 0.16);
    color: #8af0b8;
    font-weight: 700;
    font-size: 18px;
}

.hero-tip {
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid var(--line-soft);
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
}

.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 28px;
}

.auth-panel-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.language-chip {
    width: 58px;
    height: 30px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    font-size: 12px;
}

.language-chip-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 12px rgba(7, 48, 66, 0.18);
}

.form-card,
.panel-card {
    background: var(--card-bg);
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
}

.form-card {
    width: min(100%, 460px);
    margin: 0 auto;
    padding: 34px 30px 30px;
}

.brand-mark {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1ac977, #0d8c5b);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    box-shadow: 0 16px 32px rgba(16, 153, 101, 0.24);
}

.form-card h2,
.card-head h2,
.panel-card h3 {
    margin: 0;
}

.stack-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-form {
    margin-top: 24px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field > span,
.option-copy strong {
    font-size: 15px;
    font-weight: 700;
}

.input-shell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid #d8e4eb;
    background: #f9fbfc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input-shell:focus-within {
    border-color: rgba(16, 153, 101, 0.55);
    box-shadow: 0 0 0 4px rgba(34, 198, 122, 0.12);
    background: #fff;
}

.input-prefix {
    flex: 0 0 auto;
    min-width: 34px;
    color: #7a95a5;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

input,
select,
button {
    font: inherit;
}

input,
select {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-main);
}

input::selection {
    background: rgba(34, 198, 122, 0.16);
    color: var(--text-main);
}

input::-moz-selection {
    background: rgba(34, 198, 122, 0.16);
    color: var(--text-main);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--text-main);
    -webkit-box-shadow: 0 0 0 1000px #f9fbfc inset;
    box-shadow: 0 0 0 1000px #f9fbfc inset;
    caret-color: var(--text-main);
    transition: background-color 5000s ease-in-out 0s;
}

select {
    min-height: 54px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid #d8e4eb;
    background: #f9fbfc;
    cursor: pointer;
}

.inline-tip-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--text-soft);
    font-size: 13px;
}

.primary-btn,
.ghost-btn {
    min-height: 52px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.primary-btn {
    background: linear-gradient(135deg, #15b96f, #0d8c5b);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 16px 30px rgba(16, 153, 101, 0.24);
}

.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-1px);
}

.ghost-btn {
    padding: 0 22px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.error-box {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(201, 66, 66, 0.14);
}

.flash-stack {
    margin-top: 18px;
    display: grid;
    gap: 12px;
}

.flash-box {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid transparent;
}

.flash-box.success {
    background: rgba(34, 198, 122, 0.12);
    color: #0e7f53;
    border-color: rgba(16, 153, 101, 0.2);
}

.dashboard-shell {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
    padding: 32px 0 40px;
}

.dashboard-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 24px;
    padding: 34px 36px;
    border-radius: 30px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.06));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(6px);
}

.dashboard-copy {
    color: #fff;
    max-width: 820px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 26px;
}

.stat-card {
    padding: 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.stat-card span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
}

.stat-card strong {
    margin: 12px 0 8px;
    font-size: 28px;
    color: #fff;
}

.stat-card small {
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.6;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
}

.settings-card,
.account-card,
.side-card {
    padding: 28px;
}

.section-stack {
    display: grid;
    gap: 22px;
}

.card-head p {
    margin: 8px 0 0;
    color: var(--text-soft);
    line-height: 1.7;
}

.option-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 18px;
    align-items: center;
    padding: 18px 20px;
    border-radius: 20px;
    background: #f6faf8;
    border: 1px solid #e1eee8;
}

.option-copy small,
.field-help,
.api-list span {
    color: #6a8491;
    line-height: 1.6;
}

.field-help {
    font-size: 13px;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.save-hint {
    color: var(--text-soft);
}

.inline-error {
    margin-bottom: 18px;
}

.side-stack {
    display: grid;
    gap: 22px;
}

.flow-list,
.api-list {
    margin: 18px 0 0;
    padding-left: 20px;
    line-height: 1.85;
    color: var(--text-main);
}

.api-list {
    padding-left: 0;
    list-style: none;
}

.api-list li {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 0;
    border-bottom: 1px solid #edf2f5;
}

.api-list li:last-child {
    border-bottom: none;
}

code {
    display: inline-flex;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 10px;
    background: #eef7f2;
    color: #12774d;
    font-family: "Consolas", "Microsoft YaHei", monospace;
}

@media (max-width: 1080px) {
    .auth-layout,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        min-height: 420px;
    }
}

@media (max-width: 760px) {
    .dashboard-shell {
        width: min(100%, calc(100% - 28px));
        padding-top: 20px;
    }

    .dashboard-hero,
    .settings-card,
    .account-card,
    .side-card,
    .form-card {
        padding: 24px 20px;
    }

    .dashboard-hero {
        flex-direction: column;
    }

    .stat-grid,
    .option-card {
        grid-template-columns: 1fr;
    }

    .hero-panel,
    .auth-panel {
        padding: 26px 18px;
    }
}
