:root {
    color-scheme: light;
    --auth-bg-primary: #ffffff;
    --auth-bg-secondary: #f5f5f5;
    --auth-bg-tertiary: #ebebeb;
    --auth-bg-page: #f0f0f0;
    --auth-bg-hover: #ebe7e1;
    --auth-bg-input: rgba(255, 255, 255, 0.98);
    --auth-text-primary: #161514;
    --auth-text-secondary: #4e4a45;
    --auth-text-tertiary: #7f7a73;
    --auth-text-inverse: #ffffff;
    --auth-border: rgba(28, 24, 20, 0.08);
    --auth-border-strong: rgba(28, 24, 20, 0.14);
    --auth-shadow-sm: 0 8px 18px rgba(47, 36, 23, 0.05);
    --auth-shadow-md: 0 16px 36px rgba(47, 36, 23, 0.07);
    --auth-shadow-lg: 0 24px 54px rgba(47, 36, 23, 0.1);
    --auth-accent: #161514;
    --auth-accent-hover: #2a2623;
    --auth-accent-text: #ffffff;
    --auth-success: #22c55e;
    --auth-success-bg: #f0fdf4;
    --auth-danger: #ef4444;
    --auth-danger-bg: #fef2f2;
    --auth-warning: #f59e0b;
    --auth-warning-bg: #fffbeb;
    --auth-info: #0ea5e9;
    --auth-info-bg: #eef8ff;
    --auth-link: #8b633c;
    --auth-card-bg: rgba(255, 255, 255, 0.94);
    --auth-card-border: rgba(255, 255, 255, 0.82);
    --auth-nav-bg: rgba(255, 255, 255, 0.78);
    --auth-dot-color: rgba(0, 0, 0, 0.07);
    --auth-dot-size: 1px;
    --auth-grid-color: rgba(0, 0, 0, 0.03);
    --auth-grid-gap: 32px;
    --auth-content-width: 1240px;
    --auth-radius-sm: 8px;
    --auth-radius-md: 14px;
    --auth-radius-lg: 20px;
    --auth-radius-pill: 9999px;
    --auth-nav-height: 56px;
    --auth-transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--auth-text-primary);
    background-color: var(--auth-bg-page);
    background-image:
        radial-gradient(circle, var(--auth-dot-color) var(--auth-dot-size), transparent var(--auth-dot-size)),
        linear-gradient(var(--auth-grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--auth-grid-color) 1px, transparent 1px);
    background-size:
        var(--auth-grid-gap) var(--auth-grid-gap),
        var(--auth-grid-gap) var(--auth-grid-gap),
        var(--auth-grid-gap) var(--auth-grid-gap);
    background-position:
        calc(var(--auth-grid-gap) / 2) calc(var(--auth-grid-gap) / 2),
        0 0,
        0 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

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

a:hover {
    color: var(--auth-text-secondary);
}

input,
button,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.top-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--auth-nav-height);
    padding: 0 clamp(20px, 2.4vw, 32px);
    background: var(--auth-nav-bg);
    border-bottom: 1px solid var(--auth-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.top-nav-leading {
    display: flex;
    align-items: center;
    gap: 14px;
}

.top-nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--auth-text-primary);
}

.top-nav-brand:hover {
    color: var(--auth-text-primary);
}

.top-nav-brand,
.auth-standalone-brand {
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.top-nav-brand-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.top-nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--auth-text-secondary);
    font-size: 13px;
}

.top-nav-avatar,
.top-nav-avatar-default {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    flex-shrink: 0;
}

.top-nav-avatar {
    object-fit: cover;
    border: 1px solid var(--auth-border);
    background: var(--auth-bg-primary);
}

.top-nav-avatar-default {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #25211d, #61584f 60%, #d0a056);
    color: var(--auth-text-inverse);
    font-size: 13px;
    font-weight: 700;
}

.top-nav-logout {
    padding: 8px 14px !important;
    font-size: 12px !important;
}

