:root {
    color-scheme: light;
    --bg: #eef4fb;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-soft: #f6f9fd;
    --text: #12233d;
    --muted: #617793;
    --line: #d8e4f0;
    --accent: #1666d3;
    --accent-strong: #0e4fa8;
    --accent-soft: #eaf2ff;
    --warn: #a76500;
    --shadow: 0 18px 40px rgba(19, 40, 70, 0.08);
    --sidebar-width: 320px;
    --sidebar-collapsed-width: 88px;
    --content-max-width: 1480px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(84, 144, 255, 0.14), transparent 26%),
        linear-gradient(180deg, #f7faff 0%, var(--bg) 100%);
}

body.modal-open {
    overflow: hidden;
}

[hidden] {
    display: none !important;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    position: relative;
    transition: grid-template-columns 160ms ease;
}

body.sidebar-collapsed .app-shell {
    grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
}

.app-sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 16px;
    padding: 18px 14px 16px;
    background: rgba(255, 255, 255, 0.82);
    border-right: 1px solid rgba(216, 228, 240, 0.96);
    backdrop-filter: blur(14px);
    overflow: visible;
}

.sidebar-top {
    display: grid;
    gap: 16px;
    flex: 0 0 auto;
    min-height: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 8px 14px;
    border-bottom: 1px solid rgba(216, 228, 240, 0.86);
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 22px rgba(19, 40, 70, 0.12);
    overflow: hidden;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.brand-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.brand-copy strong {
    font-size: 17px;
    line-height: 1.15;
}

.brand-copy span {
    color: var(--muted);
    font-size: 11px;
}

.sidebar-toggle {
    position: fixed;
    top: 64px;
    left: calc(var(--sidebar-width) - 18px);
    z-index: 90;
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(216, 228, 240, 0.96);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(19, 40, 70, 0.14);
    cursor: pointer;
    transition: left 160ms ease, background-color 120ms ease, transform 120ms ease, border-color 120ms ease;
}

.sidebar-toggle:hover {
    background: #fff;
    border-color: rgba(22, 102, 211, 0.24);
    transform: translateY(-1px);
}

.sidebar-toggle:focus-visible {
    outline: 3px solid rgba(22, 102, 211, 0.18);
    outline-offset: 2px;
}

.sidebar-toggle span {
    width: 10px;
    height: 10px;
    border-left: 2px solid #8a9bb2;
    border-bottom: 2px solid #8a9bb2;
    transform: rotate(45deg) translate(1px, -1px);
    transition: transform 160ms ease, border-color 120ms ease;
}

.sidebar-toggle:hover span {
    border-color: var(--accent);
}

.sidebar-nav {
    display: grid;
    gap: 10px;
}

.side-link {
    min-height: 74px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    color: var(--muted);
    position: relative;
    transition: background-color 120ms ease, box-shadow 120ms ease;
}

.side-link:hover {
    background: rgba(246, 249, 253, 0.92);
}

.side-link.active {
    background: #fff;
    color: var(--accent-strong);
    box-shadow: 0 12px 26px rgba(19, 40, 70, 0.08), inset 0 0 0 1px rgba(22, 102, 211, 0.12);
}

.side-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 0 999px 999px 0;
    background: var(--accent);
}

.side-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #f7fbff;
    border: 1px solid rgba(198, 213, 231, 0.96);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.76);
    position: relative;
    color: #6d86a7;
}

.side-link.active .side-icon {
    background: #edf4ff;
    border-color: rgba(22, 102, 211, 0.72);
    box-shadow: 0 0 0 2px rgba(22, 102, 211, 0.13);
    color: var(--accent);
}

.side-icon::before,
.side-icon::after,
.side-icon span,
.side-icon span::before,
.side-icon span::after {
    content: "";
    position: absolute;
    display: block;
}

.side-icon-workbench::before {
    width: 14px;
    height: 10px;
    border: 1.8px solid currentColor;
    border-radius: 3px;
    top: 9px;
    left: 8px;
}

.side-icon-workbench::after {
    width: 1.8px;
    height: 14px;
    background: currentColor;
    border-radius: 999px;
    left: 15px;
    top: 6px;
}

.side-icon-workbench span {
    width: 14px;
    height: 1.8px;
    background: currentColor;
    border-radius: 999px;
    left: 9px;
    top: 14px;
}

.side-icon-history::before {
    width: 14px;
    height: 14px;
    border: 1.8px solid currentColor;
    border-radius: 999px;
    top: 8px;
    left: 8px;
}

.side-icon-history::after {
    width: 1.8px;
    height: 5px;
    background: currentColor;
    border-radius: 999px;
    left: 15px;
    top: 10px;
    transform-origin: bottom center;
}

.side-icon-history span {
    width: 5px;
    height: 1.8px;
    background: currentColor;
    border-radius: 999px;
    left: 15px;
    top: 14px;
    transform: rotate(35deg);
    transform-origin: left center;
}

.side-icon-pricing::before {
    width: 14px;
    height: 14px;
    border: 1.8px solid currentColor;
    border-radius: 4px;
    transform: rotate(45deg);
    top: 8px;
    left: 8px;
}

.side-icon-pricing::after {
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: currentColor;
    top: 14px;
    left: 14px;
}

.side-icon-site::before {
    width: 14px;
    height: 14px;
    border: 1.8px solid currentColor;
    border-radius: 999px;
    top: 8px;
    left: 8px;
}

.side-icon-site::after {
    width: 14px;
    height: 1.8px;
    background: currentColor;
    border-radius: 999px;
    top: 14px;
    left: 8px;
}

.side-icon-site span {
    width: 1.8px;
    height: 14px;
    background: currentColor;
    border-radius: 999px;
    left: 15px;
    top: 8px;
}

.side-icon-site span::before,
.side-icon-site span::after {
    width: 8px;
    height: 14px;
    border: 1.8px solid currentColor;
    border-left: none;
    border-right: none;
    border-radius: 999px;
    left: -3px;
    top: 0;
}

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

.side-copy strong {
    color: var(--text);
    font-size: 16px;
    line-height: 1.2;
}

