/* Roboto 字体 */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 300;
    src: url('../fonts/roboto-300.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/roboto-400.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 500;
    src: url('../fonts/roboto-500.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 700;
    src: url('../fonts/roboto-700.woff2') format('woff2');
    font-display: swap;
}

/* Material Icons 字体 */
@font-face {
    font-family: 'Material Icons';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/material-icons.woff2') format('woff2');
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    /* Material Design 颜色系统 */
    --md-primary: #1976d2;
    --md-primary-dark: #1565c0;
    --md-primary-light: #42a5f5;
    --md-accent: #ff4081;
    --md-success: #4caf50;
    --md-warning: #ff9800;
    --md-error: #f44336;
    --md-background: #f5f5f5;
    --md-surface: #ffffff;
    --md-on-primary: #ffffff;
    --md-on-surface: #212121;
    --md-on-surface-secondary: #757575;
    --md-divider: #e0e0e0;
    /* 侧栏：整体底与分组块 */
    --sidebar-bg: #e4e9ef;
    --sidebar-group-surface: #ffffff;
    --sidebar-group-header-bg: rgba(25, 118, 210, 0.12);
    --sidebar-group-header-hover: rgba(25, 118, 210, 0.2);
    --sidebar-group-body-bg: #f7f9fb;
    
    /* Elevation (阴影) */
    --md-elevation-1: 0 2px 1px -1px rgba(0,0,0,.2), 0 1px 1px 0 rgba(0,0,0,.14), 0 1px 3px 0 rgba(0,0,0,.12);
    --md-elevation-2: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
    --md-elevation-4: 0 2px 4px -1px rgba(0,0,0,.2), 0 4px 5px 0 rgba(0,0,0,.14), 0 1px 10px 0 rgba(0,0,0,.12);
    --md-elevation-8: 0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12);
}
body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--md-background);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: var(--md-on-surface);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.container {
    max-width: 1400px;
    margin: 0 auto;
}
/* 登录/注册表单 */
.auth-container {
    max-width: 520px;
    margin: 120px auto;
    background: var(--md-surface);
    padding: 48px;
    border-radius: 4px;
    box-shadow: var(--md-elevation-8);
}
.auth-container h1 {
    text-align: center;
    margin-bottom: 32px;
    color: var(--md-on-surface);
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 0.15px;
}
.form-group {
    margin-bottom: 24px;
    position: relative;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--md-on-surface-secondary);
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.4px;
}
.form-group input,
.form-group select {
    width: 100%;
    padding: 16px 12px;
    border: 1px solid var(--md-divider);
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--md-surface);
    font-family: inherit;
    color: var(--md-on-surface);
}
/* 手机号输入框特殊样式 */
.form-group input[type="tel"] {
    font-size: 18px;
    letter-spacing: 2px;
    font-weight: 500;
    min-width: 200px;
}
.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23757575' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--md-primary);
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}
.form-group input:hover,
.form-group select:hover {
    border-color: var(--md-on-surface);
}
/* 手机号输入组布局 */
.phone-input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
}
.phone-input-group input {
    flex: 1 1 auto;
    min-width: 250px;
    margin: 0;
}
.phone-input-group .btn-send-code {
    min-width: 110px;
    width: auto;
    padding: 16px 20px;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 14px;
    text-transform: none;
    letter-spacing: 0;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--md-primary);
    color: var(--md-on-primary);
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.75px;
    box-shadow: var(--md-elevation-2);
    position: relative;
    overflow: hidden;
}
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}
.btn:hover::before {
    width: 300px;
    height: 300px;
}
.btn:hover {
    background: var(--md-primary-dark);
    box-shadow: var(--md-elevation-4);
}
.btn:active {
    box-shadow: var(--md-elevation-1);
}
.btn-secondary {
    background: transparent;
    color: var(--md-primary);
    border: none;
    box-shadow: none;
}
.btn-secondary:hover {
    background: rgba(25, 118, 210, 0.08);
    box-shadow: none;
}
.btn-danger {
    background: var(--md-error);
    color: var(--md-on-primary);
}
.btn-danger:hover {
    background: #d32f2f;
}
.btn-success {
    background: var(--md-success);
    color: var(--md-on-primary);
}
.btn-success:hover {
    background: #388e3c;
}
.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: #666;
}
.auth-switch a {
    color: var(--text-primary);
    cursor: pointer;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s;
    border-bottom: 1px solid transparent;
}
.auth-switch a:hover {
    border-bottom-color: var(--text-primary);
}
/* 主界面 */
.main-container {
    display: none;
    min-height: 100vh;
}
.main-container.active {
    display: flex;
}
/* 侧边栏 */
.sidebar {
    width: 256px;
    background: var(--sidebar-bg);
    min-height: 100vh;
    padding: 0;
    box-shadow: var(--md-elevation-2);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}
