* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    color: #333;
    background: #f5f6fa;
    line-height: 1.6;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #f0f2f5;
}

.login-box {
    width: 400px;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #1a1a2e;
    font-size: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #1890ff;
    color: #fff;
}

.btn-primary:hover {
    background: #40a9ff;
}

.btn-block {
    display: block;
    width: 100%;
}

.alert {
    padding: 10px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.alert-error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #ff4d4f;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 220px;
    background: #001529;
    color: #fff;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 18px;
    color: #fff;
}

/* 标题即控制台入口（控制台已从菜单里去掉） */
.sidebar-brand {
    color: #fff;
    text-decoration: none;
    display: inline-block;
}

.sidebar-brand:hover {
    opacity: 0.85;
}

.sidebar-nav {
    flex: 1;
    padding: 10px 0;
    overflow-y: auto;
}

/* 菜单分组：details 默认 open，可点标题栏收起 */
.nav-group {
    margin-bottom: 4px;
}

.nav-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 1px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.nav-group-title::-webkit-details-marker {
    display: none;
}

.nav-group-title:hover {
    color: rgba(255, 255, 255, 0.75);
}

/* 纯 CSS 箭头：展开时朝上、收起时朝下 */
.nav-group-title::after {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(-135deg);
    transition: transform 0.2s;
}

.nav-group:not([open]) .nav-group-title::after {
    transform: rotate(45deg);
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: all 0.3s;
}

.nav-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    box-sizing: border-box;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 0;
}

.admin-main {
    flex: 1;
    padding: 24px;
    overflow-x: hidden;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.topbar-left {
    display: flex;
    align-items: center;
}

.topbar-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
}

.topbar-right {
    display: flex;
    align-items: center;
}

.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 6px 12px 6px 6px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    transition: all 0.2s;
}

.user-menu-btn:hover {
    border-color: #d0d0d0;
    background: #fafafa;
}

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #4f46e5;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.user-arrow {
    font-size: 10px;
    color: #aaa;
    transition: transform 0.2s;
}

.user-menu.open .user-arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    min-width: 160px;
    z-index: 100;
    overflow: hidden;
}

.user-menu.open .user-dropdown {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: background 0.15s;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.dropdown-item.logout {
    color: #e74c3c;
}

.dropdown-item.logout:hover {
    background: #fff5f5;
}

.dropdown-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 4px 0;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #aaa;
    margin-top: 4px;
}

.form-actions {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.alert-success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
}

.profile-form {
    max-width: 420px;
}

.page-content {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.card {
    border: 1px solid #f0f0f0;
    border-radius: 8px;
}

.card-body {
    padding: 20px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.stats-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s;
}

.stats-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
}

