:root {
    color-scheme: light;
    --bg: #f6f8fb;
    --panel: #ffffff;
    --text: #152033;
    --muted: #7a8496;
    --line: #e4e8ef;
    --primary: #0f73d8;
    --primary-dark: #075db4;
    --success: #16a06a;
    --danger: #c93333;
    --shadow: 0 24px 70px rgba(21, 32, 51, .10);
}

* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: #eef2f6;
}

#app {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

[v-cloak] {
    display: none;
}

.login-shell {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 42%) minmax(560px, 1fr);
    margin: 0;
    background: #f4f6f8;
}

.login-panel {
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 52px;
}

.login-brand-panel {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 48px clamp(40px, 6vw, 88px);
    color: #ffffff;
    background: #18241f;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-logo-box {
    width: 46px;
    height: 46px;
    overflow: hidden;
    display: block;
    flex: 0 0 46px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    background: #ffffff;
}

.brand-logo-box img {
    width: auto;
    height: 46px;
    display: block;
}

.brand-lockup-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-lockup-copy strong {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0;
}

.brand-lockup-copy small {
    color: #9fb1aa;
    font-size: 10px;
    letter-spacing: 1.2px;
}

.brand-intro {
    margin: auto 0 40px;
}

.brand-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #86d7ad;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
}

.brand-eyebrow::before {
    content: "";
    width: 24px;
    height: 2px;
    background: #45c285;
}

.brand-intro h1 {
    margin: 18px 0 12px;
    font-size: clamp(38px, 4vw, 56px);
    font-weight: 720;
    line-height: 1.08;
    letter-spacing: 0;
}

.brand-intro p {
    margin: 0;
    color: #bac7c2;
    font-size: 17px;
    line-height: 1.7;
}

.brand-signal {
    height: 152px;
    position: relative;
    margin-bottom: 42px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.signal-scale {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
}

.signal-scale span {
    display: block;
    height: 1px;
    background: rgba(255, 255, 255, .07);
}

.signal-bars {
    position: absolute;
    inset: 18px 0;
    display: grid;
    grid-template-columns: repeat(12, minmax(4px, 1fr));
    align-items: end;
    gap: clamp(5px, 1.1vw, 14px);
}

.signal-bars i {
    height: var(--signal-height);
    min-height: 8px;
    display: block;
    border-radius: 2px 2px 0 0;
    background: #50bd88;
    opacity: .72;
}

.signal-bars i:nth-child(3n) {
    background: #6ea7e8;
}

.signal-bars i:nth-child(4n) {
    background: #e2b657;
}

.brand-footer {
    color: #81928b;
    font-size: 12px;
}

.login-form {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    border: 1px solid #e1e6ec;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(21, 32, 51, .10);
    transition: max-width .2s ease;
}

.login-form::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 72px;
    height: 3px;
    background: #42b77f;
}

.login-form {
    padding: 42px;
}

.login-form.is-register {
    max-width: 560px;
}

.form-logo {
    width: 112px;
    height: auto;
    display: none;
    margin: 0 auto 24px;
    object-fit: contain;
}

.form-head {
    margin-bottom: 18px;
    text-align: left;
}

.form-head h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0;
}

.form-head p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.login-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 22px;
    padding: 4px;
    border: 0;
    border-radius: 6px;
    background: #f0f3f7;
}

.login-tabs button {
    height: 36px;
    border: 0;
    border-radius: 5px;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.login-tabs button.active {
    color: var(--primary);
    background: #fff;
    box-shadow: 0 6px 18px rgba(21, 32, 51, .08);
}

.auth-stage {
    min-height: 270px;
}

.auth-switch-enter-active,
.auth-switch-leave-active {
    transition: opacity .14s ease, transform .14s ease;
}

.auth-switch-enter-from {
    opacity: 0;
    transform: translateY(5px);
}

.auth-switch-leave-to {
    opacity: 0;
    transform: translateY(-3px);
}

.login-view {
    min-height: 270px;
}

.register-view {
    min-height: 270px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 16px;
}

.register-view .field {
    margin-bottom: 0;
}

.register-view .primary-button {
    grid-column: 1 / -1;
}

.field {
    display: block;
    margin-bottom: 16px;
}

.field > span:first-child {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

.password-control {
    position: relative;
    display: block;
    margin: 0;
}

.password-control input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 5px;
    color: #98a2b3;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle.visible {
    color: var(--primary);
    background: #eef6ff;
}

.password-toggle:focus-visible {
    outline: 3px solid rgba(15, 115, 216, .16);
    outline-offset: 1px;
}

.eye-icon {
    position: relative;
    width: 18px;
    height: 12px;
    display: block;
    border: 1.5px solid currentColor;
    border-radius: 50%;
}

.eye-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    transform: translate(-50%, -50%);
}

.field input {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 13px;
    color: var(--text);
    font: inherit;
    outline: none;
    background: #fbfcfe;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.field input:hover {
    background: #fff;
}

.field input::placeholder {
    color: #8c97a8;
    opacity: 1;
}

.field input:focus {
    border-color: #2684e5;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(15, 115, 216, .12);
}

.primary-button {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 6px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background .16s ease, transform .16s ease, opacity .16s ease;
}

.secondary-button {
    width: 100%;
    height: 42px;
    border: 0;
    border-radius: 6px;
    color: var(--primary);
    background: #eef6ff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.secondary-button:disabled {
    cursor: not-allowed;
    opacity: .72;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 14px;
    color: #98a2b3;
    font-size: 12px;
    white-space: nowrap;
}

.login-divider::before,
.login-divider::after {
    content: "";
    width: 100%;
    height: 1px;
    background: #e7ebf0;
}

.wechat-login-button {
    width: 100%;
    height: 48px;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid #dfe5ec;
    border-radius: 6px;
    color: #263244;
    background: #ffffff;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.wechat-login-button:hover {
    border-color: #8bd8ad;
    background: #f8fffb;
    box-shadow: 0 0 0 3px rgba(7, 193, 96, .08);
}

.login-tabs button:focus-visible,
.primary-button:focus-visible,
.wechat-login-button:focus-visible,
.wechat-actions button:focus-visible {
    outline: 3px solid rgba(15, 115, 216, .18);
    outline-offset: 2px;
}

.wechat-brand-icon {
    position: relative;
    width: 30px;
    height: 30px;
    display: inline-block;
    flex: 0 0 30px;
    border-radius: 50%;
    background: #07c160;
}

.wechat-brand-icon i {
    position: absolute;
    display: block;
    border-radius: 50%;
    background: #ffffff;
}