.sidebar::-webkit-scrollbar {
    width: 8px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: var(--md-divider);
    border-radius: 4px;
}
.sidebar-header {
    padding: 24px 16px;
    background: var(--md-primary);
    color: var(--md-on-primary);
}
.sidebar-header h1 {
    color: var(--md-on-primary);
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: 0.15px;
}
.user-info-sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    color: rgba(255, 255, 255, 0.87);
    font-size: 14px;
}
.user-info-sidebar .badge {
    width: fit-content;
}
.user-info-sidebar strong {
    color: var(--md-on-primary);
    font-weight: 500;
}
/* 侧栏主导航（分组可折叠，勿与主内容区 .tabs 混用） */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 8px 0 12px;
    overflow-y: auto;
    gap: 0;
}
.sidebar-group {
    margin: 0 10px 10px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--sidebar-group-surface);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
}
.sidebar-group:first-of-type {
    margin-top: 4px;
}
.sidebar-group:last-of-type {
    margin-bottom: 4px;
}
.sidebar-group-summary {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    margin: 0;
    background: var(--sidebar-group-header-bg);
    border: none;
    cursor: pointer;
    text-align: left;
    color: var(--md-on-surface);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.35px;
    text-transform: none;
    user-select: none;
}
.sidebar-group-summary:hover {
    background: var(--sidebar-group-header-hover);
    color: var(--md-on-surface);
}
.sidebar-group-title-text {
    flex: 1;
    line-height: 1.35;
}
.sidebar-group-chevron {
    font-size: 22px !important;
    width: 22px !important;
    height: 22px !important;
    color: var(--md-primary);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.sidebar-group[data-expanded="false"] .sidebar-group-chevron {
    transform: rotate(-90deg);
}
.sidebar-group[data-expanded="false"] .sidebar-group-body {
    display: none;
}
.sidebar-group-body {
    display: flex;
    flex-direction: column;
    padding: 4px 0 8px;
    background: var(--sidebar-group-body-bg);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.sidebar-group-body .tab {
    padding-left: 16px;
    padding-right: 12px;
}
.sidebar-nav .tab {
    font-size: 14px;
    font-weight: 500;
}
.tab {
    padding: 16px 24px 16px 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--md-on-surface-secondary);
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    width: 100%;
    letter-spacing: 0.25px;
    position: relative;
    white-space: nowrap;
}
.tab .material-icons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    flex-grow: 0;
    line-height: 1;
    margin: 0;
    padding: 0;
    vertical-align: middle;
}
.tab > span:not(.material-icons) {
    align-items: center;
    line-height: 2.5;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}