.stats-card--user::before { background: linear-gradient(90deg, #6366f1, #818cf8); }
.stats-card--memo::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stats-card--feedback::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stats-card--online::before { background: linear-gradient(90deg, #14b8a6, #2dd4bf); }

.stats-card-header {
    font-size: 13px;
    font-weight: 500;
    color: #666;
    margin-bottom: 16px;
}

.stats-items {
    display: flex;
    gap: 28px;
}

.stats-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stats-label {
    font-size: 11px;
    color: #aaa;
    order: 1;
}

.stats-value {
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    order: 0;
}

.stats-card--user .stats-value { color: #6366f1; }
.stats-card--memo .stats-value { color: #10b981; }
.stats-card--feedback .stats-value { color: #f59e0b; }
.stats-card--online .stats-value { color: #14b8a6; }

/* 活跃统计：4 张卡片一行 + 各卡片配色 */
.stats-row--4 {
    grid-template-columns: repeat(4, 1fr);
}

/* 活跃统计加了「小程序」后是 5 张（dashboard 仍用 --4） */
.stats-row--5 {
    grid-template-columns: repeat(5, 1fr);
}

.stats-card--total::before { background: linear-gradient(90deg, #6366f1, #818cf8); }
.stats-card--android::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stats-card--ios::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stats-card--web::before { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.stats-card--mp::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }

.stats-card--total .stats-value { color: #6366f1; }
.stats-card--android .stats-value { color: #10b981; }
.stats-card--ios .stats-value { color: #f59e0b; }
.stats-card--web .stats-value { color: #06b6d4; }
.stats-card--mp .stats-value { color: #8b5cf6; }

.stats-card-sub {
    margin-left: 6px;
    font-size: 11px;
    color: #aaa;
}

.active-table {
    margin-top: 16px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.active-table .cell-strong {
    font-weight: 600;
    color: #333;
}

.stats-note {
    margin-top: 12px;
    margin-bottom: 16px;
    font-size: 12px;
    line-height: 1.9;
    color: #999;
}

.stats-note b {
    color: #666;
}

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

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.table th {
    background: #fafafa;
    font-weight: 600;
    color: #555;
}

.table tr:hover td {
    background: #fafafa;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.pagination-info {
    color: #999;
    font-size: 13px;
}

.pagination-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    color: #333;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
    background: #fff;
}

.pagination-item:hover {
    color: #1890ff;
    border-color: #1890ff;
}

.pagination-item.active {
    background: #1890ff;
    border-color: #1890ff;
    color: #fff;
    cursor: default;
}

.pagination-item.disabled {
    color: #d9d9d9;
    border-color: #d9d9d9;
    cursor: not-allowed;
    background: #fafafa;
}

.filter-bar {
    margin-bottom: 20px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.filter-bar form {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 5px !important;
}

.filter-bar input.filter-input {
    height: 36px !important;
    padding: 0 14px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    width: 210px !important;
    outline: none !important;
    background: #fff !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.filter-bar input.filter-input::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.filter-bar input.filter-input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12) !important;
}

.filter-bar input[type="date"].filter-input {
    color-scheme: light;
}

.filter-bar select.filter-input {
    height: 36px !important;
    width: 130px !important;
    padding: 0 34px 0 14px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    color: #334155 !important;
    outline: none !important;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 16px 16px !important;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.filter-bar select.filter-input::-ms-expand {
    display: none;
}

.filter-bar select.filter-input:hover {
    border-color: #cbd5e1 !important;
}

.filter-bar select.filter-input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12) !important;
}

.filter-bar .filter-sep {
    color: #cbd5e1;
    font-size: 14px;
    flex-shrink: 0;
    font-weight: 300;
}

.filter-bar .btn-primary {
    height: 36px !important;
    padding: 0 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    border: none !important;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #fff !important;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
    transition: all 0.2s;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px;
}

.filter-bar .btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.filter-bar .btn-outline {
    height: 36px !important;
    padding: 0 18px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    cursor: pointer;
    background: #fff !important;
    color: #64748b !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px;
    transition: all 0.2s;
    font-weight: 500;
    box-sizing: border-box !important;
    line-height: normal !important;
}

.filter-bar .btn-outline:hover {
    color: #3b82f6 !important;
    border-color: #3b82f6 !important;
    background: #f0f7ff !important;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 13px;
    border-radius: 3px;
}

.btn-warning {
    background: #fa8c16;
    color: #fff;
}

.btn-warning:hover {
    background: #ffa940;
}

.btn-success {
    background: #52c41a;
    color: #fff;
}

.btn-success:hover {
    background: #73d13d;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.badge-danger {
    background: #fff1f0;
    color: #ff4d4f;
    border: 1px solid #ffa39e;
}

.table-empty {
    text-align: center;
    color: #999;
    padding: 40px 16px !important;
}

.inline-form {
    display: inline;
}

/* VIP badge styles */
.badge-vip {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fbbf24;
    font-weight: 600;
}

.badge-vip-expired {
    background: #f5f5f5;
    color: #999;
    border: 1px solid #e0e0e0;
}

.badge-default {
    background: #fafafa;
    color: #ccc;
    border: 1px solid #f0f0f0;
}

.vip-expire-text {
    font-size: 12px;
    color: #92400e;
    margin-left: 6px;
}

.vip-expire-text.expired {
    color: #999;
}

/* VIP button */
.btn-vip {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    border: none;
    font-weight: 500;
}

.btn-vip:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.btn-danger-outline {
    background: #fff;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
    padding: 4px 12px;
    font-size: 13px;
    border-radius: 3px;
    cursor: pointer;
}

.btn-outline {
    background: #fff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    padding: 4px 12px;
    font-size: 13px;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-outline:hover {
    color: #fff;
    background: #2563eb;
    border-color: #2563eb;
}

.btn-danger-outline:hover {
    color: #fff;
    background: #ff4d4f;
    border-color: #ff4d4f;
}

/* Modal styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-box {
    background: #fff;
    border-radius: 10px;
    width: 480px;
    max-width: 90vw;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.2s ease;
}

@keyframes modalSlideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    margin: 0;
    font-size: 17px;
    color: #1a1a2e;
}

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 24px;
}

.modal-user-info {
    margin-bottom: 20px;
    font-size: 14px;
    color: #555;
}

/* VIP duration options */
.vip-duration-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vip-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    transition: all 0.2s;
}

.vip-option:hover {
    border-color: #fbbf24;
    background: #fffbeb;
}

.vip-option input[type="radio"] {
    accent-color: #f59e0b;
    width: 16px;
    height: 16px;
}

.vip-num-input {
    width: 70px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
}

.vip-num-input:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15);
}

.vip-date-input {
    height: 30px;
    padding: 0 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
}

.vip-date-input:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15);
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.modal-footer-right {
    display: flex;
    gap: 10px;
}

.modal-footer .btn {
    padding: 8px 18px;
}

.modal-footer .btn-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
}

.modal-footer .btn-primary:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.modal-footer .btn-outline {
    background: #fff;
    border: 1px solid #d9d9d9;
    color: #666;
}

.modal-footer .btn-outline:hover {
    border-color: #f59e0b;
    color: #f59e0b;
}

/* Markdown 编辑器工具栏 */
.md-editor { width: 100%; }
.md-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    padding: 5px 6px;
    background: #fafafa;
    border: 1px solid #d9d9d9;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}
.md-toolbar textarea { margin-top: 0; }
.mdt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 30px;
    padding: 0 7px;
    background: none;
    border: none;
    border-radius: 4px;
    color: #555;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
}
.mdt-btn:hover { background: #eef0f2; color: #222; }
.mdt-btn:active { background: #e2e6ea; }
.mdt-btn svg { width: 15px; height: 15px; display: block; }
.mdt-caret { font-size: 9px; margin-left: 4px; }
.mdt-sep { width: 1px; height: 18px; background: #e0e0e0; margin: 0 4px; }
.mdt-dropdown { position: relative; display: inline-block; }
.mdt-menu {
    display: none;
    position: absolute;
    top: 32px;
    left: 0;
    min-width: 116px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
    padding: 4px;
    z-index: 100;
}
.mdt-menu.open { display: block; }
.mdt-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 6px 10px;
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #444;
    text-align: left;
}
.mdt-menu-item:hover { background: #f3f4f6; }
.mdt-menu-item .mdt-h { width: 26px; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.mdt-menu-item .mdt-d { font-size: 12px; color: #999; }
.md-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 0 0 4px 4px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}
/* ===== TSLPay 点卡系统补充样式 ===== */
.sidebar-subtitle {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
}

.sidebar-nav .nav-item.active {
    background: rgba(24, 144, 255, 0.18);
    color: #fff;
    box-shadow: inset 3px 0 0 #1890ff;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.page-header__title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
}

.page-header__actions {
    display: flex;
    gap: 8px;
}

.card-header {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
    color: #1a1a2e;
}

.card-body {
    overflow-x: auto;
}

.stats-row--grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stats-card--card::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.stats-card--card .stats-value { color: #8b5cf6; }

.stats-card-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    color: #1890ff;
    text-decoration: none;
}

.stats-card-link:hover { text-decoration: underline; }

.badge-warning {
    background: #fffbe6;
    color: #d48806;
    border: 1px solid #ffe58f;
}

.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.3s;
}

.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.form-group textarea { resize: vertical; }

.form-group select:disabled,
.form-group input:disabled {
    background: #f5f5f5;
    color: #888;
    cursor: not-allowed;
}

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

.form-grid .form-group--wide,
.form-grid .form-actions.form-group--wide {
    grid-column: 1 / -1;
}

.checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
}

.checkbox-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    color: #333;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.cell-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    word-break: break-all;
}

.cell-mono .js-copy { margin-left: 6px; }

.text-muted { color: #999; font-size: 12px; }
.text-success { color: #52c41a; font-weight: 600; }
.text-danger { color: #ff4d4f; font-weight: 600; }

.input-inline {
    width: 150px;
    padding: 6px 8px;
}

.kv-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed #f0f0f0;
}

.kv-row:last-child { border-bottom: none; }

.kv-label {
    width: 110px;
    color: #888;
    flex-shrink: 0;
}

.login-links {
    margin-top: 18px;
    text-align: center;
    font-size: 13px;
    color: #888;
}

.login-links a { color: #1890ff; text-decoration: none; }
.login-links a:hover { text-decoration: underline; }

.profile-form .form-group--wide { max-width: 100%; }

@media (max-width: 768px) {
    .page-header { flex-direction: column; align-items: flex-start; }
    .filter-bar form { flex-wrap: wrap; }
}