.side-copy small {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.sidebar-group {
    display: grid;
    gap: 8px;
    margin-top: auto;
    flex: 0 0 auto;
}

.sidebar-label {
    padding: 0 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.profile-card,
.sidebar-card,
.summary-metric,
.tool-surface,
.sidebar-panel {
    background: var(--surface);
    border: 1px solid rgba(216, 228, 240, 0.96);
    border-radius: 10px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.sidebar-card {
    padding: 16px;
}

.profile-card {
    padding: 12px;
    display: grid;
    gap: 10px;
    position: relative;
    overflow: visible;
}

.profile-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-avatar {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #1666d3 0%, #6ea5ff 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(22, 102, 211, 0.22);
}

.profile-avatar svg {
    width: 52%;
    height: 52%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.profile-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.profile-copy strong {
    font-size: 15px;
    line-height: 1.2;
}

.profile-copy span,
.profile-metric span,
.profile-panel-row span {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.profile-status,
.profile-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.profile-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.profile-badge {
    height: 24px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #edf4ff;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
}

.profile-badge-soft {
    background: #f3f7fc;
    color: #6c82a0;
}

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

.profile-metric,
.profile-panel {
    padding: 10px;
    border-radius: 8px;
    background: rgba(246, 249, 253, 0.9);
    box-shadow: inset 0 0 0 1px rgba(216, 228, 240, 0.92);
}

.profile-metric strong {
    display: block;
    margin-top: 6px;
    font-size: 16px;
    line-height: 1.2;
}

.profile-panel {
    display: grid;
    gap: 8px;
}

.profile-panel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.profile-panel-row strong {
    font-size: 12px;
}

.profile-link {
    min-height: 34px;
    padding: 6px 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: inset 0 0 0 1px rgba(216, 228, 240, 0.96);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.profile-link-button {
    border: none;
    cursor: pointer;
}

.profile-link-button[aria-expanded="true"] {
    color: var(--accent);
    background: #edf4ff;
    box-shadow: inset 0 0 0 1px rgba(22, 102, 211, 0.16);
}

.profile-link:hover {
    color: var(--accent);
}

.help-center-panel {
    position: absolute;
    right: -286px;
    bottom: 0;
    width: 268px;
    padding: 12px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 34px rgba(19, 40, 70, 0.12), inset 0 0 0 1px rgba(216, 228, 240, 0.96);
    display: grid;
    gap: 10px;
    z-index: 80;
}

.member-rights-panel {
    bottom: 46px;
}

.member-rights-badge {
    background: linear-gradient(180deg, #4f7cff 0%, #2f63eb 100%);
}

.help-center-panel::before {
    content: "";
    position: absolute;
    left: -6px;
    bottom: 18px;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.98);
    transform: rotate(45deg);
    box-shadow: inset 1px 1px 0 0 rgba(216, 228, 240, 0.96);
}

.help-center-panel[hidden] {
    display: none;
}

.help-center-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-center-head strong {
    font-size: 14px;
    line-height: 1.25;
}

.help-center-bulb {
    width: 16px;
    height: 16px;
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
}

.help-center-bulb::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffd768 0%, #ffbd2f 100%);
    box-shadow: inset 0 0 0 1px rgba(187, 132, 9, 0.18);
}

.help-center-bulb::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 11px;
    width: 6px;
    height: 4px;
    border-radius: 2px;
    background: #7b5f2d;
}

.help-center-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.sidebar-card strong {
    font-size: 20px;
    line-height: 1.2;
}

.sidebar-card p,
.footer-note,
.surface-head p,
.section-head p,
.lede {
    color: var(--muted);
    line-height: 1.65;
}

.sidebar-actions {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.quota-box {
    margin-top: 14px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(246, 249, 253, 0.9);
    box-shadow: inset 0 0 0 1px rgba(216, 228, 240, 0.92);
}

.quota-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
}

.quota-row strong {
    color: var(--text);
    font-size: 13px;
}

.quota-track {
    margin-top: 8px;
    height: 7px;
    border-radius: 999px;
    background: #e3ecf7;
    overflow: hidden;
}

.quota-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1666d3 0%, #75aaff 100%);
}

.full-btn {
    width: 100%;
}

body.sidebar-collapsed .app-sidebar {
    padding: 18px 10px;
}

body.sidebar-collapsed .brand {
    justify-content: center;
    gap: 0;
    padding: 6px 0 14px;
}

body.sidebar-collapsed .brand-copy,
body.sidebar-collapsed .side-index,
body.sidebar-collapsed .side-copy,
body.sidebar-collapsed .sidebar-group,
body.sidebar-collapsed .sidebar-label {
    display: none;
}

body.sidebar-collapsed .sidebar-top {
    gap: 16px;
}

body.sidebar-collapsed .sidebar-toggle {
    left: calc(var(--sidebar-collapsed-width) - 18px);
}

body.sidebar-collapsed .sidebar-toggle span {
    transform: rotate(225deg) translate(1px, -1px);
}

body.sidebar-collapsed .sidebar-nav {
    gap: 10px;
}

body.sidebar-collapsed .side-link {
    min-height: 62px;
    padding: 8px 4px;
    grid-template-columns: 1fr;
    justify-items: center;
}

body.sidebar-collapsed .side-link.active::before {
    top: 10px;
    bottom: 10px;
}

body.sidebar-collapsed .side-icon {
    width: 40px;
    height: 40px;
}

.app-main {
    padding: 24px 28px 40px;
}

.app-page[hidden] {
    display: none;
}

.main-toolbar {
    position: sticky;
    top: 10px;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.28);
    box-shadow: inset 0 0 0 1px rgba(216, 228, 240, 0.62);
    backdrop-filter: blur(10px);
}

.main-toolbar strong {
    display: block;
    margin-top: 4px;
    font-size: 18px;
}

.toolbar-label {
    color: var(--muted);
    font-size: 12px;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.service-pill {
    height: 34px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #eef9f2;
    color: #197144;
    font-size: 13px;
    font-weight: 700;
}

.toolbar-btn {
    min-width: 0;
    min-height: 34px;
    padding: 6px 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-align: center;
    background: rgba(239, 246, 255, 0.78);
    border: none;
    box-shadow: inset 0 0 0 1px rgba(198, 216, 238, 0.96);
    color: #3d5f8c;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.toolbar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.toolbar-auth {
    position: relative;
    display: inline-flex;
}

.toolbar-btn__icon {
    width: 13px;
    height: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
    flex: 0 0 auto;
}

.toolbar-btn__icon svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.toolbar-btn__label {
    white-space: nowrap;
}

#back-to-workbench {
    min-width: 0;
}

.toolbar-btn:hover {
    background: rgba(232, 242, 255, 0.96);
    color: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(150, 187, 232, 0.96);
}

.auth-menu-panel {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: 286px;
    padding: 18px 16px 16px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 22px 40px rgba(19, 40, 70, 0.16), inset 0 0 0 1px rgba(216, 228, 240, 0.96);
    display: grid;
    gap: 12px;
    z-index: 90;
}

.auth-menu-panel::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 28px;
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.98);
    transform: rotate(45deg);
    box-shadow: inset 1px 1px 0 0 rgba(216, 228, 240, 0.96);
}

