* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #f0f2f5;
}
#toolbar {
    height: 48px;
    background: #2b3a67;
    color: #fff;
    line-height: 48px;
    padding: 0 20px;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
#main { flex: 1; display: flex; overflow: hidden; }
#sidebar {
    width: 180px;
    background: #fff;
    border-right: 1px solid #e8e8e8;
    padding-top: 8px;
}
.nav {
    padding: 14px 20px;
    cursor: pointer;
    border-left: 3px solid transparent;
    color: #595959;
    font-size: 14px;
    transition: all 0.2s;
}
.nav:hover { background: #f5f5f5; color: #1890ff; }
.nav.active { background: #e6f7ff; border-left-color: #1890ff; color: #1890ff; font-weight: 500; }
#content { flex: 1; padding: 20px; overflow: auto; }

.page-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 16px;
    color: #262626;
}
.card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.card h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: #262626;
    border-left: 4px solid #1890ff;
    padding-left: 10px;
}

.form-row { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.form-row label { min-width: 80px; color: #595959; font-size: 14px; }
input, select {
    padding: 6px 10px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    min-width: 160px;
    outline: none;
}
input:focus, select:focus { border-color: #1890ff; }
button {
    background: #1890ff;
    color: #fff;
    border: none;
    padding: 7px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}
button:hover { background: #40a9ff; }
button.secondary { background: #fff; color: #595959; border: 1px solid #d9d9d9; }
button.secondary:hover { color: #1890ff; border-color: #1890ff; }
button.danger { background: #ff4d4f; }
button.danger:hover { background: #ff7875; }
button.success { background: #52c41a; }
button.success:hover { background: #73d13d; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 8px;
}
th, td { border: 1px solid #f0f0f0; padding: 10px 12px; text-align: left; }
th { background: #fafafa; color: #262626; font-weight: 600; }
tr:hover { background: #fafafa; }
.status-normal { color: #52c41a; font-weight: 500; }
.status-lost { color: #ff4d4f; font-weight: 500; }
.status-maintain { color: #faad14; font-weight: 500; }
.status-offline { color: #8c8c8c; font-weight: 500; }
.status-on { color: #1890ff; font-weight: 500; }
.status-off { color: #8c8c8c; font-weight: 500; }

.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat-box {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.stat-box .number { font-size: 28px; font-weight: bold; color: #1890ff; }
.stat-box .label { color: #8c8c8c; font-size: 14px; margin-top: 4px; }

#toast {
    position: fixed;
    top: 60px;
    right: 20px;
    padding: 10px 20px;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
#toast.success { background: #52c41a; }
#toast.error { background: #ff4d4f; }

.result-box {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    border-radius: 4px;
    padding: 12px 16px;
    margin-top: 12px;
    color: #389e0d;
}
.error-box {
    background: #fff1f0;
    border: 1px solid #ffa39e;
    border-radius: 4px;
    padding: 12px 16px;
    margin-top: 12px;
    color: #cf1322;
}