.tab:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--md-on-surface);
}
.tab.active {
    background: transparent;
    color: var(--md-on-surface-secondary);
    font-weight: 500;
}
.sidebar-nav .tab:hover {
    background: transparent;
    color: var(--md-primary-dark);
}
.sidebar-nav .tab.active {
    background: transparent;
    color: var(--md-primary-dark);
    font-weight: 600;
}
.sidebar-nav .tab.active .material-icons {
    color: var(--md-primary);
}
/* 用户信息和修改密码页面居中 */
#profileTab,
#passwordTab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}
#profileTab #profileAlert,
#passwordTab #passwordAlert {
    width: 100%;
    max-width: 600px;
}
/* 主内容区 */
.main-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    margin-left: 256px;
    min-height: 100vh;
}
.header {
    background: var(--md-surface);
    padding: 24px;
    margin-bottom: 24px;
    border-radius: 4px;
    box-shadow: var(--md-elevation-1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header h1 {
    color: var(--md-on-surface);
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 0.15px;
}
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}
.user-info span {
    color: #666;
}
.logout-btn {
    padding: 16px 24px 16px 16px;
    background: transparent;
    color: var(--md-on-surface-secondary);
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.25px;
    text-align: left;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    width: 100%;
    letter-spacing: 0.25px;
    position: relative;
    white-space: nowrap;
}
.logout-btn .material-icons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    flex-grow: 0;
    line-height: 1;
    margin: 0;
    padding: 0;
    vertical-align: middle;
}
.logout-btn > span:not(.material-icons) {
    display: inline-block;
    align-items: center;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.logout-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--md-on-surface);
}
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.badge-admin {
    background: rgba(255, 152, 0, 0.12);
    color: #f57c00;
}
.badge-staff {
    background: rgba(123, 31, 162, 0.12);
    color: #7b1fa2;
}
.badge-user {
    background: rgba(33, 150, 243, 0.12);
    color: #1976d2;
}
.badge-active {
    background: rgba(76, 175, 80, 0.12);
    color: #388e3c;
}
.badge-inactive {
    background: rgba(158, 158, 158, 0.12);
    color: #616161;
}
.badge-disabled {
    background: rgba(244, 67, 54, 0.12);
    color: #d32f2f;
}
.badge-success {
    background: rgba(76, 175, 80, 0.12);
    color: #388e3c;
}
.badge-failed {
    background: rgba(244, 67, 54, 0.12);
    color: #d32f2f;
}
/* 问题反馈状态 */
.badge-pending {
    background: rgba(255, 152, 0, 0.12);
    color: #f57c00;
}
.badge-processing {
    background: rgba(33, 150, 243, 0.12);
    color: #1976d2;
}
.badge-resolved {
    background: rgba(76, 175, 80, 0.12);
    color: #388e3c;
}
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.tab {
    padding: 10px 20px;
    background: #f8f9fa;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}
.tab.active {
    background: #667eea;
    color: white;
}
.content {
    background: var(--md-surface);
    padding: 24px;
    border-radius: 4px;
    box-shadow: var(--md-elevation-1);
    min-height: calc(100vh - 200px);
}
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--md-surface);
    color: var(--md-on-surface);
    padding: 24px;
    border-radius: 4px;
    box-shadow: var(--md-elevation-2);
    text-align: left;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.stat-card:hover {
    box-shadow: var(--md-elevation-4);
    transform: translateY(-2px);
}
.stat-card h3 {
    font-size: 34px;
    font-weight: 400;
    margin-bottom: 8px;
    letter-spacing: 0.25px;
    color: var(--md-primary);
}
.stat-card p {
    color: var(--md-on-surface-secondary);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.25px;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 24px;
    background: var(--md-surface);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--md-elevation-1);
}
table th,
table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--md-divider);
}
table th {
    background: var(--md-background);
    font-weight: 500;
    color: var(--md-on-surface-secondary);
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
table tbody tr {
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
table tbody tr:hover {
    background: rgba(0, 0, 0, 0.04);
}
table tbody tr:last-child td {
    border-bottom: none;
}
.actions {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: flex-start;
    align-items: center;
    white-space: nowrap;
    width: max-content;
    max-width: none;
    box-sizing: border-box;
}
/* 含操作按钮的列：仅占内容宽度，宽屏下不把多余空间分给该列 */
table:has(.actions) > thead > tr > th:last-child,
table td.actions {
    width: 0.01%;
    white-space: nowrap;
    vertical-align: middle;
}
/* .actions 默认是 inline-flex；在表内须为 table-cell，否则列宽错位、表头背景铺不满 */
table thead th.actions,
table tbody td.actions {
    display: table-cell;
    vertical-align: middle;
}
.actions .btn-sm {
    flex-shrink: 0;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}
.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}
.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    width: auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 64px;
}
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.modal.active {
    display: flex;
    animation: fadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
.modal.active .modal-content {
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.modal-content {
    background: var(--md-surface);
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 4px;
    box-shadow: var(--md-elevation-8);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.modal-header h2 {
    color: var(--md-on-surface);
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.15px;
}
/* 用户详情页样式 */
.detail-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--md-divider);
    min-height: 40px;
}
.detail-row:last-child {
    border-bottom: none;
}
.detail-label {
    flex-shrink: 0;
    width: 120px;
    color: var(--md-on-surface-secondary);
    font-size: 14px;
    font-weight: 500;
    margin-right: 16px;
}
.detail-value {
    flex: 1;
    color: var(--md-on-surface);
    font-size: 14px;
    word-break: break-word;
}
.detail-value-secondary {
    color: var(--md-on-surface-secondary);
    font-size: 13px;
}
.close {
    font-size: 24px;
    cursor: pointer;
    color: var(--md-on-surface-secondary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.close:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--md-on-surface);
}
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.pagination button {
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--md-on-surface-secondary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
}
.pagination button:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.04);
    color: var(--md-on-surface);
}
.pagination button.active {
    background: var(--md-primary);
    color: var(--md-on-primary);
}
.pagination button:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}
.alert {
    padding: 16px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 400;
    border-radius: 4px;
    letter-spacing: 0.25px;
}
.alert-success {
    background: rgba(76, 175, 80, 0.12);
    color: #2e7d32;
}
.alert-error {
    background: rgba(244, 67, 54, 0.12);
    color: #c62828;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    .main-content {
        margin-left: 200px;
        padding: 40px 32px;
    }
    .header h1 {
        font-size: 24px;
    }
    .stats {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .search-box {
        width: 100%;
    }
    table {
        font-size: 12px;
    }
    table th,
    table td {
        padding: 16px 0;
    }
    /* 手机号输入组响应式 */
    .phone-input-group {
        flex-direction: column;
        gap: 12px;
    }
    .phone-input-group input {
        min-width: 100%;
    }
    .phone-input-group .btn-send-code {
        width: 100%;
        min-width: 100%;
    }
}
/* 滚动条样式 */
.main-content::-webkit-scrollbar,
.content::-webkit-scrollbar {
    width: 8px;
}
.main-content::-webkit-scrollbar-track,
.content::-webkit-scrollbar-track {
    background: transparent;
}
.main-content::-webkit-scrollbar-thumb,
.content::-webkit-scrollbar-thumb {
    background: var(--md-divider);
    border-radius: 4px;
}
.main-content::-webkit-scrollbar-thumb:hover,
.content::-webkit-scrollbar-thumb:hover {
    background: var(--md-on-surface-secondary);
}
.search-box {
    padding: 12px 16px;
    border: 1px solid var(--md-divider);
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--md-surface);
    width: 300px;
    font-family: inherit;
    color: var(--md-on-surface);
}
.search-box:focus {
    outline: none;
    border-color: var(--md-primary);
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}
.action-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    align-items: center;
    flex-wrap: wrap;
}
/* 我的模版 — 分层树 */
.my-templates-tree-root {
    background: var(--md-surface);
    border-radius: 4px;
    box-shadow: var(--md-elevation-1);
    padding: 16px 20px;
}
.my-templates-tree {
    list-style: none;
    padding: 0;
    margin: 0;
}
.my-templates-tree ul.my-templates-tree {
    padding-left: 1.25rem;
    margin: 6px 0 0 0;
    border-left: 1px solid var(--md-divider);
}
.my-templates-li {
    margin: 4px 0;
}
.my-templates-folder {
    border-radius: 4px;
}
.my-templates-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    cursor: pointer;
    list-style: none;
    padding: 4px 0;
}
.my-templates-summary::-webkit-details-marker {
    display: none;
}
.my-templates-folder-icon,
.my-templates-leaf-icon {
    font-size: 20px;
    vertical-align: middle;
    color: var(--md-primary);
    flex-shrink: 0;
}
.my-templates-summary-actions,
.my-templates-item-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}
.my-templates-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    padding: 6px 0;
}
.my-templates-li-leaf {
    padding-left: 2px;
}