.auth-menu-card {
    padding: 18px 18px 20px;
    border-radius: 20px;
    background: linear-gradient(180deg, #f7fbff 0%, #eaf2ff 100%);
    box-shadow: inset 0 0 0 1px rgba(195, 213, 240, 0.95);
    display: grid;
    gap: 8px;
}

.auth-menu-card__title {
    color: #174f9f;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
    word-break: break-word;
}

.auth-menu-card__meta {
    display: grid;
    gap: 3px;
    color: #6582b1;
    font-size: 13px;
    line-height: 1.55;
}

.auth-menu-item {
    min-height: 54px;
    padding: 10px 14px;
    border: none;
    border-radius: 16px;
    background: transparent;
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: background-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.auth-menu-item__icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: #eef4ff;
    color: #7a9ed8;
}

.auth-menu-item__icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-menu-item:hover {
    background: #eef5ff;
    color: var(--accent);
    transform: translateY(-1px);
}

.auth-menu-item-danger:hover {
    background: #fff1f0;
    color: #d14343;
}

.auth-menu-item-danger:hover .auth-menu-item__icon {
    background: #ffe8e6;
    color: #d14343;
}

.hero {
    display: block;
    margin-bottom: 24px;
    padding: 20px 22px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: var(--shadow), inset 0 0 0 1px rgba(216, 228, 240, 0.82);
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: inset 0 0 0 1px rgba(216, 228, 240, 0.96);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: #eef8f1;
    color: #197144;
    font-size: 12px;
    font-weight: 700;
}

.hero-copy h1 {
    margin: 14px 0 0;
    max-width: 760px;
    font-size: 32px;
    line-height: 1.16;
}

.lede {
    margin: 12px 0 0;
    max-width: 760px;
    font-size: 15px;
    line-height: 1.7;
}

.summary-metric {
    padding: 16px;
    background: var(--surface-soft);
    box-shadow: inset 0 0 0 1px rgba(216, 228, 240, 0.96);
    backdrop-filter: none;
}

.summary-metric span,
.label,
.panel-tag {
    color: var(--muted);
    font-size: 12px;
}

.summary-metric strong {
    display: block;
    margin-top: 8px;
    font-size: 20px;
    line-height: 1.2;
}

.workspace-grid {
    display: block;
    width: min(100%, var(--content-max-width));
    margin-inline: auto;
}

.login-guard {
    margin-bottom: 18px;
}

.login-guard__card {
    width: 100%;
    padding: 24px 28px;
    border-radius: 8px;
    background: linear-gradient(180deg, #f7fbff 0%, #eef5ff 100%);
    box-shadow: inset 0 0 0 1px rgba(22, 102, 211, 0.12);
}

.login-guard__eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(22, 102, 211, 0.1);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}

.login-guard__card h2 {
    margin: 14px 0 8px;
    font-size: 24px;
}

.login-guard__card p {
    margin: 0;
    max-width: 720px;
    color: var(--muted);
    line-height: 1.7;
}

.login-guard__card .primary-btn {
    margin-top: 18px;
}

.tool-surface {
    padding: 28px;
    width: 100%;
}

.tool-surface.is-locked {
    opacity: 0.6;
}

.tool-surface.is-locked .upload-zone,
.tool-surface.is-locked .preset-option,
.tool-surface.is-locked .target-search,
.tool-surface.is-locked .ghost-btn,
.tool-surface.is-locked .action-btn {
    pointer-events: none;
}

.surface-head,
.section-head,
.surface-footer,
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.surface-head h2,
.section-head h3,
.panel-head h3 {
    margin: 0;
    font-size: 20px;
}

.workflow-steps {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.step-item {
    min-height: 58px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    border: none;
    background: var(--surface-soft);
    box-shadow: inset 0 0 0 1px rgba(216, 228, 240, 0.96);
    color: var(--muted);
    cursor: pointer;
    text-align: left;
}

.step-item span {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(216, 228, 240, 0.96);
}

.step-item strong {
    color: var(--text);
    font-size: 14px;
}

.step-item.active {
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 1px rgba(22, 102, 211, 0.14);
}

.step-item:hover {
    box-shadow: inset 0 0 0 1px rgba(22, 102, 211, 0.22);
}

.step-item:focus-visible {
    outline: 3px solid rgba(22, 102, 211, 0.16);
    outline-offset: 2px;
}

.upload-zone {
    margin-top: 24px;
    display: grid;
    place-items: center;
    min-height: 180px;
    border: 2px dashed #a8c4e8;
    border-radius: 8px;
    background: linear-gradient(180deg, #f3f8ff 0%, #edf4fc 100%);
    text-align: center;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.upload-zone.has-file {
    min-height: auto;
    padding: 20px 14px 14px;
    gap: 12px;
    border-style: solid;
    border-width: 1px;
    border-color: #cde6c8;
    background: linear-gradient(180deg, #f7fcf4 0%, #f2faf0 100%);
}

.upload-zone.dragging {
    border-color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-1px);
}

.upload-zone input {
    display: none;
}

.upload-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #edf4ff 100%);
    box-shadow: inset 0 0 0 1px rgba(216, 228, 240, 0.96);
    position: relative;
}

.upload-icon::before,
.upload-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    border-radius: 999px;
}

.upload-icon::before {
    top: 12px;
    width: 4px;
    height: 20px;
}

.upload-icon::after {
    top: 26px;
    width: 18px;
    height: 4px;
}

.upload-title {
    margin-top: 14px;
    font-size: 18px;
    font-weight: 700;
}

.upload-zone.has-file .upload-title {
    width: 100%;
    margin-top: 0;
    padding: 10px 16px;
    border: 1px solid #d4ecd0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.56);
    color: #2f8a3e;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}

.upload-sub {
    margin-top: 8px;
    max-width: 560px;
    color: var(--muted);
    line-height: 1.6;
    font-size: 14px;
}

.upload-zone.has-file .upload-sub,
.upload-zone.has-file .upload-icon {
    display: none;
}

.upload-change {
    min-width: 92px;
    height: 38px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(20, 54, 96, 0.08), inset 0 0 0 1px rgba(216, 228, 240, 0.96);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}

.upload-change[hidden] {
    display: none;
}

.file-meta {
    margin-top: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(160px, 1fr));
    gap: 14px;
}

.meta-item {
    padding: 16px 18px;
    border-radius: 8px;
    background: var(--surface-soft);
    box-shadow: inset 0 0 0 1px rgba(216, 228, 240, 0.96);
}

.meta-item strong {
    display: block;
    margin-top: 8px;
    font-size: 16px;
    line-height: 1.45;
    word-break: break-word;
}

.preset-bar {
    margin-top: 18px;
    padding: 4px 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.preset-bar-label {
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

.preset-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.preset-option {
    min-width: 78px;
    height: 34px;
    padding: 0 14px;
    border: 1px solid rgba(190, 206, 227, 0.96);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.preset-option:hover {
    transform: translateY(-1px);
    border-color: rgba(22, 102, 211, 0.28);
}

.preset-option.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 8px 18px rgba(22, 102, 211, 0.18);
}

.preset-option:focus-visible {
    outline: 3px solid rgba(22, 102, 211, 0.16);
    outline-offset: 2px;
}

.meta-item-status strong {
    color: var(--accent-strong);
}

.target-section {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid rgba(216, 228, 240, 0.96);
}

.target-section-head {
    align-items: flex-start;
}

.target-search {
    width: min(320px, 100%);
    height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(190, 206, 227, 0.96);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
}

.target-search:disabled {
    background: #f6f9fd;
    color: var(--muted);
}

.target-grid {
    margin-top: 18px;
    display: grid;
    gap: 18px;
    min-height: 88px;
}

.target-group {
    display: grid;
    gap: 10px;
}

.target-group-title {
    margin: 0;
    font-size: 15px;
    line-height: 1.3;
}

.target-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.target-card {
    display: flex;
    min-height: 0;
}

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

.target-card label {
    min-width: 78px;
    min-height: 36px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    border-radius: 10px;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(216, 228, 240, 0.96);
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.target-card label:hover {
    transform: translateY(-1px);
}

.target-card input:checked + label {
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 1px rgba(22, 102, 211, 0.22);
}

.target-format {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
}

.target-meta {
    display: none;
}

.target-card.unavailable label {
    background: #f9fbfe;
    border: 1px dashed #c4d6ea;
    box-shadow: none;
    color: #7f91aa;
}

.target-card.unavailable .target-meta {
    color: var(--warn);
}

.surface-footer {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(216, 228, 240, 0.96);
}

.footer-note {
    margin: 0;
    font-size: 14px;
}

.content-side {
    display: grid;
    gap: 16px;
}

.sidebar-panel {
    padding: 20px;
}

.panel-tag {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: inset 0 0 0 1px rgba(216, 228, 240, 0.96);
    font-weight: 700;
}

.usage-list,
.account-mini {
    margin-top: 16px;
}

.usage-list,
.account-mini {
    display: grid;
    gap: 10px;
}

.usage-row,
.account-mini div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(216, 228, 240, 0.96);
}

.usage-row:last-child,
.account-mini div:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.usage-row span,
.account-mini span {
    color: var(--muted);
    font-size: 14px;
}

.usage-row strong,
.account-mini strong {
    font-size: 15px;
}

.panel-actions {
    margin-top: 16px;
    display: grid;
    gap: 10px;
}

.primary-btn,
.ghost-btn {
    height: 44px;
    padding: 0 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

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

.primary-btn {
    background: var(--accent);
    color: #fff;
}

.primary-btn:disabled {
    background: #99b4d9;
    cursor: not-allowed;
    transform: none;
}

.ghost-btn {
    background: rgba(255, 255, 255, 0.72);
    border-color: var(--line);
    color: var(--text);
}

#refresh-targets {
    background: rgba(234, 242, 255, 0.95);
    border-color: rgba(166, 196, 235, 0.95);
    color: var(--accent);
}

#refresh-targets:hover {
    background: rgba(223, 236, 255, 0.98);
    border-color: rgba(126, 170, 226, 0.98);
}

.action-btn {
    min-width: 138px;
}

.formats-page {
    margin-top: 24px;
    width: min(100%, var(--content-max-width));
    margin-inline: auto;
    padding: 12px 12px 18px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow), inset 0 0 0 1px rgba(216, 228, 240, 0.82);
    scroll-margin-top: 92px;
}

.formats-page[hidden] {
    display: none;
}

.formats-page-focus {
    box-shadow: 0 0 0 3px rgba(22, 102, 211, 0.14), var(--shadow), inset 0 0 0 1px rgba(216, 228, 240, 0.82);
}

.formats-page-all {
    margin-top: 18px;
}

.formats-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.formats-head h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
}

.formats-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    gap: 8px;
}