.wechat-bubble-one {
    width: 14px;
    height: 11px;
    top: 7px;
    left: 5px;
}

.wechat-bubble-two {
    width: 12px;
    height: 9px;
    right: 5px;
    bottom: 6px;
    border: 2px solid #07c160;
}

.wechat-login-arrow {
    color: #98a2b3;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    text-align: right;
}

.wechat-view {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wechat-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    color: #344054;
    font-size: 14px;
    font-weight: 650;
}

.wechat-status .wechat-brand-icon {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
}

.wechat-status .wechat-bubble-one {
    top: 6px;
    left: 4px;
}

.wechat-status .wechat-bubble-two {
    right: 3px;
    bottom: 4px;
}

.qr-card {
    width: 236px;
    height: 236px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border: 1px solid #dfe5ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(21, 32, 51, .06);
}

.qr-loading,
.qr-empty {
    color: var(--muted);
    font-size: 14px;
}

.wechat-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
}

.wechat-actions button {
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 6px;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
}

.wechat-actions .secondary-button {
    border: 1px solid #cfe8da;
    color: #087d42;
    background: #f2fbf6;
}

.wechat-account-button {
    border: 1px solid #dfe5ec;
    color: #475467;
    background: #ffffff;
}

.wechat-account-button:hover {
    border-color: #b8c1cc;
    background: #f8fafc;
}

.action-icon {
    width: 18px;
    color: currentColor;
    font-size: 20px;
    line-height: 1;
    text-align: center;
}

.primary-button {
    margin-top: 4px;
    color: #fff;
    background: var(--primary);
}

.primary-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.login-form .primary-button {
    box-shadow: 0 8px 18px rgba(15, 115, 216, .18);
}

.login-form .primary-button:hover {
    box-shadow: 0 10px 22px rgba(15, 115, 216, .23);
}

.primary-button:disabled {
    cursor: not-allowed;
    opacity: .72;
    transform: none;
}

.login-form .primary-button:disabled {
    box-shadow: none;
}

.message {
    min-height: 20px;
    margin: 16px 0 0;
    color: var(--success);
    font-size: 14px;
    line-height: 1.45;
}

.message.error {
    color: var(--danger);
}

.message.is-empty {
    visibility: hidden;
}

@media (max-width: 520px) {
    .login-shell {
        display: block;
        width: 100%;
        min-height: 100vh;
        padding: 0;
    }

    .login-panel {
        min-height: 100vh;
        padding: 28px 12px;
    }

    .login-form {
        padding: 32px 24px 28px;
    }

    .register-view {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .register-view .field {
        margin-bottom: 16px;
    }

    .register-view .primary-button {
        grid-column: auto;
    }
}

@media (min-width: 521px) and (max-width: 1120px) {
    .login-shell {
        display: block;
    }

    .login-panel {
        padding: 40px 24px;
    }
}

@media (max-width: 1120px) {
    .login-brand-panel {
        display: none;
    }

    .form-logo {
        display: block;
    }

    .form-head {
        text-align: center;
    }

    .form-head h2 {
        font-size: 23px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-form,
    .auth-switch-enter-active,
    .auth-switch-leave-active,
    .primary-button,
    .field input,
    .wechat-login-button {
        transition: none;
    }
}

.app-shell {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    background: #f6f8fb;
}

.sidebar {
    min-height: 100vh;
    border-right: 1px solid var(--line);
    background: #ffffff;
}

.brand {
    height: 72px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--line);
}

.brand img {
    width: 112px;
    height: auto;
    display: block;
}

.menu-list {
    height: calc(100vh - 72px);
    overflow: auto;
    padding: 12px 8px;
}

.menu-item {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 6px;
    margin-bottom: 4px;
    color: #334155;
    background: transparent;
    font: inherit;
    font-size: 14px;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}

.menu-item.expandable {
    font-weight: 700;
}

.menu-item.child {
    min-height: 36px;
    color: #526174;
    font-size: 13px;
}

.menu-item.visible-child {
    animation: menuChildIn .18s ease both;
}

.menu-item:hover {
    background: #f2f6fb;
}

.menu-item.active {
    color: var(--primary);
    background: #eaf4ff;
    font-weight: 700;
}

.menu-mark {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #64748b;
    background: #edf2f7;
    font-size: 12px;
    font-weight: 700;
}

.menu-item.active .menu-mark {
    color: #fff;
    background: var(--primary);
}

.menu-title {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-toggle-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    position: relative;
    margin-left: auto;
    border-radius: 50%;
    background: #eef2f7;
    transition: background .16s ease, transform .18s ease;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
    content: "";
    position: absolute;
    inset: 9px 5px auto;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    opacity: .72;
}

.menu-toggle-icon::after {
    transform: rotate(90deg);
    transition: opacity .12s ease, transform .18s ease;
}

.menu-item.expanded .menu-toggle-icon {
    background: rgba(15, 115, 216, .14);
    transform: rotate(180deg);
}

.menu-item.expanded .menu-toggle-icon::after {
    opacity: 0;
    transform: rotate(0deg);
}

@keyframes menuChildIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-state {
    padding: 14px 12px;
    color: var(--muted);
    font-size: 14px;
}

.workspace {
    min-width: 0;
    padding: 24px;
}

.topbar {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: -24px -24px 24px;
    padding: 0 24px;
    border-bottom: 1px solid var(--line);
    background: #ffffff;
}

.topbar h1 {
    margin: 0 0 4px;
    font-size: 22px;
    line-height: 1.25;
}

.topbar p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.user-box {
    position: relative;
    display: flex;
    align-items: center;
}

.avatar-button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(15, 115, 216, .22);
    border-radius: 50%;
    color: #fff;
    background: var(--primary);
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(15, 115, 216, .18);
}

.avatar-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 30;
    width: 188px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(21, 32, 51, .16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}

.user-box:hover .user-dropdown,
.user-box:focus-within .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown::before {
    content: "";
    position: absolute;
    inset: -12px 0 auto;
    height: 12px;
}

.user-card {
    padding: 8px 10px 10px;
    border-bottom: 1px solid #edf1f6;
}

.user-card strong,
.user-card small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-card strong {
    margin-bottom: 4px;
    color: var(--text);
    font-size: 14px;
}

.user-card small {
    color: var(--muted);
    font-size: 12px;
}