.mobile-menu-toggle {
    display: none;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--auth-border);
    border-radius: 999px;
    background: var(--auth-bg-primary);
    color: var(--auth-text-secondary);
    font-size: 18px;
    line-height: 1;
}

.main-layout {
    display: flex;
    min-height: calc(100vh - var(--auth-nav-height));
}

.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.76);
    border-right: 1px solid var(--auth-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.sidebar-nav {
    padding: 18px 0;
}

.nav-section {
    padding: 10px 24px;
    font-size: 11px;
    color: var(--auth-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nav-item {
    display: block;
    margin: 4px 14px;
    padding: 11px 14px;
    border-radius: var(--auth-radius-pill);
    color: var(--auth-text-secondary);
    font-size: 14px;
    transition: var(--auth-transition);
}

.nav-item:hover {
    background: var(--auth-bg-hover);
    color: var(--auth-text-primary);
}

.nav-item.active {
    background: var(--auth-accent);
    color: var(--auth-accent-text);
    font-weight: 600;
}

.sidebar-overlay {
    display: none;
}

.content-area {
    flex: 1;
    min-width: 0;
    padding: 24px;
    overflow-y: auto;
}

.content-container {
    max-width: var(--auth-content-width);
    margin: 0 auto;
}

.page-header,
.card {
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-card-border);
    border-radius: var(--auth-radius-lg);
    box-shadow: var(--auth-shadow-md);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.page-header {
    padding: 20px 24px;
    margin-bottom: 18px;
}

.page-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-subtitle {
    margin: 8px 0 0;
    color: var(--auth-text-tertiary);
    font-size: 13px;
    line-height: 1.65;
}

.card {
    padding: 24px;
    margin-bottom: 18px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--auth-text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--auth-border);
}

.card-title-plain {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.mt-18 {
    margin-top: 18px;
}

.mt-20 {
    margin-top: 20px;
}

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

.form-container {
    max-width: 900px;
    margin: 0 auto;
}

.form-container-narrow {
    max-width: 560px;
}

.form-section {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--auth-border);
}

.form-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.form-section-title {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 700;
    color: var(--auth-text-primary);
}

.required::after {
    content: " *";
    color: var(--auth-danger);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: var(--auth-radius-pill);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    transition: var(--auth-transition);
    text-decoration: none;
}

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

.btn-primary {
    background: var(--auth-accent);
    color: var(--auth-accent-text);
    border-color: var(--auth-accent);
}

.btn-primary:hover {
    background: var(--auth-accent-hover);
    border-color: var(--auth-accent-hover);
    color: var(--auth-accent-text);
    box-shadow: var(--auth-shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--auth-text-primary);
    border-color: var(--auth-border-strong);
}

.btn-secondary:hover {
    background: var(--auth-bg-hover);
    border-color: var(--auth-text-primary);
    color: var(--auth-text-primary);
}

.btn-link {
    padding: 0;
    border: none;
    background: transparent;
    color: var(--auth-link);
}

.btn-link:hover {
    transform: none;
    color: var(--auth-accent);
}

.btn-danger {
    background: var(--auth-danger);
    color: #ffffff;
    border-color: var(--auth-danger);
}

.btn-danger:hover {
    color: #ffffff;
    box-shadow: var(--auth-shadow-md);
}

.btn-sm {
    padding: 7px 12px;
    font-size: 12px;
    border-radius: 12px;
}

.btn-block {
    width: 100%;
}

.form-group,
.password-container .form-group,
.form-section .form-group {
    margin-bottom: 20px;
}

.form-label,
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--auth-text-secondary);
}

.form-input,
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group select,
.form-group textarea,
.search-form input,
.search-form select {
    width: 100%;
    min-width: 0;
    padding: 11px 13px;
    border: 1px solid var(--auth-border-strong);
    border-radius: var(--auth-radius-md);
    background: var(--auth-bg-input);
    color: var(--auth-text-primary);
    transition: var(--auth-transition);
}

