* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f1f5f9;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    transition: background 0.2s;
}

/* 全局容器 & 卡片样式 */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 28px;
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.1);
    padding: 28px 24px;
    transition: all 0.2s;
}

/* 登录页专用窄卡 */
.login-card {
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
    padding: 36px 28px;
}

/* 列表/编辑公用头部 */
.page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    gap: 16px;
}

.page-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    background: linear-gradient(135deg, #1e293b, #2c3e66);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.btn {
    border: none;
    background: #eef2ff;
    padding: 10px 20px;
    border-radius: 60px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.btn-primary {
    background: #2563eb;
    color: white;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #1e293b;
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.btn-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.btn-danger:hover {
    background: #fecaca;
}

/* 表格/列表 自适应布局 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 16px 12px;
    border-bottom: 1px solid #e9edf2;
}

.data-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #1e2a3e;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.action-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.edit-btn, .delete-btn {
    background: none;
    border: none;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 40px;
    font-weight: 500;
    transition: 0.1s;
}
.edit-btn {
    background: #e6f0ff;
    color: #2563eb;
}
.delete-btn {
    background: #ffe9e9;
    color: #dc2626;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}
label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #0f172a;
}
input, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cfdee9;
    border-radius: 20px;
    font-size: 1rem;
    font-family: inherit;
    transition: 0.2s;
    background: #ffffff;
}
input:focus, textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}
textarea {
    resize: vertical;
    min-height: 80px;
}
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
}

/* 空状态 & 提示 */
.empty-row td {
    text-align: center;
    padding: 48px 16px;
    color: #64748b;
}

/* 移动端优化: 卡片式表格 */
@media (max-width: 680px) {
    body {
        padding: 12px;
    }
    .card {
        padding: 20px 16px;
    }
    .login-card {
        padding: 28px 20px;
    }
    /* 表格转卡片 (移动端更友好) */
    .data-table thead {
        display: none;
    }
    .data-table, .data-table tbody, .data-table tr, .data-table td {
        display: block;
        width: 100%;
    }
    .data-table tr {
        margin-bottom: 20px;
        border: 1px solid #eef2f6;
        border-radius: 24px;
        padding: 12px 0;
        background: white;
        box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    }
    .data-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 16px;
        border-bottom: 1px dashed #edf2f7;
        text-align: right;
    }
    .data-table td:last-child {
        border-bottom: none;
    }
    .data-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #334155;
        text-align: left;
        flex: 1;
        font-size: 0.85rem;
    }
    .action-btns {
        justify-content: flex-end;
        width: 100%;
    }
    .page-header h1 {
        font-size: 1.5rem;
    }
}

/* 页面切换动画简单过渡 */
.page {
    transition: opacity 0.2s ease;
}
.hidden {
    display: none;
}

/* 消息提示条 */
.toast-msg {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 0.85rem;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    white-space: nowrap;
}
@media (max-width: 480px) {
    .toast-msg {
        white-space: normal;
        text-align: center;
        max-width: 90%;
        font-size: 0.75rem;
    }
}