.user-dropdown button {
    width: 100%;
    height: 36px;
    display: flex;
    align-items: center;
    border: 0;
    border-radius: 6px;
    padding: 0 10px;
    color: #334155;
    background: transparent;
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.user-dropdown button:hover {
    color: var(--primary);
    background: #f3f8ff;
}

.user-dropdown button:last-child:hover {
    color: var(--danger);
    background: #fff4f4;
}

.overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.metric,
.content-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.metric {
    min-height: 118px;
    padding: 18px;
}

.metric span {
    display: block;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 13px;
}

.metric strong {
    display: block;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 24px;
    line-height: 1.25;
}

.content-panel {
    padding: 24px;
}

.content-panel h2 {
    margin: 0 0 10px;
    font-size: 20px;
}

.content-panel p {
    margin: 0;
    color: var(--muted);
}

.amazon-shop-page {
    display: grid;
    gap: 16px;
}

.shop-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.shop-panel {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.shop-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-bottom: 1px solid #edf1f6;
}

.shop-panel-head h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.shop-panel-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.shop-actions,
.shop-form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.shop-filter-bar {
    display: grid;
    grid-template-columns: minmax(180px, 1.5fr) repeat(4, minmax(120px, 1fr)) auto;
    align-items: end;
    gap: 10px;
    padding: 14px 14px 0;
}

.shop-filter-bar label {
    display: grid;
    gap: 6px;
}

.shop-filter-bar span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.shop-filter-bar input,
.shop-filter-bar select {
    width: 100%;
    height: 34px;
    border: 1px solid #dbe5f2;
    border-radius: 6px;
    padding: 0 10px;
    color: var(--text);
    background: #fff;
    font: inherit;
    font-size: 13px;
}

.shop-filter-bar input:focus,
.shop-filter-bar select:focus {
    border-color: rgba(15, 115, 216, .55);
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 115, 216, .1);
}

.shop-modal-form {
    width: min(720px, calc(100vw - 48px));
    display: grid;
    gap: 16px;
    padding: 18px;
}

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

.shop-modal-grid label,
.shop-modal-grid .shop-field {
    display: grid;
    gap: 7px;
}

.shop-modal-grid label > span,
.shop-modal-grid .shop-field > span {
    color: #526174;
    font-size: 13px;
    font-weight: 700;
}

.shop-modal-grid input,
.shop-modal-grid select {
    width: 100%;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 10px;
    color: var(--text);
    background: #fff;
    font: inherit;
    outline: none;
}

.shop-modal-grid input:focus,
.shop-modal-grid select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 115, 216, .12);
}

.shop-modal-wide {
    grid-column: span 2;
}

.shop-country-list {
    min-height: 38px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 6px;
    background: #fff;
}

.shop-country-list:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 115, 216, .12);
}

.shop-country-option {
    min-height: 28px;
    display: inline-flex !important;
    align-items: center;
    gap: 6px !important;
    border: 1px solid #dbe5f2;
    border-radius: 6px;
    padding: 0 9px;
    background: #fbfcfe;
    cursor: pointer;
}

.shop-country-option input {
    width: 15px !important;
    height: 15px !important;
    padding: 0 !important;
}

.shop-modal-grid .shop-country-option > span {
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.shop-modal-grid .shop-country-option > em,
.shop-country-empty {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.shop-auth-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border-radius: 999px;
    padding: 0 10px;
    color: #b45309;
    background: #fff7ed;
    font-style: normal;
    font-size: 12px;
    font-weight: 800;
}

.shop-auth-badge.success {
    color: var(--success);
    background: #eaf8f2;
}

.shop-list {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.shop-list-state {
    min-height: 140px;
    display: grid;
    place-items: center;
    border: 1px dashed #d9e1ec;
    border-radius: 8px;
    color: var(--muted);
    background: #fbfcfe;
    font-size: 14px;
}

.shop-list-item {
    display: grid;
    grid-template-columns: minmax(220px, .9fr) minmax(520px, 1.8fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid #edf1f6;
    border-radius: 8px;
    background: #fff;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.shop-list-item:hover {
    border-color: rgba(15, 115, 216, .22);
    box-shadow: 0 10px 24px rgba(21, 32, 51, .06);
    transform: translateY(-1px);
}

.shop-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.shop-avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: #0f73d8;
    font-size: 18px;
    font-weight: 800;
}

.shop-title {
    min-width: 0;
}

.shop-title > div {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.shop-title strong {
    max-width: 240px;
    display: block;
    overflow: hidden;
    color: var(--text);
    font-size: 15px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-title small {
    display: block;
    margin-top: 5px;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-meta {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.shop-meta div {
    min-width: 0;
    padding: 9px 10px;
    border-radius: 6px;
    background: #f8fafc;
}

.shop-meta span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
}

.shop-meta strong {
    display: block;
    overflow: hidden;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.text-button.danger:hover {
    color: var(--danger);
    border-color: rgba(201, 51, 51, .32);
    background: #fff4f4;
}

.danger-button {
    background: var(--danger);
}

.danger-button:hover:not(:disabled) {
    box-shadow: 0 10px 20px rgba(201, 51, 51, .18);
}

.shop-delete-dialog {
    width: min(420px, calc(100vw - 48px));
    padding: 24px;
    text-align: center;
}

.shop-delete-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    border-radius: 50%;
    color: var(--danger);
    background: #fff4f4;
    font-size: 24px;
    font-weight: 900;
}

.shop-delete-dialog h3 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 18px;
}

.shop-delete-dialog p {
    margin: 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.7;
}

.shop-delete-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

.sync-status-dialog {
    width: min(900px, calc(100vw - 48px));
    padding: 22px;
}

.sync-status-state {
    min-height: 180px;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 14px;
}

.sync-status-state.error {
    color: var(--danger);
}

.sync-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.sync-summary div {
    padding: 12px;
    border-radius: 8px;
    background: #f8fafc;
}

.sync-summary span,
.sync-section-head small,
.sync-latest-row span,
.sync-latest-row em {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.sync-summary strong {
    display: block;
    margin-top: 5px;
    color: var(--text);
    font-size: 20px;
}

.sync-section-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.sync-section {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.sync-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.sync-section-head strong {
    color: var(--text);
    font-size: 14px;
}

.sync-section-head em {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 4px 9px;
    color: #334155;
    background: #eef2f7;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.sync-count-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.sync-count-list span {
    border-radius: 999px;
    padding: 4px 8px;
    color: #334155;
    background: #f1f5f9;
    font-size: 12px;
    font-weight: 700;
}

.sync-empty {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}

.sync-latest-list {
    display: grid;
    gap: 6px;
    margin-top: 10px;
}

.sync-latest-row {
    display: grid;
    grid-template-columns: 100px minmax(120px, 1fr) 150px minmax(0, 1.4fr);
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    background: #fbfcfe;
}

.sync-latest-row strong {
    color: #334155;
    font-size: 13px;
}

.sync-latest-row em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-style: normal;
}

.account-center-page {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 16px;
}

.account-center-nav,
.account-center-main,
.account-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.account-center-nav {
    align-self: start;
    display: grid;
    gap: 6px;
    padding: 10px;
}

.account-center-nav button {
    display: grid;
    gap: 5px;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 12px;
    color: #334155;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.account-center-nav button:hover,
.account-center-nav button.active {
    border-color: rgba(15, 115, 216, .18);
    color: var(--primary);
    background: #f3f8ff;
}

.account-center-nav strong {
    font-size: 14px;
}

.account-center-nav span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.account-center-main {
    min-width: 0;
    padding: 20px;
}

.account-center-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #edf1f6;
}

.account-center-head h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.account-center-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.personal-account-layout {
    display: grid;
    gap: 14px;
}

.personal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.personal-tabs button {
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 14px;
    color: #334155;
    background: #fbfcfe;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.personal-tabs button:hover,
.personal-tabs button.active {
    color: var(--primary);
    border-color: rgba(15, 115, 216, .28);
    background: #eef6ff;
}

.account-panel {
    padding: 18px;
}

.account-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.account-avatar {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    color: #fff;
    background: var(--primary);
    font-size: 24px;
    font-weight: 800;
}

.account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-profile h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.account-profile p {
    margin: 0;
    color: var(--muted);
}

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

.account-detail-grid div {
    min-width: 0;
    padding: 12px;
    border: 1px solid #edf1f6;
    border-radius: 6px;
    background: #fbfcfe;
}

.account-detail-grid dt {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
}

.account-detail-grid dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--text);
    font-weight: 700;
}

.account-info-form {
    display: grid;
    gap: 10px;
}

.account-form-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-height: 54px;
    padding: 10px 12px;
    border: 1px solid #edf1f6;
    border-radius: 6px;
    background: #fbfcfe;
}

.account-form-row > label {
    color: #526174;
    font-size: 14px;
    font-weight: 700;
}

.account-row-content {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #334155;
}

.account-row-content strong,
.account-row-content span {
    overflow-wrap: anywhere;
}

.account-row-content input,
.account-modal-form input {
    width: min(320px, 100%);
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 10px;
    color: var(--text);
    background: #fff;
    font: inherit;
    outline: none;
}

.account-row-content input:focus,
.account-modal-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 115, 216, .12);
}

.account-modal-form {
    width: min(490px, calc(100vw - 48px));
    display: grid;
    gap: 14px;
    padding: 18px;
}

.account-modal-form label {
    display: grid;
    gap: 7px;
}

.account-modal-form label span {
    color: #526174;
    font-size: 13px;
    font-weight: 700;
}

.account-modal-form input {
    width: 100%;
}

.account-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 4px;
}

