* {
    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: #f5f7fa;
    line-height: 1.6;
}

a { color: #1890ff; text-decoration: none; }
a:hover { color: #40a9ff; }

.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    width: 400px;
    max-width: 90vw;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 8px;
}

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

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color .3s, box-shadow .3s;
    background: #fff;
}

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

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

.form-error {
    color: #ff4d4f;
    font-size: 13px;
    margin-bottom: 12px;
    min-height: 20px;
}

.btn {
    display: inline-block;
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all .3s;
    text-align: center;
}

.btn-primary { background: #1890ff; color: #fff; }
.btn-primary:hover { background: #40a9ff; color: #fff; }
.btn-success { background: #52c41a; color: #fff; }
.btn-success:hover { background: #73d13d; color: #fff; }
.btn-warning { background: #faad14; color: #fff; }
.btn-warning:hover { background: #ffc53d; color: #fff; }
.btn-danger { background: #ff4d4f; color: #fff; }
.btn-danger:hover { background: #ff7875; color: #fff; }
.btn-secondary { background: #f0f0f0; color: #333; }
.btn-secondary:hover { background: #d9d9d9; }
.btn-block { width: 100%; padding: 12px; font-size: 16px; }
.btn-sm { padding: 4px 12px; font-size: 12px; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

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

.sidebar {
    width: 220px;
    background: #001529;
    color: #fff;
    flex-shrink: 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

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

.sidebar-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.sidebar-header p {
    font-size: 12px;
    color: rgba(255,255,255,.6);
    margin-top: 4px;
}

.sidebar-menu {
    list-style: none;
    padding: 8px 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    color: rgba(255,255,255,.8);
    transition: all .3s;
    font-size: 14px;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: #1890ff;
    color: #fff;
}

.sidebar-menu .icon {
    width: 18px;
    text-align: center;
}

.main-content {
    flex: 1;
    margin-left: 220px;
    min-height: 100vh;
}

.topbar {
    background: #fff;
    padding: 0 24px;
    height: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    position: sticky;
    top: 0;
    z-index: 99;
}

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

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

.notification-badge {
    position: relative;
    cursor: pointer;
    padding: 6px;
}

.notification-badge .count {
    position: absolute;
    top: 0;
    right: 0;
    background: #ff4d4f;
    color: #fff;
    font-size: 11px;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.content-area {
    padding: 24px;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.stat-card .label {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
}

.stat-card .value {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.stat-card .sub {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    margin-bottom: 20px;
}

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

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

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;
    font-size: 13px;
}

table tr:hover {
    background: #fafafa;
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 4px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.pagination button {
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.pagination button.active {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

.pagination button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 12px;
    width: 560px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 12px 48px rgba(0,0,0,.2);
}

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

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    padding: 4px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.progress-bar {
    background: #f0f0f0;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    position: relative;
}

.progress-bar .fill {
    height: 100%;
    border-radius: 10px;
    transition: width .3s;
    background: linear-gradient(90deg, #1890ff, #36cfc9);
}

.progress-bar .text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state p {
    margin-top: 12px;
}

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

.search-box {
    display: flex;
    gap: 8px;
}

.search-box input {
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    width: 240px;
}

.search-box input:focus {
    outline: none;
    border-color: #1890ff;
}

.notification-panel {
    display: none;
    position: fixed;
    top: 56px;
    right: 16px;
    width: 360px;
    max-height: 480px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0,0,0,.15);
    z-index: 200;
    overflow-y: auto;
}

.notification-panel.active {
    display: block;
}

.notification-panel .item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background .3s;
}

.notification-panel .item:hover {
    background: #fafafa;
}

.notification-panel .item.unread {
    background: #e6f7ff;
}

.notification-panel .item .title {
    font-weight: 500;
    font-size: 13px;
    color: #333;
}

.notification-panel .item .time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.filter-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.filter-tabs button {
    padding: 6px 16px;
    border: 1px solid #d9d9d9;
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all .3s;
}

.filter-tabs button.active {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .topbar { padding: 0 16px; }
    .content-area { padding: 16px; }
    .search-box input { width: 160px; }
}