.form-input::placeholder,
.form-group input::placeholder,
.form-group textarea::placeholder,
.search-form input::placeholder {
    color: var(--auth-text-tertiary);
}

.form-input:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.search-form input:focus,
.search-form select:focus {
    outline: none;
    border-color: var(--auth-text-primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.form-group input:disabled,
.form-group textarea:disabled,
.form-group select:disabled {
    cursor: not-allowed;
    background: rgba(242, 236, 230, 0.92);
    color: var(--auth-text-tertiary);
}

.form-help,
.password-requirements {
    margin-top: 6px;
    font-size: 12px;
    color: var(--auth-text-tertiary);
    line-height: 1.5;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--auth-border);
}

.form-actions .btn {
    flex: 1;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

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

.info-label,
.auth-detail-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--auth-text-tertiary);
    letter-spacing: 0.02em;
}

.info-value {
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-md);
    background: rgba(255, 255, 255, 0.64);
    color: var(--auth-text-primary);
    line-height: 1.6;
}

.badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-md);
    background: rgba(255, 255, 255, 0.56);
}

.table-wrap table th:first-child,
.table-wrap table td:first-child {
    padding-left: 16px;
}

.table-wrap table th:last-child,
.table-wrap table td:last-child {
    padding-right: 16px;
}

.mono-pill,
code {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--auth-radius-pill);
    background: rgba(208, 160, 86, 0.14);
    color: #7b5a33;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.4;
}

.auth-link {
    color: var(--auth-link);
    word-break: break-all;
}

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

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.checkbox-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.uri-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.uri-item {
    display: flex;
    gap: 10px;
}

.uri-item input {
    flex: 1;
}

.btn-add,
.btn-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--auth-radius-pill);
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    transition: var(--auth-transition);
}

.btn-add {
    padding: 10px 16px;
    background: #f4ede2;
    color: #7b5a33;
    border-color: rgba(123, 90, 51, 0.12);
}

.btn-add:hover {
    background: #eadfcd;
}

.btn-remove {
    padding: 0 16px;
    background: rgba(239, 68, 68, 0.08);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.12);
}

.btn-remove:hover {
    background: rgba(239, 68, 68, 0.14);
}

.error-message,
.success-message,
.info-message,
.info-box,
.info-tip,
.alert {
    border-radius: var(--auth-radius-md);
    padding: 14px 16px;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 18px;
}

.error-message,
.alert-danger {
    background: var(--auth-danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.18);
    color: #b91c1c;
}

.success-message,
.alert-success {
    background: var(--auth-success-bg);
    border: 1px solid rgba(34, 197, 94, 0.18);
    color: #15803d;
}

.info-message,
.info-box,
.info-tip {
    background: #f7f0e6;
    border: 1px solid rgba(123, 90, 51, 0.12);
    color: #6f5535;
}

.empty-state {
    text-align: center;
    padding: 52px 20px;
    color: var(--auth-text-tertiary);
}

.empty-state svg {
    width: 72px;
    height: 72px;
    margin-bottom: 18px;
    opacity: 0.75;
}

.empty-state h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: var(--auth-text-primary);
}

.empty-state p {
    margin: 0;
}

.badge,
.scope-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: var(--auth-radius-pill);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.badge-success {
    background: var(--auth-success-bg);
    color: #15803d;
}

.badge-danger {
    background: var(--auth-danger-bg);
    color: #b91c1c;
}

.badge-warning {
    background: var(--auth-warning-bg);
    color: #b45309;
}

.badge-info {
    background: #f7f0e6;
    color: #6f5535;
}

.badge-primary,
.badge-web,
.scope-badge {
    background: #f4ede2;
    color: #7b5a33;
}

.badge-native {
    background: #fffbeb;
    color: #b45309;
}

.badge-public {
    background: #f7f0e6;
    color: #6f5535;
}

.badge-confidential {
    background: #fef2f2;
    color: #b91c1c;
}

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