/* 我的模版 — 标签模版表格：固定布局与列宽，避免表头在宽屏下被 0.01% 操作列拉散 */
table.my-label-templates-table {
    table-layout: fixed;
    width: 100%;
}
table.my-label-templates-table thead th {
    text-transform: none;
    letter-spacing: normal;
    font-size: 13px;
}
table.my-label-templates-table th,
table.my-label-templates-table td {
    vertical-align: middle;
}
table.my-label-templates-table thead th:nth-child(1) {
    width: 16%;
}
table.my-label-templates-table thead th:nth-child(2) {
    width: 20%;
}
table.my-label-templates-table thead th:nth-child(3) {
    width: 24%;
}
table.my-label-templates-table thead th:nth-child(4),
table.my-label-templates-table thead th:nth-child(5) {
    width: 13%;
}
/* 覆盖全局 table:has(.actions) th:last-child 的 width:0.01%，否则整表列宽异常 */
table.my-label-templates-table thead > tr > th.actions,
table.my-label-templates-table tbody td.actions {
    width: 14%;
    min-width: 88px;
    box-sizing: border-box;
}
table.my-label-templates-table tbody td:nth-child(1),
table.my-label-templates-table tbody td:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
table.my-label-templates-table tbody td:nth-child(3) {
    word-break: break-word;
    overflow-wrap: anywhere;
    font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
    font-size: 12px;
}
table.my-label-templates-table tbody td:nth-child(4),
table.my-label-templates-table tbody td:nth-child(5) {
    white-space: nowrap;
    font-size: 13px;
}