.setting-list,
.device-list,
.plan-list {
    display: grid;
    gap: 10px;
}

.setting-row,
.device-item,
.plan-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 60px;
    padding: 12px 14px;
    border: 1px solid #edf1f6;
    border-radius: 6px;
    background: #fbfcfe;
}

.setting-row strong,
.device-item strong,
.plan-item strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text);
    font-size: 14px;
}

.setting-row span,
.device-item span,
.plan-item span {
    display: block;
    overflow-wrap: anywhere;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.setting-row em,
.device-item em,
.plan-item em {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 4px 9px;
    color: var(--muted);
    background: #eef2f7;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.setting-row em.success,
.device-item em,
.plan-item.active em {
    color: var(--success);
    background: #eaf8f2;
}

.inline-switch {
    position: relative;
    flex: 0 0 auto;
    width: 42px;
    height: 24px;
}

.inline-switch input {
    position: absolute;
    opacity: 0;
}

.inline-switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #cbd5e1;
    cursor: pointer;
    transition: background .16s ease;
}

.inline-switch span::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .22);
    transition: transform .16s ease;
}

.inline-switch input:checked + span {
    background: var(--primary);
}

.inline-switch input:checked + span::after {
    transform: translateX(18px);
}

.module-empty {
    min-height: 180px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 8px;
    text-align: center;
}

.module-empty strong {
    font-size: 18px;
}

.module-empty p {
    max-width: 420px;
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.subaccount-page {
    display: grid;
    gap: 16px;
}

.subaccount-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.subaccount-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(140px, .8fr));
    align-items: end;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.subaccount-toolbar label {
    display: grid;
    gap: 7px;
}

.subaccount-toolbar span {
    color: #526174;
    font-size: 13px;
    font-weight: 700;
}

.subaccount-toolbar input,
.subaccount-toolbar select {
    width: 100%;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 10px;
    color: var(--text);
    background: #fbfcfe;
    font: inherit;
    outline: none;
}

.subaccount-toolbar input:focus,
.subaccount-toolbar select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 115, 216, .12);
}

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

.subaccount-card,
.subaccount-table {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.subaccount-card {
    min-height: 180px;
    padding: 18px;
}

.subaccount-card h2,
.table-head h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
}

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

.subaccount-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mini-button,
.text-button {
    height: 32px;
    border-radius: 6px;
    padding: 0 12px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.mini-button {
    border: 0;
    color: #fff;
    background: var(--primary);
}

.mini-button:disabled {
    cursor: not-allowed;
    opacity: .72;
}

.mini-button.danger-button {
    background: var(--danger);
}

.mini-button.danger-button:hover:not(:disabled) {
    box-shadow: 0 10px 20px rgba(201, 51, 51, .18);
}

.text-button {
    border: 1px solid var(--line);
    color: #526174;
    background: #fff;
}

.text-button.active {
    color: var(--primary);
    border-color: rgba(15, 115, 216, .35);
    background: #eef6ff;
}

.department-form {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(160px, 1.2fr) 90px auto;
    align-items: end;
    gap: 10px;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid #edf1f6;
    border-radius: 8px;
    background: #fbfcfe;
}

.role-form {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) 100px 90px minmax(150px, 1fr) auto;
    align-items: end;
    gap: 10px;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid #edf1f6;
    border-radius: 8px;
    background: #fbfcfe;
}

.department-form label,
.role-form label {
    display: grid;
    gap: 6px;
}

.department-form label span,
.role-form label span {
    color: #526174;
    font-size: 12px;
    font-weight: 700;
}