.toolbar,
.action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-md);
    background: rgba(255, 255, 255, 0.72);
}

.admin-toolbar {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid var(--auth-border);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.66));
    box-shadow: var(--auth-shadow-sm);
}

.admin-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-search-form input[type="text"],
.admin-search-form select {
    height: 40px;
    margin: 0;
    border: 1px solid rgba(28, 24, 20, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.admin-search-form input[type="text"] {
    flex: 1 1 320px;
    min-width: min(100%, 260px);
    padding: 0 14px;
}

.admin-search-form select {
    flex: 0 0 132px;
    min-width: 132px;
    padding: 0 36px 0 12px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237f7a73' d='M6 8.825 1.175 4l1.063-1.062L6 6.7l3.763-3.763L10.825 4 6 8.825Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.admin-search-form input[type="text"]:focus,
.admin-search-form select:focus {
    outline: none;
    border-color: rgba(22, 21, 20, 0.26);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 0 0 4px rgba(22, 21, 20, 0.05);
}

.admin-search-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.toolbar-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.toolbar-inline-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--auth-text-tertiary);
    font-size: 12px;
    white-space: nowrap;
}

.toolbar-inline-form select {
    height: 34px;
    min-width: 104px;
    padding: 0 32px 0 10px;
    border: 1px solid rgba(28, 24, 20, 0.12);
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.94);
    color: var(--auth-text-primary);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237f7a73' d='M6 8.825 1.175 4l1.063-1.062L6 6.7l3.763-3.763L10.825 4 6 8.825Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.search-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
    align-items: center;
}

.list-summary {
    color: var(--auth-text-tertiary);
    font-size: 12px;
    line-height: 1.5;
}

.app-table,
.data-table,
table {
    width: 100%;
    border-collapse: collapse;
}

.app-table th,
.app-table td,
table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--auth-border);
}

.app-table th,
table th {
    color: var(--auth-text-tertiary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: transparent;
}

.app-table td,
table td {
    color: var(--auth-text-secondary);
    font-size: 14px;
}

.app-table tbody tr:hover,
table tbody tr:hover {
    background: rgba(255, 255, 255, 0.56);
}

.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid var(--auth-border);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.66));
    box-shadow: var(--auth-shadow-sm);
}

.pagination-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pagination-link,
.pagination-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 12px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: var(--auth-transition);
}

.pagination-link {
    border: 1px solid rgba(28, 24, 20, 0.1);
    color: var(--auth-text-secondary);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.pagination-link:hover {
    border-color: rgba(22, 21, 20, 0.18);
    background: rgba(250, 247, 241, 0.96);
    color: var(--auth-text-primary);
}

.pagination-current {
    border: 1px solid var(--auth-accent);
    background: var(--auth-accent);
    color: var(--auth-accent-text);
    box-shadow: 0 10px 18px rgba(22, 21, 20, 0.14);
}

.pagination-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.auth-list {
    display: grid;
    gap: 14px;
}

.auth-item,
.app-card,
.scope-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-md);
    box-shadow: var(--auth-shadow-sm);
}

.auth-item {
    padding: 18px;
}

.auth-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--auth-shadow-md);
}

.scope-badge {
    background: #f4ede2;
    color: #7b5a33;
}

.btn-group form {
    display: flex;
}

.btn-group form .btn {
    width: 100%;
}

.profile-overview {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--auth-border);
}

.profile-avatar,
.profile-avatar-default {
    width: 92px;
    height: 92px;
    border-radius: 999px;
    flex-shrink: 0;
}

.profile-avatar {
    object-fit: cover;
    background: var(--auth-bg-primary);
    border: 1px solid var(--auth-border);
    box-shadow: var(--auth-shadow-md);
}

.profile-avatar-default {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #25211d, #61584f 60%, #d0a056);
    color: #ffffff;
    font-size: 34px;
    font-weight: 700;
    box-shadow: var(--auth-shadow-md);
}

.profile-overview-copy {
    min-width: 0;
}