.btn-group {
    display: flex;
    gap: 8px;
}
/* Material Design 输入框样式优化 */
.form-group input[type="date"] {
    padding: 16px 12px;
}
/* Material Design 卡片样式 */
.card {
    background: var(--md-surface);
    border-radius: 4px;
    box-shadow: var(--md-elevation-2);
    padding: 24px;
    margin-bottom: 24px;
    transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.card:hover {
    box-shadow: var(--md-elevation-4);
}
/* 问题反馈样式 */
.description-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.description-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 200px;
    overflow-y: auto;
    padding: 12px;
    background: var(--md-background);
    border-radius: 4px;
    line-height: 1.6;
}
.content-header {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    align-items: center;
    flex-wrap: wrap;
}
.filter-box select {
    padding: 12px 16px;
    border: 1px solid var(--md-divider);
    border-radius: 4px;
    font-size: 14px;
    background: var(--md-surface);
    font-family: inherit;
    color: var(--md-on-surface);
    cursor: pointer;
}
.detail-group {
    margin-bottom: 16px;
}
.detail-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--md-on-surface-secondary);
    font-weight: 500;
    font-size: 13px;
}
.detail-group span,
.detail-group div {
    color: var(--md-on-surface);
}
.detail-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--md-divider);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    color: var(--md-on-surface);
    resize: vertical;
    min-height: 100px;
}
.detail-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--md-divider);
    border-radius: 4px;
    font-size: 14px;
    background: var(--md-surface);
    font-family: inherit;
    color: var(--md-on-surface);
}

/* ==================== 问题反馈页面优化样式 ==================== */

/* 页面头部 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--md-divider);
}

.page-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 400;
    color: var(--md-on-surface);
}

/* 保留 page-header 样式以备其他页面使用 */

/* 筛选栏 */
.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
}

.filter-bar .search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--md-divider);
    border-radius: 8px;
    font-size: 14px;
    background: var(--md-surface);
    font-family: inherit;
    color: var(--md-on-surface);
    transition: all 0.2s;
}