.department-form input,
.department-form select,
.role-form input,
.role-form select {
    width: 100%;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 9px;
    color: var(--text);
    background: #fff;
    font: inherit;
    font-size: 13px;
    outline: none;
}

.department-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.compact-list {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
}

.compact-list li {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid #edf1f6;
    color: #334155;
    font-size: 14px;
}

.compact-list li:first-child {
    border-top: 0;
}

.compact-list span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-list em {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.department-tree li {
    position: relative;
    gap: 12px;
    min-height: 44px;
    padding-top: 5px;
    padding-bottom: 5px;
    border-radius: 6px;
}

.department-tree li:hover {
    background: #f7faff;
}

.department-tree li.selected {
    background: #eaf4ff;
    box-shadow: inset 3px 0 0 var(--primary);
}

.department-tree li::before {
    content: none;
}

.department-tree li.parent::before {
    content: none;
}

.department-tree li.branch::after {
    content: "";
    position: absolute;
    left: calc(var(--tree-offset, 0px) + 12px);
    top: 0;
    bottom: 0;
    border-left: 1px solid #d8e0ea;
}

.dept-main {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.dept-name {
    position: relative;
    z-index: 1;
    min-width: 0;
    overflow: hidden;
    color: #243246;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.department-tree li.selected .dept-name {
    color: var(--primary);
}

.dept-main em {
    flex: 0 0 auto;
    min-width: 42px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #526174;
    background: #eef2f7;
    font-size: 12px;
    font-style: normal;
}

.dept-toggle {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    position: relative;
    border: 1px solid transparent;
    border-radius: 6px;
    color: transparent;
    background: transparent;
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    cursor: default;
}

.dept-toggle.visible {
    border-color: rgba(15, 115, 216, .28);
    color: var(--primary);
    background: #eef6ff;
    cursor: pointer;
}

.dept-toggle.visible:hover {
    border-color: var(--primary);
    background: #e2f1ff;
}

.dept-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
}

.dept-actions button {
    min-width: 52px;
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: #526174;
    background: #fff;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.dept-actions button:hover {
    color: var(--primary);
    border-color: rgba(15, 115, 216, .35);
    background: #f3f8ff;
}

.dept-actions button:last-child:hover {
    color: var(--danger);
    border-color: rgba(201, 51, 51, .32);
    background: #fff4f4;
}

.dept-actions button:disabled {
    cursor: not-allowed;
    opacity: .58;
}

.role-list li {
    gap: 12px;
    min-height: 48px;
}

.role-main {
    min-width: 0;
    flex: 1;
}

.role-main span {
    display: block;
    margin-bottom: 4px;
    color: #243246;
    font-weight: 700;
}

.role-main em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.role-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
}

.role-actions button {
    min-width: 52px;
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: #526174;
    background: #fff;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.role-actions button:first-child {
    min-width: 76px;
    color: var(--primary);
    border-color: rgba(15, 115, 216, .26);
    background: #f3f8ff;
}

.role-actions button:hover {
    color: var(--primary);
    border-color: rgba(15, 115, 216, .35);
    background: #f3f8ff;
}

.role-actions button:last-child:hover {
    color: var(--danger);
    border-color: rgba(201, 51, 51, .32);
    background: #fff4f4;
}

.role-actions button:disabled {
    cursor: not-allowed;
    opacity: .58;
}

.permission-panel {
    border: 1px solid #dbe5f2;
    border-radius: 8px;
    background: #fbfcfe;
}

.permission-modal-backdrop {
    align-items: center;
}

.permission-modal {
    width: min(1040px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.permission-head,
.permission-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
}

.permission-head {
    flex: 0 0 auto;
    border-bottom: 1px solid #edf1f6;
    background: #fff;
}

.permission-head h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.permission-head p,
.permission-actions span {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.permission-toolbar {
    flex: 0 0 auto;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    padding: 12px;
    border-bottom: 1px solid #edf1f6;
    background: #fbfcfe;
}

.permission-toolbar label {
    width: min(460px, 100%);
    display: grid;
    gap: 6px;
}

.permission-toolbar span {
    color: #526174;
    font-size: 12px;
    font-weight: 700;
}

.permission-toolbar input {
    width: 100%;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 10px;
    color: var(--text);
    background: #fff;
    font: inherit;
    outline: none;
}

.permission-toolbar input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 115, 216, .12);
}

.permission-toolbar em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.permission-tree {
    flex: 1 1 auto;
    min-height: 280px;
    max-height: none;
    overflow: auto;
    padding: 8px;
    background: #fff;
}

.permission-node,
.permission-empty {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 6px;
    color: #334155;
    font-size: 13px;
}

.permission-node:hover {
    background: #f2f7ff;
}