.formats-kicker::before {
    content: "";
    display: block;
}

.formats-kicker-common::before {
    width: 14px;
    height: 16px;
    border: 1.5px solid #1b1b1b;
    border-radius: 2px;
    background:
        linear-gradient(#1b1b1b, #1b1b1b) 3px 4px / 7px 1.2px no-repeat,
        linear-gradient(#1b1b1b, #1b1b1b) 3px 8px / 7px 1.2px no-repeat,
        linear-gradient(#1b1b1b, #1b1b1b) 3px 12px / 5px 1.2px no-repeat,
        linear-gradient(135deg, transparent 0 50%, #ffffff 50% 100%) top right / 5px 5px no-repeat;
    box-sizing: border-box;
}

.formats-kicker-all::before {
    width: 15px;
    height: 15px;
    border-radius: 2px;
    background:
        linear-gradient(#ffffff, #ffffff) 5px 4px / 5px 1.2px no-repeat,
        linear-gradient(#ffffff, #ffffff) 5px 7px / 5px 1.2px no-repeat,
        linear-gradient(#ffffff, #ffffff) 5px 10px / 4px 1.2px no-repeat,
        linear-gradient(135deg, transparent 0 50%, #e7f0ff 50% 100%) 8px 3px / 3px 3px no-repeat,
        linear-gradient(#ffffff, #ffffff) 4px 3px / 7px 9px no-repeat,
        linear-gradient(#1666d3, #1666d3) center / 100% 100% no-repeat;
    box-shadow: inset 0 0 0 1px rgba(11, 76, 179, 0.28);
}

.formats-note {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.common-format-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
}

.common-format-card {
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #d9ebfb;
    border-radius: 8px;
    background: #eaf4ff;
    color: #0b4cb3;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 120ms ease, background-color 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.common-format-card:hover,
.more-formats-link:hover,
.group-more:hover {
    transform: translateY(-1px);
}

.common-format-card:hover {
    background: #dfefff;
    border-color: #bfdcff;
    box-shadow: inset 0 0 0 1px rgba(22, 102, 211, 0.08);
}

.common-format-card:focus-visible {
    outline: 3px solid rgba(22, 102, 211, 0.16);
    outline-offset: 1px;
}

.formats-footer {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
}

.more-formats-link,
.group-more {
    border: none;
    background: transparent;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.formats-search-wrap {
    margin-top: 18px;
}

.formats-search {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid rgba(22, 102, 211, 0.28);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
}

.format-catalog {
    margin-top: 16px;
    display: grid;
    gap: 18px;
}

.format-group {
    padding: 16px;
    border-radius: 10px;
    background: rgba(246, 249, 253, 0.86);
    box-shadow: inset 0 0 0 1px rgba(216, 228, 240, 0.92);
}

.format-group-title {
    margin: 0 0 14px;
    color: var(--accent);
    font-size: 20px;
    line-height: 1.2;
}

.format-group-list {
    display: grid;
    gap: 10px;
}

.format-row {
    padding: 12px 14px;
    border-radius: 8px;
    background: #fff;
    box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 1px rgba(216, 228, 240, 0.8);
}

.format-row strong {
    font-size: 16px;
}

.format-row span {
    color: var(--muted);
    line-height: 1.6;
}

.format-empty {
    padding: 18px;
    border-radius: 8px;
    background: rgba(246, 249, 253, 0.9);
    color: var(--muted);
    text-align: center;
}

.history-page {
    margin-top: 24px;
    width: min(100%, var(--content-max-width));
    margin-inline: auto;
    padding: 18px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow), inset 0 0 0 1px rgba(216, 228, 240, 0.82);
}

.history-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.history-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.history-head h2 {
    margin: 4px 0 0;
    font-size: 24px;
    line-height: 1.2;
}

.history-note {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.history-stats {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.history-toolbar {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.history-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.history-filter,
.history-search {
    height: 40px;
    border: 1px solid rgba(190, 206, 227, 0.96);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
}

.history-filter {
    min-width: 132px;
    padding: 0 12px;
}

.history-search {
    width: min(320px, 100%);
    padding: 0 14px;
}

.history-clear-btn {
    flex: 0 0 auto;
}

.history-stat {
    padding: 16px 18px;
    border-radius: 10px;
    background: rgba(246, 249, 253, 0.92);
    box-shadow: inset 0 0 0 1px rgba(216, 228, 240, 0.92);
}

.history-stat span {
    color: var(--muted);
    font-size: 12px;
}

.history-stat strong {
    display: block;
    margin-top: 8px;
    font-size: 24px;
    line-height: 1.1;
}

.history-list {
    display: grid;
    gap: 0;
}

.history-table {
    margin-top: 16px;
    border-radius: 10px;
    background: rgba(246, 249, 253, 0.9);
    box-shadow: inset 0 0 0 1px rgba(216, 228, 240, 0.92);
    overflow: hidden;
}

.history-table-head,
.history-item {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) 120px minmax(160px, 1.2fr) 120px minmax(180px, 1.3fr) 150px;
    gap: 12px;
    align-items: center;
}

.history-table-head {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(216, 228, 240, 0.96);
    background: rgba(255, 255, 255, 0.72);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.history-item {
    padding: 14px 16px;
    border-top: 1px solid rgba(216, 228, 240, 0.72);
    background: rgba(255, 255, 255, 0.82);
}

.history-item:first-child {
    border-top: none;
}

.history-col {
    min-width: 0;
}

.history-file {
    display: grid;
    gap: 6px;
}

.history-file strong {
    font-size: 15px;
    line-height: 1.3;
    word-break: break-word;
}

.history-file-meta,
.history-result-line,
.history-time {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.history-status-badge {
    min-height: 30px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #eaf7ef;
    color: #197144;
    font-size: 12px;
    font-weight: 700;
}

.history-chip {
    min-height: 28px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(216, 228, 240, 0.96);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.history-result {
    display: grid;
    gap: 6px;
}

.profile-center-page {
    margin-top: 24px;
    width: min(100%, var(--content-max-width));
    margin-inline: auto;
    padding: 22px 22px 24px;
    border-radius: 16px;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.96), rgba(239, 247, 255, 0.82) 42%, rgba(228, 238, 251, 0.92) 100%);
    box-shadow: 0 18px 40px rgba(28, 55, 94, 0.12), inset 0 0 0 1px rgba(208, 224, 242, 0.88);
}

.profile-center-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(540px, 0.92fr);
    gap: 20px;
    align-items: start;
}

.profile-center-banner {
    min-width: 0;
    padding-top: 0;
}

.profile-center-banner__head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-center-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(180deg, #2f81ff 0%, #245fdf 100%);
    box-shadow: 0 18px 32px rgba(34, 99, 217, 0.18);
}

.profile-center-avatar svg {
    width: 50%;
    height: 50%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.profile-center-avatar-hero {
    width: 58px;
    height: 58px;
    border-radius: 999px;
    font-size: 22px;
}

.profile-center-banner__copy {
    min-width: 0;
    padding-top: 0;
}

.profile-center-product {
    min-height: 28px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: inset 0 0 0 1px rgba(208, 224, 242, 0.96);
    color: #336bf0;
    font-size: 10px;
    font-weight: 700;
}

.profile-center-banner__copy h2 {
    margin: 4px 0 0;
    color: #29b9f4;
    font-size: 27px;
    line-height: 1.06;
}

.profile-center-note {
    margin: 4px 0 0;
    max-width: 520px;
    color: #5477a6;
    font-size: 12px;
    line-height: 1.4;
}

.profile-center-banner__actions {
    margin-top: 10px;
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
}

.profile-center-action {
    min-width: 132px;
    min-height: 46px;
    padding: 0 14px;
    border: none;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 24px rgba(29, 64, 117, 0.08), inset 0 0 0 1px rgba(202, 220, 244, 0.92);
    color: #2562e2;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.profile-center-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(29, 64, 117, 0.12), inset 0 0 0 1px rgba(180, 203, 234, 0.96);
}

.profile-center-action__icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.profile-center-action__icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.profile-center-action.is-refreshing {
    background: #edf4ff;
    box-shadow: 0 14px 28px rgba(29, 64, 117, 0.12), inset 0 0 0 1px rgba(126, 166, 236, 0.96);
}

.profile-center-action.is-refreshing .profile-center-action__icon {
    animation: profile-center-spin 0.8s linear infinite;
}

.profile-center-action:disabled {
    cursor: wait;
    opacity: 1;
}

.profile-center-action-primary {
    background: linear-gradient(180deg, #356bf0 0%, #2a61e6 100%);
    color: #fff;
    box-shadow: 0 16px 28px rgba(46, 98, 223, 0.24);
}

.profile-center-action-primary:hover {
    box-shadow: 0 18px 32px rgba(46, 98, 223, 0.28);
}

@keyframes profile-center-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.profile-center-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-self: start;
}

.profile-center-stat-card,
.profile-center-panel {
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 14px 30px rgba(25, 59, 110, 0.1), inset 0 0 0 1px rgba(211, 226, 244, 0.94);
}

.profile-center-stat-card {
    padding: 18px 16px;
    min-height: 146px;
    display: grid;
    align-content: start;
}

.profile-center-stat-card__label {
    color: #5c6f8d;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.profile-center-stat-card__body {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 70px;
}

.profile-center-stat-card__icon {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf3ff;
    color: #356bf0;
    font-size: 28px;
    font-weight: 700;
    flex: 0 0 auto;
}

.profile-center-stat-card__icon svg,
.profile-center-panel__icon svg,
.profile-center-detail-row__icon svg {
    width: 54%;
    height: 54%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.profile-center-stat-card__copy {
    min-width: 0;
    flex: 1 1 auto;
    display: grid;
    gap: 4px;
    align-content: center;
}

.profile-center-stat-card__copy strong {
    color: #245ce0;
    font-size: 32px;
    line-height: 1.05;
    white-space: nowrap;
}

.profile-center-stat-card__copy span {
    color: #5a73a0;
    font-size: 13px;
    line-height: 1.45;
    word-break: keep-all;
    overflow-wrap: normal;
}

.profile-center-panels {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.profile-center-panel {
    padding: 0;
    overflow: hidden;
}

.profile-center-panel__head {
    min-height: 122px;
    padding: 26px 28px 22px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border-bottom: 1px solid rgba(221, 231, 244, 0.94);
}

.profile-center-panel__icon {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #3776f2 0%, #2a62e6 100%);
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    flex: 0 0 auto;
}

.profile-center-panel__head h3 {
    margin: 0;
    color: #1f2d40;
    font-size: 26px;
    line-height: 1.2;
}

.profile-center-panel__line {
    margin-top: 12px;
    width: 112px;
    height: 5px;
    display: block;
    border-radius: 999px;
    background: linear-gradient(90deg, #9dbfff 0%, #bfd4ff 100%);
}

.profile-center-detail-list {
    margin: 24px;
    border-radius: 18px;
    background: rgba(250, 252, 255, 0.98);
    box-shadow: inset 0 0 0 1px rgba(220, 231, 245, 0.94);
    overflow: hidden;
}

.profile-center-detail-row {
    min-height: 86px;
    padding: 16px 20px;
    display: grid;
    grid-template-columns: minmax(0, 158px) minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid rgba(226, 234, 245, 0.96);
}

.profile-center-detail-row:last-child {
    border-bottom: none;
}

.profile-center-detail-row__label {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #587396;
    font-size: 15px;
    font-weight: 700;
}

.profile-center-detail-row__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf3ff;
    color: #356bf0;
    font-size: 16px;
    font-weight: 800;
    flex: 0 0 auto;
}

.profile-center-detail-row strong {
    min-width: 0;
    max-width: none;
    color: #0d2346;
    font-size: 16px;
    line-height: 1.35;
    justify-self: end;
    text-align: right;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.profile-center-status-pill {
    min-width: auto;
    padding: 0 18px;
    min-height: 44px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    background: #e8fbef;
    color: #14a44d;
}

.profile-center-status-pill.is-member {
    background: #e8fbef;
    color: #14a44d;
}

.profile-center-status-pill.is-trial {
    background: #eef5ff;
    color: #356bf0;
}

.profile-center-status-pill.is-idle {
    background: #f2f5fa;
    color: #6f809b;
}

.profile-center-actions {
    margin-top: 10px;
    display: grid;
    gap: 10px;
}

.member-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
}

.member-modal[hidden] {
    display: none;
}

.member-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 22, 44, 0.46);
    backdrop-filter: blur(8px);
}

.member-modal__dialog {
    position: relative;
    width: min(1080px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    overflow: auto;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(20, 39, 75, 0.24);
}

.member-modal__head,
.member-modal__footer {
    padding: 28px 32px;
}

.member-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid rgba(221, 230, 242, 0.92);
}

.member-modal__head h2 {
    margin: 0;
    color: #13233c;
    font-size: 24px;
    line-height: 1.2;
}

.member-modal__subtitle {
    margin: 12px 0 0;
    color: #6e7f98;
    font-size: 14px;
    line-height: 1.6;
}

.member-modal__close {
    position: relative;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: #f4f7fb;
    cursor: pointer;
}

.member-modal__close span {
    position: absolute;
    top: 19px;
    left: 10px;
    width: 20px;
    height: 2px;
    background: #5f7291;
}

.member-modal__close span:first-child {
    transform: rotate(45deg);
}

.member-modal__close span:last-child {
    transform: rotate(-45deg);
}

.member-modal__body {
    padding: 24px 32px 8px;
    display: grid;
    gap: 28px;
}

.member-modal__section {
    display: grid;
    gap: 14px;
}

.member-modal__section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.member-modal__label {
    color: #20304b;
    font-size: 14px;
    font-weight: 800;
}

.member-modal__status {
    color: #60738f;
    font-size: 13px;
    font-weight: 600;
}

.member-modal__input {
    width: 100%;
    min-height: 62px;
    padding: 0 18px;
    border: 1px solid #d7e3f3;
    border-radius: 16px;
    background: #fff;
    color: #13233c;
    font-size: 18px;
    font-weight: 600;
}

.member-package-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(184px, 1fr));
    gap: 14px;
}

.member-package-card,
.member-paytype-card {
    border: 1px solid #d7e3f3;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.member-package-card {
    min-height: 144px;
    padding: 20px 16px;
    text-align: left;
}

.member-package-card.active,
.member-paytype-card.active {
    border-color: #4d6fff;
    background: #f3f7ff;
    box-shadow: 0 0 0 2px rgba(77, 111, 255, 0.12);
}

.member-package-card strong {
    display: block;
    color: #14233c;
    font-size: 18px;
    line-height: 1.3;
}

.member-package-card span {
    display: block;
}

.member-package-card__days,
.member-package-card__desc {
    margin-top: 8px;
    color: #6f809a;
    font-size: 13px;
    line-height: 1.5;
}

.member-package-card__price {
    margin-top: 14px;
    color: #f15a28;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

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

.member-paytype-card {
    min-height: 62px;
    padding: 0 18px;
    color: #12233c;
    font-size: 16px;
    font-weight: 700;
}

.member-order-panel {
    padding: 18px;
    border: 1px solid #dbe6f4;
    border-radius: 18px;
    background: #fbfdff;
}

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

.member-order-panel__meta span {
    display: block;
    color: #6f809a;
    font-size: 12px;
}

.member-order-panel__meta strong {
    display: block;
    margin-top: 6px;
    color: #15243c;
    font-size: 15px;
    line-height: 1.5;
    word-break: break-all;
}

.member-order-panel__qr {
    margin-top: 18px;
    display: grid;
    place-items: center;
}

.member-order-panel__qr img {
    width: min(240px, 100%);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(30, 58, 102, 0.12);
}

.member-order-panel__status,
.member-modal__feedback {
    margin: 16px 0 0;
    color: #5f7390;
    font-size: 14px;
    line-height: 1.6;
}

.member-modal__feedback:empty {
    display: none;
}

.member-modal__footer {
    border-top: 1px solid rgba(221, 230, 242, 0.92);
}

.member-modal__submit {
    width: 100%;
    min-height: 64px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(180deg, #4c6cf5 0%, #3557e8 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 20px 36px rgba(56, 87, 232, 0.24);
}

.history-empty {
    padding: 26px 18px;
    background: transparent;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 1180px) {
    .app-shell {
        --sidebar-width: 256px;
    }

    body.sidebar-collapsed .sidebar-toggle,
    .sidebar-toggle {
        top: calc(env(safe-area-inset-top, 0px) + 6px);
        left: calc(env(safe-area-inset-left, 0px) - 10px);
        width: 56px;
        height: 56px;
        border-radius: 18px;
        border-color: rgba(226, 233, 242, 0.96);
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 18px 36px rgba(19, 40, 70, 0.16);
    }

    .sidebar-toggle span,
    .sidebar-toggle span::before,
    .sidebar-toggle span::after {
        content: "";
        display: block;
        width: 16px;
        height: 2px;
        border: none;
        border-radius: 999px;
        background: #5a6677;
        transform: none;
        transition: transform 160ms ease, opacity 120ms ease, background-color 120ms ease;
    }

    .sidebar-toggle span {
        position: relative;
    }

    .sidebar-toggle span::before {
        position: absolute;
        top: -5px;
        left: 0;
    }

    .sidebar-toggle span::after {
        position: absolute;
        top: 5px;
        left: 0;
    }

    body.sidebar-collapsed .sidebar-toggle span {
        background: #5a6677;
        transform: none;
        border: none;
    }

    body:not(.sidebar-collapsed) .sidebar-toggle span {
        background: transparent;
        transform: none;
        border: none;
    }

    body:not(.sidebar-collapsed) .sidebar-toggle span::before {
        top: 0;
        transform: rotate(45deg);
    }

    body:not(.sidebar-collapsed) .sidebar-toggle span::after {
        top: 0;
        transform: rotate(-45deg);
    }

    .app-main {
        padding-top: 96px;
    }

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

    .profile-center-summary,
    .profile-center-panels {
        grid-template-columns: 1fr;
    }
}

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

    body.sidebar-collapsed .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 80;
        width: min(84vw, 320px);
        height: 100dvh;
        padding: 84px 14px 18px;
        border-right: 1px solid rgba(216, 228, 240, 0.96);
        border-bottom: none;
        box-shadow: 0 24px 48px rgba(19, 40, 70, 0.18);
        overflow-y: auto;
        transform: translateX(0);
        transition: transform 180ms ease;
    }

    body.sidebar-collapsed .app-sidebar {
        transform: translateX(calc(-100% - 24px));
    }

    body.sidebar-collapsed .sidebar-toggle,
    .sidebar-toggle {
        display: inline-flex;
        top: calc(env(safe-area-inset-top, 0px) + 6px);
        left: calc(env(safe-area-inset-left, 0px) - 10px);
        width: 56px;
        height: 56px;
        border-radius: 18px;
        border-color: rgba(226, 233, 242, 0.96);
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 18px 36px rgba(19, 40, 70, 0.16);
    }

    .sidebar-toggle span,
    .sidebar-toggle span::before,
    .sidebar-toggle span::after {
        content: "";
        display: block;
        width: 18px;
        height: 2px;
        border: none;
        border-radius: 999px;
        background: #52657f;
        transform: none;
        transition: transform 160ms ease, opacity 120ms ease, background-color 120ms ease;
    }

    .sidebar-toggle span {
        position: relative;
    }

    .sidebar-toggle span::before {
        position: absolute;
        top: -6px;
        left: 0;
    }

    .sidebar-toggle span::after {
        position: absolute;
        top: 6px;
        left: 0;
    }

    body.sidebar-collapsed .sidebar-toggle span {
        background: #52657f;
    }

    body:not(.sidebar-collapsed) .sidebar-toggle span {
        background: transparent;
    }

    body:not(.sidebar-collapsed) .sidebar-toggle span::before {
        top: 0;
        transform: rotate(45deg);
    }

    body:not(.sidebar-collapsed) .sidebar-toggle span::after {
        top: 0;
        transform: rotate(-45deg);
    }

    body.sidebar-collapsed .brand,
    body.sidebar-collapsed .sidebar-top,
    body.sidebar-collapsed .side-link,
    body.sidebar-collapsed .brand-mark,
    body.sidebar-collapsed .brand-copy,
    body.sidebar-collapsed .side-index,
    body.sidebar-collapsed .side-copy,
    body.sidebar-collapsed .sidebar-group,
    body.sidebar-collapsed .sidebar-label {
        display: initial;
    }

        .sidebar-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-main {
        padding: 96px 18px 30px;
    }

    .profile-center-page {
        padding: 22px;
    }

    .profile-center-banner__head {
        flex-direction: column;
        gap: 18px;
    }

    .profile-center-banner__copy h2 {
        font-size: 42px;
    }

    .profile-center-banner__actions {
        gap: 14px;
    }

    .profile-center-action {
        min-width: 148px;
        min-height: 58px;
        font-size: 15px;
    }

    .profile-center-panel__head {
        min-height: 110px;
        padding: 22px 22px 18px;
    }

    .profile-center-panel__head h3 {
        font-size: 22px;
    }

    .profile-center-detail-list {
        margin: 18px;
    }

    .profile-center-detail-row {
        min-height: 78px;
        padding: 14px 16px;
    }

    .profile-center-detail-row strong {
        font-size: 15px;
    }

    body.sidebar-collapsed .brand-mark,
    body.sidebar-collapsed .brand-copy,
    body.sidebar-collapsed .side-index,
    body.sidebar-collapsed .side-copy,
    body.sidebar-collapsed .sidebar-group,
    body.sidebar-collapsed .sidebar-label {
        display: initial;
    }

    body.sidebar-collapsed .brand-copy,
    body.sidebar-collapsed .side-copy,
    body.sidebar-collapsed .sidebar-group {
        display: grid;
    }

    body.sidebar-collapsed .brand-mark {
        display: inline-block;
    }

    body.sidebar-collapsed .side-index,
    body.sidebar-collapsed .sidebar-label {
        display: block;
    }

    body.sidebar-collapsed .side-link {
        min-height: 72px;
        padding: 8px;
        grid-template-columns: 32px minmax(0, 1fr);
        justify-items: stretch;
    }

    body.sidebar-collapsed .side-icon {
        width: 40px;
        height: 40px;
    }

    .sidebar-label {
        grid-column: 1 / -1;
    }

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

    .file-meta {
        grid-template-columns: 1fr;
    }

    .common-format-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .history-stats {
        grid-template-columns: 1fr;
    }

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

    .history-filters {
        width: 100%;
    }

    .history-search {
        width: 100%;
    }

    .history-table-head {
        display: none;
    }

    .history-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .help-center-panel {
        position: static;
        width: 100%;
        margin-top: 8px;
    }

    .help-center-panel::before {
        display: none;
    }
}

@media (max-width: 640px) {
    .app-main {
        padding: 96px 16px 28px;
    }

    .app-sidebar {
        padding: 18px 14px 16px;
    }

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

    .lede {
        font-size: 15px;
    }

    .tool-surface,
    .sidebar-panel,
    .sidebar-card {
        padding: 18px;
    }

    .surface-head,
    .surface-footer,
    .section-head,
    .history-head,
    .history-item-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .sidebar-nav {
        grid-template-columns: 1fr;
    }

    .workflow-steps {
        grid-template-columns: 1fr;
    }

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

    .upload-zone {
        min-height: 160px;
    }

    .upload-title {
        font-size: 18px;
    }

    .formats-page {
        padding: 18px;
    }

    .common-format-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-menu-panel {
        width: min(286px, calc(100vw - 32px));
        right: -4px;
    }

    .profile-center-page {
        padding: 18px;
    }

    .profile-center-banner__copy h2 {
        font-size: 34px;
    }

    .profile-center-note {
        font-size: 16px;
    }

    .profile-center-summary,
    .profile-center-panels {
        grid-template-columns: 1fr;
    }

    .profile-center-banner__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .profile-center-action {
        width: 100%;
        min-width: 0;
        min-height: 58px;
        padding: 0 20px;
    }

    .profile-center-stat-card {
        padding: 24px 20px;
    }

    .profile-center-stat-card__body {
        margin-top: 20px;
    }

    .profile-center-stat-card__icon {
        width: 72px;
        height: 72px;
        font-size: 30px;
    }

    .profile-center-stat-card__copy strong {
        font-size: 36px;
    }

    .member-modal {
        padding: 12px;
    }

    .member-modal__dialog {
        width: min(100vw - 24px, 720px);
        max-height: calc(100vh - 24px);
        border-radius: 20px;
    }

    .member-modal__head,
    .member-modal__body,
    .member-modal__footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .member-package-list,
    .member-paytype-list,
    .member-order-panel__meta {
        grid-template-columns: 1fr;
    }

    .profile-center-panel__head {
        min-height: 112px;
        padding: 22px 20px;
    }

    .profile-center-panel__icon {
        width: 52px;
        height: 52px;
        font-size: 20px;
    }

    .profile-center-panel__head h3 {
        font-size: 24px;
    }

    .profile-center-detail-list {
        margin: 18px;
    }

    .profile-center-detail-row {
        min-height: 82px;
        padding: 16px 18px;
        display: flex;
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-center-detail-row__label,
    .profile-center-detail-row strong {
        font-size: 16px;
        text-align: left;
    }

    .profile-center-detail-row__label {
        flex-basis: auto;
    }

    .profile-center-detail-row strong {
        max-width: none;
    }

    .profile-center-detail-row__icon {
        width: 46px;
        height: 46px;
        border-radius: 14px;
        font-size: 16px;
    }
}