.filter-bar .search-input:focus {
    outline: none;
    border-color: var(--md-primary);
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.filter-bar .filter-select {
    padding: 12px 16px;
    border: 1px solid var(--md-divider);
    border-radius: 8px;
    font-size: 14px;
    background: var(--md-surface);
    font-family: inherit;
    color: var(--md-on-surface);
    cursor: pointer;
    min-width: 140px;
}

.filter-bar .btn {
    width: 150px;
    flex-shrink: 0;
}

/* 表格包装器 */
.table-wrapper {
    background: var(--md-surface);
    border-radius: 8px;
    box-shadow: var(--md-elevation-1);
    overflow: hidden;
}

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

.feedback-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.feedback-table thead th {
    color: white;
    font-weight: 500;
    padding: 16px 12px;
    text-align: left;
    border-bottom: none;
}

.feedback-table tbody tr {
    border-bottom: 1px solid var(--md-divider);
    transition: background-color 0.2s;
}

.feedback-table tbody tr:hover {
    background-color: var(--md-background);
}

.feedback-table tbody td {
    padding: 14px 12px;
    vertical-align: middle;
}

/* 反馈行样式 */
.feedback-row {
    border-left: 3px solid transparent;
}

/* 根据状态设置不同的左边框颜色 */
.feedback-row[data-status="pending"] {
    border-left-color: #f57c00;
}

.feedback-row[data-status="processing"] {
    border-left-color: #1976d2;
}

.feedback-row[data-status="resolved"] {
    border-left-color: #388e3c;
}

.feedback-row .device-id {
    color: var(--md-primary);
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.feedback-row .contact-cell {
    color: var(--md-on-surface-secondary);
}

.feedback-row .text-muted {
    color: var(--md-on-surface-secondary);
}

.feedback-row .small {
    font-size: 12px;
}

.feedback-row .description-cell {
    max-width: 350px;
}

.description-text {
    color: var(--md-on-surface);
    line-height: 1.5;
    max-width: 350px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--md-background);
    color: var(--md-on-surface-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--md-divider);
    color: var(--md-on-surface);
}

.btn-view:hover {
    background: rgba(25, 118, 210, 0.1);
    color: var(--md-primary);
}

.btn-delete:hover {
    background: rgba(244, 67, 54, 0.1);
    color: var(--md-error);
}

/* 模态框优化 */
.feedback-modal {
    max-width: 800px;
}

.feedback-modal .modal-icon {
    font-size: 28px;
    vertical-align: middle;
    margin-right: 8px;
}

.modal-header h2 {
    display: flex;
    align-items: center;
    margin: 0;
    font-size: 20px;
    font-weight: 500;
}

/* 信息区域 */
.info-section {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--md-background);
    border-radius: 8px;
}

.content-section {
    margin-bottom: 24px;
}

.action-section {
    margin-bottom: 24px;
}

.section-title {
    display: flex;
    align-items: center;
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--md-on-surface);
}

.section-title .material-icons {
    margin-right: 8px;
    font-size: 20px;
    color: var(--md-primary);
}

/* 信息网格 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

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

.info-item label {
    font-size: 12px;
    color: var(--md-on-surface-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 14px;
    color: var(--md-on-surface);
}

.info-value.small {
    font-size: 13px;
    color: var(--md-on-surface-secondary);
}

.info-value.device-id-value {
    font-family: 'Courier New', monospace;
    color: var(--md-primary);
    font-weight: 500;
}

/* 模态框描述内容 */
.modal-description {
    max-height: 200px;
    overflow-y: auto;
    padding: 16px;
    background: var(--md-surface);
    border-radius: 8px;
    line-height: 1.6;
    color: var(--md-on-surface);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 表单网格 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

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

.form-item.full-width {
    grid-column: 1 / -1;
}

.form-item label {
    font-size: 13px;
    font-weight: 500;
    color: var(--md-on-surface-secondary);
}

.form-control {
    padding: 12px;
    border: 1px solid var(--md-divider);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: var(--md-on-surface);
    background: var(--md-surface);
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--md-primary);
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.form-control::placeholder {
    color: var(--md-on-surface-secondary);
}

/* 响应式 */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .filter-bar .search-input {
        width: 100%;
    }

    .filter-bar .filter-select {
        width: 100%;
    }

    .feedback-table {
        font-size: 12px;
    }

    .feedback-table thead th,
    .feedback-table tbody td {
        padding: 10px 8px;
    }

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

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

    .description-text {
        max-width: 200px;
    }
}