.permission-node input {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.permission-node span {
    min-width: 0;
    flex: 0 1 auto;
    overflow: hidden;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.permission-node.parent span {
    color: var(--primary);
}

.permission-node em {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.permission-actions {
    flex: 0 0 auto;
    border-top: 1px solid #edf1f6;
    background: #fff;
}

.table-head {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 18px;
    border-bottom: 1px solid var(--line);
}

.table-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.table-head span {
    color: var(--muted);
    font-size: 13px;
}

.subaccount-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    background: #fbfcfe;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, .42);
}

.modal-panel {
    width: min(980px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 26px 80px rgba(21, 32, 51, .28);
}

.modal-head {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 4px;
}

.modal-head h3 {
    margin: 0 0 4px;
    font-size: 18px;
}

.modal-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.subaccount-form label {
    display: grid;
    gap: 6px;
}

.subaccount-form label span {
    color: #526174;
    font-size: 12px;
    font-weight: 700;
}

.subaccount-form input,
.subaccount-form select {
    width: 100%;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 9px;
    color: var(--text);
    background: #fff;
    font: inherit;
    font-size: 13px;
    outline: none;
}

.subaccount-form-wide {
    grid-column: span 2;
}

.check-list {
    min-height: 34px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 5px 0;
}

.check-list label,
.inline-check {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
}

.check-list label {
    min-height: 28px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 10px;
    background: #fff;
}

.check-list input,
.inline-check input {
    width: 15px;
    height: 15px;
}

.check-list em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.subaccount-form-actions {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 8px;
}

.table-scroll {
    overflow-x: auto;
}

.subaccount-table table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}

.subaccount-table th,
.subaccount-table td {
    padding: 13px 18px;
    border-bottom: 1px solid #edf1f6;
    text-align: left;
    vertical-align: middle;
    font-size: 14px;
}

.subaccount-table th {
    color: #526174;
    background: #fbfcfe;
    font-size: 13px;
    font-weight: 700;
}

.subaccount-table td strong,
.subaccount-table td small {
    display: block;
}

.subaccount-table td strong {
    margin-bottom: 4px;
    color: var(--text);
    font-weight: 700;
}

.subaccount-table td small {
    color: var(--muted);
    font-size: 12px;
}

.table-empty {
    height: 96px;
    color: var(--muted);
    text-align: center !important;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 24px;
    border-radius: 999px;
    color: #08724c;
    background: #e7f7ef;
    font-size: 12px;
    font-weight: 700;
}

.status-pill.off {
    color: #9f2f2f;
    background: #fdecec;
}

.status-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.status-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.status-switch span {
    width: 40px;
    height: 22px;
    position: relative;
    flex: 0 0 40px;
    border-radius: 999px;
    background: #dbe3ee;
    transition: background .16s ease;
}

.status-switch span::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 2px;
    top: 2px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(21, 32, 51, .22);
    transition: transform .16s ease;
}

.status-switch input:checked + span {
    background: var(--success);
}

.status-switch input:checked + span::after {
    transform: translateX(18px);
}

.status-switch em {
    min-width: 28px;
    color: #08724c;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.status-switch.off em {
    color: #9f2f2f;
}

.status-switch.busy {
    cursor: wait;
    opacity: .68;
}

.table-actions {
    display: flex;
    gap: 6px;
}

.table-actions button {
    min-width: 48px;
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: #526174;
    background: #fff;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.table-actions button:hover {
    color: var(--primary);
    border-color: rgba(15, 115, 216, .35);
    background: #f3f8ff;
}

.table-actions button:last-child:hover {
    color: var(--danger);
    border-color: rgba(201, 51, 51, .32);
    background: #fff4f4;
}

.table-actions button:disabled {
    cursor: not-allowed;
    opacity: .58;
}

.app-message {
    margin: 18px 0 0;
    color: var(--success);
    font-size: 14px;
}

.app-message.error {
    color: var(--danger);
}

.feedback-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(16, 24, 40, .36);
}

.feedback-dialog {
    width: min(360px, 100%);
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 26px 24px 22px;
    border: 1px solid rgba(15, 115, 216, .18);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(15, 23, 42, .22);
    text-align: center;
}

.feedback-dialog h3 {
    margin: 4px 0 0;
    color: var(--text);
    font-size: 18px;
}

.feedback-dialog p {
    margin: 0;
    color: #526174;
    line-height: 1.7;
}

.feedback-dialog button {
    min-width: 92px;
    height: 36px;
    margin-top: 4px;
    border: 0;
    border-radius: 6px;
    color: #fff;
    background: var(--primary);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.feedback-dialog.error {
    border-color: rgba(201, 51, 51, .18);
}

.feedback-dialog.error button {
    background: var(--danger);
}

.dialog-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(15, 115, 216, .16);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: dialog-spin .85s linear infinite;
}

.dialog-status-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--primary);
    font-size: 20px;
    font-weight: 800;
}

.feedback-dialog.error .dialog-status-icon {
    background: var(--danger);
}

@keyframes dialog-spin {
    to {
        transform: rotate(360deg);
    }
}

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

    .sidebar {
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .menu-list {
        height: auto;
        max-height: 260px;
    }

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

    .account-center-page {
        grid-template-columns: 1fr;
    }

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

    .subaccount-summary,
    .shop-summary,
    .subaccount-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shop-list-item {
        grid-template-columns: 1fr;
    }

    .shop-row-actions {
        justify-content: flex-start;
    }

    .sync-latest-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .shop-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .department-form,
    .role-form,
    .shop-modal-grid,
    .subaccount-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shop-modal-wide {
        grid-column: span 2;
    }

    .subaccount-card-head,
    .shop-panel-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

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

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        margin: -16px -16px 16px;
        padding: 14px 16px;
    }

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

    .account-center-nav,
    .account-detail-grid {
        grid-template-columns: 1fr;
    }

    .setting-row,
    .device-item,
    .plan-item {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .account-row-content {
        align-items: flex-start;
        flex-direction: column;
    }

    .subaccount-summary,
    .shop-summary,
    .subaccount-grid,
    .shop-filter-bar,
    .subaccount-toolbar,
    .department-form,
    .role-form,
    .shop-modal-grid,
    .subaccount-form {
        grid-template-columns: 1fr;
    }

    .subaccount-form-wide,
    .shop-modal-wide {
        grid-column: auto;
    }

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

    .sync-summary,
    .sync-latest-row {
        grid-template-columns: 1fr;
    }

    .shop-row-actions {
        flex-wrap: wrap;
    }

    .table-head,
    .table-head-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .department-tree li {
        align-items: flex-start;
        flex-direction: column;
    }

    .subaccount-card-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .dept-actions {
        width: 100%;
        padding-left: 32px;
    }

    .role-list li,
    .permission-head,
    .permission-actions,
    .permission-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .role-actions {
        width: 100%;
        flex-wrap: wrap;
    }
}

