/* ============================================ */
/*  内网IP管理系统 - 全局样式                    */
/* ============================================ */

/* ==================== 基础重置 ==================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    color: #333;
    background: linear-gradient(135deg, #e8ecf1 0%, #f0f2f5 50%, #e4e8ee 100%);
    background-attachment: fixed;
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: #1890ff;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #40a9ff;
}

ul, ol {
    list-style: none;
}

::selection {
    background: #1890ff;
    color: #fff;
}

/* ==================== 登录页面 ==================== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 40px;
    animation: fadeInUp 0.5s ease;
}

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

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

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

.login-form .form-group {
    margin-bottom: 20px;
}

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

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.15);
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.login-footer p {
    font-size: 12px;
    color: #999;
}

/* ==================== 按钮 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    line-height: 1.5;
    color: #555;
    background: #fff;
    white-space: nowrap;
}

.btn:hover {
    color: #1890ff;
    border-color: #1890ff;
}

.btn:active {
    transform: scale(0.97);
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.15);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(24, 144, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #40a9ff 0%, #1890ff 100%);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
    transform: translateY(-1px);
}

.btn-success {
    color: #fff;
    background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(82, 196, 26, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #73d13d 0%, #52c41a 100%);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(82, 196, 26, 0.4);
    transform: translateY(-1px);
}

.btn-warning {
    color: #fff;
    background: linear-gradient(135deg, #faad14 0%, #d48806 100%);
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(250, 173, 20, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ffc53d 0%, #faad14 100%);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(250, 173, 20, 0.4);
    transform: translateY(-1px);
}

.btn-danger {
    color: #fff;
    background: linear-gradient(135deg, #ff4d4f 0%, #cf1322 100%);
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(255, 77, 79, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ff7875 0%, #ff4d4f 100%);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(255, 77, 79, 0.4);
    transform: translateY(-1px);
}

.btn-block {
    display: flex;
    width: 100%;
    padding: 10px 16px;
    font-size: 16px;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 4px;
}

.btn-link {
    color: #1890ff;
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
}

.btn-link:hover {
    color: #40a9ff;
    background: none;
    transform: none;
    box-shadow: none;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ==================== 提示信息 ==================== */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeInDown 0.3s ease;
}

.alert-error {
    color: #cf1322;
    background-color: #fff1f0;
    border: 1px solid #ffa39e;
}

.alert-warning {
    color: #d46b08;
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
}

.alert-success {
    color: #389e0d;
    background-color: #f6ffed;
    border: 1px solid #b7eb8f;
}

.alert-info {
    color: #096dd9;
    background-color: #e6f7ff;
    border: 1px solid #91d5ff;
}

.alert-icon {
    font-size: 16px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.alert-success .alert-icon {
    background: #b7eb8f;
    color: #fff;
}

.alert-error .alert-icon {
    background: #ffa39e;
    color: #fff;
}

.alert-warning .alert-icon {
    background: #ffe58f;
    color: #d46b08;
}

.alert-info .alert-icon {
    background: #91d5ff;
    color: #fff;
}

/* ==================== 表格 ==================== */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.data-table th {
    background-color: #fafafa;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table tbody tr {
    transition: background-color 0.2s ease;
}

.data-table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.data-table tbody tr:hover {
    background-color: #e6f7ff;
}

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

.data-table .actions {
    white-space: nowrap;
    text-align: center;
}

.data-table .actions .btn-sm {
    margin: 1px 2px;
}

/* ==================== 状态标签 ==================== */
.status-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
}

.status-free {
    color: #096dd9;
    background: #e6f7ff;
    border: 1px solid #91d5ff;
}

.status-used {
    color: #389e0d;
    background: #f6ffed;
    border: 1px solid #b7eb8f;
}

.status-reserved {
    color: #d46b08;
    background: #fff7e6;
    border: 1px solid #ffd591;
}

/* ==================== 角色标签 ==================== */
.role-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.role-admin {
    color: #cf1322;
    background: #fff1f0;
    border: 1px solid #ffa39e;
}

.role-user {
    color: #096dd9;
    background: #e6f7ff;
    border: 1px solid #91d5ff;
}

