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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f4f6f9;
    color: #333;
    min-height: 100vh;
}

/* 布局 */
.layout {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 260px;
    background: #1a1a2e;
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar-brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-brand svg {
    width: 28px;
    height: 28px;
    stroke: #e94560;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: #aaa;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    margin-bottom: 4px;
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(233, 69, 96, 0.15);
    color: #e94560;
}

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}

.sidebar-footer span {
    color: #888;
}

.logout-btn {
    background: rgba(233, 69, 96, 0.2);
    border: none;
    color: #e94560;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: #e94560;
    color: white;
}

/* 主内容 */
.main {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
    max-width: 1000px;
}

.page-header {
    margin-bottom: 28px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.page-header p {
    color: #888;
    font-size: 14px;
}

/* 卡片 */
.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: 1px solid #eee;
}

.card-header {
    margin-bottom: 20px;
}

.card-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.card-header p {
    font-size: 13px;
    color: #999;
}

/* 添加表单 */
.add-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.form-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-size: 13px;
    font-weight: 500;
    color: #666;
}

.form-field input {
    padding: 10px 14px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
    font-family: inherit;
}

.form-field input:focus {
    border-color: #e94560;
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.08);
}

.form-action {
    flex: 0 0 auto;
}

.form-action label {
    visibility: hidden;
}

.btn-primary {
    padding: 10px 24px;
    background: #e94560;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-primary:hover:not(:disabled) {
    background: #ff6b81;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary .spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* 表格 */
.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead th {
    text-align: left;
    padding: 12px 16px;
    color: #888;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #f0f0f0;
}

.data-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #f8f8f8;
    color: #555;
}

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

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.empty-row td {
    text-align: center;
    color: #aaa;
    padding: 40px;
}

.btn-delete {
    background: #fff0f0;
    border: none;
    color: #e94560;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-delete:hover {
    background: #e94560;
    color: white;
}

/* 提示条 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1000;
    transform: translateX(120%);
    transition: transform 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    background: #e94560;
}

.toast.success {
    background: #52c41a;
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    .layout {
        flex-direction: column;
    }
    .main {
        margin-left: 0;
        padding: 20px;
    }
    .form-row {
        flex-direction: column;
        align-items: stretch;
    }
    .form-action label {
        display: none;
    }
}