/* Member access is split into focused work pages instead of one dense dashboard. */
.team-access-page { min-width: 0; gap: 14px; overflow-x: clip; }
.team-access-head { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.team-access-head h2 { margin: 3px 0 4px; font-size: 24px; }
.team-access-head p { margin: 0; color: var(--muted); font-size: 13px; }
.team-access-eyebrow, .form-step-label { display: block; color: var(--primary); font-size: 11px; font-weight: 800; }
.team-primary-action { min-width: 104px; height: 38px; }

.team-page-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.team-page-nav button { position: relative; min-height: 52px; border: 0; border-left: 1px solid var(--line); padding: 0 18px; color: #526174; background: #fff; text-align: center; cursor: pointer; }
.team-page-nav button:first-child { border-left: 0; }
.team-page-nav button:hover { background: #f8fafc; }
.team-page-nav button.active { color: var(--primary); background: #f3f8ff; }
.team-page-nav button.active::after { position: absolute; right: 18px; bottom: 0; left: 18px; height: 3px; content: ''; background: var(--primary); }
.team-page-nav strong, .team-page-nav span { display: block; }
.team-page-nav strong { font-size: 15px; }
.team-page-nav span { margin-top: 5px; color: var(--muted); font-size: 12px; }

.member-summary { gap: 12px; }
.member-summary .metric { min-height: 86px; padding: 15px 18px; }
.member-summary .metric strong { margin-top: 7px; font-size: 25px; }
.member-list-panel, .organization-panel, .role-management-panel { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.member-list-head, .management-page-head { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.member-list-head h3, .management-page-head h3 { margin: 0; font-size: 18px; }
.member-list-head p, .management-page-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.management-page-head > span { color: var(--muted); font-size: 13px; }
.management-head-actions { display: flex; align-items: center; gap: 14px; }
.management-head-actions > span { color: var(--muted); font-size: 13px; }
.member-filter-bar { grid-template-columns: minmax(230px, 1.45fr) repeat(3, minmax(135px, .75fr)); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: #fbfcfe; }
.member-list-panel .table-scroll { width: 100%; max-width: 100%; overflow-x: auto; }
.member-table { width: 100%; min-width: 940px; border-collapse: collapse; table-layout: fixed; }
.member-table th, .member-table td { padding: 13px 16px; border-bottom: 1px solid #edf1f6; text-align: left; vertical-align: middle; }
.member-table th { color: #526174; background: #fff; font-size: 13px; font-weight: 700; }
.member-table th:nth-child(1) { width: 18%; }
.member-table th:nth-child(2) { width: 17%; }
.member-table th:nth-child(3) { width: 21%; }
.member-table th:nth-child(4) { width: 19%; }
.member-table th:nth-child(5) { width: 11%; }
.member-table th:nth-child(6) { width: 14%; }
.member-table td > span, .member-table td > small { display: block; }
.member-table td > small { margin-top: 5px; color: var(--muted); font-size: 12px; }
.member-identity { display: flex; align-items: center; gap: 10px; }
.member-identity > div { min-width: 0; }
.member-identity strong, .member-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-identity strong { margin: 0 0 4px; color: var(--text); }
.member-identity small { color: var(--muted); font-size: 12px; }
.member-avatar { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 50%; color: #0c568f; background: #e5f2ff; font-size: 13px; font-weight: 800; }
.member-department { margin: 0 0 5px !important; }
.owner-label { display: inline-flex !important; width: max-content; margin: 0 !important; border-radius: 4px; padding: 2px 6px; color: #08724c !important; background: #e7f7ef; }
.member-role-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.member-role-tags span { display: inline-flex; min-height: 24px; align-items: center; border: 1px solid #d8e7f7; border-radius: 4px; padding: 2px 7px; color: #245a86; background: #f3f8fd; font-size: 12px; }
.unassigned-label { color: var(--muted); font-size: 12px; }
.member-table .table-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.member-table .table-actions button { height: 30px; border: 1px solid var(--line); border-radius: 5px; padding: 0 9px; color: #526174; background: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.member-table .table-actions button:first-child { color: var(--primary); border-color: #c9def4; background: #f3f8ff; }
.member-table .table-actions button:last-child { color: var(--danger); }

.organization-panel { min-height: 360px; padding: 0; }
.organization-column-head { display: flex; justify-content: space-between; padding: 10px 22px; color: var(--muted); background: #fbfcfe; font-size: 12px; font-weight: 700; }
.organization-tree { margin: 0; padding: 4px 18px 18px; }
.organization-tree li { min-height: 58px; border-radius: 0; }
.organization-tree .dept-main { min-width: 220px; }
.organization-tree .dept-actions { align-items: center; }
.department-member-count { min-width: 56px; color: var(--muted); font-size: 12px; text-align: right; }
.management-inline-form { margin: 16px 18px; }
.management-modal-backdrop { z-index: 55; }
.management-dialog { width: min(620px, calc(100vw - 48px)); display: block; padding: 0; overflow: hidden; }
.management-dialog-head { position: static; }
.management-dialog-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 22px; }
.management-dialog-body label { display: grid; gap: 7px; }
.management-dialog-body label > span { color: #526174; font-size: 12px; font-weight: 700; }
.management-dialog-body input, .management-dialog-body select { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 6px; padding: 0 11px; color: var(--text); background: #fff; font: inherit; outline: none; }
.management-dialog-body input:focus, .management-dialog-body select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15, 115, 216, .12); }
.department-dialog-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.department-dialog-grid label:last-child { grid-column: 1 / -1; }
.dialog-field-wide { grid-column: 1 / -1; }
.management-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: #fbfcfe; }
.team-modal-open { overflow: hidden; }
.team-delete-backdrop { z-index: 65; }
.team-delete-dialog { width: min(440px, calc(100vw - 48px)); display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 14px; padding: 24px 24px 0; overflow: hidden; }
.team-delete-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #f0c6c6; border-radius: 50%; color: var(--danger); background: #fff3f3; font-size: 22px; font-weight: 800; }
.team-delete-content { min-width: 0; }
.team-delete-content h3 { margin: 5px 0 8px; color: var(--text); font-size: 19px; }
.team-delete-content > p { margin: 0; color: #5c6878; font-size: 13px; line-height: 1.65; }
.team-delete-target { display: grid; gap: 4px; margin-top: 17px; border-left: 3px solid var(--danger); padding: 9px 12px; background: #fbfcfe; }
.team-delete-target span { color: var(--muted); font-size: 11px; }
.team-delete-target strong { min-width: 0; overflow-wrap: anywhere; color: var(--text); font-size: 14px; }
.team-delete-content .team-delete-note { margin-top: 12px; color: #8b5b16; font-size: 12px; }
.team-delete-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; margin: 8px -24px 0; border-top: 1px solid var(--line); padding: 14px 24px; background: #fbfcfe; }
.management-empty { min-height: 150px !important; display: grid !important; place-items: center; color: var(--muted) !important; text-align: center; }

.role-management-panel { min-height: 360px; }
.role-management-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 18px; }
.role-management-grid > .management-empty { grid-column: 1 / -1; }
.role-management-card { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.role-card-title { min-height: 92px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 17px; }
.role-card-title strong { display: block; font-size: 16px; }
.role-card-title p { margin: 7px 0 0; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.role-card-title > div { min-width: 0; }
.role-card-title > span { flex: 0 0 auto; border-radius: 4px; padding: 3px 7px; color: #08724c; background: #e7f7ef; font-size: 11px; }
.role-card-title > span.off { color: #8b5b16; background: #fff2dd; }
.role-management-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid #edf1f6; border-bottom: 1px solid #edf1f6; background: #fbfcfe; }
.role-management-card dl div { padding: 12px 17px; }
.role-management-card dl div + div { border-left: 1px solid #edf1f6; }
.role-management-card dt { color: var(--muted); font-size: 11px; }
.role-management-card dd { margin: 5px 0 0; color: var(--text); font-size: 15px; font-weight: 750; }
.role-card-actions { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 14px; }
.role-card-actions button { height: 30px; border: 1px solid var(--line); border-radius: 5px; padding: 0 9px; color: #526174; background: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.role-card-actions button.primary { color: var(--primary); border-color: #c9def4; background: #f3f8ff; }
.role-card-actions button:last-child { margin-left: auto; color: var(--danger); }

.member-assignment-form { width: min(920px, calc(100vw - 48px)); display: block; padding: 0; border-bottom: 0; background: #fff; }
.member-modal-head { position: sticky; top: 0; z-index: 3; padding: 19px 22px; border-bottom: 1px solid var(--line); background: #fff; }
.member-modal-head h3 { margin-top: 4px; }
.member-modal-head > .text-button { min-width: 56px; flex: 0 0 auto; }
.member-form-section-title { display: flex; align-items: baseline; gap: 10px; padding: 18px 22px 0; }
.member-form-section-title strong { font-size: 15px; }
.member-form-section-title span { color: var(--muted); font-size: 12px; }
.member-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; padding: 14px 22px 20px; }
.member-form-grid.compact { grid-template-columns: minmax(0, 1fr) minmax(150px, .45fr); }
.member-form-wide { grid-column: 1 / -1; }
.member-assignment-form .member-form-grid label { display: grid; gap: 7px; }
.member-assignment-form .member-form-grid label > span { color: #526174; font-size: 12px; font-weight: 700; }
.member-assignment-form .member-form-grid input:not([type="checkbox"]), .member-assignment-form .member-form-grid select { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; color: var(--text); background: #fff; font: inherit; outline: none; }
.member-owner-option { grid-column: 1 / -1; display: flex !important; align-items: center; gap: 10px !important; min-height: 52px; border: 1px solid #e4eaf1; border-radius: 6px; padding: 9px 12px; background: #fbfcfe; cursor: pointer; }
.member-owner-option input, .role-choice input { width: 17px !important; height: 17px !important; flex: 0 0 17px; }
.member-owner-option > span { display: block; }
.member-owner-option strong, .member-owner-option small { display: block; }
.member-owner-option small { margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 400; }
.role-section-title { border-top: 1px solid #edf1f6; padding-top: 19px; }
.role-assignment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px 22px 20px; }
.role-choice { min-width: 0; display: flex !important; align-items: center; gap: 11px !important; min-height: 62px; border: 1px solid var(--line); border-radius: 7px; padding: 10px 12px; background: #fff; cursor: pointer; }
.role-choice:hover { border-color: #b9d4ee; }
.role-choice.selected { border-color: #77abe0; background: #f2f8ff; box-shadow: inset 3px 0 0 var(--primary); }
.role-choice > span, .role-choice strong, .role-choice small { min-width: 0; display: block; }
.role-choice strong { color: var(--text); font-size: 13px; }
.role-choice small { margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 400; }
.role-choice-empty { grid-column: 1 / -1; padding: 24px; color: var(--muted); background: #fbfcfe; text-align: center; }
.member-advanced-settings { border-top: 1px solid #edf1f6; }
.member-advanced-settings summary { padding: 14px 22px; color: #526174; font-size: 13px; font-weight: 700; cursor: pointer; }
.member-advanced-settings .member-form-grid { padding-top: 2px; }
.member-form-actions { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; border-top: 1px solid var(--line); background: #fbfcfe; box-shadow: 0 -8px 20px rgba(21, 32, 51, .05); }
.member-form-actions > span { color: var(--muted); font-size: 12px; }
.member-form-actions > div { display: flex; gap: 8px; }

@media (max-width: 1100px) {
    .role-management-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .member-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .team-access-head { align-items: flex-start; flex-direction: column; }
    .team-primary-action { width: 100%; }
    .team-page-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .team-page-nav button { min-width: 0; min-height: 46px; border-top: 0; border-left: 1px solid var(--line); padding: 0 8px; }
    .team-page-nav button:first-child { border-left: 0; }
    .team-page-nav button.active::after { top: auto; right: 10px; bottom: 0; left: 10px; width: auto; height: 3px; }
    .member-filter-bar, .role-management-grid, .member-form-grid, .member-form-grid.compact, .role-assignment-grid { grid-template-columns: 1fr; }
    .member-list-head, .management-page-head, .member-form-section-title { align-items: flex-start; flex-direction: column; }
    .management-head-actions { width: 100%; justify-content: space-between; }
    .member-list-panel .table-scroll { overflow: visible; }
    .member-table { min-width: 0; display: block; }
    .member-table thead { display: none; }
    .member-table tbody { display: block; }
    .member-table tbody tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
    .member-table tbody td { min-height: 38px; display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 10px; padding: 7px 16px; border: 0; }
    .member-table tbody td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 700; }
    .member-table tbody td:first-child { display: block; padding-bottom: 10px; }
    .member-table tbody td:first-child::before { content: none; }
    .member-table .table-empty { display: grid; place-items: center; min-height: 120px; padding: 20px; }
    .member-table .table-empty::before { content: none; }
    .member-table .table-actions { justify-content: flex-start; }
    .organization-column-head { display: none; }
    .organization-tree { padding: 5px 12px 15px; }
    .organization-tree li { align-items: flex-start; flex-direction: column; padding-top: 12px; padding-bottom: 12px; }
    .organization-tree .dept-actions { width: 100%; flex-wrap: wrap; padding-left: 32px; }
    .department-member-count { text-align: left; }
    .role-management-grid { padding: 12px; }
    .member-assignment-form { width: calc(100vw - 24px); max-height: calc(100vh - 24px); }
    .management-dialog { width: calc(100vw - 24px); }
    .management-dialog-body, .department-dialog-grid { grid-template-columns: 1fr; padding: 18px; }
    .dialog-field-wide, .department-dialog-grid label:last-child { grid-column: auto; }
    .management-dialog-actions { padding: 13px 18px; }
    .team-delete-dialog { width: calc(100vw - 24px); grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 20px 18px 0; }
    .team-delete-mark { width: 36px; height: 36px; font-size: 19px; }
    .team-delete-actions { margin-right: -18px; margin-left: -18px; padding: 13px 18px; }
    .member-form-wide, .member-owner-option { grid-column: auto; }
    .member-form-actions { align-items: flex-start; flex-direction: column; }
    .member-form-actions > div, .member-form-actions button { width: 100%; }
}