/* ==================== 操作日志标签 ==================== */
.log-action {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.log-action-login { color: #096dd9; background: #e6f7ff; border: 1px solid #91d5ff; }
.log-action-logout { color: #555; background: #f5f5f5; border: 1px solid #d9d9d9; }
.log-action-create { color: #389e0d; background: #f6ffed; border: 1px solid #b7eb8f; }
.log-action-update { color: #d46b08; background: #fff7e6; border: 1px solid #ffd591; }
.log-action-delete { color: #cf1322; background: #fff1f0; border: 1px solid #ffa39e; }

.log-value {
    font-size: 12px;
    color: #666;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.log-value-empty {
    color: #ccc;
    font-style: italic;
}

/* ==================== 在线状态指示器 ==================== */
.online-dot,
.ping-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    vertical-align: middle;
}

.online-dot.online,
.ping-dot.online {
    background-color: #52c41a;
    box-shadow: 0 0 6px rgba(82, 196, 26, 0.6);
}

.online-dot.offline,
.ping-dot.offline {
    background-color: #d9d9d9;
}

.online-dot.loading,
.ping-dot.pinging {
    background-color: #1890ff;
    animation: ping-pulse 1s infinite;
}

@keyframes ping-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.8); }
}

/* ==================== Ping状态 ==================== */
.ping-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 12px;
}

.ping-status.online {
    background: #f6ffed;
    color: #389e0d;
    border: 1px solid #b7eb8f;
}

.ping-status.offline {
    background: #fff1f0;
    color: #cf1322;
    border: 1px solid #ffa39e;
}

.ping-status.pinging {
    background: #e6f7ff;
    color: #096dd9;
    border: 1px solid #91d5ff;
}

.ping-latency {
    font-size: 12px;
    color: #888;
    margin-left: 4px;
}

/* ==================== 分页 ==================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
    padding: 16px 0;
}

.pagination-info {
    text-align: center;
    font-size: 13px;
    color: #888;
    margin-top: 12px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 13px;
    color: #555;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.page-link:hover {
    color: #1890ff;
    border-color: #1890ff;
    z-index: 1;
}

.page-link.active {
    color: #fff;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(24, 144, 255, 0.3);
}

.page-link.disabled {
    color: #d9d9d9;
    cursor: not-allowed;
    background: #f5f5f5;
    border-color: #d9d9d9;
}

.page-link.disabled:hover {
    color: #d9d9d9;
    border-color: #d9d9d9;
}

.page-link.dots {
    border: none;
    background: none;
    cursor: default;
    color: #999;
}

/* ==================== 表单控件 ==================== */
.form-group {
    margin-bottom: 16px;
}

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

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
    background: #fff;
}

.form-control:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.12);
}