.profile-overview-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.profile-overview-subtitle {
    margin-top: 6px;
    color: var(--auth-text-tertiary);
    font-size: 13px;
}

.wechat-binding-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-md);
    background: rgba(255, 255, 255, 0.62);
}

.wechat-status {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.wechat-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wechat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.wechat-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--auth-text-primary);
}

.wechat-desc {
    font-size: 13px;
    color: var(--auth-text-secondary);
}

.wechat-actions {
    display: flex;
    gap: 10px;
}

.btn-wechat {
    padding: 10px 18px;
    border-radius: var(--auth-radius-pill);
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    transition: var(--auth-transition);
}

.btn-wechat-bind {
    background: #07c160;
    color: #ffffff;
}

.btn-wechat-bind:hover {
    background: #06ad56;
    color: #ffffff;
    box-shadow: var(--auth-shadow-md);
}

.btn-wechat-unbind {
    background: rgba(255, 255, 255, 0.92);
    color: var(--auth-text-secondary);
    border-color: var(--auth-border-strong);
}

.btn-wechat-unbind:hover {
    background: var(--auth-bg-hover);
    color: var(--auth-text-primary);
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(31, 91, 82, 0.14);
    border-top-color: var(--auth-accent);
    border-radius: 50%;
    animation: auth-spin 0.9s linear infinite;
}

@keyframes auth-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.message-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 420px;
    padding: 14px 16px;
    border-radius: var(--auth-radius-md);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--auth-shadow-lg);
    z-index: 9999;
}

.message-toast.error {
    background: rgba(254, 242, 242, 0.94);
    border: 1px solid rgba(239, 68, 68, 0.18);
    color: #b91c1c;
}

.message-toast.success {
    background: rgba(240, 253, 244, 0.94);
    border: 1px solid rgba(34, 197, 94, 0.18);
    color: #15803d;
}

.message-toast .icon {
    font-size: 18px;
    flex-shrink: 0;
}

.message-toast .close-btn {
    margin-left: auto;
    font-size: 18px;
    opacity: 0.65;
    cursor: pointer;
}

.message-toast .close-btn:hover {
    opacity: 1;
}

.message-toast.hiding {
    opacity: 0;
    transform: translateX(24px);
}

body.auth-standalone {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 0 !important;
}

.auth-standalone-bar {
    height: var(--auth-nav-height);
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: var(--auth-nav-bg);
    border-bottom: 1px solid var(--auth-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.auth-standalone-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: var(--auth-text-primary);
}

.auth-standalone-brand img {
    width: 22px;
    height: 22px;
    border-radius: 6px;
}

.auth-standalone-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

body.auth-standalone .login-container,
body.auth-standalone .binding-container,
body.auth-standalone .wechat-login-container,
body.auth-standalone .container {
    width: 100%;
    max-width: 540px;
    padding: 24px;
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-card-border);
    border-radius: var(--auth-radius-lg);
    box-shadow: var(--auth-shadow-lg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--auth-text-primary);
}

body.auth-standalone .container {
    max-width: 1000px;
}

body.auth-standalone .login-header,
body.auth-standalone .binding-header,
body.auth-standalone .wechat-header {
    text-align: center;
    margin-bottom: 24px;
}

body.auth-standalone .login-header h1,
body.auth-standalone .binding-header h1,
body.auth-standalone .wechat-header h1,
body.auth-standalone .container h1 {
    margin: 0 0 8px;
    color: var(--auth-text-primary);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: none;
}

body.auth-standalone .binding-header p,
body.auth-standalone .wechat-header p,
body.auth-standalone .login-header p {
    color: var(--auth-text-tertiary);
    font-size: 13px;
}

body.auth-standalone .login-container,
body.auth-standalone .binding-container {
    max-width: 520px;
}

body.auth-standalone .wechat-info,
body.auth-standalone .qrcode-container,
body.auth-standalone .info-box {
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-md);
    color: var(--auth-text-secondary);
}