.form-control[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

select.form-control {
    appearance: auto;
}

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

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

.form-hint {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.inline-form {
    display: inline;
}

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

.sidebar {
    width: 220px;
    background: linear-gradient(180deg, #001529 0%, #002140 100%);
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

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

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

.sidebar-nav {
    padding: 8px 0;
    flex: 1;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 14px;
    transition: all 0.25s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-nav a.active {
    color: #fff;
    background: rgba(24, 144, 255, 0.15);
    border-left-color: #1890ff;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

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

.topbar-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #666;
}

.content-area {
    padding: 24px;
    flex: 1;
}

/* ==================== 工具栏 ==================== */
.toolbar {
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.toolbar .filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.toolbar .filter-group label {
    font-size: 14px;
    color: #555;
    white-space: nowrap;
}

.toolbar .filter-group select {
    min-width: 200px;
}

/* ==================== 统计卡片 ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

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

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

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

/* ==================== 搜索栏 ==================== */
.search-bar {
    background: #fff;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.search-bar .form-group {
    margin-bottom: 0;
}

/* ==================== 子网链接 ==================== */
.subnet-link {
    color: #1890ff;
    font-weight: 500;
    transition: color 0.2s;
}

.subnet-link:hover {
    color: #40a9ff;
    text-decoration: underline;
}

/* ==================== 进度条 ==================== */
.progress-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-bar {
    flex: 1;
    height: 10px;
    background: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    min-width: 80px;
}

.progress-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.4s ease;
}

.progress-fill.low {
    background: linear-gradient(90deg, #52c41a, #73d13d);
}

.progress-fill.mid {
    background: linear-gradient(90deg, #faad14, #ffc53d);
}

.progress-fill.high {
    background: linear-gradient(90deg, #ff4d4f, #ff7875);
}

.progress-text {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    min-width: 36px;
    text-align: right;
}

/* ==================== VLAN标签 ==================== */
.vlan-tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 12px;
    background: #f0f5ff;
    color: #2f54eb;
    border: 1px solid #d6e4ff;
}

/* ==================== 模态框 ==================== */
.modal-overlay {
    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(2px);
}

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

.modal-overlay.active .modal {
    animation: modalIn 0.3s ease;
}

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

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

.modal-header h3 {
    font-size: 16px;
    color: #333;
    margin: 0;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
    background: #f5f5f5;
}

.modal-body {
    padding: 24px;
}

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

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #999;
    animation: fadeIn 0.4s ease;
}

.empty-state .empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-state .empty-text {
    font-size: 15px;
    color: #aaa;
}

/* ==================== 运维工具 ==================== */
.tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.tool-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.tool-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tool-card-header h3 {
    font-size: 15px;
    color: #333;
    margin: 0;
}

.tool-card-header .tool-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.tool-icon.calc {
    background: #e6f7ff;
    color: #1890ff;
}

.tool-icon.ping {
    background: #f6ffed;
    color: #52c41a;
}

.tool-card-body {
    padding: 20px;
}

/* ==================== 结果表格 ==================== */
.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.result-table th,
.result-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
}

.result-table th {
    background: #fafafa;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    width: 120px;
}

.result-table td {
    font-family: 'Consolas', 'Monaco', monospace;
    color: #333;
}

.result-table tr:last-child td,
.result-table tr:last-child th {
    border-bottom: none;
}

/* ==================== 历史记录 ==================== */
.history-list {
    margin-top: 16px;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
}

.history-list .history-title {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item .h-ip {
    font-family: 'Consolas', 'Monaco', monospace;
    color: #333;
}

.history-item .h-time {
    color: #999;
    font-size: 12px;
}

.history-item .h-status {
    display: flex;
    align-items: center;
    gap: 4px;
}

.history-item .h-latency {
    color: #888;
    font-size: 12px;
}

.empty-history {
    text-align: center;
    color: #999;
    font-size: 13px;
    padding: 20px 0;
}

/* ==================== 表单内联分组 ==================== */
.form-inline-group {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.form-inline-group .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* ==================== 计算器辅助 ==================== */
.mask-hint {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.calc-error {
    color: #ff4d4f;
    font-size: 13px;
    margin-top: 8px;
    display: none;
}

.calc-error.show {
    display: block;
}

/* ==================== 固定宽度表格列 ==================== */
.col-id { width: 60px; text-align: center; }
.col-ip { width: 140px; font-family: 'Consolas', 'Monaco', monospace; }
.col-status { width: 80px; text-align: center; }
.col-actions { width: 120px; text-align: center; }

/* ==================== 动画关键帧 ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== 工具类 ==================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.pull-right { float: right; }

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

/* ============================================ */
/*  响应式布局                                    */
/* ============================================ */

@media (max-width: 992px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
        overflow: visible;
    }

    .sidebar-header {
        padding: 16px 10px;
    }

    .sidebar-header h2,
    .sidebar-nav a span {
        display: none;
    }

    .sidebar-nav a {
        justify-content: center;
        padding: 12px 10px;
        border-left: none;
        border-bottom: 2px solid transparent;
    }

    .sidebar-nav a.active {
        border-left-color: transparent;
        border-bottom-color: #1890ff;
    }

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

    .search-bar {
        flex-direction: column;
    }

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

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar .filter-group {
        flex-wrap: wrap;
    }

    .toolbar .filter-group select {
        min-width: 0;
        flex: 1;
    }

    .data-table {
        font-size: 13px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 8px;
    }

    .content-area {
        padding: 16px;
    }

    .topbar {
        padding: 10px 16px;
    }

    .form-inline-group {
        flex-direction: column;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 4px;
    }

    .page-link {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .page-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        flex-wrap: wrap;
        top: auto;
    }

    .sidebar-header {
        padding: 10px 16px;
        border-bottom: none;
        flex-shrink: 0;
    }

    .sidebar-header h2 {
        display: block;
        font-size: 14px;
    }

    .sidebar-nav {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar-nav a {
        flex-shrink: 0;
        padding: 10px 12px;
        font-size: 13px;
        border-left: none;
        border-bottom: 2px solid transparent;
    }

    .sidebar-nav a.active {
        border-left-color: transparent;
        border-bottom-color: #1890ff;
    }

    .sidebar-nav a span {
        display: inline;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card-value {
        font-size: 24px;
    }

    .data-table th,
    .data-table td {
        padding: 6px 6px;
        font-size: 12px;
    }

    .data-table .actions .btn-sm {
        padding: 3px 6px;
        font-size: 11px;
    }

    .content-area {
        padding: 12px;
    }

    .topbar {
        padding: 8px 12px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .topbar-title {
        font-size: 14px;
    }

    .topbar-user {
        font-size: 12px;
        gap: 8px;
    }

    .toolbar {
        gap: 8px;
    }

    .toolbar .filter-group label {
        font-size: 13px;
    }

    .search-bar {
        padding: 12px;
    }

    .pagination {
        gap: 3px;
    }

    .page-link {
        min-width: 28px;
        height: 28px;
        font-size: 11px;
        padding: 0 6px;
    }

    .modal {
        width: 96%;
        max-width: none;
    }

    .modal-header {
        padding: 12px 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-footer {
        padding: 10px 16px;
    }

    .form-row {
        gap: 10px;
    }

    .empty-state {
        padding: 40px 16px;
    }

    .empty-state .empty-icon {
        font-size: 40px;
    }

    .tools-grid {
        gap: 16px;
    }

    .tool-card-body {
        padding: 16px;
    }

    .alert {
        padding: 10px 12px;
        font-size: 13px;
    }
}