body.auth-standalone .wechat-info .text,
body.auth-standalone .tips,
body.auth-standalone .loading,
body.auth-standalone .status-text,
body.auth-standalone .qr-tips,
body.auth-standalone .back-link,
body.auth-standalone .login-footer {
    color: var(--auth-text-tertiary);
}

body.auth-standalone .btn-login,
body.auth-standalone .submit-btn {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border: 1px solid var(--auth-accent);
    border-radius: var(--auth-radius-pill);
    background: var(--auth-accent);
    color: var(--auth-accent-text);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: none;
}

body.auth-standalone .btn-login:hover,
body.auth-standalone .submit-btn:hover {
    background: var(--auth-accent-hover);
    border-color: var(--auth-accent-hover);
    box-shadow: var(--auth-shadow-md);
}

body.auth-standalone .wechat-login-btn,
body.auth-standalone .back-link {
    border-radius: var(--auth-radius-pill);
}

body.auth-standalone .wechat-login-btn {
    padding: 12px 16px;
    background: rgba(7, 193, 96, 0.08);
    border: 1px solid rgba(7, 193, 96, 0.18);
    color: #059669;
}

body.auth-standalone .wechat-login-btn:hover {
    background: rgba(7, 193, 96, 0.12);
    border-color: rgba(7, 193, 96, 0.28);
    color: #047857;
}

body.auth-standalone .divider {
    color: var(--auth-text-tertiary);
}

body.auth-standalone .divider::before,
body.auth-standalone .divider::after {
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.12), transparent);
}

body.auth-standalone pre {
    background: #111827;
    color: #dbe4f3;
    padding: 16px;
    border-radius: var(--auth-radius-md);
    overflow: auto;
}

@media (max-width: 960px) {
    .mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar {
        position: fixed;
        top: var(--auth-nav-height);
        left: 0;
        height: calc(100vh - var(--auth-nav-height));
        z-index: 120;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-overlay {
        position: fixed;
        inset: var(--auth-nav-height) 0 0;
        display: none;
        background: rgba(0, 0, 0, 0.36);
        z-index: 110;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .content-area {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .top-nav {
        padding: 0 16px;
    }

    .top-nav-brand,
    .auth-standalone-brand {
        font-size: 15px;
    }

    .top-nav-user span {
        display: none;
    }

    .top-nav-logout {
        padding: 7px 12px !important;
    }

    .card,
    .page-header {
        padding: 18px;
    }

    .page-title {
        font-size: 20px;
    }

    .toolbar,
    .action-bar,
    .pagination-bar,
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-search-form,
    .admin-search-actions,
    .toolbar-meta,
    .toolbar-inline-form {
        width: 100%;
    }

    .admin-search-actions {
        margin-left: 0;
        flex-direction: column;
    }

    .admin-search-form input[type="text"],
    .admin-search-form select,
    .admin-search-actions .btn,
    .toolbar-inline-form select {
        width: 100%;
        min-width: 0;
        flex: 1 1 auto;
    }

    .toolbar-inline-form {
        white-space: normal;
        justify-content: space-between;
    }

    .pagination-links {
        width: 100%;
    }

    .profile-overview,
    .wechat-binding-card,
    .auth-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .wechat-actions,
    .auth-actions {
        width: 100%;
    }

    .search-form input,
    .search-form select,
    .search-form .btn,
    .form-actions .btn,
    .btn-group .btn,
    .wechat-actions .btn-wechat,
    .auth-actions .btn,
    .uri-item .btn-remove,
    .btn-add {
        width: 100%;
    }

    .uri-item {
        flex-direction: column;
    }

    .content-area {
        padding: 12px;
    }

    body.auth-standalone .auth-standalone-main {
        align-items: flex-start;
        padding: 16px 12px 24px;
    }

    body.auth-standalone .login-container,
    body.auth-standalone .binding-container,
    body.auth-standalone .wechat-login-container,
    body.auth-standalone .container {
        padding: 18px;
    }
